# S1 Delegation Assessment

## Fresh SAME-SLICE S1 execution-semantics/revision remediation — 2026-09-24

This tactical WorkGraph covers only the remaining S1 operation-state lifecycle defect. It does not open S2 or any other slice. `docs/CORE_ARCHITECTURE_V2.md` remains the sole normative target and is unchanged.

### Verified source truth and frozen remediation contract

- Preflight used the shared campaign workspace `wks_acd4f78471467297` and matches the campaign snapshot: branch `core-architecture-v2`, HEAD `7e01ac84e6ea14b1444301fa6eb16a08d2bf3128`, 37 tracked modifications and 7 pre-existing untracked S1 paths. The existing candidate and controller-fencing work is preserved.
- The approved DAG was reread: candidate truth and controller fencing precede S1; S1 precedes S2, S3, and S5 and supplies identity inputs for S7, S10, and S12. Nothing outside this S1 remediation is authorized. Prerequisite evidence was rerun: `npx vitest run tests/candidateIdentity.test.ts tests/security/controllerFencing.test.ts` — 2 files and 12 tests passed.
- `saveOperation` initializes `operationExecutionRevision` for a newly created record. Loading an existing v2 record preserves an absent value. Candidate binding and `bindOperationExecutionSemantics` already reject absent/invalid revisions with an unsupported-revision error.
- `waveExecutor` is the only production caller of `bindOperationExecutionSemantics`; it computes a canonical semantics digest after candidate, epoch, and planner inputs are resolved. Preserve the current first-bind and same-digest identity behavior. Its lifecycle event advances append-only `recordRevision`; that event-order behavior remains intact.
- The only generic mutation aliases are `patchOperation` (`operation.updated`), `patchOperationMetadata` (`operation.metadata`), and `updateOperationMetadata` (callback under `operation.metadata`). None owns execution identity. `updateOperationMetadata` receives the loaded object itself, so a pre-callback snapshot is required for both absent/present state and scalar identity comparisons.
- `assertExecutionIdentityTransition` currently guards frozen policy and complete canonical participant bindings, but does not guard `executionSemanticsDigest`. Its execution-revision check runs only when the post-callback `current.operationExecutionRevision` is defined, so it misses both generic synthesis from absence and callback alias mutation. A generic future digest can therefore make the following owning bind take its same-digest return without revision advance or invalidation.
- Candidate assembly continues to own candidate revision advancement and clears frozen policy and participant bindings. Controller takeover continues to own epoch advancement and clears policy/bindings; takeover does not advance `operationExecutionRevision`.

Frozen contract before source changes:

1. Only `operation.execution-semantics.bound` may create, replace, or clear `executionSemanticsDigest`. Generic patch/update paths reject add, replacement, clear, and in-place callback mutation; each rejection leaves durable bytes unchanged.
2. The first valid semantics digest binds without advancing `operationExecutionRevision`; binding the exact digest again leaves execution identity unchanged. The operation event still follows the existing append-only `recordRevision` behavior.
3. Replacing an already-bound digest through its owner advances `operationExecutionRevision` exactly once and clears the frozen policy and every participant execution binding. Generic preemption cannot make a later owner call look like a same-digest no-op.
4. `operationExecutionRevision` is initialized only during operation creation. If absent on an existing durable record, it remains absent; generic mutation cannot synthesize it, and execution/candidate-binding boundaries fail with the explicit unsupported-revision error. If present, generic paths cannot add, replace, clear, or mutate it; only candidate binding and an actual changed-semantics owner transition may increment it exactly once. Routine stage and metadata events cannot alter it.
5. Snapshot revision presence/value and semantics-digest presence/value, plus the already guarded complete canonical policy and participant-binding identities, before invoking any callback. Compare the snapshot to the returned record, not to a callback-mutated alias. Preserve the existing candidate, takeover, policy, binding, and record-event lifecycle behavior.

### Tactical WorkGraph and Delegation Assessment

| WorkUnit | Dependencies | Scope and owner | Mechanism | Classification | Acceptance evidence |
| --- | --- | --- | --- | --- | --- |
| S1-ER-WU1 Freeze lifecycle contract; inspect candidate/takeover ownership and all semantics/update callers | Existing candidate truth and controller-fencing foundation | Luna owns source/caller inspection, the above contract, and this assessment before production-source edits. | DETERMINISTIC | LUNA_OWNED | Allowed events and exact transitions are fixed; current production callers fit them; no normative-target decision is needed. |
| S1-ER-WU2 Add focused regressions for generic digest preemption/add/replace/clear/alias, absent-revision generic synthesis/alias, first bind, same-digest bind, changed-digest increment and policy/binding invalidation | WU1 contract freeze | DeepSeek V4.1 Flash Implementer owns test-only changes to `tests/operations.test.ts` in an isolated Paseo worktree populated with this declared campaign snapshot. No production or documentation edits; no nested agents. | DETERMINISTIC | FLASH_DELEGATABLE | Regressions fail on the current bypass, preserve durable bytes after rejected mutations, and assert supported lifecycle behavior. |
| S1-ER-WU3 Integrate state-transition snapshots and owner rules | WU1 contract freeze; WU2 test return | Luna owns `src/operations/state.ts` integration because the guard shares lifecycle semantics with policy, bindings, candidate assembly, and takeover. | DETERMINISTIC | SEQUENTIAL_AFTER_CONTRACT_FREEZE | Tests pass; generic identity mutation cannot persist; actual owner transitions advance/invalidate exactly as specified; candidate/takeover behavior remains intact. |
| S1-ER-WU4 Review, run the requested S1 validation ladder, reconcile evidence | WU3 integration | Luna owns the complete diff and test review; focused S1, `npx tsc --noEmit`, `npm run build`, full non-system Vitest; evidence-only updates to affected STATUS, CONFORMANCE, and ENGINEERING_LEDGER rows. | DETERMINISTIC | LUNA_OWNED | Exact results are recorded; all S1 DoD items remain evidenced; deterministic results are not described as REAL_PROVIDER, browser, adversarial, or packed end-to-end certification. |

### Worker launch record

`list_profiles` was called before worker creation. The selected **DeepSeek V4.1 Flash Implementer** profile was materialized exactly as `provider: opencode`, `model: opencode-go/deepseek-v4.1-flash`, `modeId: build`, `thinkingOptionId: max`, and `features: { auto_accept: true }`. Paseo agent `00642b0a-071f-4b26-b95d-19dd09a93a9b` received WU2 in isolated workspace `wks_d86868e933e6bc6b`, worktree `/home/james/.paseo/worktrees/0jx5pvzi/s1-execution-semantics-flash-20260924`, branch `s1-execution-semantics-flash-20260924`. The worker edited only `tests/operations.test.ts`, created no agents, and made no commit or push.

