Skip to content

Partial: Archnemesis - #6993

Open
JacobWoodson wants to merge 1 commit into
phase-rs:mainfrom
JacobWoodson:card/archnemesis
Open

Partial: Archnemesis#6993
JacobWoodson wants to merge 1 commit into
phase-rs:mainfrom
JacobWoodson:card/archnemesis

Conversation

@JacobWoodson

Copy link
Copy Markdown
Contributor

Summary

Fixes a parse-fidelity defect on Archnemesis.

Issue: "that player loses 2 life" parses to LoseLife{target: TriggeringPlayer}, which for a YouAttack (AttackersDeclared) event resolves to the attacking player (you) instead of the enchanted/defending opponent — so the controller loses 2 life, not the attacked player.

Files changed

  • C:\Users\jacob\source\repos\phase-card-runs\crates\engine\src\parser\oracle_trigger.rs
  • C:\Users\jacob\source\repos\phase-card-runs\crates\engine\src\parser\oracle_effect\subject.rs
  • C:\Users\jacob\source\repos\phase-card-runs\crates\engine\src\parser\oracle_trigger_tests.rs
  • C:\Users\jacob\source\repos\phase-card-runs\crates\engine\tests\integration\main.rs
  • C:\Users\jacob\source\repos\phase-card-runs\crates\engine\tests\integration\archnemesis_you_attack_enchanted_player.rs

CR references

  • CR 303.4b
  • CR 508.1a
  • CR 608.2k

Track

Developer

LLM

Model: claude-opus-4-8
Thinking: high

Tier: Frontier

Verification

  • cargo fmt --all — pass (clean, no changes emitted)
  • ./scripts/check-parser-combinators.sh — pass (Gate G PASS + Gate A PASS, exit 0, incl. Family-D self-test + cross-product scan). Raw invocation exits 1 ONLY because the WindowsApps python3 stub fails Family-D's self-test = the pre-declared env limitation; masking the stub exposed a real msys2 python3 and the full gate passed.
  • cargo clippy-strict — pass (clean, no warnings/errors)
  • cargo test -p phase-engine — FAIL (18474 passed, 1 failed, 6 ignored). Single failure is an unrelated Windows path-separator census test; see failures[].
  • cargo export-cards data --stats --sidecar-dir client/public --output client/public/card-data.json && cp -> data/card-data.json — pass (card-data.json regenerated against THIS branch; both files fresh & identical 98,176,031 bytes). NOTE: the given recipe omitted --output, which writes the export to STDOUT (not the file) and would have cp'd a stale file; added --output to satisfy the step's stated intent.
  • cargo coverage — pass (Archnemesis supported:true gap_count:0; all parse_details supported)
  • cargo semantic-audit — pass (exit 0; Archnemesis has 0 findings — absent from flagged_cards among 32700 supported cards audited)

Scope Expansion

Fixed both facets of the one misparsed clause per the approved plan (wrong effect target AND the missing enchanted-player firing scope); hardened plan Edit 3 with a subject-phrase guard so "that attacking player" on Curse of Chaos/Inertia/Shallow Graves does not regress to AttachedTo.

Validation Failures

See review/cross-check notes.

CI Failures

  • cargo test -p phase-engine: 1 of 18475 tests failed -> game::engine::stage2_injector_tests::the_cr_603_5_prompt_census_is_pinned_so_a_sixth_producer_is_a_counted_event (crates/engine/src/game/engine.rs:15185). ROOT CAUSE: Windows path-separator portability bug in the test itself, NOT a code/card defect. The test builds rel from PathBuf.display().to_string() (yields backslashes on Windows) and asserts equality against hardcoded forward-slash literals like "game/effects/mod.rs:5999". left/right differ ONLY by \ vs /; the count assertions (producers.len()==5, readers==7, in_test==25) all passed. UNRELATED to Archnemesis and to this branch (none of the pinned files -- game/effects/mod.rs, scoped_library_search.rs, engine.rs:11427 -- are in the branch diff); the test is green in CI/Linux and self-documents its env fragility ('THIS ROW FAILS IN CI BEFORE IT FAILS LOCALLY'). NOT FIXED: it is another agent's actively-maintained file (detailed drift log with commit refs); modifying it is out of scope for card verification and prohibited by CLAUDE.md multi-agent safety. Deterministic separator mismatch, so retry has no value. This is the ONLY reason passed=false; every Archnemesis-specific check is green (coverage supported:true gap:0; semantic-audit 0 findings; fmt/gate/clippy all clean).

@github-actions github-actions Bot added the needs-maintainer AI-contribution PR requires human triage (Non-dev track or unresolved gaps) label Aug 4, 2026
@matthewevans matthewevans self-assigned this Aug 4, 2026

@matthewevans matthewevans left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes — the trigger parsing is close, but two correctness gates remain.

🟡 Medium

[MED] CR 608.2k is not provenance for resolving a player anaphor. Evidence: crates/engine/src/parser/oracle_trigger.rs:992-1001,1216-1221 and crates/engine/src/parser/oracle_effect/subject.rs:2127-2141,2661-2675 cite it for binding “that player” after “attack enchanted player.” The verified rule says, “If an ability’s effect refers to a specific untargeted object that has been previously referred to by that ability’s cost or trigger condition, it still affects that object even if the object has changed characteristics.” That is object persistence, not player-anaphora resolution. CR 303.4b supports only that an Aura’s attached object or player is “enchanted.” Why it matters: the annotation asserts rules support the parser’s referent choice when it does not. Suggested fix: remove or replace the unrelated 608.2k citations; retain only verified annotations that describe the implemented behavior.

[MED] The attacker-preservation branch lacks a resolved-behavior regression. Evidence: crates/engine/src/parser/oracle_effect/subject.rs:2661-2675 deliberately excludes that attacking player from the enchanted-player rebinding, while crates/engine/tests/integration/curse_attack_triggers.rs:117-155 only asserts that Curse triggers reach the stack. Why it matters: a stack-presence test cannot show whether Curse of Chaos’s recipient bound to the attacker rather than the enchanted player. Suggested fix: add a discriminating Curse of Chaos resolution test that distinguishes the attacker from the enchanted player and proves the resolved recipient is the attacker.

Evidence status

The current-head parse-diff sticky comment is absent, and Rust lint/tests are still pending for b03d830f720151f19de08c8417f79342ed02dc88. Those are evidence/status gaps, not an additional substantive blocker in this review. The branch is BEHIND only on release/lockfile maintainer churn; no rebase is requested.

Recommendation: address the two findings above, then request re-review on the updated head.

@matthewevans matthewevans removed their assignment Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Generated for head b03d830f720151f19de08c8417f79342ed02dc88.

Parse changes introduced by this PR · 1 card(s), 2 signature(s) (baseline: main a970e5548f30)

🟢 Added (1 signature)

  • 1 card · ➕ trigger/Attacks · added: Attacks (active in=battlefield, valid source=controller, valid target=attached permanent)
    • Affected (first 3): Archnemesis

🔴 Removed (1 signature)

  • 1 card · ➖ trigger/YouAttack · removed: YouAttack (active in=battlefield)
    • Affected (first 3): Archnemesis

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

Labels

needs-maintainer AI-contribution PR requires human triage (Non-dev track or unresolved gaps)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants