Skip to content

Gate repetitive migrations on a shared design assessment - #1370

Draft
taras wants to merge 1 commit into
mainfrom
codex/migration-design-gate
Draft

taras wants to merge 1 commit into
mainfrom
codex/migration-design-gate

Conversation

@taras

@taras taras commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Why

Journal attribution in #1171 shows the cost of repeating planning and review on
many similar batches. The separate Fable assessment found migration and audit
scripts in each of 17 rounds and recommended testing a shared recipe first.
Token spend has not been measured.

What changes

The workflow reads one shared parent inventory for a repetitive migration.
At 20 possible sites or three possible batches, it obtains a Problem Solver
design assessment before launching the batch. A smaller bounded program
keeps the normal route. Counts cover completed and planned work across PRs.

Twenty sites is an initial threshold for amortizing a small trial across
repetitive edits. Three batches catches repeated orchestration and review
overhead even when the units are larger. The Planner records the counting
unit, query or inventory, estimate, batch count and uncertainty.

How it works

Each batch points to the same parent program. The gate binds the existing
Problem Solver design phase to the exact program and inventory. It reuses
a matching result across batch revisions after checking the evidence, joined
reply and native session receipt. A missing or invalid result in a reserved
attempt holds the batch and preserves its evidence.

The assignment asks for mechanical, batchable and judgment cases, compares
codemods or shared helpers, Codex Terra and a narrower rollout, and calls for
a representative dry run with measurable pass and fail outcomes. A hybrid
XMD option can inventory and preview deterministically, ask a model to
classify ambiguous cases against approved recipes, and apply TypeScript
edits only where AST preconditions pass.

Review guide

Start with the parent record and thresholds in
examples/adversarial-implementation/README.md. Then follow Entry.Run
into Migration.Gate and the existing design phase.

How to verify it

  • deno task test packages/cli/tests/adversarial-diagnosis.test.ts exercises
    below-threshold admission, the 20-site and three-batch cutoffs, uncertainty,
    reuse on a different commit, and holds for an incomplete or altered receipt.
  • deno task test examples/adversarial-implementation/tests/LaunchPolicy.test.md
    verifies the ordinary API migration route below the cutoff.
  • deno task test examples/adversarial-implementation/tests/Implementation.test.md
    verifies normal launch routing and the hold for missing parent evidence.
  • deno check --frozen examples/adversarial-implementation/components/Migration/Program.ts examples/adversarial-implementation/components/Migration/Result.ts packages/cli/tests/adversarial-diagnosis.test.ts
    checks the changed TypeScript boundary.

Scope

The Planner and coordinator supply the shared parent identity and inventory.
Each batch must refer to that record, including a batch that takes the ordinary
implementation route. The #1171 codemod belongs to its separate pilot.

Scope confirmation

  • Every changed file supports the purpose described above.
  • Unrelated cleanup and formatting changes are excluded.
  • The description matches the diff and focused tests.

This branch has not been deployed

No deployments
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