The worker added five regression tests. On the unremediated campaign snapshot, `npx vitest run tests/operations.test.ts` reported 1 failed file, 4 failed and 29 passed tests; all failures were the intended generic semantics/revision bypass cases. The first-bind/same-digest event-order case passed. A worker scratch-copy cross-check with the proposed transition guard passed all 33 tests; that scratch change was not integrated. Luna reviewed and integrated the test-only diff, then the shared campaign checkout passed `npx vitest run tests/operations.test.ts` — 1 file, 33 tests passed.

The alias tests return `{ ...current }` after in-place scalar edits because `updateOperationMetadata` snapshots the spread result before invoking the updater; returning an empty patch does not propagate an in-place top-level scalar. Regressions therefore target mutations that reach the candidate record and require the durable pre-callback snapshot to reject them.

### Integrated guard and final deterministic evidence

- `mutateOperation` now snapshots execution-revision and semantics-digest presence/value, the complete canonical policy value, participant IDs, and complete canonical binding bodies before invoking a callback. Transition checks compare that immutable snapshot with the returned candidate record. Generic paths reject digest add/replace/clear/alias changes and revision add/replace/clear/alias changes; rejected updates leave the durable operation bytes unchanged.
- The absent-revision regression includes the Director's exact reproduction, `patchOperation(..., { operationExecutionRevision: 1 })`, plus generic patch/metadata/callback attempts with other values. It proves absence remains durable and that candidate binding and semantics binding fail with `UNSUPPORTED_OPERATION_EXECUTION_REVISION`.
- The future-digest regression proves generic D2 preemption fails without changing bytes; a first owner bind and exact repeat preserve operation execution identity; then the owning D2 replacement advances `operationExecutionRevision` once and clears the frozen policy and all participant bindings. Candidate assembly and controller takeover remain covered by the candidate/fencing suites.
- Prerequisites: `npx vitest run tests/candidateIdentity.test.ts tests/security/controllerFencing.test.ts` — 2 files passed, 12 tests passed.
- Focused S1: `npx vitest run tests/executionIdentity.test.ts tests/architectureWorkGraph.test.ts tests/agentPromptStructuredResultProvenance.test.ts tests/distributedExecutionIdentity.test.ts tests/structuredResultGateway.test.ts tests/knowledgeGate.test.ts tests/operations.test.ts tests/security/controllerFencing.test.ts tests/reviewerSerializationRecovery.test.ts tests/scale-governance.test.ts tests/paseoInitialTurnBarrier.test.ts tests/paseoSdk.test.ts tests/runtimeSessions.test.ts tests/paseoPendingExecutionIdentity.test.ts tests/workerExecutionAuthority.test.ts` — 15 files passed, 165 tests passed.
- `npx tsc --noEmit` — exit 0. `npm run build` — exit 0 (`release-1790243105007-1371422-c538d67d`). `npx vitest run --exclude 'tests/system/**'` — 149 files passed, 1 skipped; 773 tests passed, 7 skipped. Build-hygiene passed with missing-source-map notices.
- Evidence is deterministic contract/unit and build evidence. Direct, Podman, Paseo, and distributed transports are tested at captured adapter boundaries; no REAL_PROVIDER, browser, adversarial, container-service, or packed end-to-end certification is inferred. The normative architecture target is unchanged. The checkout remains on the expected HEAD without commits or pushes; independent Campaign Director closure remains pending.

## SAME-SLICE S1 callback-mutation follow-up — 2026-09-24

This is the active tactical assessment for the Director's remaining S1 finding. It supersedes the earlier S1 gate conclusion below for the current checkout; the earlier assessments remain as campaign history. Scope is limited to S1 — Frozen Execution & Skill Identity. The normative target `docs/CORE_ARCHITECTURE_V2.md` remains unchanged.

### Snapshot, dependency, DAG, and caller inspection

- The mandatory opening checks found branch `core-architecture-v2`, HEAD `7e01ac84e6ea14b1444301fa6eb16a08d2bf3128`, 37 modified tracked files, and the expected 7 pre-existing untracked S1 paths. The normative target has no diff. All campaign changes are preserved; no commit or push is made.
- The existing candidate-truth foundation is present: `bindOperationCandidate` advances `operationExecutionRevision`, clears the frozen policy and participant bindings, and is exercised by candidate/operation/gateway tests.
- The controller-fencing foundation is present: `claimControllerEpoch` advances the controller epoch and clears policy/bindings; `tests/security/controllerFencing.test.ts` checks that takeover invalidates an old binding and policy. Routine event revision and execution-semantics revision remain separate.
- The approved DAG was reread from STATUS: existing candidate truth and controller fencing precede S1; S1 precedes S2, S3, and S5, with no work in those slices authorized here.
- The frozen explicit binding lifecycle is `operation.participant.execution-bound` via `bindOperationParticipantExecution`; its callback validates the full v2 binding against the current participant, role, policy, candidate, execution revision, and epoch. Candidate assembly, controller takeover, and changed execution-semantics compilation are the only binding invalidation events.
- All production `updateOperationMetadata` call sites are metadata/notification, liveness, and completion updates. `updateOperationParticipant` callers update registration/status/result metadata. None needs generic binding creation or mutation.
- `mutateOperation` invokes custom callbacks with the mutable loaded record and then runs `assertExecutionIdentityTransition`. The policy guard already captures canonical policy text before the callback. The binding guard currently derives its baseline from the same mutable `current` object after the callback and compares a hash, so an in-place session-id mutation with the old declared binding digest aliases both sides and can pass.

### Frozen binding lifecycle contract

1. Before any mutation callback executes, capture an immutable snapshot containing the complete participant-ID set and each participant's optional execution-binding state. A binding is absent when no `ExecutionBindingV2` is present; when present, preserve its complete `canonicalSerialize(binding)` value. Do not use the declared binding digest or a hash as the transition comparison.
2. After the callback returns, compare every participant ID in the union of the pre-callback snapshot and `next.participants`. Read the previous state only from the snapshot and the following state only from `next`, preserving absent-versus-present binding semantics. This detects deletion, re-keying, or alias mutation of the callback's `current.participants` map.
3. Generic operation patch/update paths, including `updateOperationMetadata`, cannot add, replace, mutate, or clear a binding. In-place mutation of `runtime.sessionId` under a stale declared digest fails before durable persistence with `EXECUTION_BINDING_IMMUTABLE`.
4. Only `operation.participant.execution-bound` may create or replace exactly one binding; its resulting binding must pass `assertExecutionBindingV2` and the lifecycle's current role/policy/candidate/revision/epoch checks. It cannot clear a binding or change more than one participant binding.
5. `operation.candidate.bound`, `operation.controller.claimed`, and `operation.execution-semantics.bound` may only clear bindings as part of their owning invalidation. They may not add, replace, or mutate one. All other event types reject binding changes.
6. Preserve the complete pre-callback ResolvedOperationPolicy snapshot and all existing policy lifecycle checks. Do not alter `recordRevision` or `operationExecutionRevision` semantics.
7. Regression evidence must include stale-digest in-place session-id mutation through `updateOperationMetadata`, participant deletion/re-keying before callback return, and byte-for-byte unchanged durable operation JSON after each rejection. Existing positive explicit binding and candidate/takeover invalidation tests remain intact.

