Execute and recheck complete Phase 2 research operations (P2-08-A) #640

Merged
erikinkinen merged 5 commits from phase2/p2-08-a-operation-replay into main 2026-10-20 21:45:30 +02:00
Owner

Task

Closes #97. Plan ID: P2-08-A.

Summary

Execute all Phase 2 research actions through real core operations and reconstruct the complete research state from their outcomes. Replay re-executes each payload and compares clocks, IDs, outcome, delta and actual measured work; saved deltas never drive execution.

Scope

Add the staged research Runtime, explicit unhashed OperationEvidence, actual measured holder movement, shared primitive access checks and complete operation replay. Reconstruct policy, grants, D, all observation/view stores, pending replies, handle authorization, clocks and cursors. Preserve all seven legacy mechanism behaviors, including experimentally relevant incomplete withdrawal results. Tests cover all 11 actions and 7 intents.

Design intent

Expected denial commits prescribed reservations and work. Hard errors discard the staged operation. Policy cohorts are independently derived before resolution and never supplied to a resolver. Observation responses must match fresh actual reads; retaining K charges its real reads/writes. MoveHolder preserves issuance identity, validity and immutable birth roles while keeping physical adjacency order canonical.

The previous authority oracle's moved-holder defect is fixed separately in #638 / PR #639; this branch integrates that correction and adds actual primitive/oracle conformance. PR #639 must merge first.

Phase discipline

OperationEvidence deliberately excludes version, serialization and digest. It is the operation portion extracted from v4 events. Complete event hash verification and finalization, the separate D digest, 128-epoch snapshots and compressed-log resume remain P2-08-B. Per-operation replay checks pending queries; complete replay also rejects historical query-ID reuse. Immutable tape validation remains P2-09. This implementation does not claim Phase 3 observation semantics or modeled recovery.

Verification

All 65 CTests pass at signed source d9836b1d083e505e6207a062c088e3cc1eb640c7 in Debug, Release and Clang ASan/UBSan. The runtime fixture exercises 1,408 accepted primary operations and 54 rejected inputs/evidence, with additional complete and incremental replay copies. Hand-derived counters, unchanged legacy fixtures, all eight local hooks and frozen protocol/source checks pass.

Negative fixtures reject forged resolver outcomes, internally conserved false costs, deltas, replies and cohorts without mutation. Tests cover unbound/reserved missing handles, retirement, moves, rights changes, actor lifecycles, all observation kinds, high-bit identities/masks, last legal allocations and overflow. A common fixed request schedule runs across all seven mechanisms. The original actual-move oracle probe now passes and reports current-holder access correctly.

Exact-source JUnit, build logs, toolchains and actual-move probe evidence. Acceptance and input/output hashes are recorded in artifacts/backlog/2.2.1/P2-08-A/.

All eight final-head Forgejo checks and prior merge of PR #639 are required before checking the single issue step once and merging. These are implementation fixtures; no scientific campaign or manuscript acceptance is claimed.

## Task Closes #97. Plan ID: P2-08-A. ## Summary Execute all Phase 2 research actions through real core operations and reconstruct the complete research state from their outcomes. Replay re-executes each payload and compares clocks, IDs, outcome, delta and actual measured work; saved deltas never drive execution. ## Scope Add the staged research Runtime, explicit unhashed OperationEvidence, actual measured holder movement, shared primitive access checks and complete operation replay. Reconstruct policy, grants, D, all observation/view stores, pending replies, handle authorization, clocks and cursors. Preserve all seven legacy mechanism behaviors, including experimentally relevant incomplete withdrawal results. Tests cover all 11 actions and 7 intents. ## Design intent Expected denial commits prescribed reservations and work. Hard errors discard the staged operation. Policy cohorts are independently derived before resolution and never supplied to a resolver. Observation responses must match fresh actual reads; retaining K charges its real reads/writes. MoveHolder preserves issuance identity, validity and immutable birth roles while keeping physical adjacency order canonical. The previous authority oracle's moved-holder defect is fixed separately in #638 / PR #639; this branch integrates that correction and adds actual primitive/oracle conformance. PR #639 must merge first. ## Phase discipline OperationEvidence deliberately excludes version, serialization and digest. It is the operation portion extracted from v4 events. Complete event hash verification and finalization, the separate D digest, 128-epoch snapshots and compressed-log resume remain P2-08-B. Per-operation replay checks pending queries; complete replay also rejects historical query-ID reuse. Immutable tape validation remains P2-09. This implementation does not claim Phase 3 observation semantics or modeled recovery. ## Verification All 65 CTests pass at signed source `d9836b1d083e505e6207a062c088e3cc1eb640c7` in Debug, Release and Clang ASan/UBSan. The runtime fixture exercises 1,408 accepted primary operations and 54 rejected inputs/evidence, with additional complete and incremental replay copies. Hand-derived counters, unchanged legacy fixtures, all eight local hooks and frozen protocol/source checks pass. Negative fixtures reject forged resolver outcomes, internally conserved false costs, deltas, replies and cohorts without mutation. Tests cover unbound/reserved missing handles, retirement, moves, rights changes, actor lifecycles, all observation kinds, high-bit identities/masks, last legal allocations and overflow. A common fixed request schedule runs across all seven mechanisms. The original actual-move oracle probe now passes and reports current-holder access correctly. [Exact-source JUnit, build logs, toolchains and actual-move probe evidence](https://git.erikinkinen.fi/attachments/b4e670ba-de3e-4d23-91af-ec71a44133f0). Acceptance and input/output hashes are recorded in `artifacts/backlog/2.2.1/P2-08-A/`. All eight final-head Forgejo checks and prior merge of PR #639 are required before checking the single issue step once and merging. These are implementation fixtures; no scientific campaign or manuscript acceptance is claimed.
erikinkinen added this to the Phase 2 milestone 2026-10-20 21:37:31 +02:00
Phase 2: retain source identity and follow moved access holders (#638)
All checks were successful
markdownlint / markdown-lint (pull_request) Successful in 14s
clang-format / check-format (pull_request) Successful in 31s
ci / sanitizers (pull_request) Successful in 4m53s
ci / smoke (pull_request) Successful in 4m57s
markdownlint / markdown-lint (push) Successful in 18s
clang-format / check-format (push) Successful in 37s
ci / sanitizers (push) Successful in 7m1s
ci / smoke (push) Successful in 7m4s
1429d55367
Record validated P2-08-A operation execution and replay evidence
All checks were successful
markdownlint / markdown-lint (pull_request) Successful in 20s
clang-format / check-format (pull_request) Successful in 39s
ci / smoke (pull_request) Successful in 7m31s
ci / sanitizers (pull_request) Successful in 7m33s
markdownlint / markdown-lint (push) Successful in 14s
clang-format / check-format (push) Successful in 26s
ci / smoke (push) Successful in 3m6s
ci / sanitizers (push) Successful in 3m22s
6f395749f9
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!640
No description provided.