Skip to content

feat(dashboard): record every manual rename in the SEL with its route and titles - #34138

Merged
rnoack1 merged 1 commit into
mainfrom
fix/log-manual-tab-renames
Nov 10, 2026
Merged

rnoack1 merged 1 commit into
mainfrom
fix/log-manual-tab-renames

Conversation

@rnoack1

@rnoack1 rnoack1 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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}/title route that local scripts also call, the session_rename verb, and a channel /title. All four run chat_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 caller dashboard. A channel rename writes nothing. A log line would not help either, because the default agent.log_level is WARNING.

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

  • Telling the sidebar apart from a local script that uses the same route with the same dashboard token. Both are recorded as dashboard.
  • Changing how a rename is validated, saved or broadcast.
  • Keeping a title history anywhere except the SEL.

What changed (motivation → approach → change)

Every manual rename now writes one chat.manual_rename SEL row.

Route Row's caller route in metadata
rename route (sidebar, scripts) the app, or dashboard rename_route
session_rename verb the calling session session_rename
channel /title the channel session key channel_title

The row's metadata also holds old_title and new_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. route and caller are required keyword arguments, so a new caller has to say who it is. The rename route passes source="dashboard", because an app name is not a session key and the SEL would otherwise file the row under its slack fallback. 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, which dashboard/chat_title.py calls; they sit in their own module so chat_title.py stays under the 2,000-line cap. The two other callers, dashboard/channel_titles.py and session_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_rename access row and session_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 the dashboard surface, 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 route and caller. Each new test fails when its part of the change is broken on purpose: wrong metadata, no source, or a guard that re-raises. test_session_control_rename.py, test_chat_title.py and test_title_refresh.py all 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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@rnoack1
rnoack1 requested review from a team and KiroCrewCaptain as code owners November 9, 2026 21:42
@rnoack1
rnoack1 requested a review from buluoray November 9, 2026 21:42
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision d1b8cea4ba3534773a7ebfe9ce94d9e701e867a2 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of d1b8cea4ba3534773a7ebfe9ce94d9e701e867a2 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

No design-level concerns: the audit row is written once, in the shared apply_manual_title, and the required route/caller arguments make every new rename path name itself.

Notes

  • Titles now go into the SEL, which outlives session deletion, so a deleted or incognito session's title stays readable there after its transcript is gone. Say in the SEL spec that this is accepted.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of d1b8cea4ba3534773a7ebfe9ce94d9e701e867a2 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Item 2 — oversized: the session_rename verb already writes _audit(caller_session_key=..., operation="rename", slot_key=slot.key, ...) (caller_access.py:892). So the new chat.manual_rename row repeats its caller and slot, and only the titles and route are new. Subtraction: put old_title/new_title into that row's detail and skip record_manual_rename on the verb path. Clears when: the mechanism is removed, or a human amends the Goal.

What this change ships

Inventory (5 items) — 4 justified

Intent: 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.

  1. A channel /title rename now leaves a SEL row, where before it left nothing — justified
  2. A session_rename verb rename adds a second row with the old and new titles — oversized: it repeats the existing session_rename audit row
  3. A route rename adds a row with route and both titles, filed under the dashboard surface — justified
  4. apply_manual_title now requires route and caller keywords — justified
  5. The route's chat.slot_rename access row moves to title_audit.py and is written the same way — justified

[FIRST-PRINCIPLES-REVIEWED] d1b8cea

Description read

[DESCRIPTION-READ] d309e3657af5303a6ac115969ffdd8afd8a6e6ab48710f00f6eea3dbe5059b86

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed d1b8cea4ba3534773a7ebfe9ce94d9e701e867a2 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] d1b8cea

Verdict parsed from the review's SHA-scoped output markers for commit d1b8cea4ba3534773a7ebfe9ce94d9e701e867a2.

False positive or not applicable? A repository writer can comment:
/ai-review override fable d1b8cea4ba3534773a7ebfe9ce94d9e701e867a2 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of d1b8cea4ba3534773a7ebfe9ce94d9e701e867a2 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] d1b8cea

False positive or not applicable? A repository writer can comment:
/ai-review override gpt d1b8cea4ba3534773a7ebfe9ce94d9e701e867a2 false-positive: <reason, 20 to 500 characters>

@Zedmor

Zedmor commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Code change approver recommendation: Approve

Automated, not a person, and not a review: a maintainer still decides.

decider-v3c@217fe607 · p_defect 0.12 · router R0 (approves only when p_defect <= 0.12, on changes of at most 400 changed lines) · head d1b8cea4ba · 201 changed lines

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.

@rnoack1
rnoack1 force-pushed the fix/log-manual-tab-renames branch from 2f60e34 to 6cf131c Compare November 9, 2026 22:09
@rnoack1

rnoack1 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

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).

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 9, 2026
@rnoack1
rnoack1 force-pushed the fix/log-manual-tab-renames branch from 6cf131c to 91e71b3 Compare November 9, 2026 23:02
@rnoack1

rnoack1 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

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.

@rnoack1

rnoack1 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

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.

@rnoack1

rnoack1 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

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.

@rnoack1
rnoack1 force-pushed the fix/log-manual-tab-renames branch from 91e71b3 to d1b8cea Compare November 10, 2026 01:55
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Nov 10, 2026
@rnoack1
rnoack1 enabled auto-merge (squash) November 10, 2026 03:04
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 10, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_rename records 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 new chat.manual_rename emitter or its route, old_title and new_title metadata.
  • Open PR #33736 changes the same apply_manual_title signature, and chat_title.py is now at 1,999 lines. Whichever PR lands second must pass route and caller on its new caller and keep the file under the 2,000-line cap.

@rnoack1
rnoack1 merged commit 227d1b0 into main Nov 10, 2026
99 of 109 checks passed
@rnoack1
rnoack1 deleted the fix/log-manual-tab-renames branch November 10, 2026 03:37
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log every manual session rename with its route and both titles

3 participants