Skip to content

lab: services.optimizer must land on vein.services (runs never saw it) - #1614

Merged
Evanfeenstra merged 4 commits into
mainfrom
lab-optimizer-wiring
Aug 28, 2026
Merged

lab: services.optimizer must land on vein.services (runs never saw it)#1614
Evanfeenstra merged 4 commits into
mainfrom
lab-optimizer-wiring

Conversation

@Evanfeenstra

Copy link
Copy Markdown
Collaborator

First live run of harvey-evolve v3 died immediately with harvey/evolve-loop requires a services.optimizer capability.

Root cause: createVein builds its effective services bag by spreading the caller's bag into a fresh object ({ ...standardServices, artifacts, ...opts.services }). createLabVein injected the optimizer after construction by mutating its local bag — whose comment ("mutate the SAME object createVein holds by reference") described behavior a vein refactor removed. Runs read the effective bag, so services.optimizer was silently missing for every consumer: harvey/evolve-loop (seen live) and eval/optimize (gitsee-optimize / concepts-optimize would hit the same wall).

Fix: inject on vein.services — the effective bag createVein returns — and keep the caller's bag consistent as well.

Regression check added to evolve-smoke (end to end, offline): boot the real createLabVein into a temp workspace (dummy ANTHROPIC_API_KEY for the construction-only provider check; nothing calls an LLM), publish a probe step + one-step workflow, run it, and assert the run's ctx.services.optimizer is present. Plus an explicit process.exit — the booted vein's live handles otherwise keep the smoke alive forever.

npx tsc --noEmit clean; full evolve-smoke passes including the new check.

🤖 Generated with Claude Code

createVein SPREADS the caller's services into a fresh effective bag
(standardServices + artifacts + caller's), so createLabVein's
post-construction `services.optimizer = …` mutated an object no run ever
read again — its comment ("mutate the SAME object createVein holds by
reference") described behavior a vein refactor removed. Every consumer of
services.optimizer was silently broken at run time: harvey/evolve-loop
(seen live: "requires a services.optimizer capability") and eval/optimize
(gitsee-optimize / concepts-optimize would hit the same wall).

Inject on vein.services (the effective bag) instead, keeping the caller's
bag consistent too. evolve-smoke gains the end-to-end regression check:
boot the real lab vein (offline, dummy key for construction-only provider
checks), publish a probe step + workflow, and assert a RUN sees
ctx.services.optimizer — plus an explicit exit, since the booted vein's
live handles otherwise keep the smoke process alive forever.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Evanfeenstra and others added 3 commits August 28, 2026 09:02
…in the harness

Two generations zeroed out when the author's schema-mode final turn
degenerated to a literal {"candidate": "placeholder", ...} — the harness
graded a ghost workflow while the author's real publishes (v5, v6) sat
unmeasured. candeval now runs the harness-pinned input.candidateName, and
vpin/vactive resolve the version to grade (the echoed pin when it exists,
else the candidate's active version — the author's own last publish, since
generations run sequentially). The result step reports the resolved
version so a garbage echo can't poison the briefing lineage or the
EXPLOIT anchor. Also bump the briefing's approach-summary excerpt 400 →
1200 chars: it is the only channel telling the EXPLORE directive what has
already been tried.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The UI always loaded the active version; agent-evolved workflows
(harvey-produce-ai v1…v7) had no way to show how their structure changed
across generations. /workflows/:name/flow now takes ?version=, and a
topbar dropdown pins the canvas to any published version. Historical
views are read-only (Publish/Run/add-step/edge edits gated off, badge
shown) — Publish builds on active and Run runs it, so editing the past
would mislead. The pin self-invalidates on workflow switch and resets
when a run is selected (run events overlay the active structure).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Evanfeenstra
Evanfeenstra merged commit 793ed32 into main Aug 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant