Skip to content
Like what we’re building? Star on GitHub

impl-provenance — delivery evidence ​

Worktree run-provenance, branch leap/run-provenance. No commit or push. No paid live model call. Mutations use owned scratch at /tmp/impl-provenance.kE0hqM; the working files retain the corrected code.

The contract, formats, legacy ordering and API are documented in run provenance. Historical nested sub-bots stay compact with links to their own history, preventing a later child resume from changing an older parent graph.

Implementation sites ​

Mutation witnesses ​

Each mutation is run independently and produces an assertion failure, not a compiler or configuration error. Restore the statement after reproducing it. Comments beside the tests explain the invariant.

WitnessProduction mutationObserved
TestAttemptProvenanceSurvivesResumeAndSourceDeletion:33pkg/runtime/engine_events.go:42: typ == store.EventRunStarted || typ == store.EventRunResumed → typ == store.EventRunStartedRED
TestMissingAttemptSnapshotDoesNotFallBack:201pkg/runview/workflow_export.go:169: if len(r.Attempts) == 0 { → if true {RED
TestLegacyRecordedSourceOutranksDisk:254pkg/runview/workflow_export.go:233: recorded := recordedSource(r) → var recorded *workflowfile.SnapshotRED
TestAttemptCapturesUnitAndBundleResources:141pkg/runview/workflow_source.go:42: s.Files[rel] = body → _ = rel; _ = bodyRED
TestWorkflowHashCacheSeparatesSourceRevisions:176pkg/runview/workflow_export.go:316: if cached := cache.get(key); cached != nil { → if cached := cache.get(key); false && cached != nil {RED
TestRunWorkflowStoredLegacyAndImmutableAttempt:22pkg/server/bot_resolver.go:22: func (s *Server) legacyRunWorkflowSource(ctx context.Context, r *store.Run) (*workflowfile.Snapshot, error) { → func (s *Server) legacyRunWorkflowSource(ctx context.Context, r *store.Run) (*workflowfile.Snapshot, error) { return nil, &runview.WorkflowUnavailable{Code:"bot_source_missing",Source:r.BotID};RED
TestAttemptQueueUsesSameRevision:18pkg/server/cloudpublisher/publisher.go:4702: if wf != nil && wf.SourceSnapshot != nil { → if false && wf != nil && wf.SourceSnapshot != nil {RED
TestAttemptProjectionDoesNotRebindHostMCP:228pkg/runview/workflow_source.go:106: true, b, false) → true, b, true)RED
TestResume_BudgetlessWorkflowClearsPriorCaps:91pkg/runtime/engine_run.go:640: b := e.effectiveBudgetSnapshot() if err := e.store.SetRunBudgetSnapshot → b := e.effectiveBudgetSnapshot() if b == nil { return } if err := e.store.SetRunBudgetSnapshotRED
TestLoadWorkflowPreservesAttemptSource:14pkg/runner/loop.go:3106: runview.SourceSnapshotFromTransport(raw) → runview.SourceSnapshotFromTransport([]byte({}))RED
TestAttemptWithoutCompilerCaptureRefusesMutableDisk:272pkg/runview/workflow_export.go:200: if captured.Source == nil { return nil, unavailable("attempt_snapshot_missing", a.ID) → if captured.Source == nil { return buildLegacyWireWorkflow(ctx,r,resolve,cache)RED
TestAttemptBundleExportIdentitySurvivesMaterialization:308pkg/runview/compile.go:76: root := u.Root if b != nil { → root := u.Root if false && b != nil {RED
TestAttemptSnapshotsFilesystem:9pkg/store/attempt.go:48: body, err := json.Marshal(a) → body, err := json.Marshal(a); if len(body)>1<<20 { body=[]byte({}) }RED
TestAttemptKeepsConsumedSubbotAttachment:341pkg/runview/subbot.go:428: Type: store.EventSubbotAttached → Type: store.EventNodeFinishedRED
TestAttemptAttachmentUsesEngineObserver:386pkg/runview/subbot.go:425: if req.OnChildAttached != nil { → if false && req.OnChildAttached != nil {RED
isolates metrics:28studio/src/lib/runAttempt.ts:21: e.seq >= startSeq → trueRED
switches provenance and caps:44studio/src/store/run/reducer.ts:348: budget: attempt.budget → budget: snapshot.run.budgetRED
keeps an observed active node:56studio/src/lib/runAttempt.ts:52: return { ...wf, nodes }; → return wf;RED
retains historical metrics:72studio/src/store/run/reducer.ts:857: state.events.concat(appended) → state.events.concat(appended).slice(-5000)RED
clears scrub:35studio/src/components/Runs/runView/useSelectionState.ts:117: [runId, attemptKey] → [runId]RED
authored labels:44studio/src/lib/runChat/useNodeLabel.ts:20: queryKey: ["run-workflow", runId, key] → queryKey: ["run-workflow", runId]RED
stream has no active_ms:56studio/src/hooks/useRunMetrics.ts:202: if (running && totalActive > 0) → if (running)RED
reattached child:92studio/src/lib/runAttempt.ts:61: scope.isCurrent && reattached.includes(child.id) → false && scope.isCurrent && reattached.includes(child.id)RED
sub-millisecond:99studio/src/lib/runAttempt.ts:73: return fraction(left) - fraction(right); → return 0;RED
cumulative duration:67studio/src/components/Runs/leftPanel/overview/BudgetSection.tsx:40: Math.max(cp?.elapsedMs ?? 0, run.active_duration_ms ?? 0, (events[0]?.active_ms ?? 0) + metrics.durationMs) → metrics.durationMsRED
retains consumed child:107studio/src/lib/runAttempt.ts:60: attached.has(child.id) &#124;&#124; → false &#124;&#124;RED
historical child graphs compact:80studio/src/hooks/useInlineSubbotData.ts:223: historical ? [] : rootChildrenByNode → rootChildrenByNodeRED

The shared FS/Mongo source-size and budget assertions live in pkg/store/storetest/attempts.go. Raw overlays, Vite transforms and proof logs are in /tmp/impl-provenance.kE0hqM/mutations/; their builders are mutations.py and ts-mutations.py in that scratch root. Initial compile-only or config-only failures are corrected and rerun; the table counts only real assertion failures.

Validation ​

  • Exact go build -mod=vendor ./... is blocked by the existing duplicate map key ITERION_SCHEDULE_PATH_MAX_BYTES at pkg/platformcfg/platformcfg.go:212,215. That file is unchanged. The temporary overlay removes only that duplicate for useful validation of this change.
  • All-package build with this overlay and complete pkg/store suite: PASS (/tmp/impl-provenance.kE0hqM/build-generated-final.log).
  • Complete pkg/dsl/ir, pkg/dsl/workflowfile, pkg/store/mongo and pkg/server/cloudpublisher suites pass with the overlay. Connected Mongo conformance is skipped without ITERION_TEST_MONGO_URI; FS runs the same attempt snapshot contract, including a resource larger than 1 MiB.
  • Targeted pkg/runview, pkg/runtime, pkg/runner, pkg/server suites pass: attempts, compiler/hash, queue hydration, reattachment, effective budgets and OpenAPI. Complete suites are attempted, but the sandbox forbids sockets required by existing httptest tests. Runner git fixtures also encounter the host signing configuration. These complete suites are not claimed green.
  • Studio: 79 targeted tests pass, including 15 attempt witnesses, human-form consumers, subbot hooks and source/accessibility discipline. The full suite before the last two child witnesses reports 3,627 passes, 11 failures. All 11 reproduce with the changed modules restored to HEAD through a temporary Vite transform: splitter sizing, dropzone attributes and an IssueCard banner. Baseline sources remain unchanged.
  • TypeScript compilation is blocked by existing Lucide IconComponent type errors. The new attempt code has no reported type error after registering the subbot_attached wire variant. ESLint on changed TS files: 0 errors; warnings remain for existing ref/non-null assertion patterns.
  • task check is attempted. The regenerated package map passes; OpenAPI generation then stops on the same duplicate Go key. Maps, OpenAPI and TS schema are regenerated separately using the overlay.
  • Final formatting: gofmt clean, git diff --check clean. Generated map freshness and its negative witness pass.

Representative reproduction (the exact build above has no overlay):

sh
GOCACHE=/tmp/impl-provenance.kE0hqM/go-cache devbox run -- go test \
  -mod=vendor -overlay=/tmp/impl-provenance.kE0hqM/overlay.json \
  ./pkg/runview ./pkg/runtime ./pkg/runner ./pkg/server \
  -run 'Test(Attempt|LegacyRecorded|MissingAttempt|WorkflowHashCache|RunWorkflowStored|LoadWorkflow|Resume_.*Budget|RunBudget|Compile|ComputeWorkflowHash|ReattachSubbot|OpenAPI)' -count=1

Review ​

Five local rounds, opening estimate 8, ceiling 50 (31 files at round 1), two reviewers. Fixed findings include queue/snapshot revision mismatch, ambient MCP rebinding, raw-IR disk reread, bundle-export hash instability, event truncation, selection/label/history leaks, duration clocks, cumulative budget, consumed child associations and live observation. Independent final witnesses confirm one durable attachment and one live delivery with branch attribution. No unresolved high/critical finding is reported in the reviewed scope. No forge gate or cross-family upstream plan review is claimed.

Journal: /tmp/impl-provenance.kE0hqM/review.jsonl.