Repository navigation
S131 — A host publishes new content while running - #589
Merged
Merged
Conversation
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 publish a new build of its content without restarting.
createContentArchive({ kinds, initial })is the reference archive and channel from 16 §4.3:publishre-runs every campaign'svalidateCampaignagainst the publication's strings.(campaignId, campaignVersion)whose content differs, withcontent_version_conflict. Content identity is 16 §3.4's digest: 11 §6's campaign digest plus the full strings table, sorted by key.migrateStateis kept by reference.latest()is the last successful publication, andcurrent(scope)answers that publication's version of the scope's campaign.An engine given the archive as its
archiveresolves both old and new epochs.Criteria
S131.1 — met:
archive.test.ts› S131.1.initialresolves at its versions, and an unknown key isundefined. Aninitialthat fails validation throws, and so does one with an unregistered kind.bulgaria-bureaucracy.archive.test.tspublishes the real campaign's validated registry and republishes it as a no-op.S131.2 — met:
archive.test.ts› S131.2. The validator's errors are returned, nothing is stored andlatest()is the same object. Validation runs against the publication's ownstrings.S131.3 — met:
archive.test.ts› S131.3. 3 refusals:3 successes:
[];migrateStatereturns[];EpochRef, and a held key in the same publication does not.S131.4 — met:
archive.test.ts› S131.4. After publishing, changing the content, the campaign map and the strings changes nothingresolveanswers. Mutating what it serves throws on content, campaign fields,set,deleteandclear.migrateStateis the same function, andresolutionis kept.S131.5 — met:
archive.test.ts› S131.5.currentfollows each success across sessions and profiles, stays put on a refusal, and isundefinedfor a campaign the latest publication lacks, which still resolves.S131.6 — met:
archive.test.ts› S131.6. A game on epoch 1, played after epoch 2 is published, serializes byte-identically to the same game on an engine with no archive. Its scene reads epoch 1's content, and epoch 2 is playable alongside it.S131.7 — met:
archive.test.ts› S131.7.content_version_conflictis inBASE_REASON_CODESand has a message.createContentArchive,ContentArchive,ContentChannel,ContentScopeandEpochRefare imported from the package root.Differs from design
Four interpretations are recorded in
90-decisions.md:unknown_kind. Core-owned Tier 1 checks are not re-run.includescounts toward the digest only when it is present and non-empty. This follows 11 §6, which §3.4 cites.ContentChannelandContentScopelive in the archive module.SessionHost.contentdoes not exist yet; it arrives with the adoption points.Verified
npm run typecheck,npm run lint,npm test: 117 files, 2278 tests passing../build/ConvertTo-HumanDocumentation.ps1and./build/Test-Documentation.ps1pass.git diff --checkis clean.Reverting each guard makes its tests fail:
One run of the full suite timed out
long-horizon.replay.test.ts› long-horizon-win round-trips through deserialize: 5.5 s against a 5 s limit, under parallel load. The test takes 1.7 s alone, and it passed on the next full run. This slice does not touch it.Not run locally:
./docs.ps1 -BuildOnly(no installeddocs.ps1). The Verify Documentation Build check covers it.