feat(dispatcher): durable parent decisions with fenced same-execution consumption #327

Merged
karsten merged 2 commits from fix/parent-execution-decisions into main 2026-11-11 06:02:37 +00:00
Owner

Source-only fix

Add durable authenticated parent-scoped decision delivery into the SAME execution. Acceptance/readback/idempotent retry are distinct from pending/applied strategy consumption. Sequential workers and independent assessors receive decisions under original task authority and constraints. New decisions fence stale intent/assessment/completion boundaries without claim theft, intent clearing or blind worker replay. Resume rejects irrelevant task/extra fields via the paired adapter.

Exact Core head: 87b50e40bc. Plugins PR: harness/plugins#82, immutable head e41beee9d12671820b77a985fffde50eb3fdc829, pinned with dispatcher-plugin.ts SHA256 2e138566d583aeac1478f81fb9fc1391b0d5fde89b911ac42e84bef571361627. Native Plugins CI green on that exact head.

Paths

Canonical host contracts: src/execution.ts, src/dispatcher.ts, src/plugins.ts. Consumption: src/dispatcher-sequential.ts and src/dispatcher-step-prompt.ts. Packaging: plugins.lock.json. Contract docs: docs/dispatcher.md. Tests: test/execution-decisions.test.ts, test/dispatcher-sequential.test.ts, test/dispatcher-plugin.test.ts, test/dispatcher-step-prompt.test.ts. Native validation: .forgejo/workflows/decision-interface.yml. Adapter source/tests/docs live in the paired Plugins PR.

Validation

Local npm run typecheck, npm run build and npm test passed with production immutable plugin materialization: 1811 tests, 1810 pass, 1 existing skip, 0 failures. Targeted core tests: 149 pass. Plugins adapter tests: 83/83 pass with real Core host fixtures. Plugin service tests/build, Fritz and dashboard suites passed. Causal tests reproduce semantic blocked assessment and technical retry, retain evidence over reload, consume a persisted decision, then run the original next step on the same execution without replay. Duplicate/conflict, active-worker and assessment races, stale tokens, ambiguous intent, failed CI, nested/foreign sessions, terminal/cancelled records, invalid/oversized input, manual pause/unanswered question, reload/compaction audit and irrelevant resume text are covered.

The environment needs Matrix native SDK postinstall initialized (npm may block scripts), and umask 0022 for the existing permission-fixture test; no test was weakened. Core previously had no CI workflow/status contexts, so this PR adds a secret-free exact-head native validation workflow on the existing runner. Protections unchanged.

Compatibility / rollout

The new adapter compiles against old Core afacd45298, but decide explicitly rejects a missing host capability. New Core plus the pinned adapter provides durable decision delivery; other strategies without the trusted opt-in reject it. Old adapter/new Core typechecks but does not expose decide.

EXTERNAL authorized rollout/restart is required. A build does NOT activate this change. This worker performs source publication only: no agent restart/self-update or live activation. Existing dirty operator worktrees and execution ef9f5631-22fe-428f-8ef7-9896e45a1b1b, its ledger and checkpoints are untouched. No force-push or protection bypass. Git identity: Karsten Samaschke karsten@vanillacore.net.

