Skip to content

Port the Parlance 0.15.0 runtime contract: 207/207 vectors - #4

Merged
mwburke merged 2 commits into
mainfrom
claude/release-0-15-prep-mi2lm0
Sep 26, 2026
Merged

mwburke merged 2 commits into
mainfrom
claude/release-0-15-prep-mi2lm0

Conversation

@mwburke

@mwburke mwburke commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

This ports the runtime to Parlance v0.15.0. conformance/PIN points to a3c6454, the commit v0.15.0 tags. All vendored vectors and schemas are byte-identical to parlance at that commit.

Runtime (addons/parlance/runtime.gd)

  • One skip walk: resolve_node is shared by step_dialogue and advance_node.
    • Only an interstitial gated node is skipped (one with no choices and no isEnd).
    • A gated node that has choices or isEnd is returned with textHidden: true and text: "".
    • Both gates are judged once, on arrival.
  • step_resolved_node: the presenting half of the contract's resolve-once arrival sequence.
  • partition_choices:
    • A fallback choice is offered only when no other choice is visible.
    • lockedChoices uses whenLocked, then rules.choices.whenLockedDefault, then "hide", and interpolates lockedText.
  • choose_choice returns {"error": "... not selectable ..."} for a hidden or locked choice, or a fallback that isn't currently offered.
  • Pass-through: node text is optional, and node and choice tags pass through unchanged. engine is an explicit no-op in apply_effect.
  • Test runner:
    • Every step result now asserts lockedChoiceIds and textHidden.
    • choose_choice handles expectedError.
    • "project": null in a vector maps to {}, as the reference harness does.

Verification

  • 207/207 locally with headless Godot 4.4-stable, the same version CI uses. This branch's conformance workflow is green.
  • I deliberately broke six of the new rules one at a time: the skippable-node test, the fallback partition, the selectable check, locked choices, per-choice whenLocked, and blanking hidden text. The suite failed each time.
  • Removing the engine case does not fail any test. match has no default arm, so an unknown effect already leaves state unchanged; the explicit case documents that.
  • Not directly tested: the text_hidden argument of step_resolved_node.

Merge once v0.15.0 is tagged at a3c6454. mistfall-inn re-vendors this runtime next.

🤖 Generated with Claude Code

https://claude.ai/code/session_018SVV6KXuhgbARyUvgQKbUP


Generated by Claude Code

Parlance 0.15.0 changes how a node and its choices are presented, and a
0.14 runtime plays the new shapes wrong with no error. Vectors and schema
re-copied from parlance 440369d (the release-prep commit; v0.15.0 is not
tagged yet, and PIN says so and must move to the tag commit once it is).

- resolve_node is the one skip walk, shared by step_dialogue and
  advance_node. Only an interstitial gated node (no choices, not isEnd) is
  skipped; a gated node with choices or isEnd is returned with its line
  hidden: textHidden true, text "". Both gates are judged on arrival.
- step_resolved_node(node, state, project, text_hidden) is the
  presentation half of the contract's arrival sequence, for a caller that
  applies onEnter between resolving and presenting.
- partition_choices: a fallback is offered only when no non-fallback
  choice is visible (its own showIf still applies), and lockedChoices lists
  failing choices whose whenLocked (else rules.choices.whenLockedDefault,
  else "hide") is "show", with lockedText interpolated.
- choose_choice returns {"error": "... not selectable ..."} for a hidden,
  locked or unoffered-fallback choice, where the reference throws.
- Absent node text is tolerated and stays absent; node and choice tags
  pass through; the engine effect is an explicit no-op in apply_effect.

The runner asserts lockedChoiceIds and textHidden (absent = false) on
every step vector, text/nodeTags/visibleChoiceTags where stated, and
expectedError for choose_choice as for advance. `"project": null` in a
vector now maps to {} as the reference harness's asProject does.

Mutants on the skippable test, the fallback partition, the selectable
check, locked choices, per-choice whenLocked and the blanked hidden text
each turn the suite red. Removing the engine case does not: the match has
no default arm, so an unknown effect already leaves state unchanged; the
case is there to make that a stated decision rather than an accident.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018SVV6KXuhgbARyUvgQKbUP
The contract is unchanged since the release-prep commit this port was
built against (440369d): every vendored vector and schema is byte-identical
to parlance at a3c6454, which v0.15.0 tags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018SVV6KXuhgbARyUvgQKbUP
@mwburke
mwburke merged commit e20ce4b into main Sep 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants