Repository navigation
Conversation
|
Reviewing this now. |
wowzoo
left a comment
There was a problem hiding this comment.
Thanks for tracking this down and for the clear write-up. A host notice should never count as the person's turn.
I reviewed the current head 412011e against main. The change is correct for what it targets:
- The new pattern matched all 36 real Kiro Crew host notices I extracted from Kiro CLI V2 chat records the same way the adapter does, including several notices queued in one steer. A person's own message, including Kiro Crew's
oreply, stays the person's. t-host-turns-not-the-personspasses, and the new test fails if either half of the fix is reverted.
What holds it back is where this code path runs today:
- On the current Kiro Crew (0.12.2) with kiro-cli 3.x, choosing Kiro CLI starts
kiro-cli acp --agent-engine v3, not the V2 engine this adapter serves (decision; a v2 opt-in, kirodotdev/KiroCrew#30001, was closed). Crew also does not load a project's hooks in dashboard chats (kirodotdev/KiroCrew#26568), so AI-DLC does not run there yet. - So I could not exercise this path on a current build. Which Kiro Crew and kiro-cli versions are you running it on?
Two small things if it goes ahead: the comment above recordMessagesTypedWhileWorking still says every steer is recorded as the person's, and the test could use a real multi-paragraph notice instead of the one-line one.
Fork CI has not run yet. I'm currently asking the Kiro Crew side to support AI-DLC (kirodotdev/KiroCrew#26568), so I think it is too early for AI-DLC to carry a Kiro Crew–specific pattern. I'm leaving this as a comment for now.
|
Thanks for the careful review. To be clear: I haven't run Kiro Crew myself. The fix is based on the notices quoted in #3934, not on notices I captured, so I can't confirm the path is reachable on a current build (0.12.2 with |
Fixes #3934
Summary
On Kiro CLI, a notice that Kiro Crew steers into a running turn (for a tool approval nobody answered) was recorded as the person's turn. This change records a steer made only of host notices as a host turn.
Changes
core/tools/aidlc-lib.ts: add akiro crew host noticeentry toKIRO_CLI_HOST_TEMPLATES. It matches text made only of whole<user_message>blocks that start with[Kiro Crew host notice].harness/kiro/hooks/aidlc-kiro-adapter.ts:recordMessagesTypedWhileWorkingnow reads the steer's words withhostTemplateOrigin(steer.words, KIRO_CLI_HOST_TEMPLATES). It falls back to the person origin only when no template matches.tests/unit/t-host-turns-not-the-persons.test.ts: add a regression test.User experience
Before: an unanswered approval that Kiro Crew declined was recorded as
HUMAN_TURN(Origin: person,Source: typed) with a message record holding the host's words. That turn could let a held system package install through and counted as the person's presence at the next gate.After: a steer made only of host notices is recorded as
HOST_TURN(Origin: host), with no message record. A steer the person typed is still their turn, including one that holds a host notice beside their own words.Checklist
If an item does not apply, leave it unchecked.
Test plan
Added the test
Kiro CLI: a Kiro Crew host notice steered into the turn records HOST_TURN; a person's words beside it stay theirsintests/unit/t-host-turns-not-the-persons.test.ts.HOST_TURNrow, noHUMAN_TURN, and no kept message words.Approve): recorded as oneHUMAN_TURN.The test suite could not be run end to end in the author's environment, because
gate-startwas refused there, on the baseline too. The new template regex was checked directly. Reviewers should runbash tests/run-tests.shfor the unit level, or the test file above.Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.
A host notice was being counted as me typing. That could let a held system install run when nobody was at the keyboard, so I wanted to fix it.