feat(engine): discovery-map add-batch — the harvest persists in one call (D7)#505
Merged
Conversation
This was referenced Jul 22, 2026
Merged
Merged
…all (D7) The batching programme pilot, recovered from the closed #495 tip and re-landed census-first. The fumi incident site: the harvest prescribed 2×N sequential calls (add + brief_path set per topic) and the model's coping alias killed all 24. - discovery-map add-batch <wu> --file <topics.json>: every entry validated (name legality, routing, summary, description/brief_path shape, in-batch duplicates) and checked against current map state (existing items, dismissed names needing force_dismissed) BEFORE any mutation — a failing entry persists nothing. One lock, one load, one save. brief_path rides each entry, replacing the per-topic follow-up set. Response carries added[] with computed lifecycles, undismissed[], and map_total, so the flow needs no re-read. - Harvest prose swap: write topics.json with the Write tool, one add-batch call — no shell-quoting hazards, atomic by construction. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
leeovery
force-pushed
the
feat/batch-discovery-map-add
branch
from
July 23, 2026 11:04
6b34710 to
85c938c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack root of the batching programme (design log: #504). The pilot: the fumi-incident site.
Why
The discovery harvest prescribed 2×N sequential engine calls (per-topic
add+brief_pathset). At N=24 the model aliased the engine path into$Eto cope; zsh does not word-split unquoted parameters, and every call died with exit 127 — plus a sequential run can die halfway, leaving a partial map. Contract C1–C3 from the design log: per-verb batch form, payload by file, validated loudly before any mutation, one lock/write/commit-scope.What
discovery-map add-batch <wu> --file <topics.json>— entries{name, routing, summary, description?, brief_path?, force_dismissed?}. Validation is exhaustive and pre-mutation: per-entry shape with the entry named in the error, in-batch duplicate names, existing-map collisions, dismissed names lackingforce_dismissed. A failing entry means nothing persisted. One lock, one load, one save;brief_pathlands with the entry (the old follow-upmanifest setper topic is gone). The response carriesadded[](with computed lifecycles),undismissed[], andmap_total— no re-read.confirm-and-persist.mdA): write the topic set as JSON with the Write tool, one call. The zsh-quoting guidance is deleted because the hazard no longer exists.b683fea7), re-cut to just this change per the census-first re-plan.Test plan
npm test1547/1547 · typecheck · conventions lint 27/27.🤖 Generated with Claude Code
Stack