FE-1524: Prove idempotent capture sweep on the live Flue chat path - #9384
FE-1524: Prove idempotent capture sweep on the live Flue chat path#9384lunelson wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryMedium Risk Overview
The Mission 1 production-path test ( Reviewed by Cursor Bugbot for commit 0313ae2. Bugbot is set up for automated code reviews on this repo. Configure here. |
Re-enter capture as a harness-side pipe so a named settled range can be applied twice without duplication or a model extraction call. Co-authored-by: Cursor <cursoragent@cursor.com>
The capture pipe is proven; the next live mission is the independent prompting experiment, not a join onto the ledger. Co-authored-by: Cursor <cursoragent@cursor.com>
7d400c4 to
00e16a5
Compare
84e6b84 to
0313ae2
Compare

🌟 What is the purpose of this PR?
Re-enter durable, source-linked capture as a pipe on the live Petrinaut ↔ Flue chat door, not as elicitation intelligence. An explicit settled Flue history range is applied into a capture store keyed by Flue conversation identity; applying the same range again yields the same capture identities. This establishes that the ledger pipe works. It does not establish extraction quality, a typed IR, a runbook, session-as-net, or two brains.
🔗 Related links
libs/@hashintel/brunch-agent/docs/mission-archive/2-mechanical-capture-sweep.md🚫 Blocked by
ln/fe-1522-mission-1)🔍 What does this change?
binding-fluefor this pipe only.applyCaptureSweepreads Flue history in-process, writes stub envelopes (quote = user text, payload{}), and re-applies without minting new ids.<flueInstanceId>.json.ChatAgentmounts one stub skill (confirm-path) soactivate_skillappears in history. The interviewer has no sweep tool.🏗️ Agent notes
Branch mission (closed)
Imperative: Re-enter durable, source-linked capture as a pipe, not as elicitation intelligence.
Throughline:
settled Flue history range → harness apply-sweep → capture store keyed by Flue conversation identity → same range applied again → same capture identities. Stub skill on the sameChatAgent. Interviewer does not call a sweep tool. Stub extraction: one envelope per user utterance, quote = that text, payload{}.Proof (one production-path test on the Mission 1
/api/chatdoor):activate_skillappears in Flue history.Constraints: Adapter still must not depend on core, binding, or plugins. App may depend on core/binding for this pipe only. No plugins, repertoire, kinds, slots, fold, completion, issues, or correction. No extraction LLM, sweep tool, token-threshold observer, or join to a runbook/IR template. Flue history remains the conversation log. Store key is the existing Flue conversation identity.
Observed proof
Witnessed 2026-08-27. Test:
apps/brunch-agent/test/petrinaut-chat.test.ts→petrinaut-chat.integration.ts.{}.skippedDedupKeys.defineSkill/useSkillmountedconfirm-path;activate_skill{ name: "confirm-path" }in history and the AI SDK stream.activate_skill,ping,readPetrinautDoc. Nosweep/brunch_sweep. Stub proposals built from history text in-process.Fog-line answers
createLocalCaptureStore+createFlueHistoryReader+store.execute({ type: "apply-sweep" })). NotuseElicitation, not HTTP, notuseAgentFinish. Evidence-bearing apply archives quotes before execute. Session id = Flue instance id.{}persisted with existingCaptureInputProposalSchema. No plugin catalog / trivial proposal schema.<flueInstanceId>.json. Hermetic test: besideBRUNCH_CHAT_DB_PATH. Internal JSON remains binding'sTargetDocumentRecord; app API does not expose that ontology.defineSkill+useSkillis enough foractivate_skillinhistory()undernode --experimental-strip-types.SKILL.md/ Vite not needed.Carried flags
MISSION.mdafter this close is Mission 3 (runbook / template / headless PN). That path must not wire itself to this store in order to tidy the list.Re-enters capture-store mechanism from FE-1392 and FE-1419 without executing those issues' typed-statement outcomes. FE-1503 is unchanged.
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
yarn workspace @apps/brunch-agent test:unitdoes not turbo-build workspace deps. Binding-flue must already be built (yarn workspace @hashintel/brunch-agent-binding-flue build) or CI turbotest:unit(dependsOn: ["build", "codegen", "^build"]) must run. This is existing workspace behavior, not introduced as a new mechanism.🐾 Next steps
MISSION.md): runbook + IR template + headless JS-API drive + off-canvas PN generation. Independent of this ledger; do not join them to tidy the list.MISSION.next.md.🛡 What tests cover this?
apps/brunch-agent/test/petrinaut-chat.test.ts— the Mission 1 production-path test, extended with skill activation, no sweep tool, and apply-sweep twice with identical capture ids.apps/brunch-agent/test/db-path.test.ts— capture file lives beside the conversation db, named by instance id.❓ How to test this?
yarn workspace @apps/brunch-agent test:unitactivate_skillin history, one envelope per user utterance, second apply returns the same ids.yarn dev:brunch, send a panel message, then inspect<instanceId>.jsonbesideapps/brunch-agent/.data-wipe-me/conversations.db. Capture is harness-side; the interviewer will not offer a sweep tool.📹 Demo
No panel recording for this close. The throughline is the production-path unit test against the same
/api/chatdoor Mission 1 named.