Skip to content

Implement dialogue offers and check modifiers; pin to Parlance v0.14.0 - #2

Merged
mwburke merged 1 commit into
mainfrom
claude/parlance-0.14-upgrade-8ank7c
Sep 22, 2026
Merged

mwburke merged 1 commit into
mainfrom
claude/parlance-0.14-upgrade-8ank7c

Conversation

@mwburke

@mwburke mwburke commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Parlance 0.14.0 has two contract changes, and a port needs both before it can claim 0.14.0 conformance.

Changes

  • Dialogue offers replace the character ladder. ResolveCharacterDialogue no longer walks character.dialogues. It collects the dialogues offering for the character (offer.character ?? speakerId) and drops those whose offer.when fails, plus visited non-replayable ones. It then picks by priority tier, then ConditionSpecificity, then lowest id (string.CompareOrdinal). It takes an optional visited set.
  • Check modifiers. ResolveCheck adds the bonus of every modifier whose when holds to the total. It reports bonus and appliedModifiers only when the check declares modifiers. A check with modifiers and no project returns an error dict, the same convention AdvanceNode uses. ChooseChoice now passes the project through. CheckBonus and PassiveCheckPasses are public.
  • Vectors and schema re-copied from parlance@v0.14.0; conformance/PIN moved to the tag. nextContinuations.json is vendored but not run yet, like resolveQuests and progression.
  • README: the compatibility row said v0.9.0, and the test command pointed at a Tests/ directory that doesn't exist (it's Parlance.Tests/). Both are fixed, and there are notes on passive checks and offers.

Verification

  • cd Parlance.Tests && dotnet test on .NET 8: 9 passed, 0 failed. Before this change, 3 failed (ResolveCheck, ChooseChoice, ResolveCharacterDialogue).
  • Mutation checks: reversing the specificity or ordinal comparison, or zeroing the reported bonus, turns the suite red.
  • Note: test.yml only triggers on PRs and pushes targeting main, so this PR is the first CI run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Wc6JEuMmSXJEJSRYwGjn1f


Generated by Claude Code

Parlance 0.14.0 carries two contract changes, and a port must ship both
before it can claim 0.14.0 conformance:

- Dialogue offers replace the character ladder. ResolveCharacterDialogue
  no longer walks character.dialogues; it gathers the dialogues offering
  for the character (offer.character ?? speakerId), drops failed
  offer.when gates and visited non-replayable ones, and picks by priority
  tier, then ConditionSpecificity, then lowest id (ordinal compare). It
  takes an optional visited set, as the reference does.
- Checks gain conditional modifiers. ResolveCheck sums every modifier
  whose when holds into the total, and reports bonus/appliedModifiers
  only when the check declares one. A check with modifiers and no project
  returns an error dict where the reference throws; ChooseChoice threads
  the project through. CheckBonus and PassiveCheckPasses (the passive
  reveal threshold) are public.

Vectors and schema re-copied from parlance@v0.14.0; PIN moved to the tag.
nextContinuations.json is new upstream and, like resolveQuests and
progression, is vendored but not yet run. The README's compatibility row
was still at v0.9.0 and its test path pointed at a nonexistent Tests/;
both corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wc6JEuMmSXJEJSRYwGjn1f
@mwburke
mwburke merged commit 77b54e4 into main Sep 22, 2026
1 check 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