Skip to content

FE-1267: Record controller takeovers in comparison evidence - #379

Merged
kostandinang merged 2 commits into
nextfrom
ka/fe-1267-capture-comparison-takeovers
Jul 24, 2026
Merged

FE-1267: Record controller takeovers in comparison evidence#379
kostandinang merged 2 commits into
nextfrom
ka/fe-1267-capture-comparison-takeovers

Conversation

@kostandinang

@kostandinang kostandinang commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Why

Comparison reports could describe a controller takeover that was absent from the immutable attempt's intervention list, leaving publication validity unsupported.

What

Require a separately captured controller-intervention ledger when retaining an execution attempt and reject retention unless it exactly matches the attempt. The comparison procedure now records takeovers immediately and derives its visible summary from that ledger.

How to test

  1. Run npm test -- src/dev/execution-comparison/__tests__/artifact-contract.test.ts and confirm a mismatched ledger is rejected.
  2. Run npm test -- src/dev/execution-comparison/__tests__/operator-cli.test.ts and confirm attempt retention requires the ledger.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kostandinang kostandinang changed the title FE-1267: Record comparison controller takeovers FE-1267: Record controller takeovers in comparison evidence Jul 24, 2026
@kostandinang
kostandinang marked this pull request as ready for review July 24, 2026 15:14
@cursor

cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Scoped to dev execution-comparison tooling and operator prompts; tightens evidence validation without changing product runtime behavior.

Overview
Closes a gap where comparison reports could describe controller takeovers that were not reflected in immutable attempt evidence.

Procedure: compare-execution.md now requires logging every controller takeover immediately to <attempt-staging>/intervention-ledger.json (schema version 1, mechanical interventions with index/kind/description/timestamp). Visible-interaction summaries must come from that ledger; unledgered takeovers are not allowed.

Retention: retain-attempt gains a required --intervention-ledger flag. Before writing an attempt, the operator loads the ledger and runs assertExecutionAttemptInterventionLedger, which rejects invalid ledgers or any mismatch with the attempt’s interventions list.

Contract: Adds ExecutionInterventionLedger and assertExecutionAttemptInterventionLedger in artifact-contract.ts, plus unit/CLI tests for mismatch rejection and the missing-flag error.

Reviewed by Cursor Bugbot for commit c55f286. Bugbot is set up for automated code reviews on this repo. Configure here.

@kostandinang kostandinang self-assigned this Jul 24, 2026
@kostandinang
kostandinang merged commit 16e96c7 into next Jul 24, 2026
7 checks passed
@kostandinang
kostandinang deleted the ka/fe-1267-capture-comparison-takeovers branch July 24, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant