Skip to content

fix(manabrew-compat): declare the unsourceable targeting intent, correct the reveal entry - #6710

Merged
matthewevans merged 1 commit into
mainfrom
ship/manabrew-targeting-intent
Jul 28, 2026
Merged

fix(manabrew-compat): declare the unsourceable targeting intent, correct the reveal entry#6710
matthewevans merged 1 commit into
mainfrom
ship/manabrew-targeting-intent

Conversation

@matthewevans

@matthewevans matthewevans commented Jul 27, 2026

Copy link
Copy Markdown
Member

Two capability-registry entries claimed things the code no longer does.

local.prompt-family-display-acks-unsupported still asserted that
WaitingFor::RevealChoice falls to local.prompt-unsupported. It has not
since the interaction projection landed: RevealChoice classifies as
HumanResponseModel::ExactCandidates, so the generic path serves it as
ChooseFromSelection — one labelled option per revealable card, plus the
empty decline when optional (CR 701.20a). What remains is a fidelity gap,
not a coverage one: cards reach the client as names because only a Select
schema is reclassified as cards and a one-of list is not one. Per the crate's
rule that a mapping claim must be exhibited rather than asserted, both halves
are now pinned by tests that answer every offered option rather than a
hand-picked one, so neither can pass on candidate ordering.

ChooseBoardTargetsInput.intent is a placeholder, which nothing recorded.
The field is required, and all 25 TargetingIntent variants are effect
semantics with no neutral member, so every prompt must claim one. Phase has
none to give: TargetSequenceProjection describes only the mechanism of the
pick (TargetSequenceAction), and deriving intent from the pending spell's
effect would be this adapter inventing game semantics. With one construction
site, every target choice is advertised as Hostile — including targeting
your own creature to buff it (CR 115.1) — while the emitted hostile: false
contradicts it. The value is left alone, because no available value would be
honest; the gap is declared as local.targeting-intent-unsourceable and
commented at the emit site. The asymmetry is visible inside the same DTO:
TargetRefDto.intent is an Option and target_ref_dto declines it with
None, so the adapter already refuses to guess wherever refusing is
expressible. The suggested extension asks upstream for that same Option at
the prompt level.

Registry recomputed rather than incremented: 83 declared, 69 live emits,
14 documentary.

Summary by CodeRabbit

  • Bug Fixes

    • Improved reveal prompts so mandatory choices display exactly the available cards and submit the selected card correctly.
    • Optional reveals now include a clear decline option and submit the correct response when declined.
    • Corrected compatibility guidance for unsupported capabilities and clarified targeting behavior.
  • Documentation

    • Updated compatibility capability records and audit counts to reflect the latest supported coverage.

…ect the reveal entry

Two capability-registry entries claimed things the code no longer does.

`local.prompt-family-display-acks-unsupported` still asserted that
`WaitingFor::RevealChoice` falls to `local.prompt-unsupported`. It has not
since the interaction projection landed: `RevealChoice` classifies as
`HumanResponseModel::ExactCandidates`, so the generic path serves it as
`ChooseFromSelection` — one labelled option per revealable card, plus the
empty decline when `optional` (CR 701.20a). What remains is a fidelity gap,
not a coverage one: cards reach the client as names because only a `Select`
schema is reclassified as cards and a one-of list is not one. Per the crate's
rule that a mapping claim must be exhibited rather than asserted, both halves
are now pinned by tests that answer every offered option rather than a
hand-picked one, so neither can pass on candidate ordering.

`ChooseBoardTargetsInput.intent` is a placeholder, which nothing recorded.
The field is required, and all 25 `TargetingIntent` variants are effect
semantics with no neutral member, so every prompt must claim one. Phase has
none to give: `TargetSequenceProjection` describes only the mechanism of the
pick (`TargetSequenceAction`), and deriving intent from the pending spell's
effect would be this adapter inventing game semantics. With one construction
site, every target choice is advertised as `Hostile` — including targeting
your own creature to buff it (CR 115.1) — while the emitted `hostile: false`
contradicts it. The value is left alone, because no available value would be
honest; the gap is declared as `local.targeting-intent-unsourceable` and
commented at the emit site. The asymmetry is visible inside the same DTO:
`TargetRefDto.intent` is an `Option` and `target_ref_dto` declines it with
`None`, so the adapter already refuses to guess wherever refusing is
expressible. The suggested extension asks upstream for that same `Option` at
the prompt level.

Registry recomputed rather than incremented: 83 declared, 69 live emits,
14 documentary.
@matthewevans
matthewevans enabled auto-merge July 27, 2026 23:34
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bf02f88c-50e1-4a5a-a13c-1fcbda601aa4

📥 Commits

Reviewing files that changed from the base of the PR and between e9a268a and 7932886.

📒 Files selected for processing (2)
  • crates/manabrew-compat/CLAUDE.md
  • crates/manabrew-compat/src/lib.rs

📝 Walkthrough

Walkthrough

The compatibility adapter updates reveal-choice response handling tests and targeting documentation, revises unsupported-capability descriptions, and increases the registry and validation counts from 82 to 83 entries.

Changes

Reveal capability fidelity

Layer / File(s) Summary
Reveal selection projection and response mapping
crates/manabrew-compat/src/lib.rs
Reveal choices are tested through ChooseFromSelection; mandatory choices map to single-card SelectCards, while optional choices include one empty-selection decline. Targeting prompt construction documents placeholder-filled intent fields.
Unsupported capability registry reconciliation
crates/manabrew-compat/src/lib.rs, crates/manabrew-compat/CLAUDE.md
Registry descriptions and declared counts are updated for 83 capabilities, with matching uniqueness and exhaustiveness documentation assertions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: real-venus, claytonlin1110, lgray

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the two main changes: declaring the unsourceable targeting intent and correcting the reveal registry entry.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ship/manabrew-targeting-intent

Comment @coderabbitai help to get the list of available commands.

@matthewevans
matthewevans added this pull request to the merge queue Jul 27, 2026
Merged via the queue into main with commit 1b5a997 Jul 28, 2026
15 checks passed
@matthewevans
matthewevans deleted the ship/manabrew-targeting-intent branch July 28, 2026 00:02
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