## Source-only fix Add durable authenticated parent-scoped decision delivery into the SAME execution. Acceptance/readback/idempotent retry are distinct from pending/applied strategy consumption. Sequential workers and independent assessors receive decisions under original task authority and constraints. New decisions fence stale intent/assessment/completion boundaries without claim theft, intent clearing or blind worker replay. Resume rejects irrelevant task/extra fields via the paired adapter. Exact Core head: 87b50e40bc888b61d13e66fef6859ad94afa6551. Plugins PR: https://git.vanillacore.net/harness/plugins/pulls/82, immutable head e41beee9d12671820b77a985fffde50eb3fdc829, pinned with dispatcher-plugin.ts SHA256 2e138566d583aeac1478f81fb9fc1391b0d5fde89b911ac42e84bef571361627. Native Plugins CI green on that exact head. ### Paths Canonical host contracts: src/execution.ts, src/dispatcher.ts, src/plugins.ts. Consumption: src/dispatcher-sequential.ts and src/dispatcher-step-prompt.ts. Packaging: plugins.lock.json. Contract docs: docs/dispatcher.md. Tests: test/execution-decisions.test.ts, test/dispatcher-sequential.test.ts, test/dispatcher-plugin.test.ts, test/dispatcher-step-prompt.test.ts. Native validation: .forgejo/workflows/decision-interface.yml. Adapter source/tests/docs live in the paired Plugins PR. ### Validation Local npm run typecheck, npm run build and npm test passed with production immutable plugin materialization: 1811 tests, 1810 pass, 1 existing skip, 0 failures. Targeted core tests: 149 pass. Plugins adapter tests: 83/83 pass with real Core host fixtures. Plugin service tests/build, Fritz and dashboard suites passed. Causal tests reproduce semantic blocked assessment and technical retry, retain evidence over reload, consume a persisted decision, then run the original next step on the same execution without replay. Duplicate/conflict, active-worker and assessment races, stale tokens, ambiguous intent, failed CI, nested/foreign sessions, terminal/cancelled records, invalid/oversized input, manual pause/unanswered question, reload/compaction audit and irrelevant resume text are covered. The environment needs Matrix native SDK postinstall initialized (npm may block scripts), and umask 0022 for the existing permission-fixture test; no test was weakened. Core previously had no CI workflow/status contexts, so this PR adds a secret-free exact-head native validation workflow on the existing runner. Protections unchanged. ### Compatibility / rollout The new adapter compiles against old Core afacd45298d4174d8768405527ddb126bdd8b140, but decide explicitly rejects a missing host capability. New Core plus the pinned adapter provides durable decision delivery; other strategies without the trusted opt-in reject it. Old adapter/new Core typechecks but does not expose decide. EXTERNAL authorized rollout/restart is required. A build does NOT activate this change. This worker performs source publication only: no agent restart/self-update or live activation. Existing dirty operator worktrees and execution ef9f5631-22fe-428f-8ef7-9896e45a1b1b, its ledger and checkpoints are untouched. No force-push or protection bypass. Git identity: Karsten Samaschke <karsten@vanillacore.net>.
feat(dispatcher): persist and fence parent decisions within executions
All checks were successful
decision-interface-ci / full-validation (push) Successful in 1m58s
decision-interface-ci / full-validation (pull_request) Successful in 2m0s
87b50e40bc
Author
Owner

Final exact-head validation evidence

Paired source PRs: Core #327, Plugins #82. Core pins Plugins e41beee9d12671820b77a985fffde50eb3fdc829 plus dispatcher adapter hash 2e138566d583aeac1478f81fb9fc1391b0d5fde89b911ac42e84bef571361627.

Local exact committed Core head: npm run typecheck, npm test and npm run build passed. 1811 tests: 1810 pass, one existing skip, zero failures. Plugin adapter suite: 83/83 pass with real Core host fixtures. Plugin agent-link build passed. Additional service suite: 41 pass/2 conditional skips; Fritz 3/3; dashboard API 32/32 plus actual host integration passed. The native CI workflows additionally validate their exact fetched heads in isolated containers. Test environment: native Matrix SDK initialized and umask 0022 for existing permission fixtures; no assertions or required gates removed.

Compatibility proved: new adapter/current pre-decision Core afacd45298 typecheck/build/full suite (1797 pass, one skip). Missing host capability rejects decide explicitly. New Core/pinned new adapter supplies durable decisions; old adapter/new Core typechecks but does not expose the feature. Core canonical contracts are in src/execution.ts, src/dispatcher.ts and src/plugins.ts; propagation in src/dispatcher-sequential.ts and src/dispatcher-step-prompt.ts; adapter in Plugins src/dispatcher-plugin.ts. Audit/rejection/race and causal same-execution tests are in the linked diffs, with contract docs in Core docs/dispatcher.md and Plugins docs/dispatcher-decisions.md.

