Skip to content

fix(conformance): correct 5 wrong PromptId constants#213

Open
delebedev wants to merge 2 commits intomainfrom
fix/prompt-ids
Open

fix(conformance): correct 5 wrong PromptId constants#213
delebedev wants to merge 2 commits intomainfrom
fix/prompt-ids

Conversation

@delebedev
Copy link
Owner

Closes #194

Summary

  • Fix 5 wrong PromptId constants to match real server values (from conformance observatory across 10+ sessions)
  • Rename SELECT_TARGETS (was 6) → DECLARE_ATTACKERS (6), new SELECT_TARGETS = 10
  • Fix GROUP_SCRY (94→92), GROUP_SURVEIL (93→129), CASTING_TIME_OPTIONS (38→23), PAY_COSTS (1244→11)
  • Add PromptIdsTest locking down all constants against verified values

Test plan

  • PromptIdsTest — 2/2 pass (value assertions + distinctness check)
  • ShapeIntegrationTest — existing promptId=6 assertion still passes
  • DealHandConformanceTest — MULLIGAN/STARTING_PLAYER unaffected

🤖 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>
Real server values from conformance observatory (10+ sessions):
- SELECT_TARGETS: 6→10 (6 is DECLARE_ATTACKERS)
- CASTING_TIME_OPTIONS: 38→23
- PAY_COSTS: 1244→11
- GROUP_SCRY: 94→92 (was mislabeled GROUP_LONDON_MULLIGAN)
- GROUP_SURVEIL: 93→129

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

Test Results

  229 files  +2  229 suites  +2   2m 14s ⏱️ -9s
  997 tests +2  965 ✅ +2   32 💤 ±0  0 ❌ ±0 
1 780 runs  +4  979 ✅ +2  801 💤 +2  0 ❌ ±0 

Results for commit 5e5382a. ± Comparison against base commit c58f0b2.

@github-actions
Copy link

CI Report — Gate

Tests: 817/817 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.7s)

@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 2m 7s —— View job


PR Review — fix(conformance): correct 5 wrong PromptId constants

  • Read changed files
  • Analyze PromptIds changes for correctness
  • Review test coverage
  • Check callsite updates in BundleBuilder/GsmBuilder
  • Post review feedback

LGTM. Clean, focused conformance fix with solid evidence backing. Here's the full breakdown:

What the PR does

Constant Before After Notes
SELECT_TARGETS (renamed) 6 Was misnamed; 6 is actually declare-attackers
DECLARE_ATTACKERS (new) 6 Correct name for protocol value 6
SELECT_TARGETS (new) 10 Correct value for target selection prompt
PAY_COSTS 1244 11 Was wildly wrong (1244 is in SELECT_N range)
CASTING_TIME_OPTIONS 38 23 Corrected
GROUP_SCRY 94 92 Corrected (also renamed from GROUP_LONDON_MULLIGAN)
GROUP_SURVEIL 93 129 Corrected
DISTRIBUTE_DAMAGE 10 Removed; no callsite references (grep clean)

Callsite updates: correct

  • BundleBuilder.kt:464,492DeclareAttackersReq now sends DECLARE_ATTACKERS=6 instead of the misnamed SELECT_TARGETS. ✓
  • GsmBuilder.kt:196 — London mulligan buildGroupReq uses GROUP_SCRY=92 (renamed from GROUP_LONDON_MULLIGAN). Semantically correct — the mulligan tuck prompt shares the scry prompt ID. ✓
  • BundleBuilder.kt:620selectTargetsBundle uses SELECT_TARGETS=10. After the rename, BundleBuilderTest:205 now asserts value 10 instead of the old wrong 6. ✓
  • BundleBuilder.kt:696,731CASTING_TIME_OPTIONS and PAY_COSTS callsites existed before and now send the corrected values. ✓

Test coverage

PromptIdsTest with ConformanceTag locks down 12 constants. A few observations:

  1. ORDER_BLOCKERS=7, SELECT_N=1243, SELECT_N_LEGEND_RULE=72, SELECT_N_LEGEND_RULE_SOURCE=15168 are absent from the test — presumably unverified against recordings. Omitting them is the right call given the docstring says "verified constants". If you get conformance data on these later, they can be added.

  2. The distinctness test (DECLARE_ATTACKERS != SELECT_TARGETS) is tautologically true (6 != 10). It reads as documentation of the original bug rather than a real invariant. Fine as-is, but it could equally be a comment. Not worth changing.

  3. ShapeIntegrationTest:52 hardcodes promptId shouldBe 6 — this still passes correctly since DECLARE_ATTACKERS = 6. The hardcoded value is acceptable in a conformance test (it's asserting the wire value). No action needed.

No issues found

  • No dangling references to removed constants (DISTRIBUTE_DAMAGE, GROUP_LONDON_MULLIGAN) — confirmed by grep.
  • CI passes: 997 tests, 0 failures.
  • The PAY_COSTS correction (1244→11) is the most impactful — old value would have been in the SELECT_N range and would have caused client confusion on any pay-costs prompt.

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.

fix(conformance): 5 wrong PromptId constants — button labels incorrect

1 participant