### Tactical WorkGraph — callback-mutation follow-up only

| WorkUnit | Depends on | Scope and ownership | Mechanism | Classification | Acceptance |
| --- | --- | --- | --- | --- | --- |
| S1-CB-WU1 Freeze binding-transition contract; verify prerequisites and callers | Existing candidate truth and controller-fencing foundation | Luna owns the read-only lifecycle/caller inspection and this contract freeze. No normative architecture decision or other slice is involved. | DETERMINISTIC | LUNA_OWNED | Snapshot shape, comparison set, canonical-value rule, lifecycle exceptions, failure boundary, and exact regression are fixed before source edits. |
| S1-CB-WU2 Add regression for stale-digest in-place session mutation, callback participant deletion/re-keying, and durable-file preservation | WU1 contract freeze | Flash owns only the bounded regression in `tests/operations.test.ts`, in a new isolated Paseo worktree populated with the declared S1 campaign snapshot. No production source or architecture changes. | DETERMINISTIC | FLASH_DELEGATABLE | The test fails against the current guard for the intended reason and proves rejected callbacks leave the durable record bytes unchanged. |
| S1-CB-WU3 Integrate the pre-callback binding snapshot into the state transition guard | WU1 contract freeze; WU2 regression return | Luna owns `src/operations/state.ts` because the guard shares the lifecycle boundary with frozen policy and candidate/epoch invalidations. Snapshot participant IDs plus optional complete canonical binding values before callback invocation; compare the union against `next`. Preserve each existing authorized event rule. | DETERMINISTIC | SEQUENTIAL_AFTER_CONTRACT_FREEZE | Regression passes; no generic binding mutation persists; explicit bind and all owning invalidations still pass. |
| S1-CB-WU4 Independently review, run the S1 validation ladder, and reconcile evidence | WU3 integration | Luna owns source/test review, focused identity/lifecycle/provenance/transport/fencing/skill-trust suites, TypeScript, build, full non-system Vitest, and evidence-only updates to affected STATUS, CONFORMANCE, and ENGINEERING_LEDGER rows. | DETERMINISTIC | LUNA_OWNED | Exact command results are recorded; the S1 DoD is checked against the current code; deterministic evidence is not described as provider certification. |

### Delegation materialization

`list_profiles` was called before worker creation. The selected profile was **DeepSeek V4.1 Flash Implementer**, materialized as `provider: opencode`, `model: opencode-go/deepseek-v4.1-flash`, `modeId: build`, `thinkingOptionId: max`, and `features: { auto_accept: true }`. Paseo worker `47bbd04e-d9f1-4929-baa7-233b6c7d5fa1` received S1-CB-WU2 only in workspace `wks_3305bca48271b614`, isolated worktree `/home/james/.paseo/worktrees/0jx5pvzi/s1-callback-mutation-flash-20260924`, branch `s1-callback-mutation-flash-20260924`. It did not create agents, edit production/docs, commit, or push. Its only diff was the two regression tests in `tests/operations.test.ts`.

### Follow-up outcome

- **Regression-first evidence:** in its isolated worktree, the worker ran `npx vitest run tests/operations.test.ts` before production integration: 1 file failed, 2 new regressions failed and 26 existing tests passed. Both intended failures resolved the callback instead of rejecting with `EXECUTION_BINDING_IMMUTABLE`. After integration, Luna ran the same command: 1 file passed, 28 tests passed.
- **Guard integration:** `src/operations/state.ts` snapshots the complete participant-ID set and each optional binding's complete canonical body before any custom callback. It compares IDs in the union of that snapshot and post-callback `next.participants`, using the snapshot for prior presence/body and `next` for following presence/body. Generic callback mutation, deletion/re-keying, and stale-digest body changes fail before persistence. The explicit validated bind lifecycle may create/replace exactly one binding; candidate assembly, takeover, and execution-semantics recompilation may only clear bindings. The pre-callback complete policy snapshot and record/execution-revision rules remain intact.
- **Durable-record regressions:** both callbacks retain the old declared digest while changing `runtime.sessionId`; one mutates in place and one also deletes the original participant key and re-keys it under an alias. Each test expects `EXECUTION_BINDING_IMMUTABLE`, compares the durable operation JSON bytes before/after, and verifies the loaded record and revision are unchanged.
- **Prerequisites:** `npx vitest run tests/candidateIdentity.test.ts tests/security/controllerFencing.test.ts` — 2 files passed, 12 tests passed.
- **Focused S1 validation:** `npx vitest run tests/executionIdentity.test.ts tests/architectureWorkGraph.test.ts tests/agentPromptStructuredResultProvenance.test.ts tests/distributedExecutionIdentity.test.ts tests/structuredResultGateway.test.ts tests/knowledgeGate.test.ts tests/operations.test.ts tests/security/controllerFencing.test.ts tests/reviewerSerializationRecovery.test.ts tests/scale-governance.test.ts tests/paseoInitialTurnBarrier.test.ts tests/paseoSdk.test.ts tests/runtimeSessions.test.ts tests/paseoPendingExecutionIdentity.test.ts tests/workerExecutionAuthority.test.ts` — 15 files passed, 160 tests passed.
- **Required repository validation:** `npx tsc --noEmit` — exit 0; `npm run build` — exit 0; `npx vitest run --exclude 'tests/system/**'` — 149 files passed, 1 skipped; 768 tests passed, 7 skipped. The full suite emitted missing-source-map notices in the packed build-hygiene test, which passed. Final `git diff --check` — clean.
- **Review and evidence boundary:** Luna independently inspected the integrated state guard, both regressions, and the complete campaign diff for identity propagation and removal of prior assertions. The v1 result/transport fixtures were migrated to the required full v2 binding contracts; no S1 rejection or lifecycle coverage was intentionally removed. Evidence is deterministic contract/unit and build evidence only. No REAL_PROVIDER, browser, adversarial/provider, container, or complete packed-journey certification is claimed. `CORE_ARCHITECTURE_V2.md` is unchanged. The shared checkout remains uncommitted, no push was made, and no S2 or other slice was started.

## Fresh S1 Director-restart assessment — 2026-09-24

This bounded repair remains within S1 — Frozen Execution & Skill Identity. It does not open another slice or amend the normative target.

### Snapshot, prerequisites, and caller inspection

