Repository navigation
fix(packtest): a template's dummy enters with no score on its name - #1235
Merged
Merged
Conversation
CI red on c2e0e16, tier 2, gallery PackTest: `gallery:watch_npc_warden failed on line 62! Expected #wr_1 dw.sys to match 1, but got 0`. It is a red the suite could always throw; the merge did not make it. Cause. A score belongs to a player's name. PackTest names dummies from a pool, and the CI log shows the warden template's dummy, `Dummy623`, had been "squished too much" two seconds earlier in another template and left before it came back: its name held `dw.deaths` 1 above `dw.death_ack` 0. The template's `function gallery:tick` ran `cp_respawn_check` for the new body; alive, with a second player present (the overlapping `watch_actor_standard_bearer` batch's dummy), the death edge took the respawn-wait path (`rw_start`: tagged `dw_cutscene`, spectator), and the warden's watch (`@p[distance=..8,tag=!dw_cutscene]`) had nobody to face. Whether it reds depends on which name a dummy draws and on which batch overlaps it; the test was under-specified, not the engine wrong. The same template, `cp_respawn_check` and `rw_start` are on 2c71988 and on 187091c; neither the seat nor the gallery's campfire prop is on the path (the edge reaches `rw_start` before any seat is read, and `setup` holds `#cp` at -1). Reproduction (local, the build's own tree cut to the warden template and the standard-bearer one, so a second dummy is present): - as built: 3 of 3 passed; - with the inherited residue planted as the template's first commands (`dw.deaths 1`, `dw.death_ack 0`): `failed on line 64! Expected #wr_1 dw.sys to match 1, but got 0` (62 plus the two planted lines). Fix, the general form: the hard rule for templates is own dummy, own scores, own init, and a reused name breaks "own scores" for every template, not only this one. `compiler::freshbody`, run on the finished tree after `solo` and `handback`, gives every template whose directives carry `# @dummy` `scoreboard players reset @s` as its first command, so its dummy enters as a player who has never joined. Binding: "packtest fresh-body binding: 279 of 279 template(s) carry a dummy and reset every score its name holds before their first command"; `validation/packtest-fresh.json`. Evidence: the planted residue against the fixed build (planted above the reset): 3 of 3 passed. The whole gallery PackTest on the fixed build: all 280 required tests passed. Unit test `freshbody::tests`. Direction: the red could only turn a proof red, never let something ship. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`module_list.rs` red on 74e2c87 (remote `cargo test --workspace --no-fail-fast`: 5047 passed, 2 failed, both here): the compiler module doc list did not name the new module. One line, in declaration order. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A PackTest template's dummy enters with no score on its name
PackTest names dummies from a small pool, and a score belongs to a name, not a body, so a new dummy inherits whatever an earlier dummy of the same name left. Seen in CI on a feature branch: an inherited
dw.deaths 1overdw.death_ack 0sent the warden-watch dummy down the respawn-wait path (taggeddw_cutscene, spectator), and the warden had nobody to face. The same template shape is onmain.compiler::freshbody, aftercompiler::solo: every# @dummytemplate starts withscoreboard players reset @s. Binding line andvalidation/packtest-fresh.json(gallery: 252 of 252).dw.deaths 1/dw.death_ack 0planted in the warden template beside a second dummy's template, the template without the reset fails at the warden's facing assertion; with it, it passes. Whole gallery PackTest 253/253.The wave-compass intermittent on
mainis not explained by this: its scores sit on a fake-player name, rewritten before each assertion.🤖 Generated with Claude Code