Repository navigation
refactor(config): stop writing modules; drop the legacy fields (CORE-189) [v0.21.0] - #402
Merged
PrzemekGalarowicz merged 1 commit intoNov 17, 2026
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 53 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
🛡️ pharn-ci · ✅ PassTip Pass · Diff coverage of this change is 100% against a threshold of 80%; 29 agent setup files found.
🧪 Diff coverage
100% of changed lines covered (6/6, threshold 80%) Changed files (1)
🔍 Test integrityNo test-integrity findings (mode: block). Tests changed: +1 −0 ~17 · 5 renamed
🤖 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 |
PrzemekGalarowicz
force-pushed
the
przemek/core-189-c64-stop-writing-modules-legacy-fields
branch
from
November 17, 2026 08:46
3a0b82c to
456e56c
Compare
Merged
…189) [v0.21.0] The v0.21.0 half of C6.4. `init` no longer writes `"modules": []` (only 0.19.x needed it), and `writePharnConfig` drops every key only older CLIs wrote (`modules`, `constitution`, `isMultiTenant`, `stackAnswers`, `installedSkills`) from any config it writes, so add/remove/update/init finish the retirement. A config that still carries them loads in every command as before. The names stay pharn-owned through `LEGACY_CONFIG_KEYS`, so `userOwnedConfigEntries` never carries one over as the user's. `PharnConfig.modules` and `LegacyConfigFields` leave src/types.ts. Docs (config reference, init, support policy, shim table) and CHANGELOG updated; tests that pinned `modules: []` now assert its absence, and a new test runs an old config with every legacy key through every command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PrzemekGalarowicz
force-pushed
the
przemek/core-189-c64-stop-writing-modules-legacy-fields
branch
from
November 17, 2026 10:04
456e56c to
e384366
Compare
PrzemekGalarowicz
marked this pull request as ready for review
November 17, 2026 10:04
PrzemekGalarowicz
deleted the
przemek/core-189-c64-stop-writing-modules-legacy-fields
branch
November 17, 2026 10:07
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ships in v0.21.0. Now unblocked: v0.20.0 is released (#403, tag
v0.20.0), so the support window (current + previous minor) is 0.20.x + 0.21.x once this ships, and 0.20.0 is the first CLI that reads a config withoutmodules(0.19.x reads one as no config).Rebased onto
mainafter the v0.20.0 release. The two CHANGELOG lines now sit under the new, empty## [Unreleased](their own### Changed/### Removed); the[0.20.0]section is byte-identical tomain's.What
The v0.21.0 half of CORE-189 (C6.4, epic CORE-155). #395 did the v0.20.0 half.
initno longer writes"modules": [](src/steps/install-archetype.ts).writePharnConfigdrops every key only older CLIs wrote —modules,constitution,isMultiTenant,stackAnswers,installedSkills— so the first config write byinit,add,removeorupdateremoves them. Readers (list,status, every--dry-run) leave the file as found.modulesarray (so a pre-archetype config still reaches the "re-runpharn init" message) or acapabilitieskey.LEGACY_CONFIG_KEYS(src/lib/pharn-config.ts), spread intoCLI_OWNED_KEYS, souserOwnedConfigEntriesnever carries one over as the user's.PharnConfig.modulesandLegacyConfigFieldsleavesrc/types.ts.Why
0.19.x reads a config without a
modulesarray as absent, soinitkept writing it while 0.19 was in the support window. From v0.21.0 the window is 0.20.x + 0.21.x, and 0.20.0 is the first CLI that reads a config withoutmodules.Decision: the legacy keys are dropped on write, not carried verbatim. They are CLI-owned and nothing reads them, so dropping them loses no user data and finishes the retirement in one step.
Docs
docs/reference/pharn-config.md:modulesleaves the top-level table and the example; "Fields older CLIs wrote" says they load but are no longer written, and that 0.20.0 is the oldest CLI that can read a new config.docs/commands/init.md:modules: []leaves the written-fields list.docs/contributing.md(C6.4 v0.21.0 shim row → "Removed: …", window paragraph) anddocs/support-policy.md(v0.21.0 row).### Changed"New configs no longer carrymodules; pharn 0.20.0 is the oldest CLI that can read them" and### Removednaming 0.20.x as the last CLI that wrotemodules.Tests
No test or test title deleted. Tests that pinned
modules: []in a new config now assert its absence (init.test.ts,add.test.ts); typedPharnConfigfixtures lose the key. Round-trip tests inpharn-config.test.tsnow round-trip a current archetype config, and the legacy ones write the old config as raw bytes, then assert the write drops the keys. New:init.test.ts"an old config withmodulesand the legacy fields loads in every command, and a write drops them" (status, list, update --dry-run, init --dry-run, then add, remove, re-run init, update, uninstall).Verified
After the rebase:
CI=1 npm run checkgreen (3704 passed, 1 skipped),npm run buildgreen. Before it:npm run test:coveragegreen (pharn-config.ts 98.46/97.02/100/99.11).🤖 Generated with Claude Code