Skip to content

fix(conformance): discard SelectNReq uses Resolution context#215

Open
delebedev wants to merge 2 commits intomainfrom
fix/discard-selectn-fields
Open

fix(conformance): discard SelectNReq uses Resolution context#215
delebedev wants to merge 2 commits intomainfrom
fix/discard-selectn-fields

Conversation

@delebedev
Copy link
Owner

Closes #175

Summary

  • Fix 3 wrong fields in discard SelectNReq: context (DiscardResolution), listType (StaticDynamic), optionContext (unset→Resolution)
  • Wire evidence: discard prompts use same context/listType/optionContext as legend-rule, only sourceId differs

Test plan

  • New test: discard SelectNReq uses Resolution context and Dynamic listType — verifies all 3 fixed fields + existing correct fields
  • LegendRuleTest — still passes (shared builder path)
  • BundleBuilderTest — 14/14 pass

🤖 Generated with Claude Code

delebedev and others added 2 commits March 22, 2026 21:27
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire shows discard prompts use the same context/listType/optionContext
as legend-rule — only sourceId differs. Fix the non-legend-rule branch
to match:
- context: Discard → Resolution
- listType: Static → Dynamic
- optionContext: (unset) → Resolution

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link

Test Results

  227 files  ±0  227 suites  ±0   2m 14s ⏱️ -9s
  996 tests +1  964 ✅ +1   32 💤 ±0  0 ❌ ±0 
1 778 runs  +2  978 ✅ +1  800 💤 +1  0 ❌ ±0 

Results for commit 0ecfa08. ± Comparison against base commit c58f0b2.

@github-actions
Copy link

CI Report — Gate

Tests: 816/816 passed (189 skipped)

Coverage: 10.5% (615/5852 lines)

Module Coverage Lines
tooling 🔴 11% 615/5852
Slow tests (>3s): 1
  • InstanceIdReallocTest.Limbo grows across multiple plays (5.6s)

@delebedev delebedev added the ralph Created by Ralph autonomous loop label Mar 22, 2026
@delebedev
Copy link
Owner Author

@claude please review this ralph PR

@claude
Copy link

claude bot commented Mar 22, 2026

Claude finished @delebedev's task in 42s —— View job


PR Review

  • Gather context
  • Read changed files
  • Provide review feedback

Overall: LGTM with one minor doc nit. The fix is correct, minimal, and well-evidenced.

What changed

buildSelectNReq previously branched on isLegendRule for context, listType, and optionContext. Wire evidence shows discard and legend-rule use identical values for all three fields — only the prompt shape and sourceId differ. The fix:

  1. context: Discard_a163Resolution_a163 (unconditional)
  2. listType: StaticDynamic (unconditional)
  3. optionContext: moved out of the isLegendRule branch → unconditional

The diff is clean and the isLegendRule variable is still correctly used for prompt/sourceId differentiation.

One nit: stale KDoc

RequestBuilder.kt:139–142 has a doc comment that now documents the old (wrong) behavior:

 * Context/listType vary by prompt type:
 * - `legend_rule`: context=Resolution, listType=Dynamic
 * - `choose_cards` (discard): context=Discard, listType=Static

This should be updated to reflect that both paths use Resolution/Dynamic/optionContext=Resolution. Fix this →

Test coverage

The new test at BundleBuilderTest.kt:288 is well-structured — it exercises the discard path end-to-end via RequestBuilder.buildSelectNReq and asserts all 3 fixed fields plus the stable ones (idType, validationType, minSel, maxSel, idsCount, promptId). This is the right level of coverage.

CI is green: 996 tests, +1 new, 0 failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ralph Created by Ralph autonomous loop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discard SelectNReq: wrong context, listType, optionContext fields

1 participant