page:docs-specs-platform-gaps-66-eval-exec-harness2-loom
Spec 66 — Evaluation and execution: lessons from harness2 and loom (WP-EXE-*, WP-EVL-*) reference
Date: 2026-10-21 · Status: round 4 for run C3 (owner decisions C3-1 and C3-2), revised after adversarial review rounds 1 (findings B1, M1–M9, N1–N8; §10), 2 (findings MF-R2-1…5, NH-R2-1…5; §11) and 3 (findings MF-R3-1…4, NH-R3-1…5; §12), each resolved in place. Approved at Gate S by owner decision C3-S1 (2026-10-21) on condition that MF-R3-1…4 are corrected before implementation starts; §12 records the corrections. It follows the spec 55 §3.0 pattern. The execution work packages WP-EXE-01…05 land in run C3. The evaluation work packages WP-EVL-01…10 are amendments to WP-CP-07, WP-CP-17, WP-FN-12, WP-CP-08 and WP-CP-22, and land in the runs that own those work packages (§4). Amended 2026-10-21 by owner decision C3-3 ("spec + eval now, serving later"): deepseek-ai/DeepInfer is a third source. Its adoptable evaluation patterns are folded into WP-EVL-02, WP-EVL-03 and WP-EVL-05 as amended acceptance criteria (§2A, §4), its non-adoptable ones are listed in §6, and serving it is the deferred design of spec 67. No work package, run, edge or flow changes: the WP-EVL work packages still land in C7b, C9a and C9b, not in C3.
Spec 66 — Evaluation and execution: lessons from harness2 and loom (WP-EXE-*, WP-EVL-*)
Date: 2026-10-21 · Status: round 4 for run C3 (owner decisions C3-1 and C3-2), revised after adversarial review rounds 1 (findings B1, M1–M9, N1–N8; §10), 2 (findings MF-R2-1…5, NH-R2-1…5; §11) and 3 (findings MF-R3-1…4, NH-R3-1…5; §12), each resolved in place. Approved at Gate S by owner decision C3-S1 (2026-10-21) on condition that MF-R3-1…4 are corrected before implementation starts; §12 records the corrections. It follows the spec 55 §3.0 pattern. The execution work packages WP-EXE-01…05 land in run C3. The evaluation work packages WP-EVL-01…10 are amendments to WP-CP-07, WP-CP-17, WP-FN-12, WP-CP-08 and WP-CP-22, and land in the runs that own those work packages (§4). **Amended 2026-10-21 by owner decision C3-3** ("spec + eval now, serving later"): deepseek-ai/DeepInfer is a third source. Its adoptable evaluation patterns are folded into WP-EVL-02, WP-EVL-03 and WP-EVL-05 as amended acceptance criteria (§2A, §4), its non-adoptable ones are listed in §6, and serving it is the deferred design of spec 67. No work package, run, edge or flow changes: the WP-EVL work packages still land in C7b, C9a and C9b, not in C3.
Inputs read in full:
- the inspiration digest of 2026-10-20 (owner decision C3-2), and every line it cites, re-read in the two read-only clones listed below;
- the fabric code cited below, at
origin/staging7de78b70a; - specs 10, 20, 30, 55 (as amended by this run), 60 and 65.
**Citation conventions.**
H2:isgoogle-research/harness2at1cfe254e8d25b15f37048c3730134686abe60335(Apache License 2.0, per-file copyright Google LLC). Paths are relative to the clone root, so the Python package lives underH2:harness2/(for exampleH2:harness2/core/runmark.py:41-115) and the scripts underH2:scripts/.LOOM:isa5c-ai/loomatd83e53851bfb1411e70156467bccf74eb6df2eb4(private, unpublished, ours).DI:isdeepseek-ai/DeepInferat9bd9cf243fc53ef9afbf8f04d391d989117d6ab9(Apache License 2.0,DI:LICENSE), read in a read-only clone; nothing in it was run. Its evaluation suite lives underDI:eval/.- Code paths without a prefix are paths in the fabric tree at
origin/staging7de78b70a. NN §xis section x of sibling spec NN, andNN:LLis line LL of sibling spec NN (the spec 55 convention).
**ID conventions.**
- New work packages: **WP-EXE-01…05** (run C3) and **WP-EVL-01…10** (runs C7b, C9a and C9b).
- New e2e flows: **FL-EXE-01…05**, a new spec 55 §6.2 area "Execution hardening (spec 66)".
- Risks: **ER-1…ER-11**.
---
0. Intent and owner decisions
0.1 Decisions that bind this spec
| # | Decision | Where executed |
|---|---|---|
| C3-2 | **Adopt the evaluation and execution lessons of harness2 and loom.** The execution items (process-group kill, fingerprinted replay and reuse, typed spend-free preflight, run identity lock, the indeterminate outcome) land in run C3. The evaluation items are scheduled onto the work packages that own the behaviour: WP-CP-07, WP-CP-17, WP-FN-12, WP-CP-08 and WP-CP-22. | §3 (C3), §4 (owner runs) |
| C3-3 | **DeepInfer: spec and evaluation now, serving later** (2026-10-21). DeepInfer's evaluation patterns join the WP-EVL work packages as amended acceptance criteria, in the runs those work packages already have; serving DeepSeek-V4.1-Flash through DeepInfer is a deferred design (spec 67, DF-10). | §2A, §4, §6, §7; spec 67 |
| C3-1 | **Console pull-forward.** C3 becomes the console run (WP-T3-25, WP-CP-04 stages 1 and 2, WP-CP-05 stage 1) and carries this spec's WP-EXE-01…05; the old C3 scope moves to C4. | spec 55 §0.1, §3.4–§3.5 (amendment 2026-10-20) |
Constraints the owner set for this spec, binding as written:
1. **harness2 is Apache-2.0 (Google LLC): reimplement ideas, copy no code.** Nothing is copied from H2:third_party/wb_runner/ or H2:third_party/patches/workbuddy-bench-runtime.diff, which carry a Tencent licence with an EU limitation. 2. **loom is ours, private and unpublished: port ideas, add no dependency.** Its root manifest is "private": true and declares an optional peer on the adapters SDK, today's @fabricstack/harness-sdk (spec 15 §3.1 row 4), at major 6 (>=6.0.0 <7, LOOM:package.json:4,73-79), while fabric ships @fabricstack/harness-sdk@7 and @fabricstack/harness-cli@7. 3. **No compatibility shims, aliases or re-export bridges (D10). No fallbacks:** explicit precedence, a reported winner, and typed errors on failure. 4. **DeepInfer is Apache-2.0 (DeepSeek): reimplement ideas, copy no code, run nothing from it (C3-3).** Fabric never imports a chat encoder from a checkpoint directory the way DI:eval/common/encoder.py:13-22 does (§6). 5. **One journal (I-11).** Every execution item lives inside the existing journal v2 (packages/babysitter-sdk/src/storage/journal.ts:23-34). Nothing adds a second log: process spawns, process exits, reuse refusals, result patches, prompt changes of reused effects, the fingerprinting marker and harness CLI version changes are journal events (§3), and no work package writes an append-only file of its own under the run directory.
0.2 Programme invariants that apply unchanged
Spec 55 §7 I-3 (no shims), I-6 (breakpoints before irreversible actions, never auto-approved), I-7 (journal sovereignty), I-10 (no test deleted, skipped, timeout-inflated or slept to green) and I-11 (the run journal is the source of truth); D10, D19 (no renamed package reaches registry.npmjs.org).
0.3 Where the digest and the code disagree — decided here
The digest was verified line by line against both clones and against fabric. Where it is wrong, this spec follows the code and says so:
1. **harness2's completion marker carries no output fingerprint.** H2:harness2/core/runmark.py:41-115 writes a version, the run id, a timestamp and a harness-tree fingerprint, and why_not compares only that fingerprint plus the executor identity of H2:harness2/benchmarks/workbuddy.py:738-758. WP-EXE-02's output digest is a fabric addition. It closes a fabric gap: an EFFECT_RESOLVED event names its resultRef but no digest of the result's bytes (packages/babysitter-sdk/src/runtime/commitEffectResult.ts:85-101). *Amended 2026-11-01 (spec 68 §0.4 item 1):* half right. The core marker carries no output fingerprint, but the JobBench and LAB adapters add one (H2:harness2/benchmarks/jobbench.py:751-756, refused on change at :762-773; H2:harness2/benchmarks/lab.py:618-623,745-754), and WorkBuddy checks executor identity instead. WP-EXE-02's output digest therefore has a harness2 precedent; no work package changes. 2. **The Tencent patch path.** The digest says patches/workbuddy-*. The file is H2:third_party/patches/workbuddy-bench-runtime.diff. The no-copy rule of §0.1 names the real path. 3. **kip-sdk/src/eval/suite.ts does not exist yet.** packages/kip-sdk/src/ has no eval/ directory, and the only suite.ts is the conformance test helper packages/kip-sdk/src/__tests__/conformance/suite.ts. The evaluation files are created by WP-CP-07 (spec 55 §3.15, affected paths). WP-EVL-01…05 amend that work package; they do not patch existing code. 4. **The ACP lane already escalates, but not on the group.** packages/adapters/codecs/src/lanes/acp/support.ts:66-75 sends SIGTERM, then SIGKILL after a grace period, to the direct child. It tree-kills only for a Windows shell launch (:22-24, :57-64). WP-EXE-01 covers this call site too, because a lane agent's tools are its grandchildren. 5. **EvalRun identity is evaluation work, not C3 work.** The digest's EXE-4 lists the judge model and the case-set digest. Those fields belong to an EvalRun, which has no behaviour before WP-CP-07 (C9a). WP-EXE-04 records the identity of harness-matrix lanes and live-stack results in C3, and WP-EVL-02 carries the judge-model lock with WP-CP-07. 6. **Process code changes and host CLI updates stay warnings.** run:iterate journals PROCESS_CODE_HASH_CHANGED and keeps reusing journaled results (packages/babysitter-sdk/src/cli/commands/runIterate.ts:109-124). Effects are keyed by invocation key (packages/babysitter-sdk/src/runtime/invocation/hashInvocationKey.ts:16-24), so an edited process re-sequences its own calls. The requested-config digest of WP-EXE-02 therefore covers the executor that is *requested* (harness id, requested model, and a closed include-list of execution-identity fields of the task's agent block, WP-EXE-02 AC1), not the process source. The prompt, the output schema and every other process-authored text are process source: a change to them is journaled (EFFECT_PROMPT_CHANGED) and never re-dispatches. Re-dispatching every effect after a process edit, including an edit of a shared prompt fragment, would break the recovery workflow that edits a process mid-run. The same cost rules out the harness CLI version as a reuse input: host CLIs such as Claude Code update themselves mid-run, and a version in the digest would re-dispatch every resolved agent effect of a live run. The version is recorded identity instead, read through the adapters' getCliInfo(), which WP-EXE-03 implements (WP-EXE-02 AC1: RunMetadata.executor, a HARNESS_CLI_VERSION_CHANGED warning modelled on PROCESS_CODE_HASH_CHANGED, and reportedIdentity per effect), and it keys the CI flake windows (WP-EXE-04 AC3), where a version change must start a new window. 7. **The loom release proof is not pinned to a run.** LOOM:babysitter.compat.json:7-10 records a run id, but LOOM:scripts/verify-babysitter-process.mjs:1-34 starts a new run and checks the process code hash. WP-EVL-07 adopts the content-addressed reference, not that script.
---
1. Intent
Fabric records what an agent did in a hash-chained journal. Five properties make a recorded result trustworthy, and fabric lacks each of them today (§2):
- every effect ends by its deadline and leaves no process behind;
- a reused result is provably the result of the same executor configuration and of the same bytes;
- a lane that cannot run fails before it spends anything;
- every result names the identity that produced it;
- an outcome that proves nothing is called
indeterminateand blocks every gate.
For evaluation, the same discipline gives six more properties:
- graders never leak into the material an improver sees;
- an ungraded case never counts as a score;
- noise is measured before a gain is believed;
- judging is blind;
- evidence is content-addressed;
- promotion is a compare-and-swap.
The ideas come from harness2's runner and judge, from loom's contracts, evidence and storage packages, and (C3-3) from DeepInfer's two-stage evaluation suite. The code is fabric's own.
---
2. Current state (origin/staging `7de78b70a`)
2.1 Process lifetime
- The hook dispatcher spawns
bashwithoutdetached(packages/babysitter-sdk/src/hooks/dispatcher.ts:126-130), so no process group is created. On timeout it sends SIGTERM to the direct child only (:136-139) and resolves only onclose(:146-153). A grandchild that holds stdout open keepsclosefrom firing, so the call outlives its deadline. Nothing escalates to SIGKILL. The dispatcher-script path repeats the pattern (:236-296). - The unified hooks-proxy subprocess,
invokeHooksProxy(packages/babysitter-sdk/src/harness/unified/subprocess.ts:91-152), spawns the hooks-adapter CLI (invoke --adapter …,:96) to run a hook event. On timeout it sends SIGTERM to the direct child and rejects at once, leaving the tree running (:109-150). It is a hook spawn, not an effect executor: itsInvokeOptionscarry no effect id or run directory, and its only reference outside tests is the re-export atharness/unified/index.ts:9. - **No spawn in
packages/babysitter-sdk/src/executes an effect.** Its otherspawn/execFilesites are the hook dispatcher (hooks/dispatcher.ts:126,236), harness discovery (harness/discovery.ts:301,harness/externalAgentDiscovery.ts:224), install support (harness/installSupport.ts:21), the Babysitter hooks helper (harness/hooks/babysitterHooks.ts:128), git calls (blueprints/marketplace.ts:98-141,processLibrary/active.ts:81), the output compressor (cli/commands/compressOutput.ts:87), the hooks-proxy availability probe (isHooksProxyAvailable,harness/unified/subprocess.ts:68, which runsharness-hooks --versionunder Node'stimeout: 3000) and two process probes (utils/ancestorWalk.ts:50,utils/processLiveness.ts:16).isProcessAlive(utils/processLiveness.ts:11-35) checks a pid only, so a reused pid passes it. - **The effect-executing spawn is the ACP lane runtime under a journal binding.**
startAcpLanespawns the agent withspawnAgentwhen the route gives alaunch(packages/adapters/codecs/src/lanes/acp/runtime.ts:54). Called with anAcpJournalBinding {runDir, effectId, agent, commit}(lanes/acp/journal.ts:44-49), it is the only writer of that effect's result: at session end it stores the transcript and resolves the effect through the injectedcommit(runtime.ts:226-236). The binding is injected, not imported, because@fabricstack/harness-codecsis dispatch-core and may not depend on the orchestration-core@fabricstack/orchestrator-sdk(scripts/check-architecture-boundaries.cjs:105-113). Its one production constructor is the environment'srunAgentEffect(apps/environment/src/acp/RunJournalLane.ts:80-110; binding at:98), which first verifies the journal and refuses an effect that is not a pendingagenteffect of the run (:83-88), and is served atPOST /api/fabric/runs/acp-effect(apps/environment/src/acp/RunJournalLaneHttp.ts:26,77). The ACP adapter accepts an optional journal factory (lanes/acp/adapter.ts:54,165-166), which no production code passes. A route that connects an in-process agent instead (the Claude Code route,lanes/acp/agents/claude/index.ts:34-37) spawns nothing through fabric. - The ACP lane escalates TERM → grace → KILL on the direct child, and tree-kills only a Windows shell launch (
packages/adapters/codecs/src/lanes/acp/support.ts:22-24,57-75). A late commit after the effect leftrequestedis refused (packages/babysitter-sdk/src/runtime/commitEffectResult.ts:35-38). - **Cancel kills nothing.**
task:cancel(packages/babysitter-sdk/src/cli/main/taskCommands.ts:268-287) andcommitEffectCancellation(packages/babysitter-sdk/src/runtime/commitEffectResult.ts:143-186) write a cancelled result and anEFFECT_CANCELLEDevent. Noprocess.killwith a signal exists anywhere underpackages/babysitter-sdk/src/. The event'steardownfield knows only"deleted" | "orphaned", for the AX Job (packages/babysitter-sdk/src/runtime/types.ts:121). - The hook result types have no timeout state.
HookExecutionResult.statusis"success" | "failed"(packages/babysitter-sdk/src/hooks/types.ts:40), andHookResultcarries onlysuccess: boolean(:28-34). The dispatcher reports a timeout asfailedwithexitCode: null(dispatcher.ts:148-149,160). The"timeout"athooks/types.ts:91isOnTaskCompletePayload.status, the task status handed *to* the on-task-complete hook, not a hook result. - The hook and lane spawns have no
detachedflag, so today a Ctrl-C reaches them through the terminal's foreground process group. Making each spawn a group leader (WP-EXE-01 AC1) removes that path, so WP-EXE-01 AC8 adds an explicit parent-exit and signal teardown. The environment runs underNodeRuntime.runMain(apps/environment/src/bin.ts:88-93), which turns SIGINT and SIGTERM into fiber interruption and runs layer finalizers. - The cross-package placement is fixed by the boundary rules:
@fabricstack/orchestrator-sdkmay depend on dispatch-core packages (check-architecture-boundaries.cjs:106-108) and already reaches@fabricstack/harness-corethrough@fabricstack/harness-sdk(packages/babysitter-sdk/package.json:87,packages/adapters/sdk/package.json:58), while@fabricstack/harness-codecsdepends on@fabricstack/harness-coredirectly. The process-tree primitives therefore live in@fabricstack/harness-core, which both consumers can import.
2.2 Effect reuse and result integrity
- Journal v2 carries
formatVersion,prevHashand an RFC 8785 checksum per event (packages/babysitter-sdk/src/storage/journal.ts:23-34,125-160; canonical JSONstorage/canonical-json.ts). Every event of a v2 journal hasformatVersion: 2, whichever SDK wrote it, so the format version cannot tell a pre-upgrade event from a post-upgrade one. The journal already marks a format transition with an event: the first append to a legacy v1 journal writes aJOURNAL_UNVERIFIED_LEGACYmarker before the new event (journal.ts:42-46). WP-EXE-02 AC6 uses the same pattern. EFFECT_RESOLVEDcarrieseffectId, status, resultRef, error, stdoutRef, stderrRef, startedAt, finishedAtand optionalexecution,executionOutcomeandacp(commitEffectResult.ts:85-101). The stored result (packages/babysitter-sdk/src/storage/types.ts:123-144) has no digest of its own bytes, so an editedresult.jsonreplays without notice.executionOutcome.phasemay be"TimedOut"(runtime/types.ts:63-72), but nothing stops a commit ofstatus: "ok"with that phase.- The invocation key hashes only
processId:slot:taskId(hashInvocationKey.ts:16-24). Nothing about the executor enters reuse. The task intrinsic looks the key up (runtime/intrinsics/task.ts:88-92), first under the primary key and then, for a call without an explicit key, under the legacy step-id key (:76-89), and returns a resolved record's stored result (:97-106); a key never seen is requested anew (:94). The index refuses a secondEFFECT_REQUESTEDfor a key it already maps (runtime/replay/effectIndex.ts:214-218,Duplicate invocation key detected), so a re-request of the same call needs an explicit retirement rule (WP-EXE-02 AC3). - The run metadata records the harness only as a name:
RunMetadata.harness?: string(storage/types.ts:15), set byrun:createfrom--harnessor the detected adapter (cli/main/runCreate.ts:125-140) and consumed bypinActiveAdapterToRecordedHarness(cli/commands/runIterate.ts:44). No CLI version, model or adapter configuration is recorded anywhere. The adapter interface declares an optionalgetCliInfo(): Promise<{command, version?, path?}>(harness/types.ts:219), but **no adapter implements it**:git grep -n getCliInfofinds only that declaration and its copy inpackages/genty/platform/src/harness/types.ts:340, and none of the eleven adapters underharness/adapters/defines it. The only version read today is discovery'scheckCliAvailable(harness/discovery.ts:95-123), which runs<cli> --version(:116) and discards a failed or unparseable probe without a reason (:118-120, "best-effort"). The CLI command of each harness comes from the catalogue'scliCommand(harness/registry.ts:44-63, field at:51; for exampleclaude,codex,gemini,cursor-agent,opencode,copilot,pi,omp; at the time of writing the catalogue still namedgh copilotfor github-copilot,pifor oh-my-pi andcursorfor cursor, corrected in C3 fix round 1, 2026-10-22). WP-EXE-03 implementsgetCliInfo()on every adapter, with an explicitunreportedresult (AC8), and WP-EXE-02 reads it. - The agent block of a task definition is
AgentTaskOptions(packages/babysitter-sdk/src/tasks/types.ts:33-42): the responder-routing fields ofResponderRoutingOptions(:18-29),name,prompt(AgentPrompt, a string or a JSON record,:31),outputSchema,model,provider,approvalMode,maxTurns, and an open index signature[key: string]: unknown. The prompt and the output schema are process-authored text; a digest that took the whole block would make every prompt edit, and any timestamp or path a process interpolates into a prompt, a reuse input. - The documented recovery path rewrites a stored result in place:
run:recover-process-error --patch-effecteditstasks/<effectId>/result.json(cli/main/runCreate.ts:582-587) and then rewrites the journal without thePROCESS_RUNTIME_ERRORevent (:589); the recovery prompt tells agents to use it (packages/babysitter-sdk/src/prompts/templates/recovery.md:12). An output digest must survive this path (WP-EXE-02 AC7). EffectResultCache(packages/babysitter-sdk/src/tasks/resultCache.ts:31-49) has no production importer. It is not a reuse path, and this spec does not build on it.
2.3 Lane preflight and failure classification
- Failure classes are
red | product-flake | infra-flake | auth-expired | quota-exhausted(scripts/harness-matrix/lib.mjs:16). Theauth-expiredandquota-exhaustedclasses are assigned by regexes over the lane's failure text (:220-229), after the lane has run and spent. harness-matrix.ymlvalidates only the OS-support declarations and the quarantine file before the lanes run (.github/workflows/harness-matrix.yml:90-91).- A lane with no artifact gets
status: 'missing'(lib.mjs:248) and is then classifiedredlike a product failure. - The lanes do not run in
harness-matrix.ymlitself: itstier1andtier2jobs call the reusablelive-stack.yml(.github/workflows/harness-matrix.yml:115-141). Inside it, the step "Run selected live stack E2E" hastimeout-minutes: 90(.github/workflows/live-stack.yml:329-330) and runs the root scriptstest:e2e:live-stack:*(package.json:153-158) overpackages/adapters/cli/tests/live-stack/; the gate reads each lane'slive.adapters.*.json(scripts/harness-matrix/cli.mjs:88-98). The run summary fills agent, provider and model cells from "Filename-derived fallback values" when the report lacks them (live-stack.yml:594-596). - **The lane deadlines that exist.** Three nested limits apply to a lane today. The innermost is the producer's per-command deadline: the run step sets
LIVE_STACK_COMMAND_TIMEOUT_MS: '4800000'(80 min,live-stack.yml:357), whichpipeline-scenario.test.ts:22anddocumented-install.test.ts:301pass as the harness command'stimeoutMs; setup commands useSETUP_TIMEOUT_MS(2 min,primary-live-runner.ts:86). At that deadlineexecuteChildProcessCommandalready kills the command's process group, TERM then KILL after 1 s (primary-live-runner.ts:527-590, timer:571-577), but it returns only an exit status (:583), so the result artifact cannot say the lane was stopped. Next is the vitest per-test timeoutLIVE_STACK_TEST_TIMEOUT_MS: '4860000'(81 min,live-stack.yml:356, consumed atpipeline-scenario.test.ts:54), which ends the test without an artifact. Outermost is the step'stimeout-minutes: 90(:330). The existing contract test asserts only that the test timeout exceeds the command timeout and that the step covers the test (packages/adapters/cli/tests/live-stack/scenario-contract.test.ts:201-221), and its step regex (:202) matches only steps named "Run selected live stack E2E". WithoutLIVE_STACK_REQUIRE_EVIDENCE=1the tests fall back to local defaults when the variables are unset (pipeline-scenario.test.ts:22,54). - **The per-command deadline does not bound the test.** The vitest timeout covers the whole scenario, and the harness command is the last of a sequence:
buildPrimaryLiveStackCommandsreturns[...setupCommands, executionCommand](primary-live-runner.ts:316), with up to eight setup commands (:182-191,:260-315:npm run generate:plugins,harness install, two globalnpm installs unlessLIVE_STACK_PUBLISHED_PACKAGES=1, the plugin install, the artifact directory, and one or two process-mode fixtures), each bounded bySETUP_TIMEOUT_MS, andrunPrimaryLiveStackScenarioruns them one after another inside the one test (:384-388). The harness command's deadline therefore falls at T_setup + 80 min while the test timeout falls at 81 min: whenever setup takes more than the 60 s gap, the vitest timeout fires first, the test ends without an artifact and the producer never kills the command group. The documented-install verification has the same shape at a smaller scale: three commands (documented-install-runner.ts:104-136), each given the wholeLIVE_STACK_COMMAND_TIMEOUT_MS(:104), run in sequence (:326-328) after a manifest fetch, inside one test whose timeout isLIVE_STACK_TEST_TIMEOUT_MS(documented-install.test.ts:301,306). - **The pre-release gate runs the same producers.**
.github/workflows/live-stack-published.ymlis the published-consumer gate that must pass before a channel tag moves (:1-12);publish-npm-private.yml:400andpublish-packages-from-tag.yml:356call it. Its fourlive_stack_*jobs share the step list&published_steps(:462), whose step "Run selected live stack E2E" (:585-627;LIVE_STACK_TEST_TIMEOUT_MS960,000 andLIVE_STACK_COMMAND_TIMEOUT_MS900,000 at:617-618) runsnpm run test:e2e:live-stack:pipelinewithLIVE_STACK_PUBLISHED_PACKAGES=1, after "Install published packages" (:493) and "Install harness agents" (:565). Itsdocumented_installjob (:388-445, harnessesclaude-codeandcodexat:402) runsnpm run test:e2e:live-stack:documented-installin the step "Verify documented published install" (:436; 720,000 and 300,000 at:443-444) and uploads no result artifact. No step of the workflow runs a preflight, and it has no filename-derived summary block (grep -n -i "fallback\|derived"over the file: no match). - No budget concept exists:
git grep -i budgetoverscripts/harness-matrix/,live-stack.ymlandharness-matrix.ymlfinds nothing.quota-exhausted(lib.mjs:16,222) is a provider-side refusal recognised by regex.
2.4 Run identity
scripts/harness-matrix/lib.mjs,scripts/harness-matrix/cli.mjsandscripts/live-stack/matrix.mjscontain noversiontoken at all (git grep -i versionover the three files: no match). A lane result names no harness CLI version, reported model, SDK version or protocol version.- The flake window (
lib.mjs:17-18,366-371) and the quarantine-exit count of five greens (lib.mjs:380-384, reported atcli.mjs:143) average whatever ran, across any change of harness or model. **No W-10 consecutive-green counter exists in code** (git grep -i consecutive -- scripts/harness-matrixfinds only the quarantine exit andrehearsal.mjs:56); the W-10 count (spec 55 §4.1 W-10 row,55:1100; the C7b matrix window,55:410) is created by WP-TEST-03 completion in C7b. scripts/live-stack/matrix.mjs:39labelsgoogle-gemini31but runsgemini-3.5-flash, the model ofgoogle-gemini35flashon:38. The mislabelled key is consumed by.github/workflows/qa-daily.yml:92,.a5c/processes/ci-qa-review.mjs:75,.a5c/processes/issue-339-claude-bi-live-stack.inputs.json:33,46-48,.a5c/processes/live-stack-matrix-stabilization.mjs:183anddocs/development/07-live-stack-qa-guide.md:16,19,21,23,104(git grep -n google-gemini31; thegoogle-gemini31prokey ofmatrix.mjs:40andlive-stack-published.yml:184is a different, correctly labelled key).
2.5 Outcomes
- No
indeterminateexists anywhere underpackages/orscripts/(case-insensitivegit grep: no match). - Effect status is
"ok" | "error" | "cancelled"(storage/types.ts:129), and replay rejects anything else (runtime/replay/effectIndex.ts:244-245).
2.6 Evaluation
EvalSuite,EvalCase,EvalRunandEvalResultexist only as declared kinds (packages/kradle/core/src/resource-model.js:106-109, registered atkubernetes-controller.js:130-133, at7de78b70a; atad7d9fd18they are:107-110and:144-154, spec 68 §0.4 item 10).EvalResultrecords a score with no graded flag or error (:109).packages/kip-sdk/src/learn/holdscompile.tsandindex.tsonly. The suite, runner and compare modules are WP-CP-07's new files (§0.3 item 3).
---
2A. What is adopted, and from where
| Idea | Source | Fabric work package |
|---|---|---|
| Kill the process group at the wall timeout; TERM, grace, then KILL | H2:harness2/benchmarks/jobbench.py:55-69; H2:harness2/benchmarks/workbuddy.py:458-470 | WP-EXE-01 (the live-stack producer already does this per command, §2.3; WP-EXE-05 reports it) |
| A timed-out unit is never marked complete | H2:harness2/benchmarks/jobbench.py:845-849 | WP-EXE-02 AC4 |
| Reuse only when the executor fingerprint matches; say why not | H2:harness2/core/runmark.py:41-115; H2:harness2/substrate/base.py:26-32 | WP-EXE-02 |
| A run directory refuses different models or tasks | H2:harness2/cli/run_sweep.py:209-235 | WP-EXE-04 AC3 |
| Spend-free preflight before anything runs | H2:harness2/preflight.py:28-160; H2:harness2/install.py:69-103 | WP-EXE-03 |
An indeterminate outcome apart from pass and fail (loom's inconclusive is not adopted, §6) | LOOM:packages/model-core/src/contracts.ts:158-162 | WP-EXE-05 |
| A zero-exit command without its required artifacts does not satisfy | LOOM:docs/quality-scorecard.md:47 | WP-EXE-05 AC2, WP-EVL-06 |
| Answer-key and grader-marker tripwire; rubric words refused in prompts | H2:harness2/core/context.py:399-518; H2:harness2/core/spec.py:111-126 | WP-EVL-01 |
| "Could not grade" is None, counted apart; a failed re-judge never overwrites; the judge model is locked | H2:harness2/core/judge.py:15-19,46-53; H2:harness2/core/report.py:86-111; H2:harness2/cli/judge.py:65-81,169-171 | WP-EVL-02 |
| Noise floor, fallback, most-picks-were-base and mixed-units warnings | H2:harness2/core/report.py:122-164 | WP-EVL-03 |
| Blind selector: seeded anonymous ids, base excluded, full artifacts on disk | H2:harness2/core/selection.py:71-111,183-219 | WP-EVL-04 |
| Seeded, domain-stratified splits that are never overwritten; an expected-count ledger | H2:harness2/core/schedule.py:130-163; H2:scripts/split_tasks.py:46-60; H2:harness2/core/ledger.py:89-113 | WP-EVL-05 |
| Pass = score ≥ target AND at least one confirmed finding | LOOM:scripts/public-composition/aggregate.mjs:2 | WP-EVL-06 |
| Content-addressed evidence refs naming producer, revision and environment; predicted-vs-observed diff | LOOM:packages/runtime-evidence/src/index.ts:65-110 | WP-EVL-07 |
| CAS model activation with lineage and content checks | LOOM:packages/storage/src/index.ts:284-305 | WP-EVL-08 |
| Counterexample needs a real divergence; revision version = previous + 1; typed reason checked against the diff; confidence recomputed | LOOM:packages/model-learning/src/index.ts:192-300,222-244 | WP-EVL-09 |
| Composition checks the next requirement against the previous effect; an unsatisfiable bridge throws | LOOM:packages/candidate-algebra/src/index.ts:168-238 | WP-EVL-10 |
| Generation and scoring are separate stages; re-scoring reads stored outputs and needs no regeneration (C3-3) | DI:eval/README.md:127-131,178-184; DI:eval/score.py:27-40 (scoring reads raw_rank*.jsonl only) | WP-EVL-02 AC6 |
| A coverage-complete flag: expected tasks × samples against what was scored (C3-3; DeepInfer only warns, fabric invalidates) | DI:eval/score.py:126-140,161-162 | WP-EVL-05 AC4 |
| A run meta record of the generation settings, written before generation and read by the scorer (C3-3) | DI:eval/run_eval.py:269-298; DI:eval/score.py:95-101,129,150-160 | WP-EVL-05 AC5 |
| Unbiased pass@k, 1 − C(n−c, k) / C(n, k) (C3-3; DeepInfer's min(k, n) approximation is not adopted, §6) | DI:eval/common/passk.py:8-19 | WP-EVL-03 AC5 |
| Rule-based and LLM verdicts both stored per case, with their agreement reported (C3-3) | DI:eval/score.py:52-55,75-77,185-187 | WP-EVL-02 AC7 |
---
3. Execution work packages (run C3, Track C)
The format follows 00-intent.md acceptance criterion 3; sizes are S/M/L as in spec 55 §3.14. Track C of run C3 (console/c3-c-exec) lands the five work packages in this merge order, each after every work package its Dependencies line names: WP-EXE-01 (it creates the exec-hardening job) → WP-EXE-03 (the lane preflight and getCliInfo() on every adapter, the one version reader behind both a lane's harnessCliVersion and the run's RunMetadata.executor) → WP-EXE-04 (the identity record, which reads that probe, and requestedConfigDigest) → WP-EXE-02 (reuse, which extends fingerprint.ts) → WP-EXE-05. Every PR passes the provenance guard of §7.
WP-EXE-01: Process-group termination on timeout, cancel and owner exit
- *Hook spawns* — bounded, not journaled: the dispatcher (hooks/dispatcher.ts:126 and :236) and the hooks-proxy subprocess invokeHooksProxy (harness/unified/subprocess.ts:109). AC1–AC3, AC7 (dispatcher) and AC8 apply. - *The effect spawn* — bounded and journaled: spawnAgent (lanes/acp/support.ts) when startAcpLane runs under an AcpJournalBinding, whose production caller is the environment's runAgentEffect (RunJournalLane.ts:80-110). AC1–AC6, AC8 and AC9 apply. A spawnAgent launch without a binding is bounded (AC1–AC3, AC8) and not journaled. - *Out of scope*: a route that connects an in-process agent (the Claude Code route, agents/claude/index.ts:34-37) spawns nothing through fabric; its session ends through the lane's close and cancel (lanes/acp/adapter.ts:169-170). The live-stack producer already kills its command groups (§2.3); WP-EXE-05 makes that stop visible. The --version probes (isHooksProxyAvailable, harness/unified/subprocess.ts:68; discovery, harness/discovery.ts:116; and WP-EXE-03's readHarnessCliInfo) run a CLI's version flag under Node's own timeout option and execute no hook or effect; they are not converted.
- new packages/adapters/core/src/process-tree.ts in @fabricstack/harness-core, exported from its node entry (src/index.ts), not from ./browser: spawnInGroup, terminateGroup, readPlatformStartTime, the typed ProcessGoneError and StartTimeUnavailableError, the per-process live-group set, terminateLiveGroups and installSignalTeardown; - packages/babysitter-sdk/package.json: a direct dependency on @fabricstack/harness-core 7.0.0 (allowed by check-architecture-boundaries.cjs:106-108; already in its install closure through @fabricstack/harness-sdk, §2.1); - packages/babysitter-sdk/src/hooks/dispatcher.ts (both spawn sites) and hooks/types.ts (HookExecutionResult.status and HookResult, AC7); harness/unified/subprocess.ts (:109-150); cli/main.ts (installs the signal teardown, AC8); - new packages/babysitter-sdk/src/runtime/effectProcess.ts (recordEffectProcess, reapEffectProcesses), exported from the package root beside commitEffectResult; runtime/commitEffectResult.ts (commitEffectCancellation), cli/main/taskCommands.ts (task:cancel) and cli/commands/runIterate.ts (the reap of AC9); - packages/babysitter-sdk/src/runtime/types.ts (teardown gains "killed"; the two new event payloads) and runtime/replay/effectIndex.ts (SupportedEventType at :21 gains EFFECT_PROCESS_SPAWNED and EFFECT_PROCESS_EXITED; one exit per spawned pid); - packages/adapters/codecs/src/lanes/acp/support.ts (spawnAgent spawns through spawnInGroup; terminate ends the group or tree), lanes/acp/journal.ts (AcpJournalBinding gains the required recordProcess: AcpJournalProcessRecorder, injected as commit is, :36-49), lanes/acp/runtime.ts (reports the agent's spawn and exit through it, :54; terminates the agent on a refused spawn record, AC4) and lanes/acp/types.ts (AcpLaneError.kind, :154, gains journal-failed and cancelled); - apps/environment/src/acp/RunJournalLane.ts (the binding at :98 passes recordProcess: recordEffectProcess; runAgentEffect reaps before its pending check, AC9, and maps a commit refused after a cancel to the typed RunJournalLaneError("cancelled")) and apps/environment/src/acp/RunJournalLaneHttp.ts (the route layer's finalizer calls terminateLiveGroups, AC8); - new shared fixtures e2e-tests/fixtures/process-tree/: a spawner whose grandchild ignores SIGTERM and holds stdout and a sentinel pipe; an ACP agent that starts that grandchild, then serves the ACP mock agent's v1 script and holds its prompt turn open until terminated; a lane-owner script that runs one agent effect through startAcpLane with the binding RunJournalLane.ts:98 builds; - new apps/environment/src/acp/EffectProcess.test.ts (beside JournalSovereignty.test.ts) and tests beside each changed module; - new scripts/__tests__/inspiration-provenance.test.mjs and its fixtures scripts/__tests__/fixtures/inspiration-provenance/ (§7); - .github/workflows/ci.yml: new job exec-hardening (ubuntu-latest and windows-latest), uploading flow-results-exec-hardening-<os>.
1. On POSIX every spawn site above starts its child through spawnInGroup with detached: true. At the deadline (a hook) or on terminate (a lane agent) it sends SIGTERM to the group (process.kill(-pgid, 'SIGTERM')), waits the grace period (default 2,000 ms; a configured value is reported with its source), then sends SIGKILL to the group. Test per site with the fixture: after the call settles, the grandchild's sentinel pipe reaches EOF, which proves the process is gone. 2. A hook call (dispatcher or hooks-proxy) settles on the leader's exit or on the deadline plus the grace period, whichever comes first. It never waits for close once the deadline has passed. Test: the fixture's grandchild holds stdout open, and the call settles within timeout + grace + 500 ms. 3. On Windows there is no group signal and no grace period. **At the deadline** (or on terminate), while the leader is still alive, the tree is killed with taskkill /pid <pid> /T /F; the reported grace is {ms: 0, source: "windows-tree-kill"}. Test on windows-latest: a live three-level tree is killed at the deadline and the grandchild's sentinel pipe reaches EOF. (ER-1 states the same rule.) 4. **The effect spawn is journaled, not written to a side file.** When startAcpLane runs under an AcpJournalBinding and spawns the agent, it calls binding.recordProcess({kind: "spawned", pid, pgid}) before it sends the ACP initialize, and binding.recordProcess({kind: "exited", pid, exitCode, signal, reason}) when the agent exits. recordEffectProcess (orchestrator-sdk) appends under withRunLock, reading the start times itself (AC5): EFFECT_PROCESS_SPAWNED {effectId, pid, pgid | null, platformStartTime, startTimeSource, hostId, owner: {pid, platformStartTime}, spawnedAt}, where hostId is os.hostname() and owner is the recording process; and EFFECT_PROCESS_EXITED {effectId, pid, exitCode | null, signal | null, reason: "exited" | "deadline" | "cancelled" | "parent-exit" | "reaped", terminated?}. The index accepts one EFFECT_PROCESS_EXITED per spawned pid of an effect, only after its EFFECT_PROCESS_SPAWNED. When a cancel or a reap has already journaled the exit, recordEffectProcess appends nothing and returns {recorded: false, existing: <reason>}, which the lane reports. recordProcess is required by the binding type, so every binding constructor supplies it; a recorder failure ends the session with the typed AcpLaneError('journal-failed') before the prompt is sent. **The window between spawn and record is closed by the recorder.** spawnAgent starts the agent (runtime.ts:54) before the spawn can be journaled, so a task:cancel in that window finds no EFFECT_PROCESS_SPAWNED and signals nothing. recordEffectProcess({kind: "spawned"}) therefore checks, under the same withRunLock, that the effect is still requested; if it is not, it appends nothing and returns the typed refusal {recorded: false, refused: "effect-not-requested", status}. The lane then terminates the agent's group or tree (AC1/AC3), sends no initialize and no prompt, and ends with the typed AcpLaneError('cancelled'), which runAgentEffect maps to RunJournalLaneError("cancelled"). No EFFECT_PROCESS_SPAWNED is ever appended for an effect that has left requested. No file under tasks/<effectId>/ or elsewhere in the run directory records processes. Tests: an agent effect run through runAgentEffect with the process-tree agent fixture journals one EFFECT_PROCESS_SPAWNED (start time and owner set) before the first ACP request and one EFFECT_PROCESS_EXITED with reason exited after close, and both verify with loadJournalWithIntegrity; with a test recorder that commits task:cancel for the effect and then delegates to recordEffectProcess, the spawn is refused, the journal holds EFFECT_CANCELLED and no EFFECT_PROCESS_SPAWNED, the fixture's grandchild sentinel pipe reaches EOF, the ACP mock agent receives zero requests, and runAgentEffect rejects with cancelled. 5. **Platform start time, per OS, with no native code.** readPlatformStartTime(pid) returns {value, source}: on Linux, field 22 (starttime, clock ticks since boot) of /proc/<pid>/stat joined with /proc/sys/kernel/random/boot_id, source procfs; on macOS, ps -o lstart= -p <pid> parsed to an ISO second, source ps-lstart; on Windows, Win32_Process.CreationDate read with powershell -NoProfile -NonInteractive -Command "(Get-CimInstance Win32_Process -Filter 'ProcessId=<pid>').CreationDate.ToUniversalTime().ToString('o')", source cim-creationdate. A pid that no longer exists returns the typed ProcessGoneError; a source that cannot be read throws the typed StartTimeUnavailableError, and such a pid is never signalled. Tests per OS leg: the value of a live child is stable across two reads, and differs for a new process. *Amended 2026-10-23 (C3 fix round 2): on Windows the same Win32_Process.CreationDate query, source cim-creationdate, is answered by one long-lived PowerShell host per process (started by the first read, unreferenced while idle, killed at process exit) instead of one powershell spawn per read. A cold PowerShell start and CIM provider took most of a 10 s test case on a fresh windows-latest runner, a cost a per-read spawn paid on every poll of AC6's 5 s confirmation bound. A host that cannot start, exits or prints an unexpected line fails every read it holds with StartTimeUnavailableError; the next read starts a new host. Tests (process-tree.win32.test.ts): each read fits inside half the confirmation bound, and a process whose only work is one read stays alive for it and then exits; process-tree.test.ts covers the typed failures.* *Amended 2026-10-25 (C3 fix round 3): the host is powershell -NoProfile -NonInteractive -Command -, which executes the lines it reads on stdin: a fixed prelude defines Read-FabricStartTime and runs a first query, and each read is one line Read-FabricStartTime <id> <pid> of two integers the reader produced or validated. Its query is Get-CimInstance Win32_Process -Filter "ProcessId=<pid>" -OperationTimeoutSec 4, .CreationDate.ToUniversalTime().ToString('o'): the spec's query plus a CIM operation timeout. Every host line is a cmdlet, a function or a method of a core type, so the host runs unchanged under Constrained Language Mode (WDAC/AppLocker-locked hosts are supported targets; the round-2 host's [Console]::In/[Console]::Out calls failed there). Bounds: the host must print READY within 20 s (a cold PowerShell and CIM provider start), and each read sent to a ready host must be answered within 5 s (AC6's confirmation bound); a host that misses a bound, prints a line outside the protocol, cannot start or exits is killed and fails every read it holds with StartTimeUnavailableError, and the next read starts a new host, so a stuck CIM query never holds a run lock or the reads behind it. Tests: process-tree.test.ts (every OS leg, a stand-in host e2e-tests/fixtures/process-tree/fake-start-time-host.mjs) covers a read never answered (typed failure at its deadline, host killed), a host never ready, concurrent reads of different pids answered out of order, GONE, an unexpected line (host killed, every held read typed), a non-pid refused before anything is written, and the slot starting a new host after a kill; process-tree.win32.test.ts runs the real host, asserts each read within half the confirmation bound, and runs the same reads in a session switched to Constrained Language Mode.* 6. **Cancellation kills what the journal names.** commitEffectCancellation reads the effect's EFFECT_PROCESS_SPAWNED events that have no EFFECT_PROCESS_EXITED from the effect index, built from the journal loadJournalWithIntegrity verified. For each: a record whose hostId is not this host is never signalled (reason other-host); otherwise it re-reads the platform start time, and if it matches, terminates the group or tree (AC1/AC3 escalation) and appends EFFECT_PROCESS_EXITED with reason cancelled; if it differs (pid-reused) or the pid is gone (process-gone), it never signals the pid. It then appends EFFECT_CANCELLED with teardown: "killed" when it terminated at least one process, or teardown: "orphaned" with the typed reason otherwise. An effect with no journaled spawn (a host-executed agent task, an in-process lane) is cancelled as today, without teardown. The effect's owner then sees its agent exit; its late commit is refused (commitEffectResult.ts:35-38), and runAgentEffect rejects with RunJournalLaneError("cancelled"), not lane-failed. Tests (EffectProcess.test.ts): task:cancel, run as a separate CLI process during an agent effect that runAgentEffect runs with the process-tree agent fixture, leaves no grandchild, journals cancelled and teardown: "killed", and runAgentEffect rejects with cancelled; a spawn record that names an unrelated live process with a different start time journals orphaned/pid-reused, and that process survives; a spawn record with another hostId journals orphaned/other-host and signals nothing; a journal whose spawn event was edited fails loadJournalWithIntegrity, and nothing is signalled. *Amended 2026-10-22 (C3 fix round 1, review must-fix): a kill is journaled only once it is confirmed. After terminating, commitEffectCancellation re-reads the process (confirmProcessGone, a POSIX zombie counts as gone) and appends EFFECT_PROCESS_EXITED with terminated: true and the method used (group-signal or tree-kill; the index rejects a method without terminated: true). A kill that reported no method while the process had already ended journals orphaned/process-gone with terminated: false. A kill that threw, signalled nothing, or left the process running journals no exit, and the cancel's teardown is orphaned with the typed reason kill-failed; the next reap (AC9) tries again. Tests assert the method on both OS legs.* 7. A timed-out hook reports the new status "timeout": HookExecutionResult.status (hooks/types.ts:40) becomes "success" | "failed" | "timeout", and HookResult (:28-34) gains outcome: "success" | "failed" | "timeout" beside success (timeout when any executed hook timed out, success: false). The dispatcher (dispatcher.ts:148-149,160) never reports a timeout as failed. WP-EXE-05 maps timeout to indeterminate. 8. **Owner exit and signals.** Every group spawned through spawnInGroup is held in the live-group set of its process until it exits. spawnInGroup registers one synchronous process.on('exit') listener that kills every group still live (SIGKILL on POSIX, taskkill /T /F on Windows); an exit listener changes no signal behaviour. Signals stay with the process entry point. The orchestrator-sdk CLI (cli/main.ts) calls installSignalTeardown(): on SIGINT, SIGTERM and (POSIX) SIGHUP it terminates every live group with the AC1/AC3 escalation and then exits with the signal's conventional code (130, 143, 129). The environment already turns these signals into fiber interruption under runMain (bin.ts:88-93). The finalizer of the RunJournalLaneHttp route layer calls terminateLiveGroups(), which journals EFFECT_PROCESS_EXITED with reason parent-exit through each journaled group's recorder before it returns. Tests: on ubuntu-latest, run:iterate is started on a run whose hook spawns the fixture, SIGINT is sent to the CLI, the grandchild's sentinel pipe reaches EOF and the CLI exits 130. On both legs, a CLI that exits normally while a hook tree is live leaves no grandchild. Closing the scope of a runtime that holds the route layer while an agent effect runs leaves no grandchild and journals parent-exit. 9. **Reap after the owner dies hard.** An owner killed with SIGKILL, by the OOM killer or by pod eviction runs neither AC8 path. reapEffectProcesses(runDir) runs under withRunLock at the start of every run:iterate and of every runAgentEffect (before its pending check). For each EFFECT_PROCESS_SPAWNED with no exit, on this host: if the recorded owner is alive (its pid exists with the recorded start time, read by readPlatformStartTime; a bare pid check such as isProcessAlive is not used, because a reused pid passes it), the process is a live effect of another process and is left alone. Otherwise the child's start time is re-checked: on a match the group is terminated and EFFECT_PROCESS_EXITED is journaled with reason reaped and terminated: true; if the child is gone or its start time differs, the exit is journaled with terminated: false and nothing is signalled. A spawn record from another host is left and listed in the iteration summary as foreign-host-process. The reaped effect stays requested: nothing resolves it, and it can be run again. Tests on both legs: the lane-owner fixture is killed (SIGKILL on POSIX; taskkill /pid <owner> /F, without /T, on Windows) while its agent effect runs; the next run:iterate leaves no grandchild and journals reaped. A run:iterate while the owner is alive leaves its agent running and appends nothing. An owner whose pid now belongs to another process (start time differs) counts as dead. *Amended 2026-10-22: terminated: true and its method are journaled only after the kill is confirmed (AC6); a reap whose kill fails journals nothing, lists the process as kill-failed in the iteration summary and retries at the next reap.* 10. Tests wait on process and pipe events only. They contain no sleep and no polling loop (scripts/check-no-sleeps-in-tests.cjs green), and no suite timeout is raised. 11. FL-EXE-01 is green in ci.yml:exec-hardening on both OS legs.
- **Objective**: Every process fabric spawns for a hook or to execute an effect ends by its deadline, together with every descendant. A cancelled effect stops its live processes, and a process that owns spawned groups takes them with it when it exits or is interrupted. On POSIX each spawn creates its own process group and escalates TERM → grace → KILL on the group; on Windows the tree is killed at the deadline. The call settles on the deadline, not on stdio
close. The processes spawned to execute an effect are journal events, so cancellation and reaping signal only what the hash-chained journal names. - **Spawn sites, by role** (§2.1):
- **Affected paths**:
- **Acceptance criteria**:
- **Test requirements**: process-tree suites per spawn site and OS; start-time source tests per OS; the journal binding test; cancellation tests (kill, a cancel between spawn and record, pid reuse, other host, tampered journal); signal, owner-exit and reap tests; the provenance guard.
- **Dependencies**: WP-FN-01 (journal v2), **landed** on
stagingin C2 (PR #46, merge6c7f2b06d, an ancestor of7de78b70a); its index record staysin-progressuntil the C2 gate record closes it, which C3 does not need. - **Flows**: FL-EXE-01.
- **Size**: M · **Run**: C3
WP-EXE-03: Typed spend-free preflight per harness-matrix lane
- scripts/harness-matrix/cli.mjs (new preflight command; validate --base), scripts/harness-matrix/lib.mjs (gateRun reads preflight.json), new declaration file e2e-tests/harness-preflight.json (per lane: binary, version pin, auth probe, quota probe or a bounded unprobed entry, and the lane budget of WP-EXE-05; per documented-install harness: binary and version pin); - new packages/babysitter-sdk/src/harness/cliInfo.ts (readHarnessCliInfo, the typed HarnessCliInfo); harness/discovery.ts (exports execFilePromise and parseVersionString, :295-331, for it; checkCliAvailable is unchanged); harness/types.ts (getCliInfo, :219, becomes a required method returning Promise<HarnessCliInfo>; it has no caller at 7de78b70a, so no consumer changes); the eleven adapters under harness/adapters/ (claude-code, codex, cursor, gemini-cli, genty, github-copilot, hermes, oh-my-pi, openclaw, opencode, pi), harness/unified/adapter.ts and harness/customAdapter.ts (each implements getCliInfo() by delegating to readHarnessCliInfo with its harness id); new CLI command harness:cli-info --harness <id> --json (cli/main/program.ts, cli/main/dispatchHarness.ts); - .github/workflows/live-stack.yml (a preflight step before "Run selected live stack E2E", :329, using the built SDK the run step already names, LIVE_STACK_BABYSITTER_BIN, :358); - .github/workflows/live-stack-published.yml (a preflight step in the shared &published_steps, :462, after "Install harness agents" :565 and before "Run selected live stack E2E" :585, using the published orchestrator-sdk the job installed at :493; and a preflight step in the documented_install job after the harness CLI installs, :415-422, and before "Verify documented published install" :436); - .github/workflows/harness-matrix.yml (validate at :90-91 also validates the probe declarations against the base revision); - tests under scripts/harness-matrix/__tests__/, beside harness/cliInfo.ts, and beside each adapter.
1. cli.mjs preflight --lane <laneId> --out <file> writes {laneId, probes: [{probe, result, detail}], harnessCliVersion, versionSource, verdict} with probe classes missing-binary, version-mismatch, auth-expired and quota-exhausted. The auth probe uses only a spend-free endpoint declared per provider (a model listing, token introspection or the CLI's own auth-status command). The version probe runs harness:cli-info --harness <scenario.agent> --json of the SDK under test (node "$LIVE_STACK_BABYSITTER_BIN" in live-stack.yml; the published orchestrator-sdk bin in live-stack-published.yml), which prints the adapter's getCliInfo() (AC8), so the lane's version is read by the same code as the host's. harnessCliVersion is that reported version with versionSource: "cli-version-flag"; a lane whose binary is the in-tree build (integration_type: 'runtime-cli', the genty lane, scripts/live-stack/matrix.mjs:131, run through LIVE_STACK_GENTY_BIN) declares version: {source: "in-tree-package", package} and records that package's package.json version with versionSource: "in-tree-package". An unreported result of AC8 fails the version probe with class version-mismatch and the unreportedReason in detail: a lane never passes preflight without a version. WP-EXE-04 writes harnessCliVersion into the lane's identity record. 2. A failing probe makes the lane failed with the probe's class and source: "probe", and the lane's model call is never made. Test: a stub provider server counts zero completion requests during preflight and after a failing probe. 3. No path turns a failed probe into skipped or missing. A gateRun self-test fixture asserts the typed failure. 4. The regex classifier (lib.mjs:220-229) runs only on a lane that passed preflight and then failed. Its result is reported as crossCheck. A run-time auth or quota regex hit on a lane whose probe passed is reported as classification-mismatch, which is red and listed in the run summary, never silently reclassified. 5. cli.mjs validate fails when a lane of scripts/live-stack/matrix.mjs lacks its binary or version probe, when a documented-install harness (live-stack-published.yml:402) lacks its binary or version probe (it makes no model call, so it declares no auth or quota probe), or when a Tier-1 lane lacks any of its four probes. A provider with no spend-free quota signal may declare quota: {unprobed: true, reason, approvedBy, grantedAt, expiresAt, renewals}, on the 30:94 fixture-blocked clock applied verbatim (≤14 days, at most 2 renewals): reason names why no signal exists; approvedBy cites an owner action or gate record id; expiresAt is at most 14 days after grantedAt; renewals is 0, 1 or 2, and a renewal moves grantedAt and expiresAt, adds exactly one to renewals and names its own approvedBy. validate fails on a missing field, a past expiresAt, an expiry more than 14 days after the grant, or renewals > 2. With --base <ref> (the PR's base, or the push's before commit, in harness-matrix.yml) it also compares each entry with the same entry at that revision, and fails when grantedAt or expiresAt changed without renewals rising by exactly one, or when renewals fell. 6. Probe details pass through the existing redaction, and a canary test proves that no credential reaches the artifact or the log. 7. FL-EXE-03 is green in ci.yml:exec-hardening. 8. **getCliInfo() is real on every adapter, and says why when it cannot report.** readHarnessCliInfo(harnessId) takes the CLI command from the harness's discovery spec (the catalogue cliCommand, registry.ts:51), splits it into executable and leading arguments (a catalogue command may carry leading arguments; no catalogued harness uses one since the 2026-10-22 correction), locates the executable with which/where, runs it with --version through execFilePromise with discovery's CLI_CHECK_TIMEOUT_MS (2,000 ms, discovery.ts:84; no timeout is added or raised), and parses the output with parseVersionString. It does not call checkCliAvailable, whose catch (:118-120) would hide the reason. The result is one of two typed shapes, never a missing version on a success: {harnessId, command, path, version, versionSource: "cli-version-flag"}, or {harnessId, command | null, path | null, version: null, versionSource: "unreported", unreportedReason: "no-cli-command" | "binary-not-found" | "version-probe-failed" | "version-unparseable", detail}. The method per harness is the same version flag on the catalogue command: claude-code → claude --version, codex → codex --version, gemini-cli → gemini --version, cursor → cursor-agent --version, opencode → opencode --version, github-copilot → copilot --version (the @github/copilot CLI; amended 2026-10-22, was gh copilot --version), pi → pi --version, oh-my-pi → omp --version, hermes → hermes --version, openclaw → openclaw --version. An adapter whose CLI is not a separately installed binary (genty, whose catalogue entry names genty but whose runtime is the in-tree build, so it reports no version; amended 2026-10-22; the unified and custom adapters unless their configuration names a catalogued harness) returns unreported/no-cli-command. Tests, one per adapter: the --version output of the harness at its catalogued version, served by a fake binary placed first on PATH, yields that version with cli-version-flag; and, against readHarnessCliInfo, a missing binary, a binary exiting non-zero and a binary printing no version yield the three unreported reasons. harness:cli-info --json prints exactly the HarnessCliInfo and exits non-zero only on an unknown harness id. 9. **The release gate runs the preflight.** Every lane step that produces a live-stack result runs after a preflight step for its lane, in live-stack.yml and in both lane kinds of live-stack-published.yml (the &published_steps lanes and the documented_install lanes), and passes the preflight.json path to the run step (LIVE_STACK_PREFLIGHT_PATH). A workflow contract test (beside scenario-contract.test.ts:201-221) fails when a step that runs test:e2e:live-stack:pipeline or test:e2e:live-stack:documented-install in either workflow is not preceded, in its job, by a preflight step for the same lane.
- **Objective**: Before a lane spends anything, a probe proves that it can run: the binary exists, its version matches the declared pin, the credential is valid and the quota is not exhausted. A failing probe is a typed RED, never a skip. Log-regex classification stays only as a cross-check. One version reader,
getCliInfo(), implemented here on every harness adapter, is the source of both a lane's harness CLI version (through the preflight) and the host harness version of a run (WP-EXE-02). Every live-stack lane that produces a result runs the preflight, inlive-stack.ymland in the pre-release gatelive-stack-published.ymlalike. - **Affected paths**:
- **Acceptance criteria**:
- **Test requirements**: probe unit tests against stubs (each class, spend-free counter); gate fixtures; validation negative fixtures (missing probe;
unprobedwithout reason, approver, grant date or expiry; expired; expiry beyond 14 days; a third renewal; a re-dated entry without a counted renewal against a base fixture); canary test; per-adaptergetCliInfo()tests with fake binaries and the threeunreportedreasons; the workflow preflight-placement contract test over both workflows. - **Impact while no quota probe or unprobed entry is declared (C3 round-3 correction, 2026-10-25)**:
e2e-tests/harness-preflight.jsondeclares no spend-free quota probe and no approved boundedunprobedentry foropenai,anthropicorgoogle-vertex, so every lane oflive-stack.ymland oflive-stack-published.ymlgoes red at its preflight step (unverified,source: probe; the run step never starts and no model call is made), and the run summary reports it aspreflight unverified(AC3,scripts/live-stack/summary.mjs). Promotion is NOT gated on those lanes while the repository variableFABRIC_LIVE_LANES_GATEis unset orinformational(its default,live-stack-published.yml:831):promote_release_channelneeds the called workflow's aggregate only when the variable isrequired(publish-npm-private.yml:476-483), andcreate_release_tagdoes not need it. The staging train and release promotion therefore proceed; the lanes are red, not skipped. PR CI is unaffected (ci.yml:exec-hardeningruns stub probes only). Owner action: approve boundedunprobedquota entries (AC5) or name a spend-free quota probe per provider;approvedByis format-checked only, so an owner review ofe2e-tests/harness-preflight.jsonchanges is required (no CODEOWNERS file exists in the repository to enforce it). - **Dependencies**: WP-EXE-01 (the
exec-hardeningjob). - **Flows**: FL-EXE-03.
- **Size**: M · **Run**: C3
WP-EXE-04: Run identity record and the live-stack model-key fix
- new packages/babysitter-sdk/src/runtime/fingerprint.ts with requestedConfigDigest (sha256 of the RFC 8785 canonical {harnessId, requestedModel, adapterConfigDigest} through storage/canonical-json.ts; no second canonicaliser) and laneAdapterConfig (AC1), exported for the live-stack producers and extended by WP-EXE-02; - scripts/harness-matrix/lib.mjs (result shape, flake window, quarantine exit, gate) and scripts/harness-matrix/cli.mjs (lane result reader :88-98, ledger); - the live-stack result producers: packages/adapters/cli/tests/live-stack/{primary-live-runner.ts,scenario-contract.ts,pipeline-scenario.test.ts,documented-install-runner.ts} (run by the root scripts test:e2e:live-stack:*, package.json:153-158) and scripts/live-stack-coverage-report.cjs; - .github/workflows/live-stack.yml (the run step :329-421 passes the requested identity and the preflight result in; the combined report step :513-742 reads identity from the result and its "Filename-derived fallback values" block, :594-596, is deleted); - .github/workflows/live-stack-published.yml (the run step of &published_steps, :585-627, passes the requested identity and the preflight result in, as in live-stack.yml; the workflow has no filename-derived block to delete, §2.3); - .github/workflows/harness-matrix.yml (the gate reads identity from each lane artifact); - the google-gemini31 consumers: scripts/live-stack/matrix.mjs:39, .github/workflows/qa-daily.yml:92, .a5c/processes/ci-qa-review.mjs:75, .a5c/processes/issue-339-claude-bi-live-stack.inputs.json:33,46-48, .a5c/processes/live-stack-matrix-stabilization.mjs:183, docs/development/07-live-stack-qa-guide.md:16,19,21,23,104; - tests under scripts/harness-matrix/__tests__/, scripts/live-stack/__tests__/ and beside the live-stack producers.
1. Each lane result artifact (live.adapters.*.json) and each live-stack result carries identity: {harnessId, harnessCliVersion, versionSource, requestedModel, model, harnessConfigDigest, sdkVersion, protocolVersion, unprobed}, written by the producer that ran the lane. - harnessCliVersion is the harnessCliVersion of the lane's WP-EXE-03 preflight.json (read from LIVE_STACK_PREFLIGHT_PATH, WP-EXE-03 AC9), with versionSource: "preflight"; WP-EXE-03 merges first, so the source exists when this work package merges. This holds for the lanes of live-stack.yml and of the release gate live-stack-published.yml alike: both run the same producer (test:e2e:live-stack:pipeline), and a gate lane without its preflight result is indeterminate/missing-artifact, never a lane with a derived identity. The documented-install lanes write no result artifact (§2.3) and this work package adds none; their binary and version are checked by their preflight (WP-EXE-03 AC5, AC9). - model is the model the harness reported, never the requested one copied over. *Amended 2026-11-09 (spec 30 §3.4, the OpenRouter route):* the producer records which report it read, in modelSource. - **session-stream**: a model event in the harness's session stream. An init event echoes the configured model, while an assistant or response event names the model the provider served, and through OpenRouter that can be a canonical slug matched only through the explicit OPENROUTER_CANONICAL_SLUGS table. - **harness-header**: for a harness whose stream names no model (Codex exec), the model: line of the session header it prints on stderr, read only from a complete block that ends with its closing rule. This is the configured model the harness echoes, not the model the provider served, which Codex does not report anywhere. The identity therefore proves which model the harness requested, not which one answered. - **unreported**: model is null, and the lane fails as model-mismatch (AC2).
- **Objective**: Every harness-matrix lane result and every live-stack result names the identity that produced it. Comparisons never mix identities, and the mislabelled live-stack key is fixed at its cause in every consumer.
- **Affected paths**:
- **Acceptance criteria**:
*Was:* "model is the model the harness reported in its session stream, not the requested one." - harnessConfigDigest is requestedConfigDigest over the lane's requested configuration, whose adapterConfigDigest is the sha256 of the canonical laneAdapterConfig(scenario): exactly the matrix scenario fields agent, adaptersAgent, provider, adaptersProvider, integrationType, babysitterHarness, installMode, processMode, interactionMode, interactive, bridgeInteractive and bridgeHooks (the LIVE_STACK_* inputs of the run step, live-stack.yml:334-346, with provider and adaptersProvider at :345-346 and the model, excluded, at :347; the same inputs at live-stack-published.yml:590-607). Credentials, workspace paths, scenario and run ids and timestamps never enter it; the model and the CLI version are identity fields of their own and are not in the digest. WP-EXE-02 uses the same requestedConfigDigest on EFFECT_REQUESTED. - protocolVersion is the negotiated ACP version, or null with reason: "not-acp" for a lane outside ACP. - unprobed lists the lane's unprobed declarations from e2e-tests/harness-preflight.json (WP-EXE-03 AC5); each is also listed in the run summary as a tracked gap. - A result without its identity is indeterminate with reason missing-artifact (WP-EXE-05). 2. A reported model that differs from the requested model fails the lane with the typed class model-mismatch. 3. The flake window (lib.mjs:366-371) and the quarantine-exit count (lib.mjs:380-384) are keyed by the whole identity, the CLI version included. A change of identity starts a new window, reported as identity-changed. cli.mjs ledger, asked to aggregate across two identities, exits non-zero with ERR_MIXED_IDENTITY. 4. The run summary of live-stack.yml reads agent, provider and model from the result's identity. The filename-derived block is deleted; a result without identity shows indeterminate (missing-artifact) in its row, never a derived value. 5. A test derives a model family from each MODELS key of scripts/live-stack/matrix.mjs and fails on any key whose model id is outside it. google-gemini31 is fixed at its cause by this rule: if Vertex serves a Gemini 3.1 non-pro model, the key names it, with the model list response recorded in the PR; otherwise the key is deleted and every consumer listed in the affected paths names google-gemini35flash (or drops the row where the consumer is a historical process input that no workflow reads, with the reason in the PR). A git grep -n "google-gemini31[^p]" test over the tree outside docs/specs/ finds nothing in the deletion case. No alias is kept either way (D10). 6. FL-EXE-04 is green in ci.yml:exec-hardening.
- **Binding on the W-10 count (C7b).** The consecutive-green count that W-10 requires does not exist yet (§2.4). WP-TEST-03 completion creates it in C7b, in
scripts/harness-matrix/lib.mjsover the gate statuses the ledger already collects. *Amended by spec 66:* that count is keyed by the WP-EXE-04 identity of every Tier-1 lane (a change of any Tier-1 lane's identity resets it, reportedidentity-changed), and a run with anindeterminateTier-1 lane is not green and resets it (WP-EXE-05). Spec 30 WP-TEST-03 and spec 55 §3.8 (C7b exit) carry this line. - **Test requirements**: lib unit tests for the identity keying and the ledger refusal;
laneAdapterConfigfield-list test (a volatile field added to a scenario does not change the digest; each listed field does); key/model consistency test and the consumer grep; identity capture tested against a recorded lane artifact and itspreflight.json, once with the environment of thelive-stack.ymlrun step and once with the environment of thelive-stack-published.ymlrun step (LIVE_STACK_PUBLISHED_PACKAGES=1), each producing a result whoseidentityhas every field set; a gate-lane run withoutLIVE_STACK_PREFLIGHT_PATHproducingindeterminate/missing-artifact; summary test without the filename fallback. - **Dependencies**: WP-EXE-03 (the version probe and
preflight.json, the source ofharnessCliVersionandunprobed); WP-EXE-01 (theexec-hardeningjob). - **Flows**: FL-EXE-04.
- **Size**: M · **Run**: C3
WP-EXE-02: Fingerprinted effect reuse inside journal v2
- packages/babysitter-sdk/src/runtime/fingerprint.ts (created by WP-EXE-04 with requestedConfigDigest; this work package adds outputDigest, promptDigest and taskAdapterConfig) and new packages/babysitter-sdk/src/runtime/executorConfig.ts (resolveExecutorConfig); - packages/babysitter-sdk/src/storage/types.ts (RunMetadata.executor; outputDigest on the stored result's event, not in result.json) and storage/journal.ts (the fingerprinting marker of AC6, written in the append path beside the legacy marker, :42-46); - packages/babysitter-sdk/src/cli/main/runCreate.ts (run:create records executor from the adapter's getCliInfo(), implemented by WP-EXE-03 AC8; run:recover-process-error --patch-effect journals EFFECT_RESULT_PATCHED, AC7) and cli/commands/runIterate.ts (HARNESS_CLI_VERSION_CHANGED and the executor backfill, modelled on :109-124); - packages/babysitter-sdk/src/runtime/intrinsics/task.ts (handleExistingInvocation :97-106 builds the current task definition for a resolved digested record, checks the digests and journals a prompt change; requestNewEffect writes the digests, reissueKey and supersedes); - packages/babysitter-sdk/src/runtime/commitEffectResult.ts (outputDigest, reportedIdentity, the timeout refusal) and packages/babysitter-sdk/src/cli/main/taskCommands.ts (task:post --reported-model, --reported-cli-version); - packages/babysitter-sdk/src/runtime/replay/effectIndex.ts (new events EFFECT_REUSE_REFUSED, EFFECT_RESULT_PATCHED, EFFECT_PROMPT_CHANGED, JOURNAL_FINGERPRINTING_STARTED and HARNESS_CLI_VERSION_CHANGED; the retirement rule of AC3; the fingerprint rule of AC6); - packages/babysitter-sdk/src/runtime/types.ts (typed payloads); - packages/babysitter-sdk/src/prompts/templates/recovery.md and critical-rules.md (a hand edit of result.json is refused on replay unless run:recover-process-error journals it, AC7 as amended 2026-10-22; --patch-effect is the other recovery path); - the WP-FN-01 AC6 golden vectors (extended, checksums recomputed by the test, never hand-edited).
1. **Requested-config digest, and where it comes from.** RunMetadata (storage/types.ts:10-39) gains executor: {harnessId, harnessCliVersion: string | null, versionSource: "cli-version-flag" | "unreported", unreportedReason?, recordedAt}, recorded by run:create from the pinned adapter's getCliInfo() (harness/types.ts:219, implemented on every adapter by WP-EXE-03 AC8; no new adapter method). harnessCliVersion is null only together with versionSource: "unreported" and its unreportedReason; run:status lists an unreported executor as a tracked gap, never as a recorded version. harness?: string (:15) is unchanged, because runIterate.ts:44 pins the adapter by that name. Per effect, resolveExecutorConfig(taskDef) builds {harnessId, requestedModel, adapterConfigDigest} at the iteration that requests or replays the call. Its sources, in fixed precedence with the winner reported in harnessSource and modelSource: - harnessId: taskDef.agent.lane when the task definition names a lane; otherwise RunMetadata.harness, the host harness that executes agent tasks and posts their results with task:post. *Amended 2026-10-22: there is no third source. run:create records RunMetadata.harness from --harness or the detected adapter; when the task names no lane and the run records no harness, the request fails with the typed UnrecordedHarnessError and nothing is requested.* - requestedModel: taskDef.agent.model; otherwise null with modelSource: "host-selects". - adapterConfigDigest: the sha256 of the canonical taskAdapterConfig(taskDef.agent), a closed **include-list** of the execution-identity fields of AgentTaskOptions (tasks/types.ts:18-42), as laneAdapterConfig is for lanes (WP-EXE-04 AC1): provider, approvalMode, maxTurns, and the responder routing that decides who executes the task, external, responderType, adapter, targetResponders, trackerBackend and capabilities. A listed field that is absent is omitted, not set to null. Nothing else enters the digest: not model or lane (identity fields of their own), not name, not the process-authored prompt (role, task, context, instructions or a string) or outputSchema, not the timeouts and fallback routing (timeout, timeoutMs, fallbackType, fallbackToInternal), and not any key outside the list, including keys a process adds through the index signature (:41). A new execution-identity field enters only by an edit of the list in fingerprint.ts, with its test. Volatility inside excluded values (a timestamp or path interpolated into prompt.context) therefore never reaches the digest. The listed fields are typed scalars or string arrays (:18-29, :38-40); a listed field holding any other value fails the request with the typed InvalidExecutorConfigError {field}. - promptDigest: the sha256 of the canonical {prompt, outputSchema}. It is recorded, never compared for reuse: when handleExistingInvocation reuses a resolved digested effect whose current promptDigest differs from the latest one journaled for that effect (on its EFFECT_REQUESTED, or its latest EFFECT_PROMPT_CHANGED), it appends EFFECT_PROMPT_CHANGED {effectId, invocationKey, recorded, current} under withRunLock and returns the stored result. An unchanged prompt appends nothing; each further change appends one event, so a prompt that varies at every iteration appends at most one event per reused effect per iteration and dispatches nothing. The replay summary counts reused effects whose prompt changed. EFFECT_REQUESTED of every agent-kind effect, and of every effect whose task definition names a lane, carries harnessConfigDigest = requestedConfigDigest(harnessId, requestedModel, adapterConfigDigest) (WP-EXE-04) and promptDigest. Breakpoint, sleep, shell and node effects carry no digest and are reused by invocation key as today; the replay summary reports the count per kind. **The host CLI version is identity, not a reuse input.** At each run:iterate the SDK calls the pinned adapter's getCliInfo() once. When the pair (harnessCliVersion, versionSource) differs from RunMetadata.executor, it updates the metadata and appends HARNESS_CLI_VERSION_CHANGED {runId, harnessId, previousVersion, previousVersionSource, version, versionSource, unreportedReason?}, as runIterate.ts:109-124 does for PROCESS_CODE_HASH_CHANGED; a change between a reported version and unreported is a change like any other. Reuse is unaffected, and the run status lists the change. **A run created before this work package** has no RunMetadata.executor; unlike the modelled check, which skips an absent recorded value (runIterate.ts:110), the first run:iterate by this SDK backfills executor from getCliInfo() and appends HARNESS_CLI_VERSION_CHANGED with previousVersion: null and previousVersionSource: "not-recorded", so the start of version tracking is on record; later iterations compare as above. Tests: with a fake harness binary first on PATH (the WP-EXE-03 AC8 fixture), a version change between two iterations of a run with three resolved agent effects journals exactly one HARNESS_CLI_VERSION_CHANGED, appends no EFFECT_REUSE_REFUSED and dispatches nothing; a third iteration at the same version appends nothing; removing the binary journals a change to unreported/binary-not-found; a changed requested model in the same run is still refused (AC3). **Prompt edits are not re-dispatches.** Tests: a resolved agent effect whose prompt.context (and, separately, outputSchema) changed between iterations is reused, appends one EFFECT_PROMPT_CHANGED and no EFFECT_REUSE_REFUSED, and dispatches nothing, and the next iteration with the same edited prompt appends nothing; a task whose prompt interpolates the current time is reused at every iteration and never refused; adding an unknown key, or changing name, timeoutMs or fallbackType, leaves adapterConfigDigest unchanged; changing each listed field changes it. 2. EFFECT_RESOLVED carries outputDigest: the sha256 of the canonical {status, value | error} together with the sha256 of each referenced blob (result, stdout, stderr), computed at commit. For a digested effect it also carries reportedIdentity: {model | null, harnessCliVersion | null, source: "session-stream" | "task-post" | "unreported"}: lanes fill it from the session stream; task:post fills it from --reported-model and --reported-cli-version, and without them records source: "unreported" with both fields null. unreported is listed in the run status and never compared. 3. **Refusal, retirement and supersession.** When handleExistingInvocation meets a resolved digested record and (a) the record's harnessConfigDigest differs from the current one, or (b) the stored result no longer re-hashes to the effect's current output digest (AC2, or the latest EFFECT_RESULT_PATCHED, AC7), it appends, under one withRunLock, EFFECT_REUSE_REFUSED {effectId, invocationKey, reissueKey, reason: "harness-config-changed" | "output-digest-mismatch", recorded, current} and then a new EFFECT_REQUESTED with a new effectId, invocationKey = reissueKey and supersedes: <refused effectId>. invocationKey is the key the refused record is mapped under: the primary key, or the legacy step-id key the lookup matched (task.ts:76-89). reissueKey is the call's primary key. The index rule: EFFECT_REUSE_REFUSED is accepted only for a resolved, not yet retired effect; it marks that record retired (kept in byEffectId) and removes the byInvocation mapping of its invocationKey, so neither the primary nor the legacy lookup can reach it again. An EFFECT_REQUESTED with supersedes is accepted only if its key is unmapped and supersedes names a retired effect, not yet superseded, whose refusal named this key as reissueKey. A duplicate key without supersedes, and any other supersedes, still fail with Duplicate invocation key detected (effectIndex.ts:214-218) or a typed InvalidSupersedesError. If the CLI dies between the two appends, the next iteration finds the reissue key unmapped and the retired effect without a successor, and requests it with supersedes naming that effect. Tests: a changed requested model between two iterations is refused and re-dispatched, and the process's call resolves to the new effect on every later replay; a tampered result.json is refused as output-digest-mismatch; a record mapped under a legacy key is refused, reissued under the primary key, and later replays resolve to the new effect, never to the legacy record; an unchanged run reuses and appends no event; a duplicate key without supersedes, and a supersedes naming a non-retired effect, both fail replay. 4. commitEffectResult refuses status: "ok" when executionOutcome.phase is "TimedOut" or the executor reported its deadline, with the typed EffectTimeoutCommitError. The lane and hook paths commit a timeout as status: "error", error.name: "EffectTimeoutError", phase "TimedOut". *Amended 2026-10-22: the production path is real. The ACP lane takes its deadline from the effect's agent.timeoutMs (a malformed value fails invalid-deadline); at the deadline it kills the agent tree (exit reason deadline), ends the session as deadline and commits through effectTimeoutCommit, a required field of the journal binding. The hook path commits the backend's TIMEOUT the same way.* 5. One journal: the file-name patterns under the run directory after a fixture run equal those the same fixture run produces at 7de78b70a (the layout of packages/babysitter-sdk/src/storage/paths.ts:4-15: journal/, journal.head.json, run.json, inputs.json, run.lock, state/, blobs/, tasks/, process/, orphaned/, and the per-effect files under tasks/<effectId>/), recorded as a test fixture with no carve-out; a new pattern anywhere, including under tasks/<effectId>/, fails the test. Every event verifies with loadJournalWithIntegrity. The golden vectors include every new field and event. 6. **The fingerprinting marker separates pre- and post-upgrade events.** Every event of a v2 journal carries formatVersion: 2 (§2.2), so the format version does not tell them apart; a journaled marker does. The first append by an SDK that carries this work package to a journal without the marker first writes JOURNAL_FINGERPRINTING_STARTED {sdkVersion}, in the append path, as the legacy marker is written (journal.ts:42-46); a new run gets it right after RUN_CREATED. Each effect is classified by the position of its EFFECT_REQUESTED: - **before the marker**, it is unfingerprinted: reused by invocation key with no requested-config or prompt check; its output digest is checked only when its EFFECT_RESOLVED carries one (a resolution written after the upgrade does). The replay summary counts these effects. - **after the marker**, a digested kind must carry harnessConfigDigest and promptDigest, and its EFFECT_RESOLVED must carry outputDigest and reportedIdentity. A missing one fails replay with the typed MissingFingerprintError {seq, type, effectId, sdkVersion}, which names the writer's sdkVersion from the envelope. This is how an older SDK appending after the marker (a downgrade) is caught. A second marker fails replay. This is a journaled, hash-chained boundary with a reported count, not a fallback. Tests: a fixture journal written by the SDK at 7de78b70a, holding a resolved agent effect A and a pending agent effect B, with a run.json that has no executor, is resumed by this SDK. The marker is appended once, executor is backfilled with one HARNESS_CLI_VERSION_CHANGED (previousVersionSource: "not-recorded", AC1), B resolves with its outputDigest, and a new agent effect C is requested with its digests. Replay reports A and B unfingerprinted and C fingerprinted. The same journal with C's digest stripped (checksums recomputed by the test) fails with MissingFingerprintError, and a journal with two markers fails. 7. **The recovery patch keeps the digest honest.** run:recover-process-error --patch-effect (runCreate.ts:582-587), after writing the patched result.json and after its journal rewrite (:589), appends EFFECT_RESULT_PATCHED {effectId, path, previousOutputDigest, outputDigest, reason: "process-error-recovery"} under withRunLock. The index takes the latest patched digest as the effect's current output digest. Tests: after a patch, the next run:iterate reuses the effect, appends no EFFECT_REUSE_REFUSED and dispatches nothing; a hand edit of the same file without the command is still refused as output-digest-mismatch; the patch event verifies with loadJournalWithIntegrity. *Amended 2026-10-22 (coordinator direction for C3 fix round 1): the documented operator recovery keeps working. An operator who hand-patches tasks/<effectId>/result.json (value/result) and then runs run:recover-process-error gets that patch journaled as EFFECT_RESULT_PATCHED with edit: "hand", reported as handPatchedResults; the next iteration reuses the patched result and dispatches nothing. A hand edit that no recovery command covers is still refused as output-digest-mismatch. An older SDK resolving an effect requested before the marker is accepted as unfingerprinted (AC6); an older SDK's digested request after the marker still fails with MissingFingerprintError, whose message names the recovery.* 8. FL-EXE-02 is green in ci.yml:exec-hardening.
- **Objective**: A resolved effect that executed on a harness is reused on replay or resume only when the executor configuration that would request it now is the one that requested it, and its stored result is the same bytes. Otherwise the old effect is retired by a journaled refusal and the call is requested again as a new effect that supersedes it. A host harness CLI update and a prompt edit are reported, never a reason to re-dispatch. A timeout is never committed as a completed result. Everything stays inside journal v2.
- **Two digests, at two times.** The *requested-config digest* is known before execution and goes on
EFFECT_REQUESTED. The *reported identity* (the model and CLI version the harness actually reported) is known only after execution and goes onEFFECT_RESOLVED. Reuse is decided on the requested-config digest and the output digest only; the prompt digest, also onEFFECT_REQUESTED, is recorded and reported, never compared for reuse. The reported identity feeds WP-EXE-04'smodel-mismatchand comparisons, never reuse, and the harness CLI version is never a reuse input (§0.3 item 6). - **Affected paths**:
- **Acceptance criteria**:
- **Test requirements**: fingerprint unit tests (canonical inputs, blob hashing, the
taskAdapterConfiginclude-list with an unknown-key and a per-field test,InvalidExecutorConfigError, source precedence); executor-config tests for a lane-named task and for a host-posted agent task; the host CLI version change,unreportedtransition and backfill tests; the prompt-edit and time-varying-prompt reuse tests; replay refusal, retirement, legacy-key and supersession integration tests; the straddling-journal test; the recovery-patch test; the timeout refusal test; journal integrity, tree-listing and golden-vector tests. - **Dependencies**: WP-EXE-04 (
fingerprint.tsandrequestedConfigDigest); WP-EXE-03 (getCliInfo()on every adapter, the source ofRunMetadata.executor); WP-EXE-01 (theexec-hardeningjob). - **Flows**: FL-EXE-02.
- **Size**: M · **Run**: C3
WP-EXE-05: The `indeterminate` outcome
- timeout: **the producer's existing deadlines, bounded by the remaining test budget, and no new or longer limit.** executeChildProcessCommand (packages/adapters/cli/tests/live-stack/primary-live-runner.ts:527-590) already kills a command's group at its timeoutMs (§2.3). Its CommandResult gains timedOut and {deadlineMs, deadlineSource, declaredDeadlineMs}. Each command has a *declared* deadline: LIVE_STACK_COMMAND_TIMEOUT_MS for the harness command (live-stack.yml:357, 80 min) and for each documented-install command (documented-install.test.ts:301), deadlineSource: "env:LIVE_STACK_COMMAND_TIMEOUT_MS"; SETUP_TIMEOUT_MS (primary-live-runner.ts:86) for a setup command, deadlineSource: "setup". Because the setup commands and the harness command share one vitest test (§2.3), a declared deadline alone cannot keep the lane inside the test timeout. **The per-command budget is therefore derived from the remaining test budget.** The test records testStartedAtMs as its first statement and passes testBudgetMs (the same LIVE_STACK_TEST_TIMEOUT_MS it hands vitest, pipeline-scenario.test.ts:54, documented-install.test.ts:306) and artifactMarginMs to the runner (runPrimaryLiveStackScenario, runDocumentedInstallVerification); production tests pass the exported constant LANE_ARTIFACT_MARGIN_MS = 30_000, which covers the 1 s kill escalation (primary-live-runner.ts:575), the transcript and artifact writes, and the gap between vitest's timer and the test's first statement. Before each command the runner computes remainingMs = testStartedAtMs + testBudgetMs − artifactMarginMs − now. The command's effective deadline is min(declared, remainingMs), and the winner is reported: the declared source when it is the smaller or equal one, otherwise deadlineSource: "test-budget". When remainingMs ≤ 0 the runner starts no further command and writes terminatedBy: "deadline", deadlineSource: "test-budget" and notStarted (the commands not run). When any command ends at its effective deadline, the producer writes terminatedBy: "deadline" with that command's {deadlineMs, deadlineSource, declaredDeadlineMs} into live.adapters.*.json (the documented-install runner returns the same fields in its result). No timeout is raised: the budget can only shorten a command's deadline. With LIVE_STACK_REQUIRE_EVIDENCE=1, an unset or non-numeric LIVE_STACK_COMMAND_TIMEOUT_MS or LIVE_STACK_TEST_TIMEOUT_MS fails the test with the typed ERR_LANE_DEADLINE_UNSET before any command runs. The local defaults (pipeline-scenario.test.ts:22,54; documented-install.test.ts:301,306) apply only to non-evidence local runs and are reported as deadlineSource: "local-default". A hook or effect timeout is the WP-EXE-01 AC7 timeout status and the WP-EXE-02 AC4 TimedOut phase. A lane whose GitHub step timeout fires, or whose process dies, leaves no result file, which is missing-artifact. - budget-exhausted: a **fabric-side** ceiling, declared per lane in e2e-tests/harness-preflight.json as budget: {unit: "turns", limit}. The producer counts the assistant turns of the session stream it already captures for identity (WP-EXE-04) and, when the count exceeds limit, terminates the lane's command group (primary-live-runner.ts:557-569) and writes terminatedBy: "budget" with budget: {unit, limit, consumed}. A lane without a budget declaration has no ceiling and never reports this reason. - quota-exhausted is **not** indeterminate: it is the **provider's** refusal (HTTP 429, an exhausted account quota), a failed lane with class quota-exhausted from the probe (WP-EXE-03) or the cross-check (lib.mjs:16,222), because it names an account state the owner fixes. The split is by who stopped the lane: fabric's own ceiling is budget-exhausted (indeterminate), the provider is quota-exhausted (failed). - missing-artifact: the gate finds no live.adapters.*.json for the lane (cli.mjs:91, lib.mjs:248), a result without identity (WP-EXE-04 AC1), or a zero-exit lane whose required artifacts (the result JSON and the transcript) are absent.
1. Lane and live-stack results carry outcome: "pass" | "fail" | "indeterminate" and, for indeterminate, indeterminateReason: "timeout" | "budget-exhausted" | "missing-artifact". 2. The mapping is fixed, from the fields above. terminatedBy: "deadline" → indeterminate/timeout. terminatedBy: "budget" → indeterminate/budget-exhausted. No result file, no identity, or a zero-exit lane without its required artifacts → indeterminate/missing-artifact, no longer classified red. A provider quota refusal stays fail/quota-exhausted. 3. Flake rates and quarantine proposals exclude indeterminate rows. Test: a 14-run window with indeterminate entries proposes no quarantine, and the pass-rate denominator excludes them. 4. Fail closed: an indeterminate Tier-1 lane turns the gate red with the reason indeterminate: <reason>. check-e2e-flow-coverage.cjs reports a live job run that concluded timed_out or cancelled with the reason string indeterminate: timed_out or indeterminate: cancelled. Test: the checker self-test asserts those exact strings, which the checker at 7de78b70a does not emit (it prints the bare conclusion, :421-423), so the test fails before this work package. 5. An effect resolved with phase "TimedOut", and a hook result with outcome: "timeout", are reported indeterminate by run:status and the replay summary (WP-EXE-02 AC4 keeps the effect from ever being ok). 6. **One effective deadline per command, inside the test budget, and the artifact is always written.** Producer tests against stub commands (each stub exits on its own timer or never; the test waits on process events only, WP-EXE-01 AC10), each run in a vitest test whose timeout is the testBudgetMs it passes: - a stub harness that outlives a 2,000 ms LIVE_STACK_COMMAND_TIMEOUT_MS, with no setup, under a 6,000 ms budget, writes terminatedBy: "deadline" with deadlineSource: "env:LIVE_STACK_COMMAND_TIMEOUT_MS" and outcome: "indeterminate"; - **setup that consumes most of the margin:** two setup stubs that exit after 1,500 ms each, then a stub harness that never exits, with a 4,000 ms LIVE_STACK_COMMAND_TIMEOUT_MS, a 6,000 ms budget and a 500 ms artifactMarginMs: the harness command's effective deadline is below its declared 4,000 ms, it is reported deadlineSource: "test-budget" with declaredDeadlineMs: 4000, and the artifact is written before the test timeout (at 7de78b70a the same scenario ends in the vitest timeout with no artifact, so the test fails before this work package); - setup that exhausts the budget (a setup stub that never exits): the setup command ends at the test budget, the harness command is listed in notStarted, and the artifact is written; - the documented-install runner with three stub commands that never exit under a budget smaller than three declared deadlines ends with terminatedBy: "deadline", deadlineSource: "test-budget" before the test timeout; - with LIVE_STACK_REQUIRE_EVIDENCE=1 and either variable unset, the test fails with ERR_LANE_DEADLINE_UNSET and runs no command. The contract test (scenario-contract.test.ts:201-221) is extended to every step that runs a live-stack producer: the steps named "Run selected live stack E2E" (live-stack.yml:329, live-stack-published.yml:585), as today, and the step "Verify documented published install" (live-stack-published.yml:436), which its step regex (:202) does not match today. In each, LIVE_STACK_TEST_TIMEOUT_MS − LIVE_STACK_COMMAND_TIMEOUT_MS ≥ 60,000 ms (twice LANE_ARTIFACT_MARGIN_MS, so that a harness command after a setup shorter than 30 s keeps its declared deadline) and the step's timeout-minutes covers the test timeout; the existing ≥ 900,000 command floor stays on the "Run selected live stack E2E" steps only. live-stack.yml (4,860,000 − 4,800,000 at :356-357; 90 min), the published lanes (960,000 − 900,000 at live-stack-published.yml:617-618; 18 min at :586) and the documented-install step (720,000 − 300,000 at :443-444; 15 min at :437) already meet these rules, so no timeout is raised. 7. FL-EXE-05 is green in ci.yml:exec-hardening.
- **Objective**: A timeout, budget exhaustion or a missing artifact proves nothing. Such an outcome is
indeterminate: neither pass nor fail. It never feeds flake rates, and it blocks every gate, failing closed. - **Signals and producers.** Each reason has one named producer and one field; nothing is inferred from logs.
- **Affected paths**:
scripts/harness-matrix/lib.mjs(outcome vocabulary, gate, flake window, quarantine proposals),scripts/harness-matrix/cli.mjs(:88-98readsterminatedBy), the live-stack producers of WP-EXE-04 (primary-live-runner.ts:CommandResult.timedOut, the deadline source, the test-budget rule andLANE_ARTIFACT_MARGIN_MS, and the turn budget;documented-install-runner.ts: the same test-budget rule over its command loop,:326-328;pipeline-scenario.test.tsanddocumented-install.test.ts:testStartedAtMs,testBudgetMsand the evidence-mode deadline check),packages/adapters/cli/tests/live-stack/scenario-contract.test.ts(:201-221, the step rules of AC6),e2e-tests/harness-preflight.json(budget),scripts/check-e2e-flow-coverage.cjs(live job conclusions,:421-423), therun:statusand replay summaries ofpackages/babysitter-sdk, tests beside each. - **Acceptance criteria**:
- **Test requirements**: gate and flake-window fixtures; producer tests for the deadline, its source, the test-budget rule (setup consuming the margin, setup exhausting the budget, documented-install) and the turn budget against stub commands; the contract-test step rules over both workflows; checker self-test fixtures for timed-out and cancelled live runs; run-status test.
- **Dependencies**: WP-EXE-01 (hook
timeoutstatus, tree termination), WP-EXE-02 (typed timeout commit), WP-EXE-03 (gate fixtures, the declaration file), WP-EXE-04 (identity-keyed windows, the producers). - **Flows**: FL-EXE-05.
- **Size**: S · **Run**: C3
**Shared files in run C3.** Track C edits files that other tracks also edit or may edit. Each track edits only its own blocks, and the later PR rebases on the run branch:
| File | Track C's part | Other tracks' parts | Order |
|---|---|---|---|
.github/workflows/ci.yml | the exec-hardening job | A: console-web; B: the grep-gate step in environment | wave 1, any order; each PR adds or edits only its own job |
scripts/check-e2e-flow-coverage.cjs | the indeterminate conclusion mapping (WP-EXE-05 AC4) | E: LIVE_RESULT_ARTIFACTS | C (wave 1) before E (wave 2) |
apps/environment/src/acp/RunJournalLane.ts, RunJournalLaneHttp.ts | the journal binding's recorder, the reap and the cancelled error (WP-EXE-01 AC4, AC6, AC9); the route layer's teardown finalizer (AC8) | none planned by this spec; a B or E PR that edits either file rebases on Track C's WP-EXE-01 | C's WP-EXE-01 PR (wave 1) first |
.github/workflows/live-stack.yml, live-stack-published.yml, harness-matrix.yml, qa-daily.yml | WP-EXE-03 and WP-EXE-04 (and the WP-EXE-05 contract test that reads the first two) | none | — |
**Track C load:** 4.5 units (four M and one S).
---
4. Evaluation work packages (amendments, scheduled into the owning runs)
*Amended 2026-10-27 (55-console-program.md C4 re-plan, C3-18): the owning work packages moved, and the WP-EVL amendments move with them. WP-EVL-01 (amends WP-FN-12) → C8; WP-EVL-02…05 (amend WP-CP-07's **suites** stage) → C7; WP-EVL-06/07 (WP-CP-17) → C7; WP-EVL-08/09 (WP-CP-08) and WP-EVL-10 (WP-CP-22, kept or deferred at C8 Gate A) → C8. Where a heading below says C7b, C9a or C9b, read the slice above. WP-EVL-09's "No automatic learner is built" stays true for WP-CP-08; the automated candidate learner is WP-LOOP-04 (C8, owner decision C3-19), which auto-trains and auto-evaluates and stops at the human promotion breakpoint (I-6).*
Each WP-EVL work package amends one owning work package of spec 55 §3.15 or spec 20. It lands in that work package's run, merged after it or in its PR, and the owning run's exit criteria include its acceptance criteria. The amendment is written into the owning records, so an implementer reading the owning work package sees it: spec 55 §3.8 (C7b exit: WP-EVL-06, WP-EVL-07), §3.10 (C9a exit: WP-EVL-01…05; C9b exit: WP-EVL-08…10) and the bodies of WP-CP-07, WP-CP-08, WP-CP-17 and WP-CP-22 in §3.15 each carry an "Amended by spec 66" note on their Objective line, as do WP-FN-12 in spec 20 and WP-TEST-03 in spec 30 (the W-10 count binding of WP-EXE-04). Spec 55 §3.14 carries the rows and §6.4 adds them to the owning flows.
| WP | Amends | Run | Asserted by |
|---|---|---|---|
| WP-EVL-01 | WP-FN-12 | C9a | FL-TRN-01 |
| WP-EVL-02 | WP-CP-07 | C9a | FL-EVL-01, FL-EVL-02 |
| WP-EVL-03 | WP-CP-07 | C9a | FL-EVL-02 |
| WP-EVL-04 | WP-CP-07 | C9a | FL-EVL-02 |
| WP-EVL-05 | WP-CP-07 | C9a | FL-EVL-01 |
| WP-EVL-06 | WP-CP-17 | C7b | FL-HAR-03 |
| WP-EVL-07 | WP-CP-17 | C7b | FL-HAR-03 |
| WP-EVL-08 | WP-CP-08 | C9b | FL-TRN-02 |
| WP-EVL-09 | WP-CP-08 | C9b | FL-TRN-03 |
| WP-EVL-10 | WP-CP-22 | C9b | FL-TRN-08 |
WP-EVL-01: Leak tripwire on improver and training inputs
1. assertNoEvalLeak(bundle, pinnedCaseSet) runs on every file and inline text before dispatch. It matches held-out case ids, expected-output content digests, serialised EvalResult payloads and grader-verdict markers. 2. A prompt or configuration field that names a rubric, score, grader or judge is refused as a typed configuration error. 3. A hit appends EVAL_LEAK_REFUSED {channel, match} to the journal and dispatches nothing. There is no partial dispatch and no redaction-and-continue. 4. Negative fixtures, one per channel: a file path, inline text and a digest match. 5. FL-TRN-01 asserts that a seeded leak is refused.
- **Objective**: Amends WP-FN-12. Nothing that grades a candidate reaches the agent that improves it. Every bundle handed to an improver or training agent is checked for held-out case ids, expected outputs,
EvalResultpayloads and grader-verdict markers, and a hit is a typed, journaled refusal. *Amended by spec 68 (2026-11-01): ACs 6–8 of spec 68 §6.4 join this work package's acceptance criteria: the tripwire runs on every generator bundle of every loop, behind a positive read allowlist, and refusesseenBycases as held-out material.* - **Affected paths**:
packages/kip-sdk/src/learn/(the WP-FN-12 improvement stage), newpackages/kip-sdk/src/learn/leak-tripwire.ts, tests beside it. - **Acceptance criteria**:
- **Test requirements**: tripwire unit tests per channel; the FL-TRN-01 refusal leg.
- **Dependencies**: WP-FN-12.
- **Size**: S · **Run**: C9a
WP-EVL-02: Graded flag; an ungraded case blocks promotion
1. A judge failure writes graded: false and a typed error, and no score. A score of 0 is a graded result. 2. Compare reports n_ungraded per metric family. Any ungraded case of the pinned case set refuses promotion with a typed refusal; ungraded rows are never dropped from the denominator to let a promotion pass. 3. A failed re-judge never overwrites an existing score. 4. Changing the judge model of an existing EvalRun is refused. A new judge model is a new run. 5. FL-EVL-01 and FL-EVL-02 assert the ungraded refusal. 6. *(C3-3, from DI:eval/README.md:127-131,178-184.)* Generation and scoring are separate stages. The runner stores each candidate output as a WP-EVL-07 evidence reference before any grader runs, and a scoring pass reads only those stored outputs. Re-scoring (a new rule grader, or a new judge model, which AC4 makes a new EvalRun) never re-invokes the candidate; the new run names the outputs it scored by their references. A re-score that cannot find an output it needs is a typed error, never a regeneration. 7. *(C3-3, from DI:eval/score.py:52-55,75-77,185-187.)* Where a case family has a deterministic rule grader, every LLM-judged result also stores the rule verdict for the same output (ruleGraded, ruleScore beside graded, score). The EvalRun records the rule-vs-judge agreement rate over the cases both graded and lists the disagreeing case ids; compare prints both. Agreement is reported, not a gate: neither verdict overrides the other, and an ungraded judge result stays ungraded (AC1) whatever the rule says.
- **Objective**: Amends WP-CP-07. "Could not grade" is never a score.
EvalResultrecords whether the case was graded and why not, compare reports the ungraded count, and any ungraded pinned case blocks promotion. *Amended by spec 68 (2026-11-01): AC 8 of spec 68 §6.4 join this work package's acceptance criteria: a run without a deliverable is a graded zero, an executor kill isindeterminate, a partial judge result is ungraded and a failed judge artifact is kept.* - **Affected paths**:
packages/kradle/core/src/resource-model.js:110(*corrected 2026-11-01, spec 68 §0.4 item 10*;EvalResultgainsgradedanderrorinrequiredSpec),packages/kip-sdk/src/eval/{runner.ts,compare.ts}(WP-CP-07's new files),packages/contracts/src/fabric/evaluations.ts. - **Acceptance criteria**:
- **Test requirements**: runner and compare unit tests; resource-model test; a re-score test that counts zero candidate invocations; a rule-vs-judge fixture with one seeded disagreement.
- **Dependencies**: WP-CP-07; WP-EVL-07 (evidence refs on each result).
- **Size**: S · **Run**: C9a
WP-EVL-03: Noise floor and metric units
1. Compare runs the incumbent against itself on the pinned cases (replicate count recorded) and records a noise floor per metric. 2. A promotion whose gain is at or below the noise floor is refused with the measured values in the refusal. 3. A comparison that mixes metric units is refused. 4. The report carries a noise-floor line and warnings when most picks were the incumbent. 5. *(C3-3, from DI:eval/common/passk.py:8-19.)* pass@k uses the unbiased estimator 1 − C(n−c, k) / C(n, k) over the graded replicates of a case (pass@1 = c / n), averaged over cases. A case with fewer than k graded replicates makes pass@k for that k a typed error: it is not approximated with min(k, n), because pass@min(k, n) is a different metric and AC3 forbids mixing them (§6).
- **Objective**: Amends WP-CP-07. A gain is believed only above the noise of the incumbent measured against itself, and metrics of different units are never mixed. *Amended by spec 68 (2026-11-01): ACs 6–7 of spec 68 §6.4 join this work package's acceptance criteria: the noise floor is the δ of loop admission, and promotion evidence carries a paired interval.*
- **Affected paths**:
packages/kip-sdk/src/eval/compare.ts, tests beside it. - **Acceptance criteria**:
- **Test requirements**: compare unit tests on a deterministic fixture corpus; estimator tests against hand-computed values, including n − c < k (= 1) and k = 1 (= c / n); the n < k refusal.
- **Dependencies**: WP-CP-07.
- **Size**: S · **Run**: C9a
WP-EVL-04: Blind, anonymised pairwise judging
1. Candidate ids are anonymised by a seeded shuffle; the mapping is stored apart from the judge's input, and the seed is recorded in the EvalRun. 2. Each candidate's artifacts are written whole to disk for the judge. Nothing is truncated; a candidate above the size limit is refused, not trimmed. 3. A judge answer outside the anonymous id set is a typed error. Nothing falls back to the incumbent or to a default pick. 4. An architecture rule fails if any module under packages/kip-sdk/src/learn/ imports the judge module.
- **Objective**: Amends WP-CP-07. A pairwise LLM judge sees seeded anonymous ids and full on-disk artifacts, never labels. An invalid choice is a hard error with no fallback to the incumbent. *Amended by spec 68 (2026-11-01): AC 5 of spec 68 §6.4 join this work package's acceptance criteria: candidates dropped before anonymisation are recorded with their cause.*
- **Affected paths**: new
packages/kip-sdk/src/eval/pairwise.ts,packages/kip-sdk/src/eval/compare.ts, the architecture rules ofscripts/check-architecture-boundaries.cjs. - **Acceptance criteria**:
- **Test requirements**: anonymisation determinism test; invalid-choice test; architecture-rule negative fixture.
- **Dependencies**: WP-CP-07.
- **Size**: M · **Run**: C9a
WP-EVL-05: Seeded, stratified held-out assignment and an expected-count ledger
1. The held-out split is a seeded shuffle stratified by case origin. The seed and the digest of the assignment are recorded; an existing assignment is never overwritten (a re-split is a new suite version). 2. A suite run's ledger asserts cases × replicates results with no duplicate run id, and a mismatch fails the run. 3. FL-EVL-01 asserts both. 4. *(C3-3, from DI:eval/score.py:126-140,161-162.)* Every suite run records coverageComplete = no planned case is missing AND results = cases × replicates. DeepInfer prints a warning and still writes the score; fabric does not. A run whose coverageComplete is false is invalid: compare refuses it as a baseline or a candidate, and promotion refuses it, each with a typed refusal naming the missing cases and the result count. FL-EVL-01 asserts the refusal. 5. *(C3-3, from DI:eval/run_eval.py:269-298.)* Before the first case runs, the runner writes a run meta record into the EvalRun: the requested model and, once known, its reported identity (WP-EXE-04), the sampling settings (temperature, top-p, reasoning effort, maximum length, seed), the replicate count, the case-set digest, the held-out assignment digest (AC1) and the runtime configuration. Its digest is recorded. The ledger of AC2 and the coverage check of AC4 take the planned counts from this record. A scoring pass refuses outputs whose recorded meta digest differs from the run's, and a run without a meta record is refused; nothing is inferred from the outputs and no default is substituted (§6).
- **Objective**: Amends WP-CP-07. Held-out assignment is reproducible and immutable, and a suite run proves it executed exactly the cases and replicates it planned. *Amended by spec 68 (2026-11-01): ACs 6–7 of spec 68 §6.4 join this work package's acceptance criteria: the meta record carries the sandbox and egress policy digests, and a loop's planned counts are checked by the same ledger.*
- **Affected paths**:
packages/kip-sdk/src/eval/suite.ts,packages/kip-sdk/src/eval/runner.ts. - **Acceptance criteria**:
- **Test requirements**: split determinism and immutability tests; ledger negative fixtures (missing, duplicate); a partial-run fixture refused by compare and promotion; meta-record fixtures (absent, digest mismatch).
- **Dependencies**: WP-CP-07. WP-SIL-05 (spec 68 §6.4).
- **Size**: S · **Run**: C9a
WP-EVL-06: Evidence-backed pass
1. A check without evidence fails. A zero exit without its required artifacts does not satisfy the check. 2. A judge or report that cites a case id outside the pinned case-set digest is rejected. 3. *(edited 2026-11-01, spec 68 §6)* A check set passes = score ≥ target AND every hard gate; neither alone suffices. A pass makes a runtime eligible (WP-CP-17) or satisfies a guard metric; it promotes nothing. 4. FL-HAR-03 asserts each rule.
- **Objective**: Amends WP-CP-17. A scorecard check passes only with evidence: a re-executed allowlisted command result or a cited artifact that exists. A check set **passes** when score ≥ target and every hard gate holds; WP-CP-07 reuses this pass rule as the guard-metric pass of fitness contracts. *(edited 2026-11-01, spec 68 §6)* A pass is a conformance result, never a promotion: promotion is spec 68's path alone.
- **Affected paths**: WP-CP-17's new
packages/atlas/src/catalog/scorecards.ts(scorecard schema and evaluator, spec 55 §3.15) and its per-runtime scorecard files, tests beside it. - **Acceptance criteria**:
- **Test requirements**: scorecard negative fixtures (no evidence, zero exit without artifacts, foreign case id).
- **Dependencies**: WP-CP-17; WP-EVL-07.
- **Size**: S · **Run**: C7b
WP-EVL-07: Content-addressed evidence references
1. A reference whose content does not hash to its id is refused. 2. Each reference names {producer, revision, os, harnessVersion, protocolVersion}. 3. The W-10 count for a lane is recomputed from references alone in a test and matches the gate's count. 4. FL-HAR-03 asserts AC1 and AC3.
- **Objective**: Amends WP-CP-17. Every scorecard check and every
EvalResultcites evidence asevidence:<sha256>with its producer, repository revision, OS, harness version and protocol version, so the W-10 "three consecutive green runs" is auditable from the references alone. *Amended by spec 68 (2026-11-01): ACs 5–6 of spec 68 §6.4 join this work package's acceptance criteria: a reference may carry a verbatim quote that must be an exact substring of its artifact.* - **Affected paths**: new
packages/contracts/src/fabric/evidence.ts(the reference schema),packages/atlas/src/catalog/scorecards.ts(WP-CP-17), tests. - **Acceptance criteria**:
- **Test requirements**: reference validation tests; W-10 recount test.
- **Dependencies**: WP-CP-17.
- **Size**: S · **Run**: C7b
WP-EVL-08: Compare-and-swap promotion pointer
1. promote(version, expectedIncumbent) succeeds only if the pointer still names expectedIncumbent. Of two concurrent promotions one wins and the other gets a typed conflict. 2. A promoted version is in the incumbent's family, and its version is the incumbent's plus one. 3. Re-promoting a version checks its content hash. 4. *(edited 2026-11-01, spec 68 §6)* A demotion is spec 68's rollback: a signed escalation answer and the loop run's journaled promotion effect, with the loop journal signed (WP-FN-02, landed C6). 5. FL-TRN-02 asserts AC1 and AC4.
- **Objective**: Amends WP-CP-08. Promotion of a method version is a compare-and-swap on a pointer: it names the incumbent it expects, stays within one family, advances the version by one and checks content on re-promotion. A demotion is journaled and signed. *Re-scoped by spec 68 (2026-11-01): the methods registry's pointer is a
PromotionPointerof WP-SIL-11, moved by WP-SIL-09's executor; AC4 is edited in place and AC 6 of spec 68 §6.5 joins this work package's acceptance criteria.* - **Affected paths**: the WP-CP-08 methods registry (registry storage through the WP-FN-09 memory backend),
packages/contracts/src/fabric/training.ts. - **Acceptance criteria**:
- **Test requirements**: concurrency test; lineage and content negative fixtures.
- **Dependencies**: WP-CP-08. WP-SIL-09, WP-SIL-11 (spec 68 §6.5).
- **Size**: S · **Run**: C9b
WP-EVL-09: Counterexample-backed revisions
1. A change-set without a WP-EVL-07 evidence reference showing a predicted-vs-observed divergence is refused. 2. The change-set's typed reason must match the class of the actual diff, or it is refused. 3. The version is the previous plus one, and the confidence delta is recomputed from evidence, never taken from the change-set. 4. FL-TRN-03 asserts each refusal.
- **Objective**: Amends WP-CP-08. A method change-set must cite contradicting evidence that shows a real divergence between predicted and observed behaviour, with a typed reason checked against the actual diff. The version advances by one and the confidence is recomputed. No automatic learner is built. *Amended by spec 68 (2026-11-01): AC 5 of spec 68 §6.5 join this work package's acceptance criteria: a method change-set is a candidate with a falsifiable edit manifest.*
- **Affected paths**:
packages/kip-sdk/src/learn/(method stage), the WP-CP-08 change-set schema. - **Acceptance criteria**:
- **Test requirements**: change-set validator negative fixtures.
- **Dependencies**: WP-CP-08; WP-EVL-07. WP-SIL-06 (spec 68 §6.5).
- **Size**: M · **Run**: C9b
WP-EVL-10: Declared pre- and post-facts on pipeline blocks (experimental)
1. A link whose downstream requirement is not covered by the upstream block's ensured facts is refused before dispatch with a typed unsatisfiable-link error naming the missing facts. 2. A block without declarations composes only where WP-CP-22 allows it today, and the composition report counts it as undeclared. 3. FL-TRN-08 asserts AC1. 4. At C9b Gate A the owner keeps the check or records a deferral (spec 55 §4.2 format); the decision is recorded in the WP closing note.
- **Objective**: Amends WP-CP-22. A pipeline block declares the facts it requires and the facts it ensures. Composition checks each link before dispatch and refuses an unsatisfiable one. The check is set inclusion over declared facts; no solver is adopted (§6). *Amended by spec 68 (2026-11-01): AC 5 of spec 68 §6.5 join this work package's acceptance criteria: a block candidate that loses an ensured fact is refused.*
- **Affected paths**: the WP-CP-22 block schema and composer.
- **Acceptance criteria**:
- **Test requirements**: composer negative fixtures.
- **Dependencies**: WP-CP-22. WP-SIL-06 (spec 68 §6.5).
- **Size**: M · **Run**: C9b
---
5. E2E flows
The five execution flows are deterministic CI legs: they run on the PR head with zero credentials. They are mirrored verbatim into spec 55 §6.2 (area "Execution hardening (spec 66)"), which is the catalogue's binding source, and into §6.4, and they are registered in e2e-tests/flows/catalogue.json with run C3 and status scheduled. The evaluation work packages add no new flow; they extend the owning flows' work-package lists (§4 table).
| ID | Steps | Components | Run | Layer | CI job |
|---|---|---|---|---|---|
| FL-EXE-01 | process-group termination: a hook and a hooks-proxy subprocess each spawn a grandchild that ignores SIGTERM and holds stdout; at the deadline the group gets TERM, then KILL after the grace period; the call settles within timeout + grace; the grandchild's sentinel pipe reaches EOF; the Windows leg kills the live tree with taskkill /T /F at the deadline; an agent effect run through the environment's journaled ACP lane (runAgentEffect) journals EFFECT_PROCESS_SPAWNED with its start time and owner, and task:cancel from another process kills the journaled group and journals teardown: "killed"; a journaled pid whose start time changed, or that was spawned on another host, is never signalled (orphaned); SIGINT to run:iterate leaves no grandchild; the agent group of a lane owner killed hard is reaped by the next run:iterate, while a live owner's group is left running | orchestrator-sdk hooks dispatcher and hooks-proxy subprocess, harness-core process tree, ACP lane runtime (startAcpLane, spawnAgent) with the environment's journal binding, effect cancellation and reap | C3 | integration | ci.yml:exec-hardening |
| FL-EXE-02 | fingerprinted reuse inside journal v2: a resolved agent effect is reused when its requested-config digest and output digest match; a changed requested model or declared adapter configuration journals EFFECT_REUSE_REFUSED (harness-config-changed), retires the old effect and requests a new one that supersedes it under the call's primary invocation key; a host harness CLI update mid-run journals one HARNESS_CLI_VERSION_CHANGED warning and re-dispatches nothing; a tampered result.json journals output-digest-mismatch; run:recover-process-error --patch-effect journals EFFECT_RESULT_PATCHED and the patched effect is reused without a re-dispatch; a journal that straddles the upgrade gets one JOURNAL_FINGERPRINTING_STARTED marker, replays its earlier effects as unfingerprinted and fails a later digest-less request with MissingFingerprintError; an ok commit of a TimedOut outcome is refused with EffectTimeoutCommitError; the journal verifies and no second log exists | orchestrator-sdk journal v2, effect commit, replay | C3 | integration | ci.yml:exec-hardening |
| FL-EXE-03 | typed spend-free lane preflight: against stub providers, a missing CLI binary, a version off its pin, an expired credential and an exhausted quota each turn the lane red with that class and source: probe, with zero completion requests; no failed probe becomes skipped or missing; an unprobed quota without its reason, approver, grant date or unexpired 14-day expiry, renewed a third time, or re-dated without a counted renewal fails validation; a run-time auth regex hit on a lane whose probe passed is reported classification-mismatch | harness-matrix preflight, gate, lane declarations | C3 | integration | ci.yml:exec-hardening |
| FL-EXE-04 | run identity: every lane and live-stack result carries the harness CLI version, the requested and the reported model, the harness-config digest, the SDK version and the protocol version; a reported model that differs from the requested one is model-mismatch red; flake-window and quarantine-exit counts never span two identities, and the ledger refuses a mixed aggregate (ERR_MIXED_IDENTITY); the live-stack summary shows no filename-derived value; every live-stack model key agrees with its model id, in every consumer | harness-matrix lib and CLI, live-stack matrix | C3 | integration | ci.yml:exec-hardening |
| FL-EXE-05 | indeterminate outcome: a lane whose command was stopped at its LIVE_STACK_COMMAND_TIMEOUT_MS deadline (written with terminatedBy: deadline and the deadline's source), a lane stopped at its fabric turn budget and a zero-exit lane without its required artifacts are indeterminate with their reason, while a provider quota refusal stays quota-exhausted red; indeterminate rows are excluded from flake rates and quarantine proposals and turn the Tier-1 gate red; a live flow job concluded timed_out is reported indeterminate: timed_out, not green | live-stack producer, harness-matrix gate, flow-coverage checker, orchestrator-sdk run status | C3 | integration | ci.yml:exec-hardening |
**Job binding.** WP-EXE-01 creates ci.yml:exec-hardening with an ubuntu-latest and a windows-latest leg. Each work package adds a named step whose test titles carry its flow id and that writes JUnit to artifacts/flow-results/, uploaded as flow-results-exec-hardening-<os> for the WP-CP-02 gate. During C3 the e2e-catalogue job judges the C3 rows with --run C3, the side-run mechanism of spec 65 §0.3.
---
6. Not adopted, and why
| Item | Source | Why fabric does not adopt it |
|---|---|---|
| Retry until output appears | H2:harness2/benchmarks/jb_opencode_runner.py:239-248 | Masks failures. I-10 forbids retries that hide flakes; fabric reports a typed failure or indeterminate instead. |
| Improver retries with sleeps | H2:harness2/core/proposer.py:150-156 | Sleeps and retries are banned in tests and gates (30:187, I-10). |
| Fallbacks: a failed stage inherits the previous harness; the selector falls back to the base | H2:harness2/core/recursion.py:166-174,242-251; H2:harness2/core/selection.py:237-252 | Fabric's no-fallback rule: explicit precedence, reported winner, typed failure. WP-EVL-04 AC3 makes an invalid pick a hard error. *Amended 2026-11-01 (spec 68 §0.4 item 2):* in the shipped finals-only pool the base is never a candidate (H2:harness2/core/selection.py:93-111), so the selector's fallback picks the first final (:237-252); the fallback record keeps ok=False, is never judged and never enters the library. The non-adoption stands. |
| Preferring trials with a parseable score | H2:harness2/benchmarks/workbuddy.py:733-736 | Selection bias toward gradable output. WP-EVL-02 counts ungraded cases instead. |
| Unsandboxed agents with open network | H2:harness2/substrate/codex.py:166 (--dangerously-bypass-approvals-and-sandbox) | Fabric lanes run behind the trust-signed permission gate (WP-T3-17) and their sandbox; no lane bypasses approvals. |
| POSIX-only file locking | H2:harness2/core/schedule.py:290-328 (fcntl.flock) | Fabric runs on Windows too and already serialises run writes with its run lock (withRunLock, commitEffectResult.ts:25). |
| Excluding ungraded rows from the denominator without blocking | H2:harness2/core/report.py:86-111 | Fabric fails closed: an ungraded pinned case blocks promotion (WP-EVL-02 AC2). |
A second journal (loom FileJournal) | LOOM:packages/storage/src/index.ts:201-267 | I-11: one journal. Journal v2 is already hash-chained with RFC 8785 checksums (journal.ts:23-34). |
| A per-task process file beside the journal | the round-1 draft of WP-EXE-01 (tasks/<effectId>/processes.jsonl) | A second, unverified log: cancellation would signal pids that no hash chain protects. Spawns and exits are journal events (WP-EXE-01 AC4, AC6). |
| The harness CLI version as a reuse input | the round-2 draft of WP-EXE-02 AC1 (probeCliVersion re-probed at every iteration and hashed into the requested-config digest) | Host CLIs update themselves mid-run, and every resolved agent effect of a live run would be refused and re-dispatched, the cost §0.3 item 6 rejects for process edits. The version is recorded identity (RunMetadata.executor, HARNESS_CLI_VERSION_CHANGED, reportedIdentity) and keys the CI flake windows (WP-EXE-04 AC3). The parallel adapter method is not added either: getCliInfo() is already declared (harness/types.ts:219), and WP-EXE-03 AC8 implements it on every adapter. |
| A deny-list of volatile keys for the task adapter-config digest | the round-3 draft of WP-EXE-02 AC1 ("every other key enters the digest") | It hashed the process-authored prompt and output schema, so an edit of a shared prompt fragment re-dispatched every resolved agent effect that used it, and a timestamp or path inside a prompt value, which no key-name list can remove, re-dispatched the effect at every iteration. The digest takes a closed include-list of execution-identity fields; the prompt is recorded as promptDigest and a change is journaled (EFFECT_PROMPT_CHANGED), never a re-dispatch (WP-EXE-02 AC1, §0.3 item 6). |
Raising LIVE_STACK_TEST_TIMEOUT_MS to cover the setup commands | review round 3, MF-R3-3 (the alternative fix) | I-10 forbids raised timeouts. The runner instead shortens each command's deadline to the remaining test budget and reports test-budget as the winner (WP-EXE-05). |
A second lane deadline (LIVE_STACK_DEADLINE_MS) | the round-2 draft of WP-EXE-05 | The producer already enforces LIVE_STACK_COMMAND_TIMEOUT_MS and kills the command group at it (primary-live-runner.ts:527-590); a later deadline could never fire, and two competing limits break the explicit-precedence rule. WP-EXE-05 reports the existing deadline with its source. |
formatVersion: 3, or an sdkVersion comparison, to tell fingerprinted events apart | review round 2, MF-R2-2 | The format version describes the envelope (sequence, chain, checksum), which this spec does not change; a version string does not say whether a build contains this work package, because the staging and develop trains publish pre-release versions from different branches. A journaled marker is the journal's existing mechanism for a boundary (journal.ts:42-46), and a downgrade after it is caught by MissingFingerprintError, which names the writer's sdkVersion (WP-EXE-02 AC6). |
Halting a run on a tampered result.json instead of re-dispatching | review round 2, NH-R2-5 | The refusal is a hash-chained EFFECT_REUSE_REFUSED naming both digests, so the tampering is on record, and the tampered bytes never reach the process. A halt would block the run behind a second recovery command whose only sound action is the same retirement and re-request; the spend is bounded to the one refused effect. The sanctioned way to keep an edited result is --patch-effect (WP-EXE-02 AC7). |
loom's inconclusive outcome, beside indeterminate | LOOM:packages/model-core/src/contracts.ts:158-162 | In loom it marks evidence that ran but did not decide. Fabric has no consumer that treats such a result differently from indeterminate: both prove nothing and both must block a gate, so a second name would only split one fail-closed state in two. A check that ran and could not decide is indeterminate (or, for a scorecard check, a failing check without evidence, WP-EVL-06 AC1). |
| Reusing a result whose executor reported a different model than requested | H2:harness2/core/runmark.py:41-115 compares the harness fingerprint only | Reuse is decided on the requested-config digest (known before execution); the reported identity is recorded on EFFECT_RESOLVED and a mismatch fails the lane as model-mismatch (WP-EXE-04 AC2), never silently reused or re-keyed. |
| The equality-fact solver and its assignment budget | LOOM:packages/solver/src/index.ts:151-257 | Not needed for declared facts; WP-EVL-10 is set inclusion only. |
| Stochastic candidate types | LOOM:packages/model-core/src/contracts.ts | No fabric consumer; confidence stays evidence-derived (WP-EVL-09 AC3). |
| The hard-coded CLI demo | loom CLI | Demo code, not a capability. |
| The regex call-graph analyzer | loom analyzer | Zero accepted findings in loom's own record. |
| The v1 aggregate that passed at score 92 with coverage 17 | loom public-composition v1 | A pass without coverage is the failure WP-EVL-06 exists to prevent. |
| Self-graded documentation convergence | loom docs process | The grader and the author are the same agent; WP-EVL-01 and WP-EVL-04 forbid that shape. |
| The dispatch wrapper | loom | Fabric dispatch is the control plane's (WP-T3-20). |
| loom as a package dependency | LOOM:package.json:4,73-79 | Private and unpublished; its peer on the adapters SDK (@fabricstack/harness-sdk, spec 15 §3.1 row 4) at >=6.0.0 <7 conflicts with fabric's harness 7. |
| Judge requests retried with exponential backoff (C3-3) | DI:eval/common/judge.py:161-162,240-272 (EVAL_JUDGE_ATTEMPTS, default 3; time.sleep(min(2**attempt, 10))) | I-10 forbids retries that hide flakes. A judge failure is graded: false with its typed error (WP-EVL-02 AC1); a new attempt is a new, journaled judging pass, never a silent loop. |
| A judge failure counted as a wrong answer (C3-3) | DI:eval/common/judge.py:273-278; DI:eval/score.py:192-202 ("count as wrong") | "Could not grade" is never a score (WP-EVL-02 AC1, AC2); an ungraded pinned case blocks promotion. |
| An unlocked judge model (C3-3) | DI:eval/common/judge.py:179-183 (the argument, else EVAL_JUDGE_MODEL); recorded in the summary only (DI:eval/score.py:122,154) | Recording is not locking: the same output directory can be re-scored under another judge and overwrite summary.json (DI:eval/score.py:206-208). WP-EVL-02 AC4 refuses a judge change on an existing EvalRun. |
| Single-sample scoring with no noise floor (C3-3) | DI:eval/run_eval.py:23-27 (HLE n_sample 1); the summary carries no replicate spread | A single sample cannot separate a gain from noise. WP-EVL-03 AC1 and AC2 measure the incumbent against itself and refuse a gain at or below the floor. |
| pass@k approximated with min(k, n) for a short task (C3-3) | DI:eval/common/passk.py:28-33,40-42 | It mixes pass@k and pass@n in one average. WP-EVL-03 AC5 refuses n < k as a typed error. |
Defaults for an absent meta record: the bench falls back to aime and the sample count is inferred from the outputs (C3-3) | DI:eval/score.py:95-101,129 | A fallback (fabric's no-fallback rule). WP-EVL-05 AC5 refuses a run without its meta record. |
| Last write wins when merging duplicate (task, sample) rows (C3-3) | DI:eval/score.py:27-40 | A duplicate silently replaces a result. WP-EVL-05 AC2 fails a duplicate run id. |
| Executing Python shipped inside a checkpoint (C3-3) | DI:eval/common/encoder.py:9-23 (spec.loader.exec_module on <checkpoint>/encoding/encoding.py); checkpoints resolved by snapshot_download with no revision pin (DI:examples/_config.py:44-52) | Code that arrives with model weights is not reviewed code. Fabric executes nothing from a checkpoint directory; the chat template and output parsing are fabric's own, and a checkpoint is admitted only through the provenance gate of spec 67 (WP-DI-01). |
| Running DeepInfer in any fabric lane now (C3-3) | DI:README.md:3,5-9,33-36,38-42; DI:deepinfer/entrypoints/llm.py:23,90 | Serving is deferred (spec 67, DF-10): one model, SM100 or Ascend 950 only, offline LLM.generate with no HTTP server, and the release itself lists the KV cache system, disaggregation and load balancing as not included. |
Any harness2 source, and anything from third_party/wb_runner/ or third_party/patches/workbuddy-bench-runtime.diff | H2:LICENSE; H2:third_party/wb_runner/LICENSE | Ideas only (§7). The Tencent material carries a licence that excludes use in the European Union. |
---
7. Licence and attribution
- **harness2** is Apache License 2.0 (
H2:LICENSE), with per-file copyright Google LLC. Fabric reimplements ideas and copies no code, text or data. Because nothing is redistributed, there is no NOTICE obligation and no entry indocs/THIRD-PARTY-NOTICES.md. Credit is given in this spec (§2A cites every idea's source). - **loom** is a5c's own, private and unpublished. Its ideas are ported; no package, file or generated artifact of loom enters fabric, and no manifest names it.
- **DeepInfer** is Apache License 2.0 (
DI:LICENSE), from DeepSeek. As with harness2, fabric reimplements the evaluation ideas of §2A and copies no code, text or data, so nothing is redistributed and there is no NOTICE obligation; credit is given in §2A. Nothing from the clone was run. The model weights it serves carry their own licence, which spec 67 records. - **Tencent material** in the harness2 clone (
third_party/wb_runner/,third_party/patches/workbuddy-bench-runtime.diff) is not read into fabric in any form. - **Guard.** WP-EXE-01 adds
scripts/__tests__/inspiration-provenance.test.mjs, run inci.yml:exec-hardening. Over every git-tracked file except those underdocs/specs/and the guard's own test file and fixture directory (scripts/__tests__/inspiration-provenance.test.mjs,scripts/__tests__/fixtures/inspiration-provenance/), which is the complete exclusion list and is asserted by the test itself, it fails on aCopyright … Google LLCheader, the stringswb_runnerorworkbuddy, anypackage.jsondependency whose name ends in/loomor equalsloom, and a Python file underpackages/orscripts/that carries a harness2 module path. Negative fixtures trip each rule.
---
8. Risks
| # | Risk | Mitigation |
|---|---|---|
| ER-1 | On Windows, taskkill /T walks parent pids, so a grandchild whose parent already exited is missed | The tree is killed at the deadline while the leader is alive, with no TERM and no grace period on Windows (WP-EXE-01 AC3); the FL-EXE-01 Windows leg kills a live three-level tree. A Windows job object needs native code and is not adopted in C3. |
| ER-2 | Strict reuse re-dispatches expensive effects after an executor change | The harness CLI version is not a reuse input (§0.3 item 6): a host CLI update is one HARNESS_CLI_VERSION_CHANGED warning and re-dispatches nothing (WP-EXE-02 AC1), and neither does a prompt or output-schema edit, which is journaled as EFFECT_PROMPT_CHANGED. Only a changed requested model or a changed field of the closed execution-identity include-list, which the process author controls, re-dispatches, and the refusal names both digests. CI lanes key their flake windows by the CLI version (WP-EXE-04 AC3) and pin it through WP-EXE-03's version-mismatch probe. |
| ER-3 | Spend-free auth and quota probes differ by provider, and some providers have no quota signal | Declared per provider; an unprobed quota needs a reason and an owner approval, runs on the 30:94 clock (≤14 days, at most 2 counted renewals, checked against the base revision) and is listed as a tracked gap in the identity record and the run summary (WP-EXE-03 AC5, WP-EXE-04 AC1). |
| ER-4 | indeterminate turns more gates red | By design (fail closed). Each reason is reported so that its cause is fixed; no retry masks it. |
| ER-5 | Identity keying shortens flake windows after every harness update | A new window is correct: a pass rate across two harness versions measures neither. |
| ER-6 | Journal events gain fields and types | Additive fields (harnessConfigDigest, promptDigest, supersedes on EFFECT_REQUESTED; outputDigest, reportedIdentity on EFFECT_RESOLVED; reissueKey on the refusal) and seven new event types (EFFECT_PROCESS_SPAWNED, EFFECT_PROCESS_EXITED, EFFECT_REUSE_REFUSED, EFFECT_RESULT_PATCHED, EFFECT_PROMPT_CHANGED, JOURNAL_FINGERPRINTING_STARTED, HARNESS_CLI_VERSION_CHANGED) in journal v2, formatVersion unchanged at 2, with recomputed golden vectors (WP-EXE-02 AC5). The marker separates events written before and after the upgrade, and a run that straddles it is tested (WP-EXE-02 AC6). WP-CP-11's expand/contract rule covers later trains. |
| ER-7 | C3 is wide (five tracks) | Track C touches no console or deploy source and has no cross-track edge. In the environment it edits only the lane journal binding (apps/environment/src/acp/RunJournalLane.ts, RunJournalLaneHttp.ts). It shares those two files, ci.yml and check-e2e-flow-coverage.cjs under the ownership and order rule of §3 "Shared files in run C3", and is reviewed on its own evidence table (spec 55 §3.4). |
| ER-8 | An effect owner killed hard cannot tear down its groups | The effect spawns are journaled with their owner, and the next run:iterate or runAgentEffect reaps them once the owner is dead, after a start-time check (WP-EXE-01 AC9). Hook trees of a hard-killed CLI are not journaled: their deadline timer died with the CLI, and nothing reaps them. Hooks are short scripts whose stdio pipes close with the CLI; this residual case is accepted for C3 and listed here. |
| ER-9 | The host harness does not report the model it used for an agent task posted with task:post | The reported identity is unreported, typed and listed in the run status (WP-EXE-02 AC2). Reuse does not depend on it; it depends on the requested-config digest. |
| ER-10 | A process that spawns lane agents but installs no signal teardown (any consumer of spawnAgent other than the environment) leaves its now-detached groups behind on Ctrl-C | spawnInGroup's exit listener covers every normal exit (WP-EXE-01 AC8); an ACP agent reads its stdin, which reaches EOF when the parent dies; and a journaled effect's group is reaped (AC9). The orchestrator-sdk CLI and the environment, the two production owners, install the teardown. |
| ER-11 | A writer older than this work package (for example a deployed environment older than the user's CLI) appends a digest-less event after the fingerprinting marker, and replay fails with MissingFingerprintError (WP-EXE-02 AC6, review round 3 NH-R3-4) | Not resolved in C3. The error names the writer's sdkVersion (from the envelope) so the operator upgrades that writer; no recovery command re-digests an already-appended event in C3, and none is improvised (a re-digest of bytes no fingerprinted writer produced would assert what was never checked). Track C's PRs ship the SDK and the environment from one train, which keeps the window to a deployment that lags its CLI. A sanctioned recovery path is an open item for the C3 exit review. |
---
9. Programme records changed by this spec
- **
roadmap/index.json:**counts.EXE = 5,counts.EVL = 10,total = 155; fifteen records WP-EXE-01…05 (spec66, runC3) and WP-EVL-01…10 (spec66, the runs of §4), statusscheduled, with the edges of §3 and §4 (round 3: WP-EXE-03 → WP-EXE-01; WP-EXE-04 → WP-EXE-03, WP-EXE-01; WP-EXE-02 → WP-EXE-04, WP-EXE-01; WP-EXE-05 → all four; WP-EXE-01 → WP-FN-01; round 4 adds WP-EXE-02 → WP-EXE-03); the C3 re-sequencing of spec 55 §3.4–§3.5 (amendment 2026-10-20). - **
scripts/lib/roadmap-specs.cjsandscripts/check-roadmap-index.cjs:** spec 66 is parsed; familiesEXEandEVL→ spec66; the expected total is 155. - **
scripts/lib/flow-catalogue.cjsandscripts/check-e2e-flow-coverage.cjs:**EXEandEVLjoin the work-package id vocabulary;T2_TOTAL = 156. - **
scripts/check-compliance-matrix.cjsandroadmap/gate-b-compliance-matrix.md:** fifteen work-package rows; the section is renamed "Work-package rows (155)". - **Spec 55** (amendment 2026-10-20): §0.1 records C3-1 and C3-2; §3.14 gains fifteen rows; §6.2 gains the "Execution hardening (spec 66)" area with the five rows of §5; §6.3 T2 and §6.4 are updated.
- **
e2e-tests/flows/catalogue.json:** five rows FL-EXE-01…05, runC3, statusscheduled,tests: []; the owning flows of §4 list their WP-EVL work packages. - **Round 2 (2026-10-20):** FL-APR-05 narrowed to the tool-use action for C3; FL-APR-04 (C4) gains a
ci.yml:console-webleg and WP-T3-25; spec 55 §3.4 gains the WP-T3-23, WP-T3-17 and WP-FN-01 dependency rows and thedeploy_environmentproduction guard; the C7b, C4, C9a and C9b exits and the WP-CP-07/08/17/22 bodies, WP-FN-12 (spec 20), WP-TEST-03 (spec 30) and WP-T3-25 (spec 10) carry the amendments of §3 and §4. - **Round 3 (2026-10-20):** the merge order of Track C becomes WP-EXE-01 → WP-EXE-03 → WP-EXE-04 → WP-EXE-02 → WP-EXE-05 in this spec, spec 55 §2.1 and §3.4 and the index edges; the WP-EXE-01 title in the index and the compliance matrix becomes "…cancel and owner exit"; FL-EXE-01, FL-EXE-02, FL-EXE-03 and FL-EXE-05 are reworded in §5, spec 55 §6.2 and the catalogue; spec 55 §3.4 names the environment files Track C edits.
- **Round 4 (2026-10-21, owner decision C3-S1):** the index gains the hard edge WP-EXE-02 → WP-EXE-03 (the
getCliInfo()implementations), already implied by the merge order; no title, flow row or count changes, so spec 55 and the catalogue are unchanged. - **Amendment 2026-10-21 (owner decision C3-3):** DeepInfer added as a source; WP-EVL-02 AC6–AC7, WP-EVL-03 AC5 and WP-EVL-05 AC4–AC5 added; nine §6 rows. No title, size, run, edge, flow row or count of this spec changes. The serving design is spec 67, whose four deferred records (WP-DI-01…04, DF-10) are listed in spec 67 §10.
- **Regenerated reports:**
roadmap/progress.mdandroadmap/flow-coverage.md.
---
10. Review round 1 — findings and resolutions
| Finding | Resolution |
|---|---|
B1 (a) a re-request reuses the invocation key and trips Duplicate invocation key detected (effectIndex.ts:214-218) | Verified. WP-EXE-02 AC3 defines EFFECT_REUSE_REFUSED as the retiring event and the index rule: the refused record is retired and unmapped, and a duplicate key is accepted only with supersedes naming the most recently retired effect for that key; every other duplicate still fails. |
| B1 (b) the request-time digest used result-time facts | Verified. Split: the requested-config digest goes on EFFECT_REQUESTED (AC1); the reported identity goes on EFFECT_RESOLVED (AC2) and never decides reuse. |
B1 (c) RunMetadata.harness is a bare string (storage/types.ts:15) | Verified. AC1 adds RunMetadata.executor, keeps harness (consumed at runIterate.ts:44), and names the per-effect sources in fixed precedence, including host-executed agent tasks posted with task:post (--reported-model, --reported-cli-version, else unreported). |
M1 processes.jsonl was a second log | Verified. Spawns and exits are journal events (WP-EXE-01 AC4, AC6); the AC5 carve-out of WP-EXE-02 is removed; §6 records the rejected design. |
M2 hooks/types.ts:91 is OnTaskCompletePayload.status | Verified. §2.1 cites :40 and :28-34; WP-EXE-01 AC7 adds timeout to HookExecutionResult.status and outcome to HookResult. |
M3 --patch-effect rewrites result.json in place (runCreate.ts:582-587) | Verified. WP-EXE-02 AC7: the command journals EFFECT_RESULT_PATCHED with both digests; test that the patched effect is reused without re-dispatch. |
| M4 no signal source for timeout or budget; no W-10 counter | Verified (the lane step timeout is in live-stack.yml:330, not harness-matrix.yml). WP-EXE-05 names the producers and fields (terminatedBy, the declared turn budget; the round-2 deadline LIVE_STACK_DEADLINE_MS is replaced in round 3 by the existing per-command deadline, §11 MF-R2-4) and splits fabric budget-exhausted from provider quota-exhausted; WP-EXE-04 states that WP-TEST-03 completion creates the W-10 count and binds it. |
M5 live-stack producers and google-gemini31 consumers missing | Verified, and two more consumer lines found (07-live-stack-qa-guide.md:23,104). WP-EXE-04 lists them all and deletes the filename-derived fallback (AC4). |
| M6 FL-APR-05 needs WP-T3-23 | Verified. Spec 55 §3.4 WP-T3-23 row: FL-APR-05 narrowed to tool-use for C3; FL-APR-04 completes the 7 actions in the console in C4; no fixture approvals. |
| M7 owning runs and WPs did not reference WP-EVL | Verified. C7b, C9a, C9b exits and the five owning work packages (plus WP-TEST-03) carry the amendment (§4). |
| M8 no fail-closed production guard | Spec 55 §3.4: if: github.ref_name != 'main' plus, when lifted, a protection-rules step failing ERR_ENVIRONMENT_UNPROTECTED, with a workflow test. |
| M9 detached groups escape SIGINT; no start-time source | Verified. WP-EXE-01 AC8 (signal and exit teardown, SIGINT test), AC9 (reap after SIGKILL), AC5 (per-OS start-time sources). |
| N1–N8 | N1 §6 row; N2 WP-EXE-05 AC4 asserts the reason string; N3 WP-EXE-03 AC5 bounds unprobed; N4 §3 shared-files table and spec 55 §3.4; N5 AC3 and ER-1 agree (no grace on Windows); N6 §7 names the exclusion; N7 spec 55 §3.4 rows disclose the open C2 gate record; N8 spec 10 WP-T3-25 note. |
---
11. Review round 2 — findings and resolutions
| Finding | Resolution |
|---|---|
| MF-R2-1 no named producer for the journaled spawn, cancel and reap; the unified subprocess is a hooks-proxy spawn | Verified: invokeHooksProxy has no effect id, no run directory and no caller outside its re-export (harness/unified/index.ts:9), and no spawn in packages/babysitter-sdk/src/ executes an effect (§2.1). The effect-executing spawn is named: startAcpLane → spawnAgent under an AcpJournalBinding, constructed in production by the environment's runAgentEffect (RunJournalLane.ts:80-110, binding at :98). WP-EXE-01 classifies every spawn site by role. AC4, AC6 and AC9 apply to the lane spawn only: the binding gains an injected recordProcess (dispatch-core may not import the SDK, check-architecture-boundaries.cjs:105-113); spawn events name their owner and host; cancel works from another process; and the reap leaves a live owner's group alone. The hooks-proxy spawn is covered by AC1–AC3 and AC8 only. The process-tree primitives move to @fabricstack/harness-core, which both packages may import. FL-EXE-01 is reworded in §5, spec 55 §6.2 and the catalogue. |
| MF-R2-2 no discriminator between legacy and post-upgrade events inside journal v2 | Verified (journal.ts:23-27: every event is formatVersion: 2). WP-EXE-02 AC6 adds the journaled marker JOURNAL_FINGERPRINTING_STARTED, written on the first post-upgrade append as the legacy marker is (journal.ts:42-46). Effects are classified by the position of their request; a digest-less post-marker event fails with MissingFingerprintError, which names the writer's sdkVersion; and a journal that straddles the upgrade is tested. §6 records why neither formatVersion: 3 nor an sdkVersion comparison is used. |
MF-R2-3 the host CLI version in the reuse digest re-dispatches a live run after an auto-update; adapterConfigDigest unspecified | Verified. The CLI version leaves the digest (§0.3 item 6). For the host it is identity: RunMetadata.executor from the existing getCliInfo() (NH-R2-2) and a HARNESS_CLI_VERSION_CHANGED warning modelled on PROCESS_CODE_HASH_CHANGED, with a mid-run change test (WP-EXE-02 AC1). adapterConfigDigest has a field rule for tasks (the agent block minus a closed volatile-key list) and an exact field list for lanes (WP-EXE-04 AC1). ER-2 is rewritten. |
MF-R2-4 LIVE_STACK_DEADLINE_MS could never fire | Verified (live-stack.yml:356-357; pipeline-scenario.test.ts:22,54; primary-live-runner.ts:527-590). The second deadline is deleted. terminatedBy: "deadline" is bound to the existing per-command deadline and reports its source; evidence mode requires both variables; and the contract test requires the vitest timeout to exceed the command deadline by at least 60,000 ms, which every live-stack step already meets (WP-EXE-05 AC6). §2.3 cites the three limits. |
| MF-R2-5 WP-EXE-04 needed the version before WP-EXE-03 supplied it | Fixed by reordering: WP-EXE-01 → WP-EXE-03 → WP-EXE-04 → WP-EXE-02 → WP-EXE-05. The unprobed clause moves into WP-EXE-04 AC1. WP-EXE-03 depends only on WP-EXE-01, WP-EXE-04 on WP-EXE-03, and WP-EXE-02 no longer depends on WP-EXE-03 (the version is not a digest input). §3, spec 55 §2.1 and §3.4 and the index edges agree. |
NH-R2-1 the unprobed bound dropped the renewal count | WP-EXE-03 AC5 applies the 30:94 clock verbatim: ≤14 days and renewals ≤ 2; validate --base refuses a re-dated entry without a counted renewal. |
NH-R2-2 probeCliVersion duplicated getCliInfo() | The new method is dropped; getCliInfo() (harness/types.ts:219) is used. |
| NH-R2-3 the legacy-key lookup could bypass retirement | WP-EXE-02 AC3: the refusal names the key the record is mapped under (primary or legacy) and the reissueKey. Retirement unmaps the former, so neither lookup reaches the retired record; tested. |
| NH-R2-4 WP-EXE-01 said "Dependencies: none" | It names WP-FN-01, landed in C2, matching the index. |
| NH-R2-5 a tampered result is re-dispatched rather than halted | Kept, with the reason recorded in §6. |
---
12. Review round 3 — findings and resolutions
Owner decision C3-S1 (2026-10-21) approved this spec at Gate S on condition that MF-R3-1…4 are corrected before any implementation track starts. Each finding was re-verified against origin/staging 7de78b70a before it was fixed.
| Finding | Resolution |
|---|---|
| MF-R3-1 the task adapter-config digest was a key deny-list, so the prompt, the output schema and values with volatility inside them decided reuse | Verified (tasks/types.ts:33-42: prompt, outputSchema and an open index signature). taskAdapterConfig is now a closed include-list of execution-identity fields (provider, approvalMode, maxTurns, external, responderType, adapter, targetResponders, trackerBackend, capabilities), the counterpart of laneAdapterConfig (WP-EXE-02 AC1). The prompt and output schema are recorded as promptDigest; a change is journaled as EFFECT_PROMPT_CHANGED and never re-dispatches. §0.1, §0.3 item 6, §2.2, the WP-EXE-02 objective, AC1 and AC6, ER-2, ER-6 and §6 say the same. Tests: a prompt or output-schema edit is reused with one journaled change and no refusal; a time-varying prompt is never refused; an unknown key does not change the digest; each listed field does. |
MF-R3-2 getCliInfo() is declared but implemented by no adapter | Verified (git grep -n getCliInfo: harness/types.ts:219 and genty/platform/src/harness/types.ts:340 only). WP-EXE-03 AC8 implements it on all eleven adapters and the unified and custom adapters through one readHarnessCliInfo (the catalogue cliCommand with --version, parsed by discovery's existing parser, no new timeout), names the command per harness, and returns an explicit unreported with one of four reasons instead of a missing version. harness:cli-info exposes the same reader to the lane preflight (AC1), so lanes and host share one version source. RunMetadata.executor and HARNESS_CLI_VERSION_CHANGED record unreported explicitly (WP-EXE-02 AC1). WP-EXE-02 gains the hard dependency on WP-EXE-03. |
| MF-R3-3 the 60 s margin ignored the setup commands that share the vitest test | Verified (primary-live-runner.ts:86,316,384-388; pipeline-scenario.test.ts:54; the documented-install runner has the same shape, documented-install-runner.ts:104,326-328). Each command's effective deadline is now min(declared, remaining test budget − LANE_ARTIFACT_MARGIN_MS), with the winner reported (test-budget when the budget wins) and later commands listed as notStarted once the budget is spent (WP-EXE-05). No timeout is raised. Tests use setup stubs that consume most of the margin and all of the budget, and the documented-install runner. |
MF-R3-4 the release gate live-stack-published.yml had no preflight and no identity source | Verified (live-stack-published.yml:1-12,462,585-627,388-445; called at publish-npm-private.yml:400, publish-packages-from-tag.yml:356). WP-EXE-03 adds a preflight step to &published_steps and to the documented_install job, declares the documented-install harnesses, and adds a contract test that every producer step in both workflows follows its preflight (AC5, AC9). WP-EXE-04 lists the workflow, takes the gate lanes' identity from the same preflight, and tests identity capture with the gate's environment. The workflow has no filename-derived block (grep: no match). |
NH-R3-1 cancel between spawnAgent and the journaled spawn | Taken. recordEffectProcess refuses a spawn record for an effect no longer requested; the lane terminates the group and ends cancelled before initialize (WP-EXE-01 AC4), with a test that cancels inside the window. |
NH-R3-2 a run created before the upgrade has no RunMetadata.executor | Taken. The first iteration backfills it and journals HARNESS_CLI_VERSION_CHANGED with previousVersionSource: "not-recorded"; the straddling-journal test covers it (WP-EXE-02 AC1, AC6). |
NH-R3-3 live-stack-published.yml:443-444 was cited as a "Run selected live stack E2E" step | Taken. It is "Verify documented published install" (:436). The citation is corrected and the contract test is extended to that step (WP-EXE-05 AC6). |
NH-R3-4 no recovery path after MissingFingerprintError from an older writer | Not resolved in C3; recorded as ER-11 with the reason. |
NH-R3-5 the spawn inventory omitted harness/unified/subprocess.ts:68; the laneAdapterConfig citation | The --version probe is added to §2.1 and placed out of scope in WP-EXE-01. The citation was re-checked: at 7de78b70a live-stack.yml:334-346 already includes LIVE_STACK_PROVIDER and LIVE_STACK_AGENT_MUX_PROVIDER (:345-346), and :347 is the model, which is excluded. The citation now names those lines and the published workflow's inputs (:590-607). |