Conversation
ThreatCrush Security Scan4586 finding(s) HIGH/CRITICAL: 43 | MEDIUM: 4032 | LOW: 511
…and 4536 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
79a94e6 to
df9e298
Compare
5c9604a to
55a7455
Compare
|
Review notes for the audited SHA The merge-boundary change looks sound: graph-authored The same PR also introduces integration-branch validation/materialization, a separate contract change that accounts for most of the diff. Splitting that behavior from the boundary fix would let reviewers assess the new error/throw behavior and its callers independently; keep its real-git and invalid-ref tests with that change. The integration changeset currently has duplicate, contradictory |
Problem
A card running
builtin:codingwhose only pre-merge workflow step results came from enabled optional steps was parked atmerge-boundary-unproven — operator action required, even though every review had passed.Measured on a live card (project
proj_9ef728e7cc084681):workflow_step_resultsphase="pre-merge",status="passed",source="optional-group"plan-review,code-reviewenabled_workflow_steps["plan-review","code-review"]evaluateWorkflowMergeBoundaryfiltered relevant results withresult.source === "node", so thoseoptional-grouprows were invisible:hasRelevantNodeResultwasfalse→ blocker codeno-node-result→ the card never reachedin-review.Root cause
The graph writes pre-merge results with exactly two
sourcevalues:node— graph-authored node progress (workflow-graph-executor.ts, node-progress writes)optional-group— an enabled optional step (e.g. the builtin Plan Review / Code Review groups)The boundary proof only counted
node, so any workflow shape whose pre-merge gate work happens in optional groups could never prove its boundary.Fix
packages/engine/src/executor/evaluate-workflow-merge-boundary.tsisGraphNativePreMergeResult(result):(source === "node" || source === "optional-group") && (phase ?? "pre-merge") === "pre-merge".packages/engine/src/executor/workflow-merge-boundary-helpers.tsshouldCompleteChecklistAtWorkflowMerge(proof-free branch) uses the same predicate, so the two engine sites cannot drift. Its production caller always passes a proof object today; sharing the predicate means a future caller that drops the proof argument cannot re-park an approved card.Not loosened: a non-pre-merge (post-merge) result stays out of the proof; terminality (
allResultsTerminal) stays mandatory; terminal foreach instance coverage (coverageComplete/missing-foreach-instances) stays mandatory; legacy compiled step results (nosource) remain non-graph-native.Tests
packages/engine/src/__tests__/executor-graph-boundary.test.ts(non-PG harness, merge-gate-friendly) — 5 new cases:passedpre-mergeoptional-groupresults → boundary not blocked, proofresolved/complete, card moves toin-review.pendingoptional-groupresult still blocks withnon-terminal-node-result.post-merge-only passed result still blocks withno-node-result.missing-foreach-instances.shouldCompleteChecklistAtWorkflowMergefallback.Red → green evidence (file-scoped, no DB):
Also re-run green:
executor-skip-bypass-taint.test.ts+merge-boundary-unproven-park.test.ts(13 passed).Verification limits
pnpm install, build, typecheck, or full suite (low-RAM host).executor-merge-boundary-foreach-proof.pg.test.tswas not run locally (its harness needs a local PostgreSQL instance; writing to the shared instance was out of scope for this change). Its fixtures all usesource: "node", so its coverage is unaffected by the widening; the non-PG file covers both origins and runs in the merge gate.pnpm check:changesetsandpnpm check:fnxc-future-datespass; scoped eslint reports no errors.Changeset
.changeset/fix-merge-boundary-optional-group-proof.md—@runfusion/fusionpatch.