Repository navigation
refactor(config): legacy fields leave PharnConfig; modules written until v0.21.0 (CORE-189) - #395
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 29 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
🛡️ pharn-ci · ✅ PassTip Pass · This change adds no coverable lines; 29 agent setup files found.
🧪 Diff coverageNo coverable lines changed. 🔍 Test integrityNo test-integrity findings (mode: block). Tests changed: +6 −0 ~4
💬 Messages (1)
🤖 Agent setup (29 files)Agent setup: 29 files · claude-code Agent setup files (29)
pharn-ci 0.10.0 · report schema v2 · coverage format lcov |
…til v0.21.0 (CORE-189) constitution, installedSkills, stackAnswers and isMultiTenant move out of the public PharnConfig into an internal LegacyConfigFields type. They stay in CLI_OWNED_KEYS (the satisfies clause now covers both types), so they still load, are written back as found by add/update/remove, and are dropped by a re-run init, as before. Each names v0.21.0 as its removal version. modules stays in the public type and is still written: 0.19.x's shape guard reads a config without a modules array as no config, and 0.19 stays supported while 0.20 is current. The write site and the type now say so, with v0.21.0 as the release that stops writing it. docs/reference/pharn-config.md: "Fields older CLIs wrote" lists the four fields plus modules. No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… name the support window (CORE-189) pharn-ci warned that src/types.ts and src/steps/install-archetype.ts were not imported by a changed test. tests/pharn-config.test.ts now loads src/types.ts at run time and asserts it exports no value. A new init test asserts that a fresh config has modules: [] and none of the legacy fields. docs/reference/pharn-config.md: the schema is additive within the support window (links docs/support-policy.md, added by #394). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
893673f to
c55589d
Compare
What
constitution,installedSkills,stackAnswersandisMultiTenantmove out of the publicPharnConfiginto an internalLegacyConfigFieldstype (src/types.ts). They stay inCLI_OWNED_KEYS(src/lib/pharn-config.ts; thesatisfiesnow coverskeyof PharnConfigminusseampluskeyof LegacyConfigFields), so their behaviour is unchanged: they load,add/update/removewrite them back as found, and a re-runinitdrops them. Each is commented as legacy, to be removed in v0.21.0.modulesstays in the public type and is still written byinit. The type and the write site (src/steps/install-archetype.ts) now carry the shim comment: written for 0.19.x, whose guard needs it; stop writing in v0.21.0 (support policy: current + previous minor).docs/reference/pharn-config.md: the legacy section becomes "Fields older CLIs wrote" and lists the four fields plusmodules; the schema is described as additive within the support window, linking../support-policy.md(added by docs(policy): publish the support policy and the shims it retires (CORE-186) #394, so the link resolves once both merge).[Unreleased]→### Changed: one line. No behaviour change.Why the "stop writing
modules" half is retargeted to v0.21.0The guard change that lets a config without
modulesload (C2.2, CORE-164, #380) is not in any release:git tag --contains fdc1f453is empty, so it first ships in v0.20.0. v0.19.0's guard (!Array.isArray(raw.modules)→null) reads a config withoutmodulesas no config. Its commands then say "runpharn init", and that re-run overwrites the config. Under the support policy (the current minor plus the previous one), 0.19 must still read 0.20's config. So 0.20.0 keeps writingmodules: []. v0.21.0 can stop, because 0.20.0, the first CLI that reads such a config, will then be the oldest supported one.Ticket: https://linear.app/pharn-dev/issue/CORE-189/c64-stop-writing-modules-legacy-fields-leave-the-public-type (epic CORE-155)
How verified
tests/pharn-config.test.ts(legacy fields (LegacyConfigFields)):PharnConfigandmodulesis;userOwnedConfigEntriestreats them (andmodules) as pharn-owned;loadArchetypeConfigand round-trips verbatim.tests/commands/add.test.ts:initstill writesmodules: [], andaddkeeps legacy fields.statusthen loads that config.tests/commands/init.test.ts: a fresh config hasmodules: []and none of the four legacy fields.tests/pharn-config.test.tsalso loadssrc/types.tsat run time and asserts it exports no value.PharnConfig & LegacyConfigFields.CI=1 vitest run --coverage(103 files, 3657 passed, floors met) andnpm run build.🤖 Generated with Claude Code
Summary by CodeRabbit
add,update, orremove.modulessetting through v0.20.x; this is scheduled to stop in v0.21.0.