Repository navigation
fix: withhold the member briefing in temporary chats - #31791
Conversation
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
4bb8582 to
8fd113a
Compare
|
Rebased: main moved in docs/architecture/context-management.md, src/kiro_crew/context_assembly/turn_message.py since this head went green (39717a0 -> f71f5dd); CI re-running. The previous head's two shard-7 reds were not this change: [operator: bolichen97] |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: each legacy site now passes [DESIGN-REVIEWED] 629265e Description read[DESCRIPTION-READ] 54e7e07109e1042991c7b6b71313de48ebe41ee61b67c91117f574db69f9dc15 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This is a mechanism-level fix. It covers every caller of the member-section builder, and it uses the existing What this change shipsInventory (4 items) — 4 justifiedIntent: in a temporary chat with a legacy crew member, the user wants the model never to see that member's agent-writable briefing. FIX (closes #21617; the new test fails on the parent on all three paths).
Sibling count: grepped [FIRST-PRINCIPLES-REVIEWED] 629265e Description read[DESCRIPTION-READ] 90522a8b40027ca763c70535dfc30f97978aabbe51dd9e928dbbe4e53c2e9f8b That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
8fd113a to
d3e6302
Compare
|
Rebased: main moved in docs/architecture/mcp.md, docs/architecture/resource-protection.md, src/kiro_crew/context_assembly/replay.py, src/kiro_crew/telegram/client.py, test/test_lesson_startup_embedding.py since this head went green (f71f5dd -> e4611c5); CI re-running. The previous head's three reds (Dependency License Gate, Sensitive Change Review, Publish readiness signal) were the CI token's API rate limit, not this change. The diff is unchanged by the rebase. [operator: bolichen97] |
d3e6302 to
86d6612
Compare
|
Rebased: main moved in docs/architecture/mcp.md, docs/architecture/resource-protection.md, docs/architecture/security-deep-dive.md, scripts/crewmate_prompt_preview.py, src/kiro_crew/context_assembly/output_contract.py, test/test_crewmate_prompts.py, test/test_mate_conductor_parity.py, test/test_member_briefing_file_tools.py, test/test_memory_v1_golden.py since this head went green (e4611c5 -> 5f7f8d1); CI re-running. The previous head's nine reds (Dependency License Gate, Sensitive Change Review, Publish readiness signal, PR Readiness and the five AI review lanes) were the CI token's API rate limit, not this change; every test job on that head passed. The diff is unchanged by the rebase. [operator: bolichen97] |
|
[operator: bolichen97] The test red on this head is main's, not this PR's. |
A temporary chat promises no memory reads, but a legacy member's session-start, slim-resume and post-compaction sections still read the agent-writable briefing into [CURRENT ASSIGNMENT]. Pass include_briefing=not blocks_reads at those three sites, as the private-member envelope already does for temporary turns, so the section carries the withheld placeholder instead. Builds on #21630.
86d6612 to
629265e
Compare
|
[operator: bolichen97] Rebased onto main (5f7f8d1 -> bab2387) to pick up main's fix for the security package line budget. The Backend Tests shard 2 red on the previous head ( |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (4 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: a temporary chat withholds the member briefing on every legacy delivery path (#21617). Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/architecture/context-management.md.
A temporary chat promises no memory reads, but a legacy member's session-start, slim-resume and post-compaction sections still read the agent-writable briefing into [CURRENT ASSIGNMENT]. Pass include_briefing=not blocks_reads at those three sites, as the private-member envelope already does for temporary turns, so the section carries the withheld placeholder instead. Builds on #21630. (cherry picked from commit 9b6af7a)
Problem / Motivation
Goal: A temporary chat with a legacy crew member never carries that member's briefing, on any path that delivers the member section.
A temporary (blank-slate) dashboard chat opened as a legacy member's DM still injected the member's agent-writable
briefing.mdas[CURRENT ASSIGNMENT], even though the session prefix says no memory reads, and the agent used it in replies.Builds on #21630 by @louisss1016.
Why it matters
The temporary prefix is a promise to the user about what the model can see. Breaking it silently hands the model the member's accumulated working memory in exactly the session the user opened to keep it out.
Not a goal
[USER PROFILE]in temporary sessions, to the[MEMBER IDENTITY]/ item 6 wording when the briefing is withheld, or to the private-member (V2) path; the issue lists those as lower priority.memory.inject_memory); only the temporary scope changes.What changed (motivation → approach → change)
A temporary chat with a legacy member still showed the member its own working notes. The member section builder already knows how to withhold them (
include_briefing), but only the private-member path asked it to. The three legacy delivery paths (session start, slim resume, post-compaction re-injection) left it at its default.Each of those three sites now passes
include_briefing=not blocks_reads.blocks_readsis already true exactly for a temporary turn at every one of them (the slot's or the execution record's temporary mode, plus the per-session mode). At the member's desk the section then shows the existingwithheld by this turn's memory/privacy scopeplaceholder instead of the briefing. The context-management doc says so in one paragraph.Backwards compatibility
Compatible: only temporary turns change; persistent and incognito turns build the member section exactly as before, and the briefing file itself is untouched.
Reader: src/kiro_crew/context_assembly/session_start.py:build_session_context -- chat -- a temporary member DM gets the withheld placeholder; test_temporary_session_withholds_the_briefing[fresh]
Reader: src/kiro_crew/context_assembly/turn_message.py:build_message -- chat -- slim resume and post-compaction re-injection, same; test_temporary_session_withholds_the_briefing[slim_resume], [post_compaction]
Tests
test/test_member_prompt.py::TestMemberSectionInjection::test_temporary_session_withholds_the_briefing, parametrized over the three legacy paths: a member with a non-empty briefing in a temporary (blocks_reads=True) turn gets the withheld placeholder and not the briefing body. Red on all three on the parent.Proof: PROVEN test/test_member_prompt.py::TestMemberSectionInjection::test_temporary_session_withholds_the_briefing[fresh], test/test_member_prompt.py::TestMemberSectionInjection::test_temporary_session_withholds_the_briefing[slim_resume], test/test_member_prompt.py::TestMemberSectionInjection::test_temporary_session_withholds_the_briefing[post_compaction] (head 4bb8582)
Determinism: 20/20 runs at
-n0; 10/10 at-n 4 --dist loadgroup --max-worker-restart=2withtest_member_turn_context.pyandtest_member_essential_context.pyas co-tenants; the whole file in shuffled order (seed 25429, 82 passed).Manual verification
N/A — unit coverage sufficient: the change is pure context assembly, and the test drives the same
build_session_context/build_messageentry points the dashboard calls withblocks_reads=slot.blocks_reads.Screenshots / video
N/A — backend-only change; no frontend surface is touched.
Related Issues
Closes #21617
Sibling sweep
Swept: git grep -n "_build_member_section(" -- src/
Sibling: src/kiro_crew/context_assembly/session_start.py:359 -- changed here
Sibling: src/kiro_crew/context_assembly/turn_message.py:435 -- changed here
Sibling: src/kiro_crew/context_assembly/turn_message.py:607 -- changed here
Sibling: src/kiro_crew/context_assembly/member.py:650 -- not affected -- the private-member path already passes include_briefing=reads, which is false on a temporary turn
Pattern harvest
Rule candidate: review-prompt
Pattern: a gating keyword with a permissive default (
include_briefing=True) is passed at one call site and left at its default at sibling call sitesChecklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.