Skip to content

fix(lstsv2xlsform): reverse selected() on a multiple choice's native "other" - #81

Merged
jstet merged 1 commit into
mainfrom
fix/reverse-native-other
Sep 25, 2026
Merged

jstet merged 1 commit into
mainfrom
fix/reverse-native-other

Conversation

@jstet

@jstet jstet commented Sep 25, 2026

Copy link
Copy Markdown
Member

Fixes a failing test on main.

#80 merged with the lstsv2xlsform round-trip contract test failing: my merge chain piped the CI check through tail, which hid its exit status.

Cause:

  • selected(${q}, 'other') on a multiple choice with native other=Y is written as (q_other.NAOK == 'Y').
  • The reverse didn't know the implicit other code, so it produced selected(${q_other}, 'Y').

Fix: the reverse's selected() lookup now includes other for every multiple choice with other=Y.

vitest: 887 passed. npm run validate is clean.

🤖 Generated with Claude Code

…"other"

#80 changed the select_multiple_other example to selected(${q}, 'other'),
which the forward path writes as (q_other.NAOK == 'Y'): the native "other"
is LimeSurvey's implicit `other` subquestion. The reverse didn't know that
code, read q_other as a separate question and produced
selected(${q_other}, 'Y'), failing the round-trip contract test. #80 merged
with that test failing (my merge chain didn't check the CI exit status).

The selected() lookup now includes the implicit `other` code for every
multiple choice with other=Y, so the relevance reverses to
selected(${q}, 'other') again.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@jstet
jstet merged commit 267465c into main Sep 25, 2026
4 checks passed
@jstet
jstet deleted the fix/reverse-native-other branch September 25, 2026 14:59
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.

1 participant