From d22463465f4c4f27bcfb7b86d969ca8d794a306a Mon Sep 17 00:00:00 2001 From: Mike Clay Date: Thu, 3 Sep 2026 10:15:47 +0100 Subject: [PATCH 1/2] Adopt the corpus that audits its own canon and delivers each section whole MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moves the definitions pointer to 875a36dc, which carries three merged pull requests: the canon audit that took restated Protocol phases and schema-owned routing out of rule bodies, the decisionless-checkpoint fixes that stop a gate asking for an acknowledgement it does nothing with, and the section-delivery work that gives each delivered section what it depends on. The walk baseline is unchanged and that is a result rather than an omission. The corpus gained checkpoint and gate changes — a task cycle that stops on unaccounted symbol provenance, an isolation gate whose abort now aborts — so reachability was the thing to check, and a full fourteen-workflow walk still takes every declared option some walk can reach. Delivery falls 1,811 characters to 1,392,659, the first recording to fall. get_activity accounts for 1,611 of it and get_workflow 172, both prose the canon audit removed. get_resource rises 17, the one increase, from the single resource this walk reads that changed: the findings-report guide's layout section names the field order as a link rather than saying "above", which a reader given only that section could not follow. The binding-fidelity verdicts were made seventeen corpus commits ago, so the entries at risk are the ones whose cited file moved since. There is one, and its file gained a one-line removal of a phase citation by ordinal, which leaves the shared-op-return-contract reading intact. The stamp moves with it. Co-Authored-By: Claude Opus 5 (1M context) --- .../fixtures/token-benchmark-baseline.json | 26 +++++++++---------- tests/e2e/__snapshots__/corpus-sha.json | 2 +- workflows | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/fixtures/token-benchmark-baseline.json b/scripts/fixtures/token-benchmark-baseline.json index 1b4d980c..9c7c89d1 100644 --- a/scripts/fixtures/token-benchmark-baseline.json +++ b/scripts/fixtures/token-benchmark-baseline.json @@ -3,8 +3,8 @@ "label": "baseline", "contextMode": "fresh", "agentId": "bench-solo", - "workflowsDir": "/home/mike1/projects/dev/workflow-server/.worktrees/fix/delivery-baseline-rerecord/workflows", - "serverRoot": "/home/mike1/projects/dev/workflow-server/.worktrees/fix/delivery-baseline-rerecord", + "workflowsDir": "/home/mike1/projects/dev/workflow-server/.worktrees/chore/adopt-588/workflows", + "serverRoot": "/home/mike1/projects/dev/workflow-server/.worktrees/chore/adopt-588", "path": [ "start-work-package", "design-philosophy", @@ -33,14 +33,14 @@ }, "chars": { "start_session": 869, - "get_workflow": 112548, + "get_workflow": 112376, "next_activity": 1195, - "get_activity": 562073, - "get_resource": 572354, + "get_activity": 560462, + "get_resource": 572371, "yield_checkpoint": 2930, "respond_checkpoint": 1984, - "resume_checkpoint": 3679, - "get_technique": 147495 + "resume_checkpoint": 3672, + "get_technique": 147450 }, "history": { "technique_bundled": 66, @@ -79,10 +79,10 @@ "resourceLedgerKeys": 75, "unchangedResourceAnswers": 0, "unchangedTechniqueAnswers": 0, - "getActivityChars": 562073, - "getWorkflowChars": 112548, - "getResourceChars": 572354, - "getTechniqueChars": 147495, - "workflowsRev": "131e2942", - "description": "Gate baseline: work-package / skip-optional / robot + hot-resource probe, context_mode fresh. Recorded 2026-09-02 against workflows@c56b51ca. Delivery is 14,950 characters above the previous recording of 1,379,520 at workflows@11faffbd, and the whole of that is corpus the code branch has since adopted: the review-basis work items that state what a review run reaches and what its claims rest on, the five hand-checks a reviewer used to perform from memory, the inventories each built once, the authoring-conformance body check, the citation-grain rule that reads a citation at the grain its target is delivered at, and the graph-reach operations that open the sibling repositories and the markdown half of the knowledge graph. get_resource rises 8,718 because those work items cite rubrics and registers at the section a step reads, and each cited section is delivered; get_activity rises 8,085 because eager step-technique bundling delivers a widened operation again in each activity that binds it. get_workflow falls 1,853, the rules those operations replaced coming out of the workflow body. get_technique is unchanged: the graph operations are bound rather than bundled on this walk. One resource ledger key is added, the review register. Re-verified at workflows@131e2942, which binds graph operations across the workflows that reached none: every metric is identical, because those operations are bound rather than bundled on this walk, so a rule added to their shared contract is delivered to no activity the walk visits. The revision moves with the numbers unchanged, so the mismatch warning keeps firing on drift that costs characters." + "getActivityChars": 560462, + "getWorkflowChars": 112376, + "getResourceChars": 572371, + "getTechniqueChars": 147450, + "workflowsRev": "875a36dc", + "description": "Gate baseline: work-package / skip-optional / robot + hot-resource probe, context_mode fresh. Recorded 2026-09-02 against workflows@c56b51ca. Delivery is 14,950 characters above the previous recording of 1,379,520 at workflows@11faffbd, and the whole of that is corpus the code branch has since adopted: the review-basis work items that state what a review run reaches and what its claims rest on, the five hand-checks a reviewer used to perform from memory, the inventories each built once, the authoring-conformance body check, the citation-grain rule that reads a citation at the grain its target is delivered at, and the graph-reach operations that open the sibling repositories and the markdown half of the knowledge graph. get_resource rises 8,718 because those work items cite rubrics and registers at the section a step reads, and each cited section is delivered; get_activity rises 8,085 because eager step-technique bundling delivers a widened operation again in each activity that binds it. get_workflow falls 1,853, the rules those operations replaced coming out of the workflow body. get_technique is unchanged: the graph operations are bound rather than bundled on this walk. One resource ledger key is added, the review register. Re-verified at workflows@131e2942, which binds graph operations across the workflows that reached none: every metric was identical, because those operations are bound rather than bundled on this walk, so a rule added to their shared contract is delivered to no activity the walk visits. Re-recorded 2026-09-03 at workflows@875a36dc, which adopts the canon audit, the decisionless-checkpoint fixes and the section-delivery work. Delivery falls 1,811 characters to 1,392,659, the first recording to fall. get_activity falls 1,611 and get_workflow 172, both from prose the canon audit removed where a rule restated a Protocol phase or a schema owned the routing; get_technique falls 45 and resume_checkpoint 7 for the same reason. get_resource rises 17, the one increase, and it has a single source: the findings-report guide is the only resource this walk reads that changed, and its finding-layout section now names the field order as a link rather than saying \"above\", which a reader given only that section could not follow. The section-delivery work's citation-grain changes are in workflow-design and plain-language, which this walk does not visit." } diff --git a/tests/e2e/__snapshots__/corpus-sha.json b/tests/e2e/__snapshots__/corpus-sha.json index 674d33a3..0442e1d5 100644 --- a/tests/e2e/__snapshots__/corpus-sha.json +++ b/tests/e2e/__snapshots__/corpus-sha.json @@ -1,4 +1,4 @@ { - "corpusSha": "131e2942c15cbcf16680980be7e15b107abf051d", + "corpusSha": "875a36dc3133514522a8ced9a4d4fd19459e9f23", "note": "Corpus commit the committed walk snapshots were generated against. Update it in the same commit that bumps the workflows submodule and re-baselines the walk (npm run baseline:stamp)." } diff --git a/workflows b/workflows index 131e2942..875a36dc 160000 --- a/workflows +++ b/workflows @@ -1 +1 @@ -Subproject commit 131e2942c15cbcf16680980be7e15b107abf051d +Subproject commit 875a36dc3133514522a8ced9a4d4fd19459e9f23 From f8274ec0dc6e587aeea48eb456f1e8c7b9c8e9d7 Mon Sep 17 00:00:00 2001 From: Mike Clay Date: Thu, 3 Sep 2026 13:43:28 +0100 Subject: [PATCH 2/2] Read a re-entry gate's consequence as leaving the activity submit-for-review's body-non-conformant gate now makes provide-input an immediate exit, alongside the abort it already had. Answering that gate means the run leaves the activity and re-enters it with a corrected body, so the eleven steps after the gate do not run and the consequence the checkpoint states before the user chooses says so. Co-Authored-By: Claude Opus 5 (1M context) --- tests/mcp-server.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/mcp-server.test.ts b/tests/mcp-server.test.ts index bb9d0737..2237d08c 100644 --- a/tests/mcp-server.test.ts +++ b/tests/mcp-server.test.ts @@ -415,7 +415,8 @@ describe('mcp-server integration', () => { }); // submit-for-review's body-non-conformant gate offers a re-entry and an abort, with eleven - // steps after it. The ungated ones before it are what a worker that aborts there has run. + // steps after it. Both exits are immediate, so either answer leaves those eleven unrun; the + // ungated steps before the gate are what a worker that answers there has run. const RAN_BEFORE_ABORT = [ { step_id: 'announce-start', output: 'announced' }, { step_id: 'review-summary-approval', output: 'approved' }, @@ -440,7 +441,7 @@ describe('mcp-server integration', () => { const options = checkpoint.options as Array<{ id: string; consequence?: Record }>; expect(options.find(o => o.id === 'provide-input')?.consequence) - .toEqual({ exit: 'provide-input', next_activity: 'submit-for-review' }); + .toEqual({ exit: 'provide-input', next_activity: 'submit-for-review', ends_activity: true }); expect(options.find(o => o.id === 'abort')?.consequence) .toEqual({ exit: 'abort', next_activity: 'complete', ends_activity: true }); });