- Verified branch `core-architecture-v2`, expected HEAD `7e01ac84e6ea14b1444301fa6eb16a08d2bf3128`, 37 modified tracked files, and the 7 existing untracked S1 campaign files. Counts and paths match the declared campaign state; no additional or unattributable path was present. All pre-existing work is preserved.
- Candidate truth and controller fencing are present in the campaign diff: `bindOperationCandidate` advances `operationExecutionRevision`, clears bindings and policy; `claimControllerEpoch` advances the controller epoch and clears bindings and policy. Existing tests assert candidate invalidation, takeover invalidation, and stale-result rejection.
- `bindOperationParticipantExecution` requires a previously registered participant with matching role/logical-agent identity, current policy, candidate, operation execution revision, and controller epoch. It is the explicit binding lifecycle.
- The four production callers of `updateOperationParticipant` update launch metadata/status, participant status, completed-result metadata, or a result artifact. None writes `executionBinding`. `registerOperationAgent` is the explicit participant-registration lifecycle where production callers need one.
- `updateOperationParticipant` currently upserts an absent participant and merges the generic patch. The transition guard compares binding digests only while iterating current participant keys. A new key carrying a binding therefore bypasses the guard. The fix is bounded to the transition guard and regression coverage; caller migration is not required because production callers do not write bindings.
- The normative target and current STATUS, CONFORMANCE, and LEDGER records were inspected. Candidate/takeover invalidation and explicit binding tests remain in scope for rerun. The normative `CORE_ARCHITECTURE_V2.md` remains unchanged.

### Frozen lifecycle contract for this repair

1. `operation.participant.execution-bound`, through `bindOperationParticipantExecution`, is the only event allowed to create or replace a participant's `ExecutionBindingV2`.
2. `operation.candidate.bound`, `operation.controller.claimed`, and `operation.execution-semantics.bound` may invalidate existing bindings as part of their owning lifecycle transition.
3. `operation.participant.updated` may update ordinary participant metadata, including its existing upsert behavior, but may not create, replace, mutate, or clear an execution binding. A fresh participant plus a binding in one generic patch must be rejected before persistence.
4. `assertExecutionIdentityTransition` compares the full canonical binding value over the union of participant IDs in the current and next records, so add/change/remove transitions cannot disappear from the guard's view even when a body field changes under a stale declared digest.
5. Only `operation.participant.execution-bound` may create or replace one binding, and every changed binding accepted there must pass `assertExecutionBindingV2`. Candidate assembly, controller takeover, and execution-semantics recompilation may only clear bindings; all other changed-binding transitions fail.
6. Tests must retain positive explicit lifecycle binding and candidate/takeover invalidation evidence; the generic patch rejection must not weaken those owning lifecycle paths.

### Tactical WorkGraph — this repair only

| WorkUnit | Depends on | Scope and ownership | Mechanism | Classification | Acceptance |
| --- | --- | --- | --- | --- | --- |
| S1-FR-WU1 Freeze state-transition contract and inspect callers | Verified candidate-truth and controller-fencing foundation | Inspect `src/operations/state.ts`, all `updateOperationParticipant` production callers, explicit binding, candidate assembly, takeover, and their tests. Freeze the lifecycle contract above and record this assessment before source edits. | DETERMINISTIC | LUNA_OWNED | Exact allowed bind and invalidation events are fixed; existing callers are shown not to require generic binding writes; no architecture decision is needed. |
| S1-FR-WU2 Close generic-updater bypass and add bounded regression coverage | WU1 contract freeze | `src/operations/state.ts` transition guard and `tests/operations.test.ts` only. Compare full canonical bindings across the union of participant IDs; reject a fresh generic binding and reject generic mutation/clearing of an existing binding, including mutation under its old digest. Validate every newly persisted binding. Do not edit normative architecture or broaden lifecycle semantics. | DETERMINISTIC | FLASH_DELEGATABLE | Generic patches cannot persist binding creation or changes; explicit binding still succeeds and validates; candidate and takeover invalidation still succeed and leave old results/bindings stale. |
| S1-FR-WU3 Integrate, review, validate, and reconcile evidence | WU2 return | Luna owns worktree-diff integration/conflict resolution, independent source and test review, exact prior focused S1 suite, required TypeScript/build/full non-system validation, and only evidence-backed STATUS/CONFORMANCE/LEDGER updates. | DETERMINISTIC | LUNA_OWNED | All required checks pass with exact counts recorded; all eight S1 gate items remain evidenced; no provider certification is inferred. |

The configured Flash profile was freshly read with `list_profiles` before worker creation. Exact materialized values: profile `DeepSeek V4.1 Flash Implementer`; `provider: opencode`; `model: opencode-go/deepseek-v4.1-flash`; `modeId: build`; `thinkingOptionId: max`; `featureValues: { auto_accept: true }`. The bounded worker used a separate Paseo worktree, did not create agents or edit `CORE_ARCHITECTURE_V2.md`, and made no commit or push. Luna retained contract authority, integration, final review, documentation, and acceptance.

### WU2 integration and final verification — 2026-09-24

- Paseo Flash agent `8a1d6895-c475-4c10-b453-65e8f3a8759b` implemented WU2 in workspace `wks_352a603f7dc9f645` at `/home/james/.paseo/worktrees/0jx5pvzi/s1-frozen-binding-guard-flash`. Launch profile values are recorded above. The worker changed only `src/operations/state.ts` and `tests/operations.test.ts`; no commit was made. It linked the sibling worktree's ignored `node_modules` to run its suites.
- The worker reproduced the bypass before its fix: `npx vitest run tests/operations.test.ts` — 1 failed, 18 passed. Its post-fix focused run was `npx vitest run tests/operations.test.ts tests/structuredResultGateway.test.ts tests/security/controllerFencing.test.ts` — 3 files and 43 tests passed; worker typecheck also passed. Two additional state-suite sweeps covered 39 importing suites: 24 files / 118 tests and 15 files / 76 tests passed.
- Luna independently integrated and reviewed the patch. `updateOperationParticipant` now excludes `executionBinding` from its TypeScript patch type. The durable transition guard fingerprints the full canonical binding over the union of current and next participant IDs; only one validated `operation.participant.execution-bound` add/replace is accepted, and candidate assembly, takeover, or semantics recompilation may only clear bindings. Other binding changes fail. Tests cover adding a fresh generic participant with a binding, replacement, clearing, same-digest body mutation, rejection of a malformed explicit binding, unchanged ordinary metadata updates, and unchanged candidate/takeover invalidation.
- Final focused S1 command: `npx vitest run tests/executionIdentity.test.ts tests/architectureWorkGraph.test.ts tests/agentPromptStructuredResultProvenance.test.ts tests/distributedExecutionIdentity.test.ts tests/structuredResultGateway.test.ts tests/knowledgeGate.test.ts tests/operations.test.ts tests/security/controllerFencing.test.ts tests/reviewerSerializationRecovery.test.ts tests/scale-governance.test.ts tests/paseoInitialTurnBarrier.test.ts tests/paseoSdk.test.ts tests/runtimeSessions.test.ts tests/paseoPendingExecutionIdentity.test.ts tests/workerExecutionAuthority.test.ts` — 15 files passed, 151 tests passed. `npx tsc --noEmit` — exit 0. `npm run build` — exit 0. `npx vitest run --exclude 'tests/system/**'` — 149 files passed, 1 skipped; 759 tests passed, 7 skipped. The packed build-hygiene tests passed with missing-source-map notices. Final `git diff --check` — clean.
- Evidence remains DETERMINISTIC CONTRACT/UNIT and build evidence. Adapter fixtures do not establish REAL_PROVIDER, browser, adversarial/provider, or complete packed-journey certification.