Branch protection settings were read, not changed; no enforced status contexts are currently configured. All actual checks on these exact heads are green. Both PRs remain open for normal review/merge; no forced push or protection bypass.

SOURCE ONLY. EXTERNAL authorized rollout/restart is required; building does not activate this change. No agent restart/self-update, deployment or mutation of execution ef9f5631-22fe-428f-8ef7-9896e45a1b1b, its ledger or checkpoints. Dirty operator worktrees were not modified. Git identity: Karsten Samaschke karsten@vanillacore.net.

## Final exact-head validation evidence - core `87b50e40bc888b61d13e66fef6859ad94afa6551`: [decision-interface-ci / full-validation (push)](https://git.vanillacore.net/harness/core/actions/runs/1/jobs/0) **success**; [decision-interface-ci / full-validation (pull_request)](https://git.vanillacore.net/harness/core/actions/runs/2/jobs/0) **success** - plugins `e41beee9d12671820b77a985fffde50eb3fdc829`: [plugins-ci / compatibility (push)](https://git.vanillacore.net/harness/plugins/actions/runs/104/jobs/0) **success** Paired source PRs: [Core #327](https://git.vanillacore.net/harness/core/pulls/327), [Plugins #82](https://git.vanillacore.net/harness/plugins/pulls/82). Core pins Plugins `e41beee9d12671820b77a985fffde50eb3fdc829` plus dispatcher adapter hash `2e138566d583aeac1478f81fb9fc1391b0d5fde89b911ac42e84bef571361627`. Local exact committed Core head: `npm run typecheck`, `npm test` and `npm run build` passed. **1811 tests: 1810 pass, one existing skip, zero failures**. Plugin adapter suite: **83/83 pass** with real Core host fixtures. Plugin agent-link build passed. Additional service suite: 41 pass/2 conditional skips; Fritz 3/3; dashboard API 32/32 plus actual host integration passed. The native CI workflows additionally validate their exact fetched heads in isolated containers. Test environment: native Matrix SDK initialized and umask 0022 for existing permission fixtures; no assertions or required gates removed. Compatibility proved: new adapter/current pre-decision Core afacd45298d4174d8768405527ddb126bdd8b140 typecheck/build/full suite (1797 pass, one skip). Missing host capability rejects decide explicitly. New Core/pinned new adapter supplies durable decisions; old adapter/new Core typechecks but does not expose the feature. Core canonical contracts are in src/execution.ts, src/dispatcher.ts and src/plugins.ts; propagation in src/dispatcher-sequential.ts and src/dispatcher-step-prompt.ts; adapter in Plugins src/dispatcher-plugin.ts. Audit/rejection/race and causal same-execution tests are in the linked diffs, with contract docs in Core docs/dispatcher.md and Plugins docs/dispatcher-decisions.md. Branch protection settings were read, not changed; no enforced status contexts are currently configured. All actual checks on these exact heads are green. Both PRs remain open for normal review/merge; no forced push or protection bypass. **SOURCE ONLY. EXTERNAL authorized rollout/restart is required; building does not activate this change.** No agent restart/self-update, deployment or mutation of execution ef9f5631-22fe-428f-8ef7-9896e45a1b1b, its ledger or checkpoints. Dirty operator worktrees were not modified. Git identity: Karsten Samaschke <karsten@vanillacore.net>.
fix(dispatcher): preserve explicit pause on blocked assessments
All checks were successful
decision-interface-ci / full-validation (push) Successful in 1m58s
decision-interface-ci / full-validation (pull_request) Successful in 2m8s
3e1e68c0a0
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
harness/core!327
No description provided.