Skip to content

Update: State the interceptor sweep limits - #88

Merged
ozgb merged 6 commits into
mainfrom
spec-weapons-1338
Nov 30, 2026
Merged

ozgb merged 6 commits into
mainfrom
spec-weapons-1338

Conversation

@ozgb

@ozgb ozgb commented Nov 29, 2026

Copy link
Copy Markdown
Owner

Spec writer: Claude Code / claude-sonnet-5-5, lead lead.

Judges the leftover review findings of the weapons module (byte-tactics-moddable#1338). Spec only; specs/weapons.md:

  • A cycle of noExplode interceptor projectiles is outside the contract (the reference overflows its stack); short of a cycle the sweep goes to any depth; a module may bound it only above every chain the reference ends; the work it keeps for a sweep is cleared at the start of each sweep.
  • source of DAMAGE and REMOTE_DAMAGE is 0 or a pool unit; any other value is outside the contract.
  • A cell feature at or above Game.featureCount in the area damage rule has no case.
  • The kit pin moves to interfaces-v99 and reference-traces-v63, the next free tags, which hold the recording ai-antinuke-pair (Add: A two-level interceptor chain vector byte-tactics-moddable#1353, a two-level chain). This pull request waits for that merge and the tags. The numbers 99 and 63 are the next free ones when written.

Note for the maintainer: a finite chain through a noExplode interceptor can have more levels than the table has entries (the projectile stays undetonated-dead-bit-clear and each later sweep detonates it again), so a bound of 304 covers every chain only where no interceptor is noExplode, as in the game's data.

A cycle of noExplode interceptors is outside the contract, the sweep
may be bounded only above every chain the reference ends, a module
clears a sweep's work at its start, source is 0 or a pool unit, and a
feature index at or above featureCount has no case. The pin moves to
the kit that holds ai-antinuke-pair, a two-level chain.

Assisted-by: Claude:claude-sonnet-5-5
@ozgb

ozgb commented Nov 29, 2026

Copy link
Copy Markdown
Owner Author

Spec reviewer (phase 2, leakage): a fresh reviewer read the diff beside the source and the recording. One must-fix (a noExplode projectile whose detonation ends at step 3 still gets its dead bit set and runs no area damage), applied; the re-read of that paragraph gives approve. Lint passes against an untagged export of the moddable branch. Phase 1 (sandbox) and the implementer session need the kit tags that hold ai-antinuke-pair, so they wait for ozgb/byte-tactics-moddable#1353.

approve

ozgb added 2 commits November 30, 2026 00:35
Assisted-by: Claude:claude-sonnet-5-5
The kit holds ai-antinuke-pair, the two-level interceptor chain.

Assisted-by: Claude:claude-sonnet-5-5
@ozgb

ozgb commented Nov 30, 2026

Copy link
Copy Markdown
Owner Author

Spec reviewer (phase 2, leakage), fresh reviewer, commits 74b54e9..HEAD of spec-weapons-1338: the diff of specs/weapons.md is the one line of section 8 moving the pin from interfaces-v99 and reference-traces-v63 to interfaces-v102 and reference-traces-v64; the earlier approved passages are unchanged, and the kit export at the tags holds tests/replay/weapons/ai-antinuke-pair.txt. speclint passes against the kit exported from interfaces-v102. (The branch also merges btm main at dba94a2.)

approve

The second announcement names the projectile whose sweep it is, the
reach arithmetic is exact, the contract covers chains of up to 300
levels, nested sweeps share one work state cleared at the outermost
sweep, and the feature and source cases are stated.

Assisted-by: Claude:claude-sonnet-5-5
@ozgb

ozgb commented Nov 30, 2026

Copy link
Copy Markdown
Owner Author

Spec reviewer (phase 1, completeness, in the microVM, session p1 of the kit at interfaces-v102 and reference-traces-v64, spec head 3711b0e): verdict changes. Its points and the answers in 1bd197a:

  1. The second SendProjectileDetonated argument is the projectile whose sweep it is, not a weapon, and an event-started record has no table entry: fixed in the area damage rule.
  2. The clearing rule applies to the outermost sweep (nested sweeps share the work state): fixed.
  3. No computable depth bound: the contract is now every chain of up to 300 levels; a longer chain (only a noExplode interceptor can make one) is outside it, like the cycle. This narrows the earlier "to any depth short of a cycle", on the maintainer's cap decision; the maintainer may overrule.
  4. areaOfEffect squared (signed 32-bit product), the 32-bit wrapping differences, the 0xfffe replacement then the skip, and source (the first slot counts; the reference does no pool test): stated.
  5. The "may" licences moved out of the behavioural rules into "outside the contract" statements.

Fresh spec reviewer phase 2 (leakage) on the diff 3711b0e..1bd197a: a first reviewer asked for two must-fixes (the cycle is not limited to projectiles of different weapons; the differences wrap at 32 bits), applied; a fresh reviewer on the revised diff: approve. speclint passes against the kit at the tags.

approve

The recording ai-antinuke-pair showed that a feature not above the
projectile's whole y must not detonate it, which step 7 left open.

Assisted-by: Claude:claude-sonnet-5-5
@ozgb

ozgb commented Nov 30, 2026

Copy link
Copy Markdown
Owner Author

Spec reviewer (phase 2, leakage), fresh reviewer, commits 1bd197a..203f94b of spec-weapons-1338: the diff is one passage, step 7 of "A projectile's collision" (the feature rule), made exact after the implementer's session found that ai-antinuke-pair reaches a feature that is not above the projectile's whole y (it must not detonate the projectile; the old wording left that open, which no earlier recording reached). Checked against the source's three cases; no leakage; speclint passes.

approve

A detonation an event starts passes 0 as the second announced
projectile, and a lineOfSight turret's heading subtracts the unit's.

Assisted-by: Claude:claude-sonnet-5-5
@ozgb

ozgb commented Nov 30, 2026

Copy link
Copy Markdown
Owner Author

Spec reviewer (phase 2, leakage), fresh reviewer, commits 203f94b..6af2d36 of spec-weapons-1338: two passages made exact after code review round 2 (the sandbox reviewer's risk 2 and nit 3): a detonation that an AREA_DAMAGE or DETONATE event starts passes 0 as the second announced projectile (the event's record is no block address, the ABI types the argument as block), and a lineOfSight turret's heading subtracts the unit's heading, as the ballistic one does. Checked against the source; no leakage; speclint passes.

approve

@ozgb
ozgb merged commit f6c3a5d into main Nov 30, 2026
1 check 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.

1 participant