Repository navigation
fix: log one warning while adoption waits for a pending config review - #36586
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The fix classifies What this change shipsInventory (5 items) — 5 justifiedIntent: While a hand edit to
[FIRST-PRINCIPLES-REVIEWED] 6c60319 Description read[DESCRIPTION-READ] bebbe12fbe07b6b37a561b94024463c1d9fae9e0136dc853073145096728ffb0 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the boot pass now handles the expected pending-review refusal as a wait, with no change to retries or ledger state, and only the log output changes. [DESIGN-REVIEWED] 6c60319 Description read[DESCRIPTION-READ] 46dd6276b681d297109293aa8d0f5f498066322f30246f69190715248c445629 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 — ✅ 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: |
|
Backend Tests (3.12, 7) red on 0dfa79b is |
|
The re-run of |
0dfa79b to
275d6e7
Compare
|
Rebased: main moved in docs/system-specs/modules/config.md, src/kiro_crew/apps/routes_enable.py, src/kiro_crew/dashboard/handlers/computer_use.py, test/test_apps_routes_coverage_enable_disable.py, test/test_registry_refresh.py and 6 system-spec docs since this head went green (a45e97a -> 1ca713c); CI re-running. |
Code change approver recommendation: ApproveWhy: the decider estimates a 7% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. Log-only fix: the APPLY pass now catches PendingEditBlocksSave as a An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
|
|
|
The re-run of |
|
The lost-runner re-run of |
275d6e7 to
4e1a52d
Compare
|
Rebased: main moved in docs/system-specs/modules/app-kit-platform.md and 64 other files in the same directories since this head went green (1ca713c -> 39fd360); CI re-running. The patch is byte-identical after the rebase (new head 4e1a52d). Locally on the rebased tree: the 9 built-in adoption test files pass (333 passed, 1 skipped), the flake-pattern ratchet passes, and the black, isort, flake8, mypy, comment-history, brand and line-cap gates pass.
|
While config.json has a change made outside Kiro Crew pending review, every trust write the built-in adoption APPLY pass makes is refused with PendingEditBlocksSave. The pass caught it as an unexpected error and logged a full traceback at ERROR for each pinned app on every boot, although nothing is wrong: the built-in keeps running and the staged ledger is retried at the next start. Treat that refusal as the expected state it is. The pin's outcome is waiting_for_review, its ledger is left untouched, and the pass logs one warning naming the pending file and every waiting app, with each trace at DEBUG. Recording the legacy nav of an already adopted app waits the same way, at DEBUG only. Part of #26967
4e1a52d to
6c60319
Compare
|
Rebased onto main 6d61070 to pick up the Coverage Gate red-main fix #36804 ( |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Review of this head:
- A refused config write now reaches the new
except PendingEditBlocksSavearms inapply_alland_record_missing_nav. CancelledErrorandPlatformCompositionErrorare still re-raised ahead of the new arms.- The ledger stays
(staged, 0)while the review is pending. - The only reader of the outcome label is the boot INFO log.
- The two new tests pass, and removing any of the new except arms, the aggregate warning, the leaf collection or the DEBUG trace makes one of them fail.
Done well: the tests use the real config writer against a real pending config.json, and they also prove the recovery half: after Discard, the next boot adopts the app.
Optional:
- The tests only cover one pin. A per-pin warning would still pass. Adding a second pin and asserting one WARNING that names both apps would cover the "one warning per pass" claim.
_rollback(builtin_adoption_apply.py:564) still logs an ERROR traceback for the same refusal on the rare crash-recovery path. You could route it to DEBUG the same way, or say in the sibling sweep why it stays.- The new spec paragraph says "the built-in keeps running". That is not true when
finalize_markerrefuses after the swap, where the swapped record keeps running until the next boot finalizes it.
…#36586) While config.json has a change made outside Kiro Crew pending review, every trust write the built-in adoption APPLY pass makes is refused with PendingEditBlocksSave. The pass caught it as an unexpected error and logged a full traceback at ERROR for each pinned app on every boot, although nothing is wrong: the built-in keeps running and the staged ledger is retried at the next start. Treat that refusal as the expected state it is. The pin's outcome is waiting_for_review, its ledger is left untouched, and the pass logs one warning naming the pending file and every waiting app, with each trace at DEBUG. Recording the legacy nav of an already adopted app waits the same way, at DEBUG only. Part of #26967 (cherry picked from commit 4579388)
Problem / Motivation
Goal: While
config.jsonhas a change made outside Kiro Crew waiting for review, each gateway start logs one warning about the waiting built-in adoptions instead of an ERROR traceback per app.Edit
config.jsonby hand on a host where the sandbox seals it, so the change waits for Apply or Discard in Settings > Security. Every gateway start then logsERROR Adoption of <app> failed; the built-in keeps runningwith a fullPendingEditBlocksSavetraceback, once for each pinned former built-in. Five pins give five tracebacks per start. Nothing is actually wrong: the built-in keeps running, the staged ledger is untouched (attempts 0), and the next start tries again.Why it matters
The log reads as a crash on every start for anyone with a pending config review, which is the normal state between an outside edit and the person's Apply or Discard. Real adoption errors are hard to spot among the tracebacks, and the log never says what would clear them.
Not a goal
What changed (motivation → approach → change)
Symptom → cause. The APPLY pass's trust write goes through the config writer, which refuses a save while the file is pending review. The pass classifies a trust-overlay refusal and an unreadable file, but not this one, so it reached the pass's catch-all and was logged with
logger.exception.Change.
apply_alltreats the refusal as the expected state it is: that app's outcome iswaiting_for_review, its ledger is left as it was, and after the loop the pass logs one warning naming every waiting app and the pending file, with the remedy (Apply or Discard in Settings > Security). Each refusal's trace goes to DEBUG. Recording the legacy nav of an app that is already adopted waits the same way, logged at DEBUG only, since it is display state. The app-kit-platform spec describes the outcome.Backwards compatibility
Compatible: the same pins are retried at the same time from the same ledger state; only the log level, the line count and the outcome label in the boot's
Built-in adoption: {...}INFO line change.Removes nothing: no path, record, key or retry is taken away.
Tests
test_a_pending_outside_edit_logs_one_warning_and_adopts_once_resolved: withconfig.jsonpending review, the boot returnswaiting_for_review, logs exactly one WARNING with no trace, naming the app andconfig.json, keeps the trace at DEBUG, leaves the ledgerstagedwith 0 attempts and the built-in in place; after a Discard the next boot adopts.test_a_pending_outside_edit_records_no_nav_and_logs_no_warning: an adopted app whose nav record is missing logs no warning while the review is pending, and its nav is recorded once the review is resolved.Proof: PROVEN test/test_builtin_adoption_apply.py::test_a_pending_outside_edit_logs_one_warning_and_adopts_once_resolved, test/test_builtin_adoption_apply.py::test_a_pending_outside_edit_records_no_nav_and_logs_no_warning (head 6c60319)
Determinism: the two new tests passed 20 of 20 runs at
-n0, in a hand-reordered run (new tests first and last), and the whole file passed at-n 4 --dist loadgroup. The 16 test files that exercise built-in adoption passed: 475 passed, 2 skipped. The flake-pattern ratchet passed.Manual verification
N/A: unit coverage drives the real config writer against a real pending
config.json, which is the boot path the logs came from.Related Issues
Part of #26967
Sibling sweep
Swept: git grep -n "mutate_trust_settings|mutate_agent_marker" -- src/kiro_crew/apps/
Sibling: src/kiro_crew/apps/builtin_adoption_apply.py:652 -- changed here
Sibling: src/kiro_crew/apps/default_installs.py:367 -- not affected -- it already logs one line with no traceback and retries next boot
Sibling: src/kiro_crew/apps/local_trust_switch.py:216 -- not affected -- a person's own action, not a boot pass, and its handler answers the refusal
Pattern harvest
Rule candidate: review-prompt
Pattern: a boot pass that writes a protected config file must classify
PendingEditBlocksSaveas an expected wait, not let it reach alogger.exceptioncatch-all.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)