Repository navigation
fix(packs): a runtime pack's persistence overrides its compiled definition - #442
Merged
Merged
Conversation
…definition Fails today with "Duplicate pack persistence" (#435 review, Codex P1). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ition Compiled-in and runtime persistence shared one registry that treated any differing definition for the same pack id as a duplicate. When T3TEAM_PACKS_DIR held a newer version of a compiled pack, runtime registration threw, the boot catch dropped the whole runtime map, and every runtime pack lost its store. Each source now registers into its own layer (conflicts within one source still fail atomically) and the effective map is the compiled baseline overlaid by the runtime layer, matching how the other compiled-in content is overridden. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Thread transfer impact
This comment will update automatically after the next completed run. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Fixes the #435 review finding (Codex P1). If
T3TEAM_PACKS_DIRheld a newer version of a pack that the compiled-in distribution also registers, and the newer version changed its collection metadata, runtime registration threwDuplicate pack persistence.runT3TeamServerCommandcaught that for the whole runtime map, so the updated pack kept the stale compiled definition and every other runtime pack lost its store.Fix
registerPackCollections(definitions, source)now keeps acompiledlayer and aruntimelayer. The effective map is the compiled baseline overlaid by the runtime layer, with runtime winning per pack id. That matches how the rest of the compiled-in distribution is overridden (t3team-distribution-bootstrap.ts: "a runtime pack that provides a given content type overrides it"). A conflicting definition inside one source still fails atomically, and re-registering an identical definition is still a no-op.Tests
vp test run src/t3team-packDocumentConfig.test.ts src/t3team-packPersistence.test.ts src/t3team-distributionPersistenceModule.test.ts: 3 files, 7 tests pass. The new test was committed first and failed withError: Duplicate pack persistence: override-test. It checks that a runtime pack overrides the compiled definition, that a compiled-only pack and a runtime-only pack both survive, and that a later compiled activation never replaces the runtime override.🤖 Generated with Claude Code