Repository navigation
feat(hooks): Kiro Space app source may post into a bound shared session (preview, off by default) - #35302
feat(hooks): Kiro Space app source may post into a bound shared session (preview, off by default)#35302chenmingwei23 wants to merge 1 commit into
Conversation
First Principles Review (Opus 5.5) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK Nothing in Notes
Inventory (7 items) — 3 justifiedIntent: let people in a shared session post turns that are attributed to them. This is an ADDITION.
BlockersThe feature cannot be reached: nothing binds a session — zero consumers [FIRST-PRINCIPLES-REVIEWED] cc14676 Description read[DESCRIPTION-READ] 700fa5f7160a5ef76880afcc671e2e5d89bb2235303910fffd6fc902cfb5c402 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The path is off by default, refuses anything outside its narrow case, and is easy to revert. But nothing in it can be used yet. Notes
[DESIGN-REVIEWED] cc14676 Description read[DESCRIPTION-READ] 3e69be5aa958eb75cf706324b58830162002d17495f6f608522e7b0f7a103c80 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 |
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 — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- src/kiro_crew/shared_crew/room_sessions.py:82 -- The agent can rewrite the host’s sharing allowlist
BLOCKING -- src/kiro_crew/dashboard/handlers/hooks.py:1326 -- Timed-out bound turns leave backend work running
BLOCKING -- src/kiro_crew/webhooks.py:63 -- Core makes shared-session posting specific to one app
BLOCKING -- src/kiro_crew/dashboard/handlers/hooks.py:681 -- Human room authors share the automation budget
[BLOCK-MERGE] cc14676 |
|
TALOS security review of the bound shared-session hook path, patches 0001-0004 (95db48c..e9aa86b): ACCEPT-WITH-NITS. No blocking finding. The push can go ahead now; the items below ride in the same push. A non-author reviewer applied the four patches to a clean checkout, ran the two new test files (51 pass) and 16 hand-made mutations, and probed the real handler. TALOS read the findings and signs them. Holds: only an owner-minted Please include in the same push (all small):
Not covered: CI after the local commits, the Kiro Space side that decides who may post, a full-suite regression run, and a real host with a live agent turn. Sign-off is for this patch range only; a different head needs a delta ask. |
…on (preview, off by default) Adds a bound shared-session path for the app-mapped hook source. Off by default; preview, room switch and config read errors all read as off. Includes tests for the author cleaning, check order, switches and logs.
e2cbca9 to
cc14676
Compare
|
Parked for a maintainer decision. This PR stays a draft, with no further pushes or reruns until then. The blocking First Principles finding: nothing in src/ calls RoomSessionBindings.bind, so is_bound (hooks.py:132) is never true and every Kiro Space app post returns 403 session_key_unbound. Adding a binder, or shrinking the PR to drop the unreachable surface, changes what this PR is for, so that call belongs to a maintainer. State at head cc14676: one commit on current main; the config-baseline and test-patching failures are fixed; the other red checks are shared rate-limit failures, not findings. |
|
Closing. Nothing calls RoomSessionBindings.bind, so the is_bound check at hooks.py:132 is never true and the feature cannot take effect. It needs a binder design first; that will come as a new PR. |
Problem / Motivation
Goal: A person in a Kiro Space app can post a turn into a session their host machine chose to share, and the agent sees who wrote it.
Today an app-mapped webhook source has no way to reach a bound shared session, so a shared session cannot take input from the people it is shared with. This adds that path as a preview, off by default.
Why it matters
Without it the shared session is read-only for everyone but the host. With it the host can let named people post, while every other source stays refused on a bound key.
Not a goal
What changed (motivation → approach → change)
A token minted with
app=kiro-spacemay post to ahook:ks-session:*key, and only when that key is bound. The author comes from the body (userId,displayName), is cleaned and bounded, and is stamped on the transcript row. The agent is told these are another person's words. The preview off, the room switch off, or a config read error all read as off. A registry read error answers 503. A bound session keeps its transcript after the turn (released, not reset). Any other source on a bound key is refused, and thehook:ks-session:prefix is reserved for every source. A newroomconfig flag (default off) is added andconfig-baseline.jsonis regenerated.Backwards compatibility
Compatible: the new path needs the preview, the room switch and an app-mapped token, all off today. The one tightening is that a
hook:ks-session:key not in the bound shape is now refused.Reader: src: hook:ks-session -- app, cron, chat -- no reader of that prefix exists on origin/main (git grep over src and website/src finds none), so no existing key is refused.
Tests
test_hooks_ks_app_bound_session*.py: author cleaning, check order, preview and room switches, config read error, registry 503, reserved prefix, log lines.test_shared_crew_room_principal.py: the room principal.test_config_baseline.pyandtest_facade_mirror_guards.pypass with the new flag and the patched names going through the config facade.Manual verification
N/A -- unit coverage sufficient: the path is a webhook handler with no UI.
Related Issues
None.
Checklist
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.