Skip to content

fix(tilt): stop card-data self-triggering on its own generated outputs - #6263

Merged
matthewevans merged 1 commit into
phase-rs:mainfrom
lgray:fix/tilt-card-data-selftrigger
Jul 21, 2026
Merged

fix(tilt): stop card-data self-triggering on its own generated outputs#6263
matthewevans merged 1 commit into
phase-rs:mainfrom
lgray:fix/tilt-card-data-selftrigger

Conversation

@lgray

@lgray lgray commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Summary

Tilt's card-data resource watches crates/engine/data/ (via ENGINE_SRC in its deps), but gen-card-data.sh promotes three tracked files into that directory — known-tokens.toml, oracle-subtypes.json, and mtgjson-vintage. Each promote changes a watched dep, which re-fires card-data, which regenerates and promotes again: an infinite regen loop that also rebuilds the engine on every iteration. This adds those three generated outputs to card-data's ignore list (extending the existing TMP_IGNORE self-restart guard) so the resource no longer triggers on its own output.

The .tmp. infix the script already uses (covered by TMP_IGNORE) silences the staging writes, but the final promote writes the real tracked file, which TMP_IGNORE can't mask — hence the explicit output paths here.

Implementation method (required)

Method: not-applicable — Tilt dev-loop watch configuration (build tooling); no engine, parser, or game-logic change.

CR references

None — no rules code touched.

Verification

  • Required checks ran clean, or the exact CI-owned alternative is stated below.

  • Gate A output below is for the current committed head.

  • Final review-impl below is clean for the current committed head.

  • Both anchors cite existing analogous code at the same seam.

  • scripts/check-parser-combinators.sh — Gate A PASS (no parser file in the diff; Tiltfile-only change).

  • git ls-files crates/engine/data/known-tokens.toml, oracle-subtypes.json, mtgjson-vintage — confirms the three ignored paths are exactly the tracked files gen-card-data.sh promotes there (script: TOKENS_FILE L240, --write-subtypes oracle-subtypes L278, MTGJSON_VINTAGE_FILE L119).

  • ignore is per-resource: the engine resources (clippy, test-engine, wasm, build-native) keep deps = ENGINE_SRC with ignore = TMP_IGNORE unchanged, so a genuine crates/engine/data/ change still rebuilds the engine.

Final review-impl: not run — non-engine build-tooling change with no /review-impl engine surface. Flagged honestly rather than emitting a placeholder PASS.

Gate A

Gate A PASS head=d886ee7af49a8bb48ebca5d99af49d023ea18e5b base=836ff312ae2073c99af28d286b0c4915faa8a458

Anchored on

  • Tiltfile:23 — TMP_IGNORE, the existing per-resource self-restart guard this fix extends (same failure mode: a resource's own writes re-triggering it).
  • Tiltfile:230 — draft-pools, the sibling data resource already wired correctly: deps = DRAFT_CORE_SRC + ['data/mtgjson/sets/'] watches its input, not its output directory.

Claimed parse impact

None.

card-data's deps include crates/engine/data/, but gen-card-data.sh promotes
known-tokens.toml, oracle-subtypes.json, and mtgjson-vintage into that directory.
Each promote changes a watched dep, re-firing card-data in an infinite regen loop
(and rebuilding the engine repeatedly). Add the three generated tracked files to
card-data's ignore list, mirroring the existing TMP_IGNORE guard; the engine
resources still watch crates/engine/data/ in full, so a genuine data change still
rebuilds the engine.

Assisted-by: ClaudeCode:claude-opus-4.8
@lgray
lgray requested a review from matthewevans as a code owner July 21, 2026 05:25
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@matthewevans
matthewevans merged commit ea4612b into phase-rs:main Jul 21, 2026
11 checks passed
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.

2 participants