Repository navigation
fix(config): report nine superseded defaults old installs still store - #16190
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify the nine old-default literals against real 0.5.x–0.7.x materialized configs; a wrong value or type makes its row silently never fire. [DESIGN-REVIEWED] 0de4426 Description read[DESCRIPTION-READ] 4a879d28213d4ce97d9c08532ce21128815b0c9350343201b2cc8fec9886af91 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 |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 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: |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify the nine old-default literals against real materialized 0.5.0/0.6.0/0.7.2 configs — a wrong byte (e.g. The change extends the one existing mechanism (the What this change shipsInventory (10 items) — 10 justifiedIntent: tell upgraded installs they still store nine old defaults, and stop
[FIRST-PRINCIPLES-REVIEWED] 0de4426 Description read[DESCRIPTION-READ] e3a621a01e8cdae814bbdd30e1eae6d13d41be218989913b3dbedeaef2e8b4fb That sha256 names the PR description this verdict read. Recompute it with |
Opus 5 Review — ✅ no blocking findingsReviewed Review detailsNothing blocks; one advisory on an operator-facing cap claim that no test measures. FINDING — src/kiro_crew/config/superseded_defaults.py:233 — the new [OPUS-REVIEWED] 0de4426 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
config.json is a full materialization, so a stored value beats a changed default and an install keeps whatever it last wrote. Nine default moves shipped with no superseded-default row, so nothing told an upgraded install it still held the old value: - skills.lazy_load false -> true (#12131) - agent.subagent_spawn_stagger_secs 2.0 -> 0.25 (#12203) - session.watchdog_rss_max_mb 0 -> 1536 (#9626) - stt.language_code "en-US" -> "auto" (#9246) - decisions.history_budget_chars 0 -> 2000 (#12928) - the four watchdog windows #8949 widened All nine are report-only: each old value is a setting an operator makes on purpose, and each row states its reason and what holding the old value costs. A row can now carry a note, which doctor, config defaults and the --keep confirmation show. The decision budget's note says adopting is bounded by the consented history ceiling. The two tool-stall windows share one: the session waits the smaller of the two, so adopting one while the other holds 3600 leaves the window at an hour. skills.lazy_load also changed meaning: false was the full skills dump on 0.6.0 and now selects the short eight-name entry. Its row is marked meaning_moved, which puts its note on the one-line load warning too, so keeping false is not mistaken for keeping the old behaviour. No other note reaches that line. A row can also carry an applies predicate. stt.language_code uses it: only the local recogniser auto-detects, so where the effective provider (config.local.json included) is another one, a stored "en-US" already behaves like the default and is not reported. Both stt.provider load notices now name the key they mean (--adopt stt.provider), so following them no longer also removes the report-only values above. The remedy now spells values as JSON (true, "auto"), the way config.json takes them. The spec's one table lists every row with its change, and a test keeps it equal to the registry. The adopt/report split is pinned as two exact sets.
kirocrew config defaults --adopt always ended with "restart the gateway", even for keys a running gateway takes live through the config watcher, which costs operators a restart for nothing. The hint now names exactly the adopted keys the schema marks restart=True, the one statement of which fields a running gateway cannot adopt, and is omitted when there are none. Each removed key is still listed. dashboard.loop_stall_exit_after_secs is read once at boot to build the loop-stall watchdog and has no applier, so it now carries the mark. Without it, adopting that key would have printed no restart hint while the running gateway kept the old budget. The packaged configuration guide and the spec's marked list say the same.
c7b92d5 to
0de4426
Compare
|
|
|
|
Problem / Motivation
Goal: An upgraded install that still stores an old default for one of nine settings is told so, with the old and new values and how to adopt or keep it.
config defaults --adoptasks for a restart only when a key needs one.config.jsonholds every value, so a stored value beats a changed default. Nine default moves shipped without a superseded-default row:skills.lazy_load,agent.subagent_spawn_stagger_secs,session.watchdog_rss_max_mb,stt.language_code,decisions.history_budget_charsand four watchdog windows. An install that wrote the old value keeps it. The load warning,doctorandkirocrew config defaultssay nothing about it. Separately,config defaults --adoptalways ended with "restart the gateway", even when every adopted key is applied live.Why it matters
Operators who upgrade from 0.5.x through 0.7.x keep old behaviour they never chose, and nothing tells them. Examples: no session recycling, English-only local dictation, a slow subagent fan-out, and tool-stall windows that cancel a tool after an hour.
skills.lazy_load=falseis worse because its meaning changed: on 0.6.0 it selected the full skills dump, and today it selects the short eight-name entry. An operator who keeps it believing nothing changed gets different behaviour. An unnecessary restart prompt costs a gateway restart for nothing.Not a goal
skills.lazy_load=falsefor the provable 0.6.x cohort. fix(config): migrate a 0.6.x materialized skills.lazy_load false once #16148 shipped that on main; this PR's row composes with it (see below).--adopt/--keep, which act on every unacknowledged drifted key. That is the documented contract.What changed (motivation → approach → change)
Old installs keep old defaults because a stored value wins, and the registry had no row for these nine moves. The fix extends the existing registry rather than adding a new mechanism.
config/superseded_defaults.py. Each gives its reason in a comment and in the spec table. Old values were checked against materialized 0.5.0, 0.6.0 and 0.7.2 configs.SupersededDefault.note.doctor, theconfig defaultslisting and the--keepconfirmation append it. The--keepconfirmation insrc/kiro_crew/cli_config.pyrepeats it.skills.lazy_load, the decision budget (adopting is bounded by the consented history ceiling) and the two coupled tool-stall windows (the window is the smaller of the two, so both must be adopted) carry one.meaning_moved. It is set only onskills.lazy_load, and it puts that note on the one-line load warning too, so nobody runs--keepwithout seeing thatfalsenow means the short entry.appliespredicate.stt.language_codereportsen-USonly where the effectivestt.provider(config.local.jsonincluded) is the local recogniser. Every other provider resolves"auto"toen-USanyway. The overlay is opened only when it is a regular file, as the loader does, because this runs insideload().skills.lazy_loadrewrite. While that rewrite is due the load report skips the key, as before. The new registry row has the same key and old value as the rewrite's ledger entry, soadoption_summarynow vouches for that entry through the row, and a value a failed write left stored is listed as drift (its replay line now says so).true,"auto"). Bothstt.providerdegrade notices now name--adopt stt.provider, so following them no longer also adopts the report-only rows.src/kiro_crew/cli_config.py).--adoptlists each removed key and asks for a restart only for keysschema.requires_restartmarks and whose effective value moved: a keyconfig.local.jsonstill overrides runs the same value afterwards, so it gets no restart hint.dashboard.loop_stall_exit_after_secsis read only at boot, so it now carriesrestart=True(config-baseline.jsonregenerated).Spec updates (same commits):
docs/system-specs/modules/config.mdnow has one table listing every row with its change and reason, plus thenote/meaning_moved/appliesfields, the--adopt/--keepbullets and the restart-marked list. The packaged guidesrc/kiro_crew/docs/configuration.mdis updated too.Backwards compatibility
Compatible: no stored value is rewritten and no accepted input is rejected. New rows only add report lines. The new dataclass fields have defaults. The only behaviour change is that
--adoptleaves out the restart line when no adopted key needs one.Tests
test_config_superseded_defaults.py: each new row is reported, not adopted, and loads unchanged (parametrized over the seven later moves plus the 0.6.0 pair). JSON remedy spelling. The lazy_load note on every surface. Only ameaning_movednote reaches the load line. The tool-stall pair and decision-budget notes.stt.language_codewith transcribe/apple (quiet), local/absent/null (reported), overlay in both directions, a malformed overlay, and a FIFO overlay that must not be opened. The adopt/report split is pinned as two exact sets.test_the_spec_table_lists_every_registered_rowkeeps the spec table equal to the registry.test_cli_config_defaults.py: the restart hint names only restart-bound keys. There is no hint for live-only keys. A boot-only key asks for a restart. An overlay-shadowed restart-bound key does not.--keeprepeats a row's note, and a row without a note prints none.test_stt_provider_off.py: following each degrade notice's exact command removes onlystt.provider.test_config_lazy_load_legacy_migration.py: the replay of fix(config): migrate a 0.6.x materialized skills.lazy_load false once #16148's ledger entry is vouched for by the registry row and says the value is still listed as drift if the write failed.Manual verification
N/A: unit coverage is sufficient. Every surface (load warning, doctor,
config defaultslisting,--adopt,--keep) is exercised in tests through its real entry point against a scratch home.Related Issues
No tracking issue. Follow-ups, not in this PR:
SUPERSEDED_DEFAULTSrow. These nine moves are evidence that review alone does not catch it.Pattern harvest
Rule candidate: lint
Pattern: a config dataclass default changes on an existing field with no superseded-default registry row, so installs that materialized the old value never learn of it.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement