Repository navigation
S132 — A story moves onto additive content - #590
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
The story-graph kind now declares
adoptContent, implementing the rule in 16 §5.5 and 03 §8.1. A session moves onto a newer version of its campaign when that version only adds to what the player is playing:The session stays pinned with
content_incompatiblewhen the target would strand the player or drop something they carry.Choice availability is judged by
offeredChoices, which is now shared withavailableActions. The adoption check therefore sees exactly what the scene shows.Criteria
S132.1 — met:
adopt.test.ts› S132.1:patienceandmoodat their initial values and leaves every other field equal;initial.S132.2 — met:
adopt.test.ts› S132.2, one test per case:visitedCountskey has no target node;VarTypechanged;A further test shows that a variable neither campaign declares passes through.
S132.3 — met:
adopt.test.ts› S132.3. Four cases: a choice gated byshowWhenor byrequirements, on an inserted variable whose initial value is true or false. Adoption agrees withavailableActionson the adopted state, and adopts exactly when the gate passes.S132.4 — met:
adopt.test.ts› S132.4: the adopted state passesvalidateStateon the target, and the unadopted state does not.bulgaria-bureaucracy.adopt.test.ts: the real campaign adopts its own extension (one node plus one variable) partway through the arc. TwotraceFixtureruns of a log crossing the epoch are identical entry by entry, and the final state isformatVersion: 2on2.1.0. The state round-trips throughdeserialize.Differs from design
Three interpretations are recorded in
90-decisions.md:VarType, not its value against the target's declaration. This is the rule as written. A narrowedenumcan still fail a latercopy; the entry flags it for revisiting.validateStatetolerates it at load.migrateStatepins every extension that keeps it. The Bureaucracy campaign'smigrateStatemigrates from1.0.0only, so an extension that keeps it pins withmigration_failed. The S132.4 copy carries none, and a test pins the real behaviour. No campaign code changed.Verified
npm run typecheck,npm run lint,npm test: 119 files, 2301 tests passing../build/ConvertTo-HumanDocumentation.ps1and./build/Test-Documentation.ps1pass.git diff --checkis clean.Reverting each guard in
adopt.tsmakes its tests fail:visitedCountsVarTypeThe current-node test first passed with its guard removed, because the
visitedCountsrule refused the same state. A played state always counts the node it stands on. The test now also covers a state without that count, and fails when the guard is reverted.Not run locally:
./docs.ps1 -BuildOnly(no installeddocs.ps1). The Verify Documentation Build check covers it.