Repository navigation
feat(dashboard): record every manual rename in the SEL with its route and titles - #34138
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: the audit row is written once, in the shared Notes
[DESIGN-REVIEWED] d1b8cea Description read[DESCRIPTION-READ] f7859202bc608c93ab4905abd5fb0cd081f9548aafeedf78be63c5548375f934 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 Nothing blocks. One rename now leaves two SEL rows on the verb path and two on the route path, but the cost can be undone later and stays within the Goal. Notes
What this change shipsInventory (5 items) — 4 justifiedIntent: let a session's owner find out who renamed it, through which route, and from what to what. This is an ADDITION; the linked issue is #34082.
[FIRST-PRINCIPLES-REVIEWED] d1b8cea Description read[DESCRIPTION-READ] d309e3657af5303a6ac115969ffdd8afd8a6e6ab48710f00f6eea3dbe5059b86 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: |
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: |
Code change approver recommendation: ApproveAutomated, not a person, and not a review: a maintainer still decides.
Why: the decider approves with p_defect 0.12 <= 0.12 and every rail passes. Adds a chat.manual_rename SEL row inside apply_manual_title with required route/caller keywords. Every production caller (the rename route, session_rename, and channel_titles for Slack and Telegram) is updated. The write is synchronous before the first await, so the gate-then-write invariant holds. Metadata is redacted by the SEL writer, and a failed audit write is swallowed so it cannot fail a rename. The route's existing access row is kept and the right source is set for app callers. Channel paths gate restricted sessions before reaching the helper, and dashboard ephemeral transcripts are already persisted, so there is no new privacy leak. No stale test patches of chat_title.sel remain. The new tests exercise each path and the failure guard. Python backend tests pass; some Windows shards were still pending and the failed checks are rate-limit infra errors. If this recommendation is wrong, reply here; the replies are how the approver is evaluated. |
2f60e34 to
6cf131c
Compare
|
Rebased: main moved in test/conftest.py, test/conftest_resets.py, test/test_mate_spec_policy.py since this head went green (ddb535e -> 5ed49b3); CI re-running. The new head also moves the rename audit write into src/kiro_crew/dashboard/title_audit.py, because chat_title.py had gone over the 2,000-line cap (the Backend Ratchets & Boundaries failure). |
6cf131c to
91e71b3
Compare
|
Rebased: main moved in src/kiro_crew/cli_config.py, src/kiro_crew/dashboard/chat_turn/recovery.py, src/kiro_crew/dashboard/gateway_notice.py, src/kiro_crew/dashboard/handlers/updates.py and their tests since this head went green (5ed49b3 -> 16d40aa); CI re-running. The previous head's review lanes failed on a GitHub API rate limit (HTTP 403), not on the change; this push re-runs them. |
|
The review lanes on head 91e71b3 (Design, First Principles, UX, GPT 6.1, Opus 5.5, Sensitive Change, Dependency License) failed closed on 'API rate limit exceeded for installation' (HTTP 403) while fetching the merge-base, before reviewing anything. Other PRs failed the same way in the same window. Tracked in #34120 and #28761. I will rerun only the failed jobs once the installation quota recovers. |
|
Rebased: main moved in src/kiro_crew/dashboard/chat_title.py and other dashboard files since this head went green (16d40aa -> 6661197); CI re-running. Main's own edit put chat_title.py back over the 2,000-line cap with this change, so the route's chat.slot_rename access row now goes through dashboard/title_audit.py as well (same arguments, same order); chat_title.py is at 1,999 lines. |
91e71b3 to
d1b8cea
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approving. On this head, the review checked that all three production callers of apply_manual_title pass route and caller: the rename route, the session_rename verb, and the channel /title path from Slack and Telegram. No test still patches the removed chat_title.sel import. The SEL write runs before the first await. A failed audit is swallowed only on the new row, and a test pins that. The review also reasoned through a mutation of each new test, and each one goes red when its part is broken.
Done well: the row sits at the one shared choke point, and route and caller are required keyword-only arguments. A future rename path cannot skip the row without failing.
Security: the change touches no auth, sandbox or approval gate. Title text goes through the SEL writer's existing metadata redaction, and the SEL is readable only by the owner.
Optional:
- Incognito and temporary session titles now stay in the append-only SEL after the session is gone, while
session_renamerecords only a length. Consider recording only the route and title lengths when the slot is incognito, or say in the SEL spec that titles are kept. docs/system-specs/modules/sel.md(Integration Points) has no row for the newchat.manual_renameemitter or itsroute,old_titleandnew_titlemetadata.- Open PR #33736 changes the same
apply_manual_titlesignature, andchat_title.pyis now at 1,999 lines. Whichever PR lands second must passrouteandcalleron its new caller and keep the file under the 2,000-line cap.
Problem / Motivation
Goal: When a session's title changes by hand, anyone can later see who changed it, through which route, and from what to what.
A tab can be renamed four ways: the sidebar, the
PATCH /api/chat/slots/{slot}/titleroute that local scripts also call, thesession_renameverb, and a channel/title. All four runchat_title.apply_manual_title. Today a surprise title leaves almost no trail. The route's SEL row holds only the time, the slot and the callerdashboard. A channel rename writes nothing. A log line would not help either, because the defaultagent.log_levelisWARNING.Why it matters
Agents, scripts and channels can all rename a session. When one sets a wrong title, the owner cannot tell which one did it, so the cause cannot be found or fixed.
Not a goal
dashboard.What changed (motivation → approach → change)
Every manual rename now writes one
chat.manual_renameSEL row.routein metadatadashboardrename_routesession_renameverbsession_rename/titlechannel_titleThe row's metadata also holds
old_titleandnew_title. The SEL writer already redacts metadata, so a credential in a title is masked on disk.The row is written inside
apply_manual_title, so no route can skip it.routeandcallerare required keyword arguments, so a new caller has to say who it is. The rename route passessource="dashboard", because an app name is not a session key and the SEL would otherwise file the row under itsslackfallback. If the SEL write raises, the rename still goes through and a warning is logged, because the verb and channel paths never touched the SEL before.Both SEL writes, the new row and the route's existing access row, live in the new
dashboard/title_audit.py, whichdashboard/chat_title.pycalls; they sit in their own module sochat_title.pystays under the 2,000-line cap. The two other callers,dashboard/channel_titles.pyandsession_control_parts/session_titles.py, only pass their route and caller.Rows each route already wrote stay as they are: the route's
chat.slot_renameaccess row andsession_rename's session-control audit row.Backwards compatibility
Compatible: the HTTP route, the verb and the channel command take the same input and give the same reply. Every SEL row written today is still written. The new row is added beside it.
Removes nothing: no row, route, argument or reply field goes away. The only signature change adds required keywords to an internal function, and every caller in the tree passes them.
Tests
In
test/test_session_control_rename.py:test_session_rename_records_the_caller_and_both_titles: the row names the calling session, the slot, the route, and both titles.test_the_rename_route_records_its_app_on_the_dashboard_surface: the route writes one row under its app on thedashboardsurface, and still writes its own access row.test_a_channel_rename_records_its_channel_key: a channel rename writes a row under the channel key.test_an_audit_failure_does_not_fail_the_rename: a SEL that raises still leaves the rename done.The existing rename tests now pass
routeandcaller. Each new test fails when its part of the change is broken on purpose: wrong metadata, nosource, or a guard that re-raises.test_session_control_rename.py,test_chat_title.pyandtest_title_refresh.pyall pass.Manual verification
N/A: unit coverage is enough. The change is one SEL write on a path the tests drive end to end.
Related Issues
Closes #34082
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)