Repository navigation
S129 — Every game plays the content it names - #587
Merged
Merged
Conversation
Engine resolves every state's content through a ResolutionArchive keyed by (campaignId, campaignVersion); EngineHost.archive is optional and defaults to the construction-time registry, read once. createGame takes an optional starting version; deserialize and migrate refuse an epoch the archive does not hold.
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.
What
A host can now keep more than one published version of a campaign available at once. Every game plays the version it names, not whichever version the host registered under the campaign's name.
EngineHost.archive?: ResolutionArchiveis optional. Without it, the engine uses an archive holding only the construction-time registry.Engine.contentexposes whichever archive is in use.KindContext.registryand.campaignfromcontent.resolve(state.campaignId, state.campaignVersion).createGame(config, campaignVersion?)starts on a named epoch.deserializeandmigraterefuse a state whose epoch does not resolve, withunknown_campaign. This closes the S125.5 gap.Criteria
engine.test.ts› S129.1 — the archive in usecontentis the supplied archive, andwithEmitterkeeps it;scene,view,availableActions,submitAction,previewAction,deserializeandmigrateeach read the state's own epoch.unknown_campaignfor an unresolved version or id.unknown_campaignplus exactly onecore.deserialize.rejected, for a known id at another version.engine.test.tsimportsResolutionArchivefromsrc/index.ts, and the typecheck proves the root export.Differs from design
createEnginecopies the registry's campaign map once, so a later mutation does not change the default epoch. One existing store test mutates the registry under a live engine. Recorded in90-decisions.md, 2026-10-09.90-decisions.md, 2026-10-09.Verified
npm run typecheck,npm run lint: clean.npm test: 115 files, 2,220 tests passed../build/Test-Documentation.ps1: passed (drift check across 19 generated pages; 135 Markdown files).git diff --check: clean.test-design.tsreported 13 findings. All are path fragments such as/authoringread as slash commands. They predate this change, and none are in lines this PR touches../docs.ps1 -BuildOnly(no installeddocs.ps1). The Verify Documentation Build check covers it.