### S1 gate conclusion

All eight S1 items have deterministic implementation and test evidence recorded in the STATUS and CONFORMANCE documents. This conclusion closes only S1's frozen identity and adapter-boundary contract lane; the explicit provider and S5 lifecycle gaps remain open. No other slice was started.

## Earlier S1 remediation assessment — 2026-09-24 (superseded)

This record describes the preceding implementation pass. The Campaign Director rejected its CLOSED claim on the generic participant updater bypass recorded in the fresh assessment above. Its source and evidence history are retained; this record is not the active acceptance.

### Pre-edit snapshot and prerequisites

- Repository: `/home/james/Desarrollo/agentic-engineering-harness`; branch `core-architecture-v2`; `HEAD` is campaign base `7e01ac84e6ea14b1444301fa6eb16a08d2bf3128`.
- Before remediation edits, the tree had exactly 26 modified tracked files and four untracked files: `src/architecture/executionIdentity.ts`, `tests/executionIdentity.test.ts`, `tests/distributedExecutionIdentity.test.ts`, and this assessment. No reset, clean, checkout, commit, or push was run.
- Candidate-truth and controller-fencing prerequisites are present in the prior S1 diff: execution-semantic candidate changes advance `operationExecutionRevision` and invalidate participant execution identity; takeover increments the controller epoch and invalidates old-epoch bindings/authority. `tests/security/controllerFencing.test.ts`, candidate assembly code/tests, and operation-state code are the scoped verification points.
- The full normative target, status, conformance, and ledger were read. `CORE_ARCHITECTURE_V2.md` remains normative and will not be edited.
- Code inspection verified the Campaign Director's immutability finding: `compileExecutionBlueprint` creates `v2`, spreads it into mutable `expanded`, hashes that expanded object, and returns the new object without deep freezing it. `createExecutionBlueprintV2` does deep-freeze its own return.
- Code inspection verified actual-session gaps: fresh `resolveExecutionBinding` uses `launch:${participantGeneration}` before transport dispatch. OpenCode and Codex direct return ids parsed from JSON; Podman currently returns no id; Paseo returns its provider `agentId`. `runtimeInitialTurn.ts` already materializes/registers a managed Paseo agent before dispatching the first prompt, so it can freeze the returned id before semantic execution. The distributed worker executes remotely and returns a `WorkerSession`; its session id is not checked against the durable binding.
- Comparing `git show HEAD:tests/knowledgeGate.test.ts` to the current test verified that the existing accepted-procedure-mutation rejection was removed when the trust-digest mutation case was introduced. Both assertions are required.
- `list_profiles` was called before worker creation. Selected profile: **DeepSeek V4.1 Flash Implementer**, materialized exactly as provider/model `opencode/opencode-go/deepseek-v4.1-flash`, `modeId: build`, `thinkingOptionId: max`, `features: { auto_accept: true }`.

### Frozen runtime session identity contract

`ExecutionBindingV2.runtime.sessionId` is the exact durable session identifier returned by the selected runtime's session-materialization boundary. It is never an AEH-generated launch, generation, job, container, or process placeholder. For a fresh structured-result participant, AEH must materialize an idle provider/runtime session, receive and validate its non-empty id, bind the complete versioned identity durably, bind the result channel to the same id, then dispatch the first semantic prompt. The result's runtime/session identity must equal that binding. A resumed session reuses only its durable actual id and exact current binding. A runtime path that cannot expose a durable session id before the prompt, cannot continue the same prepared session, or returns no id fails closed before accepting structured output; it does not fabricate an identity.

