feat(orchestration): integrate v0.9 reliability control plane and release gates - #33
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5728f0246
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!verification) { | ||
| pending.push({ code: 'MISSING_VERIFICATION' }); | ||
| } else { | ||
| validateVerificationRecord(verification); |
There was a problem hiding this comment.
Bind verification criteria to the active contract
When acceptance receives a serialized verification record through the orchestration CLI, this call validates only the record's internal shape; it never checks that its criterion IDs, statements, or count match contract.acceptanceCriteria. A forged record containing one arbitrary PASS criterion with test evidence is therefore accepted even when the contract has multiple entirely different criteria, allowing uncovered requirements to produce ACCEPTED; validate the record against the active contract before trusting its verdict.
Useful? React with 👍 / 👎.
| const updatedRun = updateRun(run, { | ||
| verificationVerdict: verification?.verdict ?? null, | ||
| acceptanceState: acceptance.state, | ||
| state: acceptance.state === 'ACCEPTED' ? 'ACCEPTED' : acceptance.state === 'BLOCKED' ? 'BLOCKED' : 'PAUSED', | ||
| }); |
There was a problem hiding this comment.
Reject acceptance evidence from another run
When callers pass run B together with valid contract evidence from run A, decideAcceptance returns an accepted record for A, but this block applies that state to B without comparing run.runId to acceptance.runId. The CLI consequently persists run B as final ACCEPTED using another run's verification; require the run, contract, fingerprint, and acceptance identities to match before updating state.
Useful? React with 👍 / 👎.
| function extractFilesystemTargets(command) { | ||
| const targets = []; | ||
|
|
||
| for (const match of command.matchAll(/(?:^|[;&|]\s*)rm\s+(?:-[A-Za-z]*[rRfF][A-Za-z]*\s+)+([^;&|]+)/gi)) { |
There was a problem hiding this comment.
Recognize wrapped destructive filesystem commands
When a destructive command is prefixed by a common wrapper, such as sudo rm -rf / or sh -c "rm -rf /", this start-of-command matcher finds no target and the safety engine returns ALLOW with destructive: false; by contrast, bare rm -rf / is blocked. This is normal wrapper behavior—sudo --help describes it as executing a supplied command—so callers relying on this preflight can execute host-wide deletion without approval; unwrap recognized launchers or fail closed when command structure cannot be safely parsed.
Useful? React with 👍 / 👎.
| Task is done. Proceed to the next `/dk-build` or `/dk-build-auto`. | ||
| 1. Select the next approved task from the validated PLAN. | ||
| 2. Run repository orientation and task-readiness checks. | ||
| 3. Create or resolve the active Development Contract and orchestration run using `node scripts/orchestration.mjs --operation=prepare-run`. Bind `design.md` automatically for UI/design-governed work. |
There was a problem hiding this comment.
Restore the Design Authority workflow gates
For UI tasks, automatically binding design.md does not replace the removed Design System preflight, compliance audit, or Same Design Team Test/DS issue reporting. The checked npm run design-authority:validate now fails the workflow-contract assertions for dk-build, dk-test, and dk-review, which also makes the newly expanded release:validate fail; restore those explicit gates in the rewritten commands before release.
AGENTS.md reference: AGENTS.md:L27-L27
Useful? React with 👍 / 👎.
Purpose
Complete the v0.9 reliability control plane on top of the green ORCH-001, REL-001, ORCH-002 and core-orchestration stacks.
Current integration scope
Proposal Builder regression coverage
The fixture detects:
Remaining before merge/release
npm run release:validateKeep draft until final release gates are complete.