Phase 2: Measure actual resolver and mutation work #624

Merged
erikinkinen merged 2 commits from phase2/p2-06-a-resolver-mutation-counters into main 2026-10-20 18:08:35 +02:00
Owner

Task

Closes #90 (P2-06-A); contributes to #89.

Summary

Measure actual semantic record accesses in all seven legacy resolvers and revocation mutations. Snapshot enumeration, unsuccessful lookups, traversal frontiers, deletion scan positions and repeated lazy markers now produce an explicit measured vector while legacy estimates keep their original values.

Scope

Included

  • Opt-in measured resolver/core/Engine entry points with an immediate-revocation bucket.
  • Terminal capability, relation and validity charges inside actual resolver and mutation paths.
  • Optional validation access traces and observed queue/stack high-water marks.
  • Hand-derived vectors, failure/compatibility tests and source-pinned acceptance evidence.

Explicitly excluded

  • Access/delegation and manager-observation instrumentation, owned by P2-06-B.
  • The combined conservation gate in P2-06-C, versioned export and production campaigns.

Design intent

A terminal helper owns each access charge. Actual rereads count again; cached fields do not. Whole-record and version-only operations receive one category, and independent index copies count separately. Legacy reporting, staging, oracles and validation do not receive a mechanism meter. Existing resolver interfaces remain available; an external resolver without instrumentation explicitly rejects measured calls instead of silently reporting zero.

Phase discipline

Measured and unmeasured execution use the same local algorithms and preserve identical legacy state/event bytes. Only the new stream exposes actual work. Unsupported measured actions fail explicitly until their implementation is accepted. Failed primitives retain diagnostic meter contents but no accepted event or authority mutation.

Verification

All 50 CTests pass at the source commit in Debug, Release and Clang 22 ASan/UBSan. Analytical chain and star vectors match every strategy, including direct/snapshot differences in enumeration and leaf-first lineage index scans. Tests also cover overlapping and duplicate selectors, empty adjacency, missing roots, repeated/existing markers, failed batches, bucket misuse and uninstrumented resolvers. Per-kind access traces reconstruct the vector and total work. Full snapshot bytes, old target/cost fields and all 31 archived legacy cases remain equal. All hooks and the scope lock pass.

Commands, toolchain identities, logs and JUnit evidence are pinned in artifacts/backlog/2.2.1/P2-06-A/acceptance.json. All eight exact-head Forgejo checks are required before the single issue checklist item is updated and the PR merged.

# Task Closes #90 (P2-06-A); contributes to #89. ## Summary Measure actual semantic record accesses in all seven legacy resolvers and revocation mutations. Snapshot enumeration, unsuccessful lookups, traversal frontiers, deletion scan positions and repeated lazy markers now produce an explicit measured vector while legacy estimates keep their original values. ## Scope ### Included - Opt-in measured resolver/core/Engine entry points with an immediate-revocation bucket. - Terminal capability, relation and validity charges inside actual resolver and mutation paths. - Optional validation access traces and observed queue/stack high-water marks. - Hand-derived vectors, failure/compatibility tests and source-pinned acceptance evidence. ### Explicitly excluded - Access/delegation and manager-observation instrumentation, owned by P2-06-B. - The combined conservation gate in P2-06-C, versioned export and production campaigns. ## Design intent A terminal helper owns each access charge. Actual rereads count again; cached fields do not. Whole-record and version-only operations receive one category, and independent index copies count separately. Legacy reporting, staging, oracles and validation do not receive a mechanism meter. Existing resolver interfaces remain available; an external resolver without instrumentation explicitly rejects measured calls instead of silently reporting zero. ## Phase discipline Measured and unmeasured execution use the same local algorithms and preserve identical legacy state/event bytes. Only the new stream exposes actual work. Unsupported measured actions fail explicitly until their implementation is accepted. Failed primitives retain diagnostic meter contents but no accepted event or authority mutation. ## Verification All 50 CTests pass at the source commit in Debug, Release and Clang 22 ASan/UBSan. Analytical chain and star vectors match every strategy, including direct/snapshot differences in enumeration and leaf-first lineage index scans. Tests also cover overlapping and duplicate selectors, empty adjacency, missing roots, repeated/existing markers, failed batches, bucket misuse and uninstrumented resolvers. Per-kind access traces reconstruct the vector and total work. Full snapshot bytes, old target/cost fields and all 31 archived legacy cases remain equal. All hooks and the scope lock pass. [Commands, toolchain identities, logs and JUnit evidence](https://git.erikinkinen.fi/attachments/a72caf10-c263-459f-8d9c-cb9ccb1def2b) are pinned in `artifacts/backlog/2.2.1/P2-06-A/acceptance.json`. All eight exact-head Forgejo checks are required before the single issue checklist item is updated and the PR merged.
erikinkinen added this to the Phase 2 milestone 2026-10-20 17:52:39 +02:00
Phase 2: Record P2-06-A measured revocation acceptance (#90)
All checks were successful
clang-format / check-format (pull_request) Successful in 24s
markdownlint / markdown-lint (pull_request) Successful in 25s
ci / smoke (pull_request) Successful in 3m36s
ci / sanitizers (pull_request) Successful in 3m38s
markdownlint / markdown-lint (push) Successful in 16s
clang-format / check-format (push) Successful in 20s
ci / sanitizers (push) Successful in 2m31s
ci / smoke (push) Successful in 2m32s
196cc91247
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erikinkinen/AES!624
No description provided.