Repository navigation
feat(decisions): let Jev narrow what the memory_recall tool returns - #12492
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify one real oracle round trip through [DESIGN-REVIEWED] 6a6e24d |
UX Review (Fable 5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS Identical thumbs pairs rate different things ("I could easily click the wrong one"), and "Jev kept: 3" beside "2 did not fit" reads contradictory. Watch
Suggestions
[UX-REVIEWED] 6a6e24d |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS
Not justified as shipped
What this change shipsInventory (10 items) — 8 justifiedIntent: let Jev narrow what the
[FIRST-PRINCIPLES-REVIEWED] 6a6e24d |
GPT 5.6 Review — ✅ human override acceptedHuman judgment by @iamwhatever overrides the GPT 5.6 finding for This comment is updated in place on each push. The model was not re-run because an authorized human decision supersedes it. False positive or not applicable? A repository writer can comment: |
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsI have independently reviewed the core changes: the accounting refactor in The discovery pass produced no candidates, and my own falsification search surfaced no grounded defect that answers (a)/(b)/(c) at the required bar. No findings. [OPUS-REVIEWED] 6a6e24d Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
|
[operator: iamwhatever] Screenshot evidence for the recalled-memory strip, captured from the real built SPA behind Three states, light and dark. The collapsed line is the one the spec names: |
GPT 5.6 Review —
|
|
[operator: iamwhatever] Round 1 dispositions. Head FixedGPT
One deliberate divergence from the brief. You asked for a record carrying GPT I left the code and made the docs true, per your instruction, because the authoritative origin is not reachable in ≤10 lines: The corrected claim is in five places (the point's step 1,
First Principles item 7 — Design / UX / Screenshot Evidence — zero images. Eight now, in the description, from the real built SPA behind Disposition, no codeDesign Watch — judge latency is unbounded. Not a defect; the bound existed and was simply never written down for this point. The provider call is capped by Verification955 tests across the whole |
GPT 5.6 Review —
|
|
[operator: iamwhatever] Backend Lint & Type Check fixed. Head
RowT = TypeVar("RowT", bound=Mapping[str, Any])
Annotations only, no behaviour change. Verified before pushing:
Still frozen otherwise: this was a CI red, not a lane opinion. |
…tempt-correlated records Three findings from the review lanes, all real. Companion credential patterns bypassed redaction (compaction_keep.py:307). The state is a WHOLE TRANSCRIPT and `redacted` scrubbed it with `security.redact_credentials`, which knows only the patterns this repository ships -- so a host that loaded a companion sent its own credential and cookie spellings verbatim to a third party. It now routes through `platform.context.redact_via_context`, the canonical egress shim, before the stage's clip. The shim deliberately re-raises PlatformCompositionError so a host that could not compose its companion cannot silently downgrade; that is caught here and the FIELD IS DROPPED, the same direction every other arm of the function fails in. The shipped exfiltration-URL pass runs on top. The sink entry in security_posture names the route and the drop. Inject rows put the character share above 100% (compaction_keep.py:449, GPT F3 UPHOLD-FENCED, corroborated independently by Opus). `chars_today` counted every row the replay keeps -- which includes `inject` -- while `chars_all` counted only STATE_ROLES, so an ordinary cron notification or subagent-completion event put bytes in the numerator that the denominator skipped and the card rendered e.g. "137% of the characters". `chars_all` now counts every row EITHER arm counts, and `chars_today <= chars_jev <= chars_all` is stated as the invariant it is and asserted under every answer with a large inject row present. The reader holds it from its own side too: a share above 1 prints NO percentage rather than being clamped, because a clamp would print a plausible number over a broken measurement. A straggling scoring attached to the NEXT compaction (compaction_keep.py:702, GPT F2). The pending store was keyed by session alone, so a run that outlived its own compaction's notice had its record popped by the following compaction on that key. Each compaction now mints an attempt token synchronously before the task exists; a run whose token is no longer the session's newest publishes nothing, and minting retires whatever the previous attempt left pending -- the rule outcomes.discard applies at the start of a turn. The rows are written either way: the observation happened. F1 (capped calls reported as the complete transcript) was adjudicated DOWNGRADE as a disproportionate remedy, but the cheap half of it is worth having: the walk now records `calls_capped`, and both the point and the reader decline to draw a line for a capped record, because "N of M" over an M that is the cap rather than the session's call count is a number a reader cannot tell from a right one. The overflow rows' characters are left out of both arms, so the two stay on one universe. The FeaturePreviewsSection master-switch/scope-PUT race is NOT fixed here: #12492 owns it in that shared component and this branch inherits it on the next rebase.
fe73657 to
3b5f0d4
Compare
|
[operator: iamwhatever] Settings › Developer › Feature Previews, showing the new recalled-memory scope switch and the rewritten egress note. Captured from the real built SPA behind Consent is ON with BOTH scopes at their default OFF — the state every already-consented install is in, and the one that shows the most: each scope switch is drawn (they appear only while the main switch is on), each sits unchecked, and the note above them names all three egress categories. |
|
[operator: iamwhatever] Final code round. Head FixedPR Hygiene — 3 commits. Squashed to 1, force-pushed with a lease. One thing worth flagging, because it nearly shipped a wrong diff: GPT BLOCKING Fixed in both halves, since either alone leaves it open: a scope write now sends the current enabled value rather than a literal, so a losing write cannot assert a consent nobody asked for; and one shared GPT The cap is now derived first ( GPT Replaced with One detail that fell out: a row with no readable id is now left out of both key lists rather than named as UX — a failed record credited Jev with the fallback's set. Real copy defect. On Frontend Tests — three locale style reds, all mine. fr Screenshots. Added Settings › Developer › Feature Previews, light and dark, from the real built SPA behind Worth noting for anyone reusing that harness: the shared stub omits Disposition, no codeThumbs labelling on the memory strip. Left as is, per your call — same pattern as the shipped skills strip, so changing it here would make the two receipts differ for no reason a reader benefits from. Verification123 tests across the three |
GPT 5.6 Review — 🔴 changes requested (blocking)GPT 5.6 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- docs/feature-map/README.md:89 -- memory recall is unreachable
BLOCKING -- website/src/pages/settings/FeaturePreviewsSection.tsx:232 -- scope updates can restore withdrawn consent
BLOCKING -- website/src/pages/settings/FeaturePreviewsSection.tsx:230 -- scope save failures are silent
FINDING -- src/kiro_crew/vector_memory.py:4929 -- [BLOCK-MERGE] 3b5f0d4 |
…it would keep At every AUTOMATIC compaction, ask Jev which of the session's tool calls were worth keeping, and show the answer as one line on the compaction notice. Nothing is kept: the compaction runs byte-identically on every backend whatever Jev answers, and there is no apply path at all. What this buys is the number a live keep-list cannot be argued about without -- today's recycle replay keeps the conversation text alone (context.RECALL_ROLES), and 87% of a measured transcript is tool traffic. The decision that consumes it is tracked in #12516. Manual /compact is excluded by construction, not by a flag: the dashboard dispatches it as an ordinary turn through provider.stream_command and never reaches the coordinator. A test pins that no caller of _compact_session exists outside the session layer. The point (decisions/points/compaction_keep.py) - Hooked at session_compaction._compact_session, the one funnel both automatic entry points reach, above the arm choice so every backend is covered. The task is created and NEVER awaited, so the compaction cannot be delayed, failed or altered by it -- pinned by running one scripted compaction against a scoring that hangs for an hour and holding the outcome equal to a stubbed-out run. Scored on the compactions CREW ITSELF dispatches, which is not the same as every backend and the docs no longer imply it is: a harness that compacts on its own initiative is declined by the gate before the funnel (cc_managed for Claude-Code, compact_unsupported for KAS), so those compactions are never scored -- there is no Crew-side dispatch to hang a measurement on. The spec carries the full table. - State from ConversationLog.read_messages: conversation text verbatim, each tool input redacted THEN clipped, and every tool RESULT replaced by "ok, N chars (omitted)" -- no result byte is on the wire at any stage. First row and newest six pinned and never asked about. - Redaction goes through platform.context.redact_via_context, not the bare baseline: the state is a whole transcript, so a baseline-only pass would send a companion-defined credential verbatim. The shim re-raises a composition failure by design; that is caught and the FIELD IS DROPPED, because a scan that did not complete cannot clear text for the wire. Registered as a sink in security_posture. - Five fitting rungs from the P3 spike (inputs 1000/200/60, then text to half, then a quarter with calls on one line); the first under ~25K estimated tokens is sent, and the ~8% that fit nowhere write a state-too-large row and send nothing. - One Choice per non-pinned call (drop / call / both), batched 25 per request with the same state each, 4 concurrent, the whole run under the shared 10s ceiling. A batch is all-or-nothing and a partial answer publishes nothing, because "23 of 61" over calls nobody was asked about is a wrong number. - Each compaction mints an attempt token synchronously before the task exists. A run whose token is not the session's newest publishes nothing, so a scoring that straggles past its own notice cannot have its record popped by the next compaction on that key. An ABSENT counter is a mismatch, never a match: the cap evicts the oldest counters, and reading an absent one as equal would let the token AUTHORIZE a publish. It is subtractive -- it may only ever refuse. - Tool ROWS are folded by tool_call_id before anything is counted. One logical call reaches the transcript as up to three role="tool" rows sharing one id -- the dispatch row, plus the approval path's approved/rejected row -- so a per-row count inflated total_calls, sent the same input twice, asked two questions about one call, and counted its characters twice in the denominator. Each field takes the first non-empty value and pinned is the OR across the rows; a row carrying no id gets a key of its own, because two rows naming no call cannot be shown to be the same call. The fold finishes before the cap, so the cap counts calls not rows. - A walk past the 1000-call cap keeps the NEWEST calls, in chronological order, and COUNTS the ones it dropped as calls_truncated. The newest end is chosen rather than fallen into: a forward walk that simply stops admitting keeps the OLDEST, which are the least likely to still matter. The line states the count -- "23 of 61 (+140 not scored)" -- only when it is non-zero, because a bare "23 of 61" is wrong when 61 is the cap and drawing nothing hides a measurement accurate about everything it covers. - One outcome row per compaction: the call tallies plus chars_all, chars_today_eligible and chars_jev_eligible. Both arms are named for what they measure. The replay arm counts the rows the replay admits BY ROLE; build_session_replay additionally applies row quotas and an 80K character budget, so both arms are UPPER BOUNDS and the card says "up to". The true figure is deliberately not re-derived here -- the quota walk takes a ConversationLog rather than a row list and the budget is applied inline while formatting, so the only thing measurable is a rendered string carrying Role: prefixes, which would put formatting overhead inside a content measurement and break the invariant. chars_today_eligible <= chars_jev_eligible <= chars_all holds by construction, so chars_all counts every row EITHER arm counts -- the replay admits inject rows, which carry no tool call, and a denominator built from the state's roles alone rendered a share above 100%. The reader holds it too: a share above 1 prints no percentage rather than being clamped. The third switch reports its own states Its pending write freezes the master switch, because a scope PUT carries `enabled: true`: flipping the scope and then revoking consent is two concurrent writes to one keystone, and the scope one landing second restores consent the owner just revoked. And a refused scope write renders the shared ErrorNotice rather than snapping back in silence, which reads as the click not registering. The equivalent guards for the tool-argument switch are deliberately absent: that switch shipped with the same shape and #12492 is fixing it for every scope at once server-side, so a second client-side guard here would be reverted by that change rather than surviving it. A third consent scope compaction on the keystone, beside tool_args: absent reads as not consented, an omitted PUT field preserves, disabling clears. tool_args does NOT grant it -- that scope was reviewed as the arguments of the one call about to run, not as everything the session has run. gate._tool_args_scoped becomes _scope_consented and drives both scopes off one table, so a third is not a third predicate to forget. No new endpoint. The surface The record is published into a bounded store the point owns (not decisions.outcomes, whose one slot belongs to the next assistant reply and whose discard hook a turn fires at its own start) and dashboard/state.py stamps it as meta.decisions_strip on the compaction notice row it already appends. CompactionKeepLine renders one line UNDER whatever the card drew -- success notice, recycle notice, the error surface, or the summary card in either disclosure state -- with the existing jev thumbs. No record, no line, which is also what a scoring slower than its compaction produces. One compaction card per screenshot frame, each scene served by its own harness instance: sharing one harness and swapping its fixture left the previous scene's frame composited for the next, and a frame showing four cards isolates none of them. The capture now asserts the element it photographed contains the keep line, the theme it is named for, and the text that makes it that frame -- including what it must NOT say, since a positive check cannot tell a frame from the frame it is contrasted with. Docs: a section in both decisions docs stating exactly what leaves the machine, and a feature-map row. Tests: the point, the hook, the scope round-trip and the card, plus the spec's fenced record held against its reader. Screenshots: a capture harness writing twelve frames over the real built SPA with only the network stubbed, each asserting the words that make it that state.
…it would keep At every AUTOMATIC compaction, ask Jev which of the session's tool calls were worth keeping, and show the answer as one line on the compaction notice. Nothing is kept: the compaction runs byte-identically on every backend whatever Jev answers, and there is no apply path at all. What this buys is the number a live keep-list cannot be argued about without -- today's recycle replay keeps the conversation text alone (context.RECALL_ROLES), and 87% of a measured transcript is tool traffic. The decision that consumes it is tracked in #12516. Manual /compact is excluded by construction, not by a flag: the dashboard dispatches it as an ordinary turn through provider.stream_command and never reaches the coordinator. A test pins that no caller of _compact_session exists outside the session layer. The point (decisions/points/compaction_keep.py) - Hooked at session_compaction._compact_session, the one funnel both automatic entry points reach, above the arm choice so every backend is covered. The task is created and NEVER awaited, so the compaction cannot be delayed, failed or altered by it -- pinned by running one scripted compaction against a scoring that hangs for an hour and holding the outcome equal to a stubbed-out run. Scored on the compactions CREW ITSELF dispatches, which is not the same as every backend and the docs no longer imply it is: a harness that compacts on its own initiative is declined by the gate before the funnel (cc_managed for Claude-Code, compact_unsupported for KAS), so those compactions are never scored -- there is no Crew-side dispatch to hang a measurement on. The spec carries the full table. - State from ConversationLog.read_messages: conversation text verbatim, each tool input redacted THEN clipped, and every tool RESULT replaced by "ok, N chars (omitted)" -- no result byte is on the wire at any stage. First row and newest six pinned and never asked about. - Redaction goes through platform.context.redact_via_context, not the bare baseline: the state is a whole transcript, so a baseline-only pass would send a companion-defined credential verbatim. The shim re-raises a composition failure by design; that is caught and the FIELD IS DROPPED, because a scan that did not complete cannot clear text for the wire. Registered as a sink in security_posture. - Five fitting rungs from the P3 spike (inputs 1000/200/60, then text to half, then a quarter with calls on one line); the first under ~25K estimated tokens is sent, and the ~8% that fit nowhere write a state-too-large row and send nothing. - One Choice per non-pinned call (drop / call / both), batched 25 per request with the same state each, 4 concurrent, the whole run under the shared 10s ceiling. A batch is all-or-nothing and a partial answer publishes nothing, because "23 of 61" over calls nobody was asked about is a wrong number. - Each compaction mints an attempt token synchronously before the task exists. A run whose token is not the session's newest publishes nothing, so a scoring that straggles past its own notice cannot have its record popped by the next compaction on that key. An ABSENT counter is a mismatch, never a match: the cap evicts the oldest counters, and reading an absent one as equal would let the token AUTHORIZE a publish. It is subtractive -- it may only ever refuse. - Tool ROWS are folded by tool_call_id before anything is counted. One logical call reaches the transcript as up to three role="tool" rows sharing one id -- the dispatch row, plus the approval path's approved/rejected row -- so a per-row count inflated total_calls, sent the same input twice, asked two questions about one call, and counted its characters twice in the denominator. Each field takes the first non-empty value and pinned is the OR across the rows; a row carrying no id gets a key of its own, because two rows naming no call cannot be shown to be the same call. The fold finishes before the cap, so the cap counts calls not rows. - A walk past the 1000-call cap keeps the NEWEST calls, in chronological order, and COUNTS the ones it dropped as calls_truncated. The newest end is chosen rather than fallen into: a forward walk that simply stops admitting keeps the OLDEST, which are the least likely to still matter. The line states the count -- "23 of 61 (+140 not scored)" -- only when it is non-zero, because a bare "23 of 61" is wrong when 61 is the cap and drawing nothing hides a measurement accurate about everything it covers. - One outcome row per compaction: the call tallies plus chars_all, chars_today_eligible and chars_jev_eligible. Both arms are named for what they measure. The replay arm counts the rows the replay admits BY ROLE; build_session_replay additionally applies row quotas and an 80K character budget, so both arms are UPPER BOUNDS and the card says "up to". The true figure is deliberately not re-derived here -- the quota walk takes a ConversationLog rather than a row list and the budget is applied inline while formatting, so the only thing measurable is a rendered string carrying Role: prefixes, which would put formatting overhead inside a content measurement and break the invariant. chars_today_eligible <= chars_jev_eligible <= chars_all holds by construction, so chars_all counts every row EITHER arm counts -- the replay admits inject rows, which carry no tool call, and a denominator built from the state's roles alone rendered a share above 100%. The reader holds it too: a share above 1 prints no percentage rather than being clamped. The third switch reports its own states Its pending write freezes the master switch, because a scope PUT carries `enabled: true`: flipping the scope and then revoking consent is two concurrent writes to one keystone, and the scope one landing second restores consent the owner just revoked. And a refused scope write renders the shared ErrorNotice rather than snapping back in silence, which reads as the click not registering. The equivalent guards for the tool-argument switch are deliberately absent: that switch shipped with the same shape and #12492 is fixing it for every scope at once server-side, so a second client-side guard here would be reverted by that change rather than surviving it. A third consent scope compaction on the keystone, beside tool_args: absent reads as not consented, an omitted PUT field preserves, disabling clears. tool_args does NOT grant it -- that scope was reviewed as the arguments of the one call about to run, not as everything the session has run. gate._tool_args_scoped becomes _scope_consented and drives both scopes off one table, so a third is not a third predicate to forget. No new endpoint. The surface The record is published into a bounded store the point owns (not decisions.outcomes, whose one slot belongs to the next assistant reply and whose discard hook a turn fires at its own start) and dashboard/state.py stamps it as meta.decisions_strip on the compaction notice row it already appends. CompactionKeepLine renders one line UNDER whatever the card drew -- success notice, recycle notice, the error surface, or the summary card in either disclosure state -- with the existing jev thumbs. No record, no line, which is also what a scoring slower than its compaction produces. One compaction card per screenshot frame, each scene served by its own harness instance: sharing one harness and swapping its fixture left the previous scene's frame composited for the next, and a frame showing four cards isolates none of them. The capture now asserts the element it photographed contains the keep line, the theme it is named for, and the text that makes it that frame -- including what it must NOT say, since a positive check cannot tell a frame from the frame it is contrasted with. Docs: a section in both decisions docs stating exactly what leaves the machine, and a feature-map row. Tests: the point, the hook, the scope round-trip and the card, plus the spec's fenced record held against its reader. Screenshots: a capture harness writing twelve frames over the real built SPA with only the network stubbed, each asserting the words that make it that state.
buluoray
left a comment
There was a problem hiding this comment.
Verified at head c62a3296. I found no code defect, and I am deliberately not approving — the one thing I cannot settle as a reviewer is a product question, stated at the end.
The gate chain is correct and I checked it rather than took it. What goes on the wire is the user's query (text[:2000]) plus, per candidate, the text of each recalled memory, redacted then clipped to 200 chars (memory_recall.py:482-495, via screen_candidates:431 → scrubbed:366). Every layer in front of it holds:
consented_memory_text(state)isdata.get("memory_text") is True(consent.py:216) — strict identity, its own scope separate from base consent, so a pre-existing consent is inert for this point.consent.py:348also zeroes the scope wheneverenabledis false, so the scope cannot outlive the switch above it.- The keystone is
decisions_consent.json, sealed across the sandbox leaf sets and written only by the browser dashboard PUT — absent or unreadable resolves to off. owner_turn=Truehas exactly one caller (memory_member._memory_recall_keep:133), itself gated onsession_key in dashboard_surfaced_keys()and fail-closed on an empty set, so cron, subagent and closed-tab paths never reach it.core.is_enabled(POINT)is checked before any redaction work, and the gate-levelscrub_reason(gate.py:463-498) scans the exactstateobject that is then sent, refusing the whole request if a credential or exfil URL survives. No path between redaction and send reintroduces raw text.- The
keephook only narrows: identity-checked, filter-only, order preserved.
I mutation-verified the load-bearing assertion rather than trusting that it holds. Against copies of gate.py and consent.py under scratch, an early return True in _egress_scope_ok flips memory.recall from refused to enabled with no scope recorded — i.e. memory text would egress unconsented. Real tree untouched. The scope guard is load-bearing and the assertion is not vacuous.
GPT's two earlier blocking findings are genuinely fixed at this head, not narrowed. Reachability is rehomed onto the tool path (memory_member.api_memory_recall passes keep= into tier.recall, applied after fit), and the scope-only PUT no longer re-commits withdrawn consent — it defaults enabled to the recorded flag and the governance check now reads grants rather than enabled.
One real non-blocking item. The retry passes keep=keep (vector_memory.py:7786), so on _RecallSpaceChanged the hook runs a second time and each kept_memories takes a fresh _wait_budget() up to MAX_WAIT_SECS = 7.0. Two attempts can exceed RECALL_TIMEOUT_SECS = 9, so the route answers 504 instead of returning the memories it already found — which breaks the "every refusal keeps the similarity result" promise on exactly that path. TestTheWaitFitsInsideTheRoute pins only the single-attempt 7 < 9. Narrow (needs a raised provider.timeout_ms, a space-change retry, and a slow judge) and it degrades to an error with no privacy impact, so a follow-up is fine.
The question I am leaving to a maintainer. Every decision point shipped so far sends a category the user authored and can see in front of them: their own message excerpt, optionally prior turns. This is the first point whose payload is the user's stored memory content — text they wrote in some other session, possibly long ago, surfaced by similarity rather than chosen. The mechanism handles that correctly: a dedicated scope, strict identity, its own settings line ("Off until you turn it on, even if the switch above is already on"). But whether that category should leave the machine at all is a product call, not a gate-correctness call, and it is the kind of decision that gets made implicitly by a reviewer waving through a clean implementation. So: gates verified, category deferred to you.
…it would keep At every AUTOMATIC compaction, ask Jev which of the session's tool calls were worth keeping, and show the answer as one line on the compaction notice. Nothing is kept: the compaction runs byte-identically on every backend whatever Jev answers, and there is no apply path at all. What this buys is the number a live keep-list cannot be argued about without -- today's recycle replay keeps the conversation text alone (context.RECALL_ROLES), and 87% of a measured transcript is tool traffic. The decision that consumes it is tracked in #12516. Manual /compact is excluded by construction, not by a flag: the dashboard dispatches it as an ordinary turn through provider.stream_command and never reaches the coordinator. A test pins that no caller of _compact_session exists outside the session layer. The point (decisions/points/compaction_keep.py) - Hooked at session_compaction._compact_session, the one funnel both automatic entry points reach, above the arm choice so every backend is covered. The task is created and NEVER awaited, so the compaction cannot be delayed, failed or altered by it -- pinned by running one scripted compaction against a scoring that hangs for an hour and holding the outcome equal to a stubbed-out run. Scored on the compactions CREW ITSELF dispatches, which is not the same as every backend and the docs no longer imply it is: a harness that compacts on its own initiative is declined by the gate before the funnel (cc_managed for Claude-Code, compact_unsupported for KAS), so those compactions are never scored -- there is no Crew-side dispatch to hang a measurement on. The spec carries the full table. - State from ConversationLog.read_messages: conversation text verbatim, each tool input redacted THEN clipped, and every tool RESULT replaced by "ok, N chars (omitted)" -- no result byte is on the wire at any stage. First row and newest six pinned and never asked about. - Redaction goes through platform.context.redact_via_context, not the bare baseline: the state is a whole transcript, so a baseline-only pass would send a companion-defined credential verbatim. The shim re-raises a composition failure by design; that is caught and the FIELD IS DROPPED, because a scan that did not complete cannot clear text for the wire. Registered as a sink in security_posture. - Five fitting rungs from the P3 spike (inputs 1000/200/60, then text to half, then a quarter with calls on one line); the first under ~25K estimated tokens is sent, and the ~8% that fit nowhere write a state-too-large row and send nothing. - One Choice per non-pinned call (drop / call / both), batched 25 per request with the same state each, 4 concurrent, the whole run under the shared 10s ceiling. A batch is all-or-nothing and a partial answer publishes nothing, because "23 of 61" over calls nobody was asked about is a wrong number. - Each compaction mints an attempt token synchronously before the task exists. A run whose token is not the session's newest publishes nothing, so a scoring that straggles past its own notice cannot have its record popped by the next compaction on that key. An ABSENT counter is a mismatch, never a match: the cap evicts the oldest counters, and reading an absent one as equal would let the token AUTHORIZE a publish. It is subtractive -- it may only ever refuse. - Tool ROWS are folded by tool_call_id before anything is counted. One logical call reaches the transcript as up to three role="tool" rows sharing one id -- the dispatch row, plus the approval path's approved/rejected row -- so a per-row count inflated total_calls, sent the same input twice, asked two questions about one call, and counted its characters twice in the denominator. Each field takes the first non-empty value and pinned is the OR across the rows; a row carrying no id gets a key of its own, because two rows naming no call cannot be shown to be the same call. The fold finishes before the cap, so the cap counts calls not rows. - A walk past the 1000-call cap keeps the NEWEST calls, in chronological order, and COUNTS the ones it dropped as calls_truncated. The newest end is chosen rather than fallen into: a forward walk that simply stops admitting keeps the OLDEST, which are the least likely to still matter. The line states the count -- "23 of 61 (+140 not scored)" -- only when it is non-zero, because a bare "23 of 61" is wrong when 61 is the cap and drawing nothing hides a measurement accurate about everything it covers. - One outcome row per compaction: the call tallies plus chars_all, chars_today_eligible and chars_jev_eligible. Both arms are named for what they measure. The replay arm counts the rows the replay admits BY ROLE; build_session_replay additionally applies row quotas and an 80K character budget, so both arms are UPPER BOUNDS and the card says "up to". The true figure is deliberately not re-derived here -- the quota walk takes a ConversationLog rather than a row list and the budget is applied inline while formatting, so the only thing measurable is a rendered string carrying Role: prefixes, which would put formatting overhead inside a content measurement and break the invariant. chars_today_eligible <= chars_jev_eligible <= chars_all holds by construction, so chars_all counts every row EITHER arm counts -- the replay admits inject rows, which carry no tool call, and a denominator built from the state's roles alone rendered a share above 100%. The reader holds it too: a share above 1 prints no percentage rather than being clamped. The third switch reports its own states Its pending write freezes the master switch, because a scope PUT carries `enabled: true`: flipping the scope and then revoking consent is two concurrent writes to one keystone, and the scope one landing second restores consent the owner just revoked. And a refused scope write renders the shared ErrorNotice rather than snapping back in silence, which reads as the click not registering. The equivalent guards for the tool-argument switch are deliberately absent: that switch shipped with the same shape and #12492 is fixing it for every scope at once server-side, so a second client-side guard here would be reverted by that change rather than surviving it. A third consent scope compaction on the keystone, beside tool_args: absent reads as not consented, an omitted PUT field preserves, disabling clears. tool_args does NOT grant it -- that scope was reviewed as the arguments of the one call about to run, not as everything the session has run. gate._tool_args_scoped becomes _scope_consented and drives both scopes off one table, so a third is not a third predicate to forget. No new endpoint. The surface The record is published into a bounded store the point owns (not decisions.outcomes, whose one slot belongs to the next assistant reply and whose discard hook a turn fires at its own start) and dashboard/state.py stamps it as meta.decisions_strip on the compaction notice row it already appends. CompactionKeepLine renders one line UNDER whatever the card drew -- success notice, recycle notice, the error surface, or the summary card in either disclosure state -- with the existing jev thumbs. No record, no line, which is also what a scoring slower than its compaction produces. One compaction card per screenshot frame, each scene served by its own harness instance: sharing one harness and swapping its fixture left the previous scene's frame composited for the next, and a frame showing four cards isolates none of them. The capture now asserts the element it photographed contains the keep line, the theme it is named for, and the text that makes it that frame -- including what it must NOT say, since a positive check cannot tell a frame from the frame it is contrasted with. Docs: a section in both decisions docs stating exactly what leaves the machine, and a feature-map row. Tests: the point, the hook, the scope round-trip and the card, plus the spec's fenced record held against its reader. Screenshots: a capture harness writing twelve frames over the real built SPA with only the network stubbed, each asserting the words that make it that state.
c62a329 to
65c7aee
Compare
GPT 5.6 Review —
|
buluoray
left a comment
There was a problem hiding this comment.
Approving at head ad31fa49. I withheld approval earlier on the category rather than on the code; the maintainer has now ruled that conversation and memory content may go to Jev, so what remains is the mechanism, and I verified that before.
The category, stated for the record. This is the point that sends the text of a recalled memory -- what the user wrote in a previous session, surfaced by similarity, redacted and clipped to 200 characters -- rather than what they typed in the turn at hand. That is a different thing from every earlier point, which is why it was worth a decision rather than an approval, and why the separate scope is correct rather than ceremonial.
The gate chain holds. consented_memory_text is a strict data.get("memory_text") is True on its own keystone field, so absent, "true" and 1 all read as not consented and an already-consented install is inert for this point rather than retroactively enrolled. consent.py:348 keeps the upper switch authoritative -- turning the main switch off zeroes the scopes, so a scope cannot outlive the consent it hangs under.
I mutation-verified the guard on scratch copies rather than reading it: making _egress_scope_ok return True early flips memory.recall from refused to permitted with no scope granted, and restoring it refuses again. Load-bearing.
One non-blocking defect I want on the record, because it trades a working feature for a worse failure. The retry path passes keep=keep (vector_memory.py:7786), so on _RecallSpaceChanged the hook runs a second time and each run takes its own MAX_WAIT_SECS = 7.0. Two of those exceed RECALL_TIMEOUT_SECS = 9, and the route then answers 504 instead of returning the memories it had already found -- which breaks the promise the design otherwise keeps, that a refusal still yields the similarity results. The existing test pins the single-run case at 7 < 9, so it cannot see this. The fix is to budget the retry against the remaining time rather than granting it a fresh 7 seconds.
Everything else I checked stands: independent scope, sealed keystone, verbatim endpoint match, and scrub_reason running over the object actually about to go on the wire.
The agent recalls memory on demand, through the `memory_recall` tool: the tool calls `GET /api/memory/recall`, the route calls `VectorMemoryStore.recall`, and that searches episodes by vector similarity, drops what falls under the length-aware cosine relevance gate, and bounds the survivors with its own `fit` walk. Similarity is the only judgement made, so a memory that is ABOUT the same words as the question is returned whether or not it answers it -- and every returned episode is paid for twice, once out of the tool's response budget and again out of the model's window. `memory.recall` asks the second question, per candidate: keep this one, or drop it. Jev's kept set is what the tool returns. Where the seam is, and where it deliberately is not --------------------------------------------------- `VectorMemoryStore.recall(keep=...)`, armed by `handlers/memory_member._memory_recall_keep`. The route is the one place with all three things the point needs: the session key (from `X-Session-Key`, which the MCP tool sends), the event loop, and the `run_in_embed_pool` call that puts `recall` on the worker thread the point must run from. NOT on `get_episodic_context`. Prompt assembly asks `MemoryStore.get_context` for preferences with `include_activity=False`, and that same flag gates episodic retrieval, so that block is not built on any live path -- a `keep=` parameter there is a second door nothing opens, which the next reader would take for a live path. So there is none, and three assertions pin that it stays absent along with `get_context`'s carried hook and `ContextBuilder`'s hook builder. A SUBSET, enforced twice ------------------------ It cannot reorder -- a keep/drop answer says nothing about rank. It cannot widen, and that takes two enforcement points: `_kept_episodes` refuses an answer naming a row the search did not rank, and the hook is offered the rows `fit` ALREADY SELECTED rather than the raw result. Without that ordering, dropping a high-ranked episode frees budget a lower-ranked one -- one `fit` had excluded -- then fits into, which is the hook adding a memory the response would never have carried. A row the point's own screen dropped, capped out past `MAX_CANDIDATES` or carrying an unusable id, is returned unconditionally: a plain filter cannot tell "past the cap" from "Jev said no". Every refusal returns the similarity result unchanged: the point off, the scope unconsented, the session unsampled, a partial or out-of-domain answer, a timeout, a transport failure, no usable loop. The wait is bounded by `gate.timeout_secs()` plus 0.5s of slack, clamped into 0.25s..10s. Its own consent --------------- A recalled memory is not the text the main switch describes: that consent is recorded against a message excerpt the owner just typed and skill descriptions this build shipped, while a recalled memory is text the AGENT wrote down turns or days ago about work the owner was not reviewing. So the keystone records `memory_text`, default FALSE, and `gate.POINT_EGRESS_SCOPES` refuses the point without it. `POINTS_NEEDING_TOOL_ARGS` becomes that map -- point to (reader name, what it sends, which switch grants it) -- with the reader resolved by name at call time, because a captured function is a second handle the module cannot patch. A scope-only PUT omits `enabled` entirely and the writer preserves the recorded flag and endpoint (`KEEP_ENABLED`, resolved inside its own lock). Sending even the value the card just read is a write against a switch the owner did not touch, and a stale read re-commits a withdrawn consent. The ceiling is held against whether a write GRANTS rather than against `enabled`, so a scope grant under a pin is 403 while a revoke stays available. One `scopePending` freezes every switch while any scope write is outstanding, and each scope has its own error notice. Only for a live dashboard surface --------------------------------- The call site's condition: the egress is snippets of the member's own memories and the receipt rides a reply someone is looking at. `has_dashboard_surface` is observed state, so a channel-born session with its tab open qualifies -- the owner is reading that conversation in the dashboard. The receipt ----------- `memory · recalled: 6 · Jev kept: 3 (0.81, 210 ms) · saved 2.1K chars`, counts collapsed and ids expanded, a thumbs pair per side, published through `decisions.outcomes` onto the assistant row that ends the turn. On a record carrying an `error` the count and the list title name the FALLBACK, because the decision did not land. The record spells its lists `baseline_keys`/`jev_keys`, which keeps the three readers on `meta.decisions_strip` from rendering each other's records; rows travel by identity because the store judges membership with `id()`, carried through the signatures by a `RowT` TypeVar. No new route and no new config beyond the point name. Only a committed recall leaves a receipt ---------------------------------------- `_recall_once` validates the embedding generation AFTER applying the hook, and `recall` answers a moved generation by running the whole recall again keyword-only. So an outcome written the moment the answer arrived could describe a subset the store then discarded, and a retried recall left two rows for one tool call. The point now HOLDS its outcome (`kept_memories(pending=...)`) and the route commits it (`commit_outcome`) only once the recall has come back and it is answering with it. Only the LAST held entry is committed -- that is the attempt whose result was returned. A late provider answer, a superseded generation, a request that raised after the decision, a refused route: each commits nothing, so a failure leaves no receipt at all. The gate's own call row still records a timeout, because that is a fact an operator acts on. The retry test makes the two attempts answer DIFFERENTLY, so "commit the last" is distinguishable from "commit the first" -- with identical answers the assertion passed under either, which a mutation check caught.
|
[operator: iamwhatever] Re-captured from a HEAD build after this round's six fixes, plus the toggle recording the UX lane asked for. Every frame below was read back off the live DOM before upload, not checked by eye: the egress note reads These replace the older shots in the description, which predate the third scope switch. memory-recall-strip-toggle.webm |
GPT 5.6 Review —
|
1 similar comment
GPT 5.6 Review —
|
GPT 5.6 Review —
|
GPT 5.6 Review —
|
|
[operator: iamwhatever] Re-captured from a HEAD build after this round's five fixes. Every expanded still is new — they all predated the scope note — plus two frames for states the harness had no fixture for. Read back off the live DOM before upload, not checked by eye: the card's decides-list carries |
|
[operator: iamwhatever] Re-captured from a HEAD build after the accounting pass. Two of the previous frames were photographing the wrong row: the harness had a locator collision, so the kept-none caption sat over the bounded row and the bounded caption sat over a collapsed strip. Rows are now selected by the state each frame is of. Each frame's row was read back off the live DOM through the capture script's own selectors and click order, so the caption-to-asset mapping is measured rather than assumed:
|
… writer Four rounds of findings on this receipt were all the same defect: the numbers did not describe what happened. So this settles the accounting once, in the point's module docstring, and makes every producer and every string follow it. Four things shorten a recall, and each number names exactly one of them. `candidates` is OFFERED -- the rows put in front of the oracle. `baseline_keys` is what the recall returns without the point. `jev_keys` is KEPT BY JEV: the decision's own output, never quietly narrowed into the set that shipped. `bounded_omitted` is DROPPED BY BOUNDING, counted BESIDE the kept list rather than subtracted from it, so `len(jev_keys) - bounded_omitted` is what arrived and each removal stays attributable to whoever made it. Folding the second into the first is what made the header read "Jev kept 1" beside a row saying "2 that Jev kept did not fit". `chars_saved` is the memory text JEV'S NARROWING removed and nothing else's. Both arms are measured on the same rows at the same moment, before redaction and before bounding, so the scrubber's substitutions are absent from the difference by construction rather than subtracted by hand. REMOVED BY REDACTION is therefore a quantity the receipt deliberately does not carry: it is the same scrubbing applied to whatever ships and no part of what Jev decided. `baseline_chars` and `jev_chars` both ride the row so a reader can check the subtraction. `commit_receipt` is the ONLY writer, and it takes the completed payload as an argument. That is structural rather than conventional: a caller cannot reach it without the finished response in hand, and the writer -- not the caller -- checks that something was held, that the payload carries a delivered `retrieval`, and that the request has not been abandoned. `delivered_outcome` and `publish_outcome` are not reachable names, and a test holds them gone. The dashboard-surface gate is read on the line before `core.decide`, because that call IS the egress: it is where snippets of the owner's own remembered notes leave the machine. The reads in the route and in `kept_memories` are cost savers, each happening while the answer can still change -- the owner closes the tab, the slot leaves the published set, and a request already assembled would still go out. Removing either of them leaves the route-level test passing on the strength of the guard at the call, which is what says where the gate actually is. The strip follows the same accounting. The `Dropped to fit` row carries both numbers in one wording, so the subtraction closes where a reader sees it. The search pair says where it sits in the sequence (`Rate the search (before Jev)`), because two names for adjacent steps read as one step. The saving's legend says whose removal it counts and what it excludes. The capture harness selects rows by the state each frame is of, so the kept-none and payload-bounded frames photograph their own panels, and the bounded fixture carries Jev's own three with two lost to the budget.
GPT 5.6 Review —
|
|
/ai-review override gpt 6a6e24d: Both residuals are the inherent window of a pre-await check rather than a missing guard -- the surface test now sits on the line before the egress call and the receipt path already refuses an abandoned request, the payload is the owner's own memory text going to the endpoint they consented to on an owner-typed turn, and closing either properly needs a cancellation scope across every point, tracked on #12532. |
Human judgment recorded@iamwhatever marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |












































The gap
The agent recalls memory on demand, through the
memory_recalltool: the tool callsGET /api/memory/recall, the route callsVectorMemoryStore.recall, and that searches episodes by vector similarity, drops what falls under the length-aware cosine relevance gate, and bounds the survivors with its ownfitwalk.Similarity is a useful first pass and a poor last one. An entry that happens to share the question's words comes back whether or not it answers it — and every returned episode is paid for twice, once out of the tool's response budget and again out of the model's window.
What this adds
A fourth Jev decision point,
memory.recall. When the tool runs its search, the point asks the oracle the second question, per candidate: keep this one, or drop it. The tool returns Jev's kept set.Where the seam is, and where it deliberately is not
VectorMemoryStore.recall(keep=...), armed byhandlers/memory_member._memory_recall_keep. The recall route is the one place with all three things the point needs: the session key (fromX-Session-Key, which the MCP tool sends), the event loop, and therun_in_embed_poolcall that putsrecallon the worker thread the point must run from.Not on
get_episodic_context. An earlier revision of this PR put it there, and a reviewer was right that it made the feature unreachable: prompt assembly asksMemoryStore.get_contextfor preferences withinclude_activity=False, and that same flag gates episodic retrieval, so that block is not built on any live path. That flag is deliberate — #11996 moved recalled material to the tool — so the fix was to follow the recall, not to re-enable the block.A
keep=parameter on a path nothing walks is a second door the next reader takes for a live one, so there is none. Three assertions pin that it stays absent, along withget_context's carried hook andContextBuilder's hook builder.A subset, enforced twice
It cannot reorder — a keep/drop answer says nothing about rank.
It cannot widen, and that takes two enforcement points.
_kept_episodesrefuses an answer naming a row the search did not rank. And the hook is offered the rowsfitalready selected rather than the raw result: without that ordering, dropping a high-ranked episode frees budget that a lower-ranked one — onefithad already excluded — then fits into, which is the hook adding a memory the response would never have carried, reached without naming an unranked row.A row the point's own screen dropped is returned unconditionally — capped out past
MAX_CANDIDATES, or carrying an unusable id. Nobody decided about it, so nobody may drop it. In a plain filter "past the cap" and "Jev said no" are the same thing.Every refusal returns the similarity result unchanged: the point off, the scope unconsented, the session unsampled, a partial or out-of-domain answer, a timeout, a transport failure, no usable loop.
Reachability, proven
test_decisions_memory_recall_reachable.pydrives the whole chain from the route inward — a real keystone withmemory_text: true, a real store with seeded episodes, a real config, the real gate,run_in_embed_pool— and fakes only the HTTP transport to the oracle. 20 tests, all passing. This is the row one real tool recall writes:{ "point": "memory.recall", "turn_id": "235c3c03d3ed4962", "session": "a957be5e6509", "ts": "2026-09-21T11:14:37.856378+00:00", "baseline_keys": ["mem-one", "mem-two", "mem-three"], "jev_keys": ["mem-one", "mem-three"], "agree": false, "p": 0.6333333333333333, "candidates": 3, "chars_saved": 55, "message_chars": 29, "latency_ms": 3, "scrubbed": false, "error": null, "answers": null }Plus the gate's own call row ahead of it, sharing the
turn_id, carryingcandidates: 3and the threekeep/drop/keepanswers.chars_saved: 55is the dropped episode's text;pis the mean keep probability.A second consent, because this is a new category
A recalled memory is not the text the main switch describes. That consent is recorded against a message excerpt the owner just typed and skill descriptions this build shipped. A recalled memory is text the agent wrote down turns or days ago, about work the owner was not reviewing when they flipped the switch.
So the keystone records
memory_text, default FALSE, on the termstool_argsshipped on: written on enable, cleared on disable, an omitted PUT field preserving the recorded value inside the writer's own lock, a truthy stand-in refused with400. An install consented before the scope existed is inert for this point.POINTS_NEEDING_TOOL_ARGSbecomesPOINT_EGRESS_SCOPES, a map of point → (reader name, what it sends, which switch grants it). The reader is a name resolved at call time, not a captured function: late binding is what every other consent read in the gate does, and a captured reference is a second handle the module cannot patch — which is how the first attempt silently bypassed a test's monkeypatch.A scope-only PUT omits
enabledentirely and the writer preserves the recorded flag and endpoint (KEEP_ENABLED). Sending even the value the card just read is a write against a switch the owner did not touch, and a read taken before a concurrent revoking PUT re-commits a consent that had been withdrawn. The governance ceiling is held against whether a write grants rather than againstenabled, so a scope grant under a pin is403while a revoke stays available. OnescopePendingfreezes every switch on the card while any scope write is outstanding, and each scope carries its own error notice with a hand-off.Only for a live dashboard surface
The membership test is read twice, for two different jobs. On the event loop, before the search is dispatched, it is a cheap refusal that keeps a request the seam will not serve from paying for the gate's import graph. The read that gates the egress is a predicate handed to the hook and re-evaluated inside
kept_memories, on the worker thread, immediately before anything would be sent — because the first read happens before the search, and a tab closed during the search takes the slot out of the published set while a decision built on the earlier answer is still in flight. This is the one gate where the difference is sending versus not sending.The call site's condition, not the seam's: the egress is snippets of the member's own recalled memories, and the receipt rides a reply someone is looking at. A cron, a sub-agent, an integration and any session whose tab is closed have no such reader.
The test is membership of
session_surface.dashboard_surfaced_keys(), the set_sync_dashboard_slotsrepublishes fromstate._slotswhenever the slot table changes. A channel-born session with its dashboard tab open does qualify — a channel-born slot contributes its channel key — which is the intended reading: the owner is reading that conversation in the dashboard.Deliberately not
has_dashboard_surface, whose first test is adashboard:prefix answered before observed state is consulted. A retained or archived slot keeps its key and has no open tab, so the prefix would send recalled memory about a conversation nobody is watching. The published set empties when a slot leavesstate._slots, and it is empty before the first publish, so it fails closed.The wait is bounded, and it fits inside the request
gate.timeout_secs()caps the provider call (provider.timeout_ms, default 1000 ms) and the caller's wait is that plus 0.5 s of scheduling slack — then held under the time actually remaining on the request this decision runs inside. That last cap is the protection, and it is derived rather than declared.GET /api/memory/recallis bounded atexecutors.RECALL_TIMEOUT_SECS(9 s) and answers504 memory_recall_timeoutpast it. A fixed 7 s ceiling left 2 s of headroom — and the search runs before the judge does, inside that same request. A cold store, a rebuilt index or a slow embedding spends that 2 s, and then a full 7 s wait ends past the deadline: the tool answers with an error instead of the memories the search had already found, which is the one direction this seam's promise must not fail in. No constant can see that, because the thing it has to subtract is elapsed time.So
_remaining_budget()reads the enclosingEmbeddingWork— visible on the worker thread becauserun_in_embed_poolsubmits the search withcopy_context().run— and_wait_budget()returns the smaller of the provider's budget and what is left. The 0.5 s slack is withheld from that remainder rather than spent: the judge answering is not the end of the request, since the store still has to finish and the route still has to bound and serialize, so a wait that ran to the deadline itself would turn a judge that answered in time into a504anyway. One quantity serves both ends of that slack, so there is no second number to keep in step.A remainder at or below zero is a refusal, on exactly the terms every other Jev failure here takes: nothing is sent, no receipt is held, and the similarity result goes back unnarrowed.
MAX_WAIT_SECS(7 s) stays as the ceiling where no deadline is in force —kept_memoriesis reachable from outside the bounded route — and as a belt on a hand-editedtimeout_ms.What each number means
Four different things shorten a recall, and every number on the receipt names exactly one of them. Settled in one place — the point's module docstring — and followed by every producer and every string.
candidatesfitwalk, capped at 20, screened for a usable id.baseline_keysjev_keysbounded_omittedjev_keysthe response budget then removed. Absent when it removed none.chars_savedTwo consequences, and they are the point of writing it down.
len(jev_keys) - bounded_omittedis what arrived, so the two numbers add up and each removal stays attributable to whoever made it. Counting the budget's drop inside the kept list is what made the header read "Jev kept 1" beside a row saying "2 that Jev kept did not fit" — arithmetic a reader cannot close.Removed by redaction is a quantity this receipt deliberately does not carry. It is the same scrubbing applied to whatever ships, it is no part of what Jev decided, and because both arms of
chars_savedare measured before it runs, the scrubber's substitutions are absent from the difference by construction rather than subtracted by hand.baseline_charsandjev_charsboth ride the row so a reader can check the subtraction.One writer
commit_receiptis the only thing that writes or publishes a receipt, and it takes the completed payload as an argument. That is structural rather than conventional: a caller cannot reach it without the finished response in hand, and the writer — not the caller — checks that something was held, that the payload carries a deliveredretrieval, and that the request has not been abandoned.Three separate call sites leaked a receipt for a recall the caller never got, each time because the guard sat beside the call instead of inside it.
delivered_outcomeandpublish_outcomeare no longer reachable names, and a test asserts they are gone and thatpayloadis a required keyword argument.The record
baseline_keysandjev_keys, neverbaseline/jev— those two names are whatreadDecisionStriprequires, so a memory record spelling them would be drawn as a skill selection holding memory ids. Naming each list for what it holds makes the three records onmeta.decisions_stripdecline each other on shape as well as onpoint.Rows travel by identity, never copied, because the store judges membership with
id(); aRowTTypeVar carries that relation through the signatures rather than widening toMapping, which broke the seam's own type.On a record carrying an
errorthe count and the panel's list title name the fallback (kept after fallback,Kept (fallback)): the decision did not land and the shipped recall came back whole, so crediting Jev beside "Decision failed" would name an actor that chose nothing.No new route, and no new config beyond the point name in
gate.DECISION_POINT_NAMES.How to enable
Settings → Developer → Feature Previews → Decisions (Jev), and the second switch under it, Also send snippets of recalled memories so Jev can drop the ones that do not help. Both are required.
Screenshots
Captured from the real built SPA behind
website/scripts/capture-memory-recall-strip.mjsandcapture-decisions-memory-scope.mjs— fixtures answer the network, so the readers, the transcript virtualizer, the Settings card and the strip run exactly as in production.Each frame's row was read back off the live DOM through the capture script's own selectors and click order, so the caption-to-asset mapping is measured rather than assumed. That check exists because it failed once: appending the payload-bounded fixture made it a third
data-agree=falserow, so the kept-none caption sat over the bounded row and the bounded caption sat over a collapsed strip. Rows are now selected by the state each frame is of (data-agreeanddata-bounded), never by DOM order alone.Twelve frames, all from the current head.
Collapsed, Jev narrowed the recall. Each number carries its own word on the line: a bare
0.81beside a duration reads as a second duration, andcharsalone does not say chars of what.Expanded. Both id lists, the offered count, the egress, the latency, the scope sentence, and the second thumbs pair. Each pair names the act it rates and where in the sequence it sits —
Rate the search (before Jev)againstRate Jev's narrowing— because two names for adjacent steps read as one step.Expanded, Jev kept nothing. The floor of the range:
Jev kept: 0, so the panel names the empty kept list (no memories) rather than drawing a blank where the ids go, and the saving is the largest the turn could have.Expanded, the response budget dropped two of the three Jev kept. The header stays the decision's count and the row carries both numbers in one wording, so the subtraction closes where a reader sees it: kept 3, two did not fit, one arrived.
Expanded, the decision failed. The recall came back whole, the second count and the panel title name the fallback rather than crediting Jev, and the error surface names the category. The Jev thumbs are gone — the judge chose nothing — and a sentence says the search still ran, because the remaining pair otherwise sits under "Decision failed" reading as an invitation to rate something that did not happen.
Settings › Developer › Feature Previews, recalled-memory scope granted. The only state that draws the
memory.recallrow in "What Jev decides while this is on" — that list is gated per scope. It is listed because it is the one point there that changes what a tool returns.The same card with all three scopes at their default OFF — the state every already-consented install is in. The note above them enumerates all three, in the order they render.
The scope write refused. The PUT is answered
500, so the recalled-memory switch stays at its recorded value and its own notice says so — a separate node per scope, and the message names the switch, because with three of them "Could not save this switch" identified none.Recording — collapsed to expanded and back. The stills show the two ends of the toggle; this shows the motion between them: the chevron turning, the panel opening under the line it belongs to rather than displacing the reply above it, and the row settling at a height the virtualized transcript keeps stable.
memory-recall-strip-toggle.webm
Tested
test/test_decisions_memory_recall_reachable.py— 24 tests: the whole chain from the route inward, a row logged, the oracle asked, the kept subset returned, the outcome published for the strip, the two gates (unsurfaced session, unconsented scope) and a failing oracle each returning the recall whole, the four ways a receipt must NOT survive (a late answer, a discarded generation, a refused retry, a failed route), a request whose deadline had already passed, a payload the response budget shortened, a search that eats most of the budget leaving the judge a shortened wait, a request with no time left refusing to ask at all, and a tab closed DURING the search sending nothing, plus the three absent prompt-assembly seams.test/test_decisions_memory_recall.py— 71 tests: the decision, every refusal, the complement reading of adropprobability, the threshold, ordinal question ids, the menu's caps and key screen, the redaction order, both arms on the row, the publish hook, the store's fallbacks, the identity coupling and a revert-verify of the apply.website/src/test/MemoryRecallStrip.test.tsx— 42 tests, including the failed record offering no rating of a pick that did not happen, the two pairs named for the act each rates, the search-ran note, the scope sentence and theDropped to fitrow.website/src/pages/settings/decisionsCard.test.tsx— 63 tests, including the egress note's own count asserted against the scope switches drawn, each refused write naming its switch, and thememory.recallrow appearing with its scope and absent without it.test/test_decisions_memory_recall_apply.py— 8 tests against a real store: the kept subset in the response, the switch-off result unchanged, and the budget applied before the hook.test/test_decisions_memory_text_scope.py— 36 tests for the consent scope, including the scope-only PUT, endpoint preservation and the grant-vs-revoke ceiling.website/src/pages/settings/decisionsCard.test.tsx— 47,src/test/MemoryRecallStrip.test.tsx— 33, plus the contract and style suites.mypy src/kiro_crew/clean over 1665 files.tsc,eslint,black,isort,flake8,docs_lint,check_feature_map, 19/19 i18n checks, and the comment-history gate.Docs
docs/system-specs/modules/decisions.md§9 (the sharedPOINT_EGRESS_SCOPESmechanism) and §11 (rewritten for the tool path, with the record fixture the frontend contract test parses);src/kiro_crew/docs/decisions.md(the user-facing section and the enable instructions naming both switches);docs/feature-map/README.md(the strip row, retargeted, plus a new Recalled-memory egress consent row).Not verified here
No real TypeSafe round trip — the provider mapping is exercised against a fake oracle and the existing loopback tests, so this does not establish real service latency or account compatibility.
Follow-ups
Two findings from review are real readings of the code and are tracked in #12532 rather than fixed here, both because the honest fix is larger than this PR and because neither is an egress or a permission:
chat_persistence._restore_recent_sessions_stepsfillsstate._slotsand then calls_sync_dashboard_slots, so a session the owner had open is surfaced at boot with nobody yet looking at it. A per-viewer signal would have to be threaded from the websocket layer, and every other consumer of that registry reads the slot table the same way. Strictly narrower than the archived-slot case this PR closes: a restored slot is one the dashboard will draw.bound_recall_payloadcan still drop a tail episode after the hook has answered, sojev_keysandchars_savedcan overstate what the response carried — never understate. The character cap is largely pre-satisfied becausefitmeasures the same rendered lines; the live trigger is the 16 KiB transport budget, whichfitdoes not see. An exact record would have to be derived from the final payload, moving the point's record construction into the store or the route.