Fix blank memory titles in RATE_MEMORIES directive + terse format - #126
Conversation
Root cause: agentcore exposures use AWS mem-<uuid> ids; local title join misses, so the Stop-hook directive renders blank memory lines. Design: snapshot display text at exposure-record time, COALESCE on read, and cut the directive to a minimal format (rules stay in the skill). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Six tasks: display-column migration, exposure_log triples + COALESCE, protocol/backend threading, terse directive, full-suite gate, docs sweep. Spec amended: inline sqlite retrieve INSERTs stay join-resolved. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ot on read Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sites Task 3 of rate-directive-display: every StorageBackend.record_exposures implementer and caller now passes (kind, id, display) triples end to end, so agentcore-id exposures carry a title/content snapshot without needing a local content row. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds test_bootstrap_exposure_rows_carry_display_snapshots, which seeds a
reflection with a known title and a semantic memory with known content,
runs a real SessionBootstrapService.bootstrap() call, and asserts the
resulting session_memory_exposure rows carry those exact display values.
Closes a coverage gap flagged in review: the existing display test built
a triple by hand and never exercised _record_exposure's
reflection_display/semantic_display dict-comprehension wiring
(r.get("title") / m.content), so a future edit pointing at the wrong
field or the wrong source list would have passed every existing test.
Verified by temporarily breaking the wiring locally and confirming this
test fails, then reverting.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…eader Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tive test precision Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Claude BugBot Analysis
Reviewed the exposure-display-snapshot PR (migration, contextual_inject, session_close, exposure_log service, session_bootstrap, agentcore/protocol/sqlite storage backends, and associated tests). All tuple-shape changes (kind, id) -> (kind, id, display) were propagated consistently across every call site and signature; SQL parameter ordering in the INSERT/WHERE NOT EXISTS and the COALESCE(MAX(e.display), r.title, s.content) aggregation are correct; field accesses (m.text, r.get('title'), m.content) match their source types. No concrete defects found.
No bugs were detected in this PR.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Claude BugBot Analysis
Reviewed the display-snapshot exposure-ledger changes across hooks, services, and storage backends; all tuple arities, SQL column/placeholder counts, and data-type assumptions (dict vs sqlite3.Row, dataclass attributes) check out correctly against their call sites. No genuine defects found.
No bugs were detected in this PR.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Claude BugBot Analysis
Reviewed the display-snapshot exposure-ledger PR (migration, exposure_log.record/list_unrated, session_close directive, session_bootstrap/agentcore/contextual_inject wiring, and test updates); traced all changed call sites, dict/dataclass field usages, and SQL aggregate expressions back to their sources and found no genuine defects meeting the confidence bar.
No bugs were detected in this PR.
Summary
mem-<uuid>ids, which the localreflections.title/semantic_memories.contentjoin can never resolve.session_memory_exposure.displaycolumn (migration 0017); every exposure writer now passes(kind, id, display)triples; the read path selectsCOALESCE(MAX(e.display), r.title, s.content)so pre-migration local rows still resolve live.rate-session-memoriesskill. Thereasonstring, block-payload shape, and 8 KB cap are unchanged.memory.list_session_exposuresnow returns real titles/content for agentcore-backed memories too.services/reflection.py/services/semantic.py(they only write local ids, which the join resolves live) and the Stop hook's standalone inline SQL copy (no service-layer import, per the sync-hook ADR).Spec:
docs/superpowers/specs/2026-08-06-rate-directive-display-design.mdPlan:
docs/superpowers/plans/2026-08-06-rate-directive-display.mdTest plan
🤖 Generated with Claude Code