Paseo's S1 two-phase path keeps its structured-result MCP server installed at initial idle materialization, because the supported Paseo agent update surface changes metadata labels but does not change MCP server configuration or tool policy. Before the actual session id exists, the result channel is explicitly pending (`UNSUPPORTED`, with no active turn), and its channel id is supplied to the initial MCP server configuration. After materialization returns the actual Paseo agent id, AEH prepares and persists the complete binding, finalizes the same pending channel with complete provenance, binds that channel to the returned id, and uses Paseo's supported `agent update --label` metadata operation to attach the complete versioned binding (encoded for the CLI's comma-delimited label syntax) before dispatching the first prompt. Failure at any finalization/update step prevents prompt dispatch. The result sink cannot accept a result while pending because the channel has no active turn and is not `BOUND`.

| Transport/runtime | Frozen session contract | Remediation gate |
| --- | --- | --- |
| Direct OpenCode | Create an idle OpenCode session through its session API, bind its returned session id, then execute against that exact session; verify any execution event id agrees. | No first prompt before durable binding; missing/mismatched id blocks. |
| Direct Codex | Start an idle Codex app-server thread, bind its returned thread id, then start the turn on that same thread; verify terminal/result identity. | No `codex exec` fresh structured launch that only exposes the id after prompt execution; missing/mismatched thread id blocks. |
| Podman/OpenCode | Materialize an idle OpenCode session inside the hardened container, return that actual provider session id to the controller, bind it, then execute within the same container/runtime session. Preserve the container isolation policy. | Propagate the provider session id into `WorkerSession` and binding; fail closed if the configured image/runtime cannot perform the two-phase session handshake. Never substitute the container id. |
| Paseo | Use the existing idle materialize/register phase with a pending structured-result channel/MCP server; bind returned `agent.id`, finalize provenance, and update full-binding labels before `continueManagedPaseoAgent` dispatches the first turn. | Pending channels reject submission; no semantic prompt dispatch occurs unless the actual id, durable binding, finalized result channel, and Paseo metadata update agree. The returned continuation id must match. |
| Distributed | Use a two-phase queue handshake: worker materializes the actual approved runtime session and returns its id; controller validates and durably binds it; controller releases the execution phase carrying the complete binding; worker executes only in that same session and returns that id/binding. Filesystem and HTTP queue paths share the versioned handshake. | Missing/unsupported session ids, session replacement, stale binding, and returned-session mismatch fail closed. A worker cannot author or widen its binding. |

No real provider behavior is assumed by this contract. Adapter tests use deterministic fakes and assert ordering and exact identity equality. The identity compiler/gateway remain deterministic; session acquisition is a runtime observation that must be carried as evidence to those gates.

### Remediation-only WorkGraph

| WorkUnit | Depends on | Exact scope and ownership | Mechanism | Classification | Acceptance |
| --- | --- | --- | --- | --- | --- |
| S1-R1 Session contract and adapter lifecycle | Candidate truth and controller fencing | Own the frozen contract above; `executionIdentity.ts`, `agentPrompt.ts`, `workers/{direct,podman,paseo}.ts` production executor entry points, `directProcess.ts`/runtime adapter boundary, `paseo/runtimeInitialTurn.ts`, `paseo/sdk.ts`, `distributed/{types,queue,worker}.ts`, result gateway and operation state integration. Lead owns sequencing, identity semantics, lifecycle and cross-subsystem decisions. | DETERMINISTIC identity compilation, session-id equality, fencing, and fail-closed runtime support. | LUNA_OWNED | No synthetic session value; all production worker executor entry points route through the same binding compiler; every production structured-result transport materializes/reuses one actual id before semantic dispatch; durable binding, runtime result and gateway provenance agree; stale/replayed/wrong ids fail. Paseo uses an inert pending channel/MCP at idle materialization and must finalize provenance plus complete binding labels before its first turn. |
| S1-R2 Deeply immutable compiler result | Frozen blueprint contract | `participantPlan.ts`; construct/hash the expanded blueprint as one canonical object and deep-freeze that exact returned object. Lead owns integration and validation of nested immutability. | DETERMINISTIC canonical digest and recursive freeze. | LUNA_OWNED | `compileExecutionBlueprint` returns a deeply frozen object whose digest validates after including task, plan, waves, gates, validation requirements, catalog, and candidate. |
| S1-R3 Regression tests for frozen compiler and procedure trust | S1-R1/R2 contracts frozen | Test-only edits to `tests/architectureWorkGraph.test.ts` and `tests/knowledgeGate.test.ts`: assert the complete compiler result is recursively frozen; preserve procedure-text mutation rejection and add trust-decision-digest mutation rejection beside it. No implementation or docs changes. | DETERMINISTIC digest and immutability assertions around the deterministic trust gate. | FLASH_DELEGATABLE | Both independent regression assertions exist; focused tests pass against the integrated lead implementation. Worker test changes are reviewed and run by the lead. |
| S1-R4 Gateway, distributed/result migration, and invalidation integration | S1-R1 | Lead owns full-versioned binding propagation, channel/provenance finalization before dispatch, result/runtime equality gates, obsolete-version failure, candidate invalidation, and takeover fencing across production paths. | DETERMINISTIC provenance/lifecycle checks. | SEQUENTIAL_AFTER_CONTRACT_FREEZE | Direct, Podman, Paseo, and distributed success/rejection cases use the same binding contract; Paseo channel finalization and metadata update precede prompt dispatch; existing candidate/epoch invariants remain fail-closed. |
| S1-R5 Final verification and evidence | S1-R1–R4 | Lead owns exact focused S1 suites, TypeScript, build, full non-system Vitest, and reconciliation of only changed STATUS/CONFORMANCE/LEDGER claims. | DETERMINISTIC test/build evidence; provider certification is a separate lane. | LUNA_OWNED | Required commands pass; docs state deterministic evidence separately from REAL_PROVIDER evidence; no unrecorded scope expansion. |

The Flash assignment is meaningful bounded regression work, not quota or convenience work. It is test-only and will use a separate Paseo worktree. Architecture/session contract, authority, distributed protocol, implementation, integration, docs acceptance, and final review remain Luna-owned. Every worker prompt will include OBJECTIVE, EXACT SCOPE, FILES/AREAS, DEPENDENCIES, INVARIANTS, ACCEPTANCE CRITERIA, TESTS, EXPLICIT EXCLUSIONS, and NO NESTED DELEGATION. No worker may commit or push.

Delegated implementation: Paseo agent `40fabfbe-5f36-457f-acdf-0beee24c4099` (`opencode/opencode-go/deepseek-v4.1-flash`) owns S1-R3 only in isolated workspace `wks_df80fb40e7fd9d18` at `/home/james/.paseo/worktrees/0jx5pvzi/s1-remediation-flash`; exact listed settings were materialized (`build`, `max`, `auto_accept: true`). Its prompt prohibits nested delegation and restricts edits to `tests/architectureWorkGraph.test.ts` and `tests/knowledgeGate.test.ts`.

### Evidence and changes requiring reconciliation

The remediation does not accept the prior attempt's reported evidence as current verification. Re-run focused S1 tests, `npx tsc --noEmit`, `npm run build`, and `npx vitest run --exclude 'tests/system/**'` after integration. Include explicit checks for every adapter's actual runtime session id, immutable expanded blueprint output, and both knowledge trust regression assertions. Do not claim REAL_PROVIDER, browser, security/provider, or packed end-to-end certification.

Only the following existing STATUS rows may change, and only when their S1 claims/evidence change: Intent/route/assurance and ResolvedOperationPolicy; participant/role compiler; knowledge and SkillTrust; Context Runtime and progressive exposure (S1 identity/projection only); ExecutionBlueprint and RoleInvocation identity; StructuredResult provenance; Paseo session identity; controller fencing and action gates; candidate identity/assembly. Update Conformance only for changed claims/evidence. Refine/close AEH-V2-0037 in the Engineering Ledger only to the extent the remediation is supported by rerun evidence.

### Remediation outcome — 2026-09-24

- **Architecture decision:** none required. The normative target is implementable with the existing adapter lifecycles. Paseo already materializes an idle managed agent before first-turn dispatch, so the returned provider id is available before `ExecutionBinding` freeze. Its result MCP server/tool policy is installed while the result channel is inert; the finalized full binding/provenance is attached through Paseo's supported metadata-label update and verified before continuation. Any channel-finalization, metadata-update, or identity mismatch blocks the first prompt.
- **Session identity contract implemented:** OpenCode uses a provider-created idle session in the exact isolated home later used for execution; Codex creates an idle app-server thread in the exact `CODEX_HOME` later passed to `codex exec resume`; Podman prepares an OpenCode provider session in the isolated home mounted into its hardened container and checks the returned OpenCode event id; Paseo binds the actual materialized agent id; distributed workers return a runtime-materialization receipt, wait for the controller binding, then execute and return the same id and binding. Container/process/job/generation ids are never session substitutes. An adapter that cannot materialize a durable id or return the same id fails closed. These are deterministic adapter contracts; no live provider behavior is certified.
- **All worker executor entry points:** Direct, Podman, and Paseo `WorkerExecutor` start/repair methods now route through `executeAgentPrompt`, preserving the controller-issued authority and resolved output contract while sharing S1 binding, session, and result checks. Paseo repair uses a fresh managed invocation rather than bypassing S1 on a direct continuation path.
- **Independent finding closure:** `compileExecutionBlueprint` recursively freezes the exact expanded object returned by the compiler; `tests/architectureWorkGraph.test.ts` verifies recursive frozen state and rejects nested mutation. `tests/knowledgeGate.test.ts` retains the original accepted-procedure-text mutation rejection and adds the trust-decision-digest mutation rejection as a separate assertion.
- **Focused deterministic validation:** `npx vitest run tests/executionIdentity.test.ts tests/architectureWorkGraph.test.ts tests/agentPromptStructuredResultProvenance.test.ts tests/distributedExecutionIdentity.test.ts tests/structuredResultGateway.test.ts tests/knowledgeGate.test.ts tests/operations.test.ts tests/security/controllerFencing.test.ts tests/reviewerSerializationRecovery.test.ts tests/scale-governance.test.ts tests/paseoInitialTurnBarrier.test.ts tests/paseoSdk.test.ts tests/runtimeSessions.test.ts tests/paseoPendingExecutionIdentity.test.ts tests/workerExecutionAuthority.test.ts` — 15 files passed, 149 tests passed.
- **Required repository validation:** `npx tsc --noEmit` — exit 0; `npm run build` — exit 0; `npx vitest run --exclude 'tests/system/**'` — 149 files passed, 1 skipped; 757 tests passed, 7 skipped. The full suite printed missing-source-map notices in the build-hygiene packed-release test, which passed. `git diff --check` — clean.
- **Evidence lane:** deterministic tests/build only. No REAL_PROVIDER, browser, adversarial/provider, or complete packed end-to-end certification is claimed.
- **Documentation reconciliation:** affected STATUS rows and deterministic evidence map updated with the remediation result; AEH-V2-0037 refined to include session identity and deep blueprint immutability evidence. The normative `CORE_ARCHITECTURE_V2.md` was not edited. No commit or push was made.

---

## Prior S1 attempt record (historical; retained for provenance)

**Slice:** S1 — Frozen Execution & Skill Identity  
**Branch/workspace:** `core-architecture-v2` in `/home/james/Desarrollo/agentic-engineering-harness`  
**Assessment date:** 2026-09-24
**Authority:** `docs/CORE_ARCHITECTURE_V2.md` is the sole normative target. This assessment records tactical execution only and does not amend it.

### Tactical WorkGraph

The candidate-truth and controller-fencing foundation is a prerequisite and was inspected in the existing S1 work: candidate assembly advances `operationExecutionRevision` and clears participant bindings/policy; controller takeover advances the epoch and clears them; record event revision remains separate. The work below is limited to S1.

| WorkUnit | Depends on | Bounded scope and claims | Decision mechanism | Classification | Present implementation and remaining work |
| --- | --- | --- | --- | --- | --- |
| S1-WU1 Frozen policy and identity contracts | Candidate truth and controller fencing | `executionIdentity.ts`, core/distributed types, operation execution revision, immutable/versioned policy, role policy, blueprint, binding, skill manifest contracts. Claim: identity contracts and operation state only. | DETERMINISTIC compilation, digesting, version rejection, and lifecycle checks; HYBRID only for semantic inputs frozen before compilation. Model output cannot choose identity or widen policy. | LUNA_OWNED | Present in the current diff: ResolvedOperationPolicy V1, RoleInvocationPolicy V1, ExecutionBlueprint V2, ExecutionBinding V2, scoped SkillManifest V1, and record-revision/execution-revision separation. Candidate assembly and takeover clear bindings/policy. Remaining: final lead diff review against the normative target. |
| S1-WU2 Participant compilation and blueprint freeze | S1-WU1 | `participantPlan.ts`, `waveExecutor.ts`; bind WorkGraph, plan/catalog, roles, skills, tools, resources, validation and output contracts. Claim: deterministic participant compilation. | DETERMINISTIC participant identity and ceilings; semantic decomposition can be HYBRID upstream, but compiled identities are fixed. | LUNA_OWNED | Present in the current diff: deterministic role ceilings and static blueprint participants include work, policy, catalog, ToolPack, resource claims, validation resolution, output, specialization, and skill digests. Remaining: final lead source/diff acceptance. |
| S1-WU3 SkillManifest projection coverage | S1-WU1 and S1-WU2 contract freeze | Test-only additions to `tests/agentPromptStructuredResultProvenance.test.ts` and `tests/distributedExecutionIdentity.test.ts`. Exercise exact accepted ephemeral procedure bytes, participant assignment, authorization, prompt/binding digest, and supported launch envelopes. No production source or contract changes. | DETERMINISTIC digest/assignment/authority checks around HYBRID knowledge assessment and the existing deterministic trust gate. | FLASH_DELEGATABLE | Closed by the delegated test-only change. Tests cover direct, Podman, Paseo, and prepared distributed-worker prompt projection, exact bytes, manifest/binding digest equality, wrong participant, missing authority, dropped procedure bytes, and ID-only failure. Lead independently reviewed and reran the evidence. |
| S1-WU4 Production launch propagation | S1-WU1–WU3 | `agentPrompt.ts`, `paseo/launchSpec.ts`, `paseo/sdk.ts`, `distributed/worker.ts`, `waveExecutor.ts`; carry the complete binding to direct, Podman, Paseo and distributed execution. Claims are disjoint by transport adapter. | DETERMINISTIC envelope construction and validation; model output receives no identity or capability selection. | SEQUENTIAL_AFTER_CONTRACT_FREEZE | Present in the current diff. Lead reviewed direct, Podman, Paseo, prepared-prompt, and distributed worker propagation. Paseo result channels bind to the actual returned agent ID; no real Paseo service run is claimed. |
| S1-WU5 Structured result and invalidation gates | S1-WU1 and S1-WU4 | `resultGateway.ts`, `operations/state.ts`, controller/candidate lifecycle; complete provenance validation, replay/staleness rejection, candidate assembly and takeover invalidation. Claim: gateway/lifecycle invariants. | DETERMINISTIC provenance, candidate, revision, generation, policy, epoch and digest checks. | SEQUENTIAL_AFTER_CONTRACT_FREEZE | Present in the current diff. Focused tests cover wrong/missing identity, event revision versus execution revision, candidate invalidation, takeover fencing, and distributed PASS-result binding echo. Lead review and focused tests complete. |
| S1-WU6 Slice validation and evidence records | S1-WU1–WU5 | Focused tests, TypeScript, build, full non-system deterministic tests, affected status/conformance entries, final diff and Git review. Claims belong to the lead; no worker runs final acceptance. | DETERMINISTIC test/build evidence; REAL_PROVIDER certification remains a separate lane and is not claimed. | LUNA_OWNED | Final validation completed on 2026-09-24: focused S1 suites 10 files / 108 tests passed; `npx tsc --noEmit` exit 0; `npm run build` exit 0; full non-system Vitest 147 files passed, 1 skipped, 737 tests passed, 7 skipped. Remaining: Campaign Director review. |

The only Flash assignment is S1-WU3. It is a meaningful deterministic-evidence gap in a normative S1 requirement, not quota-only work. The worker may add tests only; it may not alter execution contracts, production implementation, or expected acceptance criteria. All source integration, policy/authority semantics, conflict resolution, validation decisions, documentation acceptance, and final gate remain with the Slice Lead.

### Current evidence snapshot (prior attempt)

- Delegated test-only focused run: `npx vitest run tests/agentPromptStructuredResultProvenance.test.ts tests/distributedExecutionIdentity.test.ts` — 2 files passed, 25 tests passed; `npx tsc --noEmit` — exit 0. Lead reran both commands after return with the same results.
- Final focused S1 run on 2026-09-24: `npx vitest run tests/executionIdentity.test.ts tests/architectureWorkGraph.test.ts tests/agentPromptStructuredResultProvenance.test.ts tests/distributedExecutionIdentity.test.ts tests/structuredResultGateway.test.ts tests/knowledgeGate.test.ts tests/operations.test.ts tests/security/controllerFencing.test.ts tests/reviewerSerializationRecovery.test.ts tests/scale-governance.test.ts` — 10 files passed, 108 tests passed.
- `npx tsc --noEmit` — exit 0; `npm run build` — exit 0.
- Final non-system Vitest run on 2026-09-24: `npx vitest run --exclude 'tests/system/**'` — 147 files passed, 1 skipped; 737 tests passed, 7 skipped.
- No REAL_PROVIDER certification is claimed.

### Delegation record (prior attempt)

- Agent: Paseo agent `ee820897-dde2-4fd7-8487-97498ec3b519`, assigned only S1-WU3; completion is advisory and was independently reviewed by the Slice Lead.
- Profile freshly materialized from `list_profiles`: `DeepSeek V4.1 Flash Implementer`; provider `opencode`; model `opencode-go/deepseek-v4.1-flash`; settings `modeId: build`, `thinkingOptionId: max`, `features: { auto_accept: true }`.
- Workspace: shared campaign checkout; the agent ran sequentially while the Slice Lead paused all writes. No Paseo worktree was used. The worker changed tests only and did not commit or push.
- Remaining contract, source, integration, documentation, and final-verification work stays Slice-Lead-owned.

---

## S1 policy mutation follow-up — 2026-09-24

**Slice:** S1 — Frozen Execution & Skill Identity
**Lead:** Luna

**Authority:** `docs/CORE_ARCHITECTURE_V2.md` remains normative and is unchanged.

### Rechecked prerequisite and mutation boundary

The current status rows and source confirm the candidate-truth and controller-fencing prerequisites. `bindOperationCandidate` advances `operationExecutionRevision`, clears `resolvedOperationPolicy`, and clears participant bindings. `claimControllerEpoch` advances the controller epoch and clears both. Event revision remains independent of execution revision. Existing deterministic tests cover candidate invalidation and takeover invalidation.

The policy finding is confirmed. `loadOperation` returns mutable normalized JSON. `patchOperation`, `patchOperationMetadata`, and `updateOperationMetadata` converge on `mutateOperation`, whose transition guard runs immediately before durable commit. `bindResolvedOperationPolicy` is the explicit policy lifecycle and validates the v1 policy plus operation, candidate, project, execution revision, and epoch identity. The guard currently compares only the declared policy digest, allowing a generic mutation to change a policy body while retaining that digest. Existing operations and gateway/controller-fencing tests already cover successful explicit policy binding and owning candidate/takeover invalidation.

### Frozen policy lifecycle contract — Luna-owned

- Generic operation update/patch events may not add, replace, mutate, or clear a frozen `ResolvedOperationPolicy`, including changing its body while retaining its declared digest.
- `operation.policy.bound` is the sole event allowed to create a policy. It may persist only a policy that passes `assertResolvedOperationPolicyV1`; an existing policy may be rebound only when the complete canonical policy value is unchanged.
- `operation.candidate.bound`, `operation.controller.claimed`, and `operation.execution-semantics.bound` may clear the policy as part of their owning invalidation lifecycle. They may not add or substitute a policy body.
- Every other event fails closed for any policy change.
- Change detection compares complete canonical policy values, not the declared digest alone.

### Tactical WorkGraph — this follow-up only

| WorkUnit | Depends on | Exact scope and ownership | Decision mechanism | Classification | Acceptance |
| --- | --- | --- | --- | --- | --- |
| WU1 Freeze policy mutation lifecycle contract; inspect callers and guard boundaries | Verified candidate-truth and controller-fencing foundation | Luna owns the frozen contract above, review of `mutateOperation`, all generic mutation APIs, policy bind callers, and candidate/takeover/semantics invalidation owners. No policy semantics are delegated. | DETERMINISTIC | LUNA_OWNED | Contract is fixed before implementation; each event type has one explicit add/replace/clear rule. |
| WU2 Compare full canonical policy values, validate the policy-bound event, and add focused regressions | WU1 contract freeze | Bounded changes to `src/operations/state.ts` and `tests/operations.test.ts`; reject same-declared-digest body changes through generic persistence APIs and prove durable state is unchanged. Preserve valid explicit policy binding and owning candidate/takeover invalidation. | DETERMINISTIC | FLASH_DELEGATABLE | Policy-bound creation validates v1; replacement/substitution is rejected; generic add/replace/mutate/clear is rejected; allowed owner invalidations clear only; focused operation-state tests pass. |
| WU3 Integrate, review caller compatibility, verify policy/binding invalidation, update evidence, and run complete S1 validation | WU2 return | Luna owns source/test review, integration, exact S1 focused suites, TypeScript, build, full non-system Vitest, and changes to affected STATUS, CONFORMANCE, and ENGINEERING_LEDGER evidence only. | DETERMINISTIC | LUNA_OWNED | All eight S1 DoD items are checked against source and rerun deterministic evidence; provider lanes remain unclaimed. |

### Flash launch contract

`list_profiles` was freshly called. The selected profile is **DeepSeek V4.1 Flash Implementer** with `provider: opencode`, `model: opencode-go/deepseek-v4.1-flash`, `modeId: build`, `thinkingOptionId: max`, and `featureValues: { auto_accept: true }`. These exact settings will be materialized in a separate Paseo worktree workspace. The worker receives WU2 only, after this contract freeze. The worker may not create agents, commit, push, change the contract, edit unrelated files, or claim final acceptance. Luna owns integration and final validation.

### Delegation and revalidation outcome

- Paseo agent `a23f3883-bd27-4c6f-b57d-d1212cf680af` ran WU2 with `opencode/opencode-go/deepseek-v4.1-flash`, `modeId: build`, `thinkingOptionId: max`, and `features: { auto_accept: true }` in workspace `wks_e0edb0e15e687a89`, worktree `/home/james/.paseo/worktrees/0jx5pvzi/s1-policy-mutation-flash`, branch `s1-policy-mutation-flash`.
- The worktree contained the declared S1 campaign snapshot. The worker's changes were limited to `src/operations/state.ts` and `tests/operations.test.ts`; Luna reviewed and integrated those two files. The final guard compares complete canonical policy values captured before mutation callbacks, validates the policy-bound event, allows only policy creation or unchanged rebind there, and permits only clearing at candidate/takeover/changed-semantics invalidation events. Regressions cover generic add/replace/mutate/clear, stale-digest body changes, in-place metadata callback mutation, durable-record byte preservation, valid explicit binding, and owning invalidations.
- Exact focused S1 command — 15 files passed, 158 tests passed. `npx tsc --noEmit` — exit 0. `npm run build` — exit 0. `npx vitest run --exclude 'tests/system/**'` — 149 files passed, 1 skipped; 766 tests passed, 7 skipped. The full suite emitted missing-source-map notices in the passing build-hygiene test.
- Evidence remains DETERMINISTIC CONTRACT/UNIT and build evidence. No REAL_PROVIDER, browser, adversarial/provider, or packed end-to-end certification is claimed. No commit or push was made; no other slice was started.
