Repository navigation
fix(config): migrate a 0.6.x materialized skills.lazy_load false once - #16148
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Confirm from release history that no pre-0.7 build ever wrote [DESIGN-REVIEWED] aa03dc9 Description read[DESCRIPTION-READ] a2384602d6c697bf7b0e7a44271cbb9372854035ec42c756a8174da5eb0a73fc 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 |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify in release history that What this change shipsInventory (9 items) — 9 justifiedIntent: an install upgrading straight from 0.6.x gets the default skill index instead of the short skill entry it never chose — a FIX.
The marker-version claim is the one load-bearing premise with no record on the base (CHANGELOG and specs name the migration but not its first shipping build); grepped [FIRST-PRINCIPLES-REVIEWED] aa03dc9 Description read[DESCRIPTION-READ] 691bd536aa9bda7a01bab66abe27c6164124a0d05c57ed81794dbadba9d8c18f That sha256 names the PR description this verdict read. 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: |
|
|
|
Opus 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: |
0.6.x and earlier materialized every default into config.json, and their skills.lazy_load default was false -- the full skills listing. #11996 moved what false means (the short eight-name entry) and #12131 flipped the default to true, so an upgraded install silently runs the narrowest mode on bytes nobody chose. Value equality cannot tell that noise from a choice made on a 0.7+ build, but WHEN the value was written can, the same boundary #9600 used for connections_ui. A load removes a stored false once, only when meta.lastTouchedVersion names 0.6.x or older AND connections_ui_migrated .json (first shipped in 0.7.0, written by every clean 0.7+ load) is absent AND the adoption ledger is readable and does not already name the key. The decision is taken on the base document before any write or the gateway's meta refresh re-stamps it. The removal rides the adoption write-back: re-detected inside the config write lock, ledger entry first, in-memory value moved only once the write is confirmed and only where the overlay does not supply the key, cache dropped and marker deferred when the write does not land. One WARNING names the key, the writer's version and the command that picks the short entry; doctor replays the ledger entry with a restore command. An install that has already run 0.7.x, or whose stamp is missing or unreadable, keeps its value and stays report-only.
a867c64 to
aa03dc9
Compare
|
|
Problem / Motivation
Goal: An install upgrading straight from 0.6.x or earlier gets the default skill index instead of the short skill entry it never chose.
0.6.x and earlier wrote every default into
config.json, and theirskills.lazy_loaddefault wasfalse, which then meant the full skills listing. #11996 changed whatfalsemeans (it now selects the short entry naming only the hottest skills) and #12131 madetruethe default. A stored value beats the default, so on an upgraded install thefalsenobody chose now selects the narrowest skills mode, with no notice.Why it matters
Every 0.6.x install that upgrades past 0.7 loses most of its skills from session start. The agent can still search for them, but nothing tells the operator why skills stopped showing up, and nobody on 0.6.x could have chosen this mode because it did not exist yet.
Not a goal
falseon installs that have already run any 0.7 build. There,falsemay be a deliberate choice of the short entry, so they keep their value (the report row in the paired PR below covers them).skills.lazy_loadrow toSUPERSEDED_DEFAULTS. That is branchfix/superseded-defaults-skills-stagger, driven separately.What changed (motivation → approach → change)
An install upgrading straight from 0.6.x now starts with the default skill index instead of the short entry, because its stored
falsewas written whenfalsestill meant "show every skill". Installs that have already run 0.7 or later keep their value.Comparing values cannot tell a materialized
falsefrom a chosen one. The time it was written can, using the same boundary #9600 used forconnections_ui. That migration's marker,connections_ui_migrated.json, first shipped in 0.7.0-insider.1, and every later clean load writes it.So a config load (
config/loader.py, deciding throughconfig/migration.py) removes a storedskills.lazy_load: falseonce, and only when all of these hold:meta.lastTouchedVersionnames 0.6.x or older;The load decides on the base
config.jsonbefore anything re-stamps it. The gateway's meta-stamp refresh holds off while the rewrite is still due, so a degraded first boot keeps the proof for the next clean load.The removal goes through the existing adoption write-back:
config.local.jsonsets the key.One WARNING names the key, the version that wrote it, and the command to choose the short entry.
doctorandkirocrew config defaultsreplay the ledger entry with a restore command (config/superseded_defaults.py). A missing or unreadable stamp, an existing marker, an explicittrue, or any non-boolean value stays as stored.config.jsonlazy_load: falsefalsefalselazy_load: true🟩 added · 🟨 changed · 🟥 removed · 🟦 unchanged
Pairs with branch
fix/superseded-defaults-skills-stagger, which adds a report-only superseded-default row forskills.lazy_load. Without it, this PR leaves the excluded cohort silent. With it, that cohort is reported, and this loader already skips the key in the same load's report when it is the one being removed. Whichever lands second should make the row's text say that installs provably written by 0.6.x were migrated.Specs updated:
docs/system-specs/modules/config.md(new "The legacyskills.lazy_loadrewrite" subsection, the module table, the default-context note),docs/system-specs/modules/memory-skills-hooks.md(discovery), andsrc/kiro_crew/docs/configuration.md("When a Shipped Default Changes").Backwards compatibility
Compatible: only a stored
skills.lazy_load: falsein a config provably last written by 0.6.x or earlier is removed, and only once. Every other config loads exactly as on main. The ledger sidecar gains one possibleadoptedkey, which older readers already tolerate.Tests
test/test_config_lazy_load_legacy_migration.py:0.5.0,0.6.2,-insider.N,.Nbuilds,rc1);trueand non-boolean values;metashapes do not migrate, and the marker still lands;refresh_config_meta_stamp, which still refreshes outside the cohort;doctorreplays the entry with a lowercasefalse.Mutation-checked: removing or inverting each of the 16 guards fails at least one test.
Manual verification
N/A: unit coverage is sufficient. The behaviour is a pure function of
config.json, the marker and the ledger, and the tests drive realKiroCrewConfig.load()andrefresh_config_meta_stamp()against a scratch home.Related Issues
no linked issue: found while auditing upgrade behaviour of superseded defaults. Pairs with branch
fix/superseded-defaults-skills-stagger(report-only row). Follows the #9600 precedent; addresses fallout from #11996 / #12131.Pattern harvest
Not generalizable: the rewrite is sound only because the meaning of
falsechanged at a release boundary that an existing marker already records. Most default changes have no such boundary and stay report-only.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)