Repository navigation
Closed
Labels
agent:readyHuman-approved for autonomous work by ocsi-fixercaptureAuto-capture pipeline: envelope compatibility, trigger coverage, trigger economicsseverity:mediumReal but narrow: robustness, hygiene, or gated behind multiple preconditions
Description
Part of #334. Reference implementation: branch retrieval-fix-20261107 @ 6f03e2d, commit item (3).
Problem
Capture re-mined the whole transcript on every trigger and offered the same facts again. The write gate collapsed them (moat intact), but each retry spent a capture-model call and an evidence line to store nothing — the dominant cost of repeated idle capture on long sessions.
Change
buildCapturePrompt gains a 4th argument: a compact list of rows the repo already keeps (knownRowsFor in the capture runtime: visible injectable rows, newest first, 15 rows / 90 chars each / 1400 total). The prompt names it as a do-not-repeat list. Empty store → no block, prompt unchanged.
Acceptance
- Unit tests: the list rides the prompt when the store is non-empty; absent when empty; e2e: a seeded row's text appears in the capture prompt.
- Evidence after merge:
auto_capture_collapsedrate per session drops on repeat captures (record before/after from the bench stores).
Footguns
- REVIEW ITEM before merge: the known list is rendered from store rows and passed through
buildCapturePromptWITHOUTredactSecrets(the transcript and prose arms are redacted; this arm is not). Store rows are gate-scrubbed at write time, so this is defense-in-depth, but addredactSecrets(known)insidebuildCapturePromptto keep the invariant "every block that reaches the capture model is redacted there, once". - The list is visibility-filtered (repo + global via
readerFromSid). Do not widen it — global rows are already visible to the session anyway. - Keep the helper fail-soft: a store read failure must degrade to an empty list, never skip the capture.
Metadata
Metadata
Assignees
Labels
agent:readyHuman-approved for autonomous work by ocsi-fixercaptureAuto-capture pipeline: envelope compatibility, trigger coverage, trigger economicsseverity:mediumReal but narrow: robustness, hygiene, or gated behind multiple preconditions
Activity
abogartz commentedon Nov 8, 2026
Landed via #362 including the review item (redactSecrets(known) inside buildCapturePrompt, main src/capture/prompt.ts:49). Dedup evidence from bench stores: auto_capture_collapsed = 0 on every run before and after (11 promoted rows results-attr-t3x5, 12 results-rules-t3x5, conflict runs 5+4+10) — nothing duplicated in those windows, so the rate had nothing to drop; no regression observed.