Phase 2: Define measured work and packed-storage contracts #622
No reviewers
Labels
No labels
bug
cli
core
docs
event
experiment
figure
invariant
metrics
oracle
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
provenance
revocation
tests
workload
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erikinkinen/AES!622
Loading…
Reference in a new issue
No description provided.
Delete branch "phase2/p2-05-operation-counters"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task
Closes #88 (P2-05).
Summary
Define the measured work unit before instrumentation: ten unsigned record-access counters with fixed unit weights, explicit invocation/bucket ownership, actual frontier peaks and abstract packed-storage accounting. Overflow and duplicate invocation charges fail without partially changing accounting state.
Scope
Included
Explicitly excluded
Design intent
An invocation belongs to one bucket and is committed once under its event/ordinal key. Nested helpers share its meter. Reads include unsuccessful lookups; iteration counts returned records, and cached field use does not add a read. Queue/stack peaks use observed entry counts. Packed storage uses declared model widths, including the 56-byte token estimate, independently of host allocation or prototype wire formats.
Phase discipline
Oracle, analytical-history, validation and analysis work stay outside mechanism W. Existing outputs retain their bytes and meanings. Meter contracts cannot certify correct instrumentation by themselves; P2-06 must verify actual call sites against hand-counted traces.
Verification
All 48 CTests pass at the source commit in Debug, Release and Clang 22 ASan/UBSan. Tests check counter positions, field/aggregate overflow, duplicate ownership across buckets, atomic failures, zero-work records, conservation, frontier maxima, all packed widths and frozen layout/count updates. All hooks and archived legacy compatibility fixtures pass.
Commands, logs and JUnit evidence are pinned in
artifacts/backlog/2.2.1/P2-05/acceptance.json. All eight exact-head Forgejo checks are required before checklist update and merge.Notes
Reviewing mutation integration exposed the separate preexisting revocation atomicity defect #621. This contract-only change does not modify those paths; the defect is being repaired before fallible instrumentation is connected to them.