Execute and recheck complete Phase 2 research operations (P2-08-A) #640
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!640
Loading…
Reference in a new issue
No description provided.
Delete branch "phase2/p2-08-a-operation-replay"
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 #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
d9836b1d083e505e6207a062c088e3cc1eb640c7in 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.