Skip to content

Write the room's re-simulation plausibility rule as a pure function in packages/ — the remainder of #465 criterion 3 #487

Description

@mgcronin

What this carries

The remainder of #465's third acceptance
criterion
, which #486 takes #465 to merge without
meeting:

The re-simulation rule written as a pure function in packages/ with a mutation-tested rejection
case (physically impossible power for the declared mass).

ADR 0028 D-2
§"What a room checks" specifies the rule's shape — four numbered rules and a physics version on
the wire — and deliberately does not implement it. The reason is #465's own standard applied to
itself, and it is recorded in that ADR rather than only here: validation code for a room that does
not exist, over a transport that does not exist, with thresholds nobody has agreed, reads to a
reviewer as evidence that the validation question was settled. CLAUDE.md §4a's "a documented
command nobody has run is the most expensive kind of wrong"
, in a new place.

This issue is filed so that the remainder lives in the tracker rather than only in an ADR's prose and
a merged pull request's body — CLAUDE.md §7's named repair for a closing keyword that went further
than intended.

Blocked on

Block What clears it
There is no room (owner decision D6) #7
The W/kg ceilings are nobody's decision yet ADR 0028 Q3. The rule's shape is settled; its numbers are not, and ADR 0006 R1 means the answer has to say where they came from rather than take somebody's table
ADR 0028 D-0's third block Spike 0005 §5 Question A — counsel on US 9,174,085 claim 1

Acceptance criteria

  • The rule is a pure function in packages/, implementing ADR 0028 D-2 rules 1–4: report
    admissibility; a power–duration ceiling judged over a window rather than per sample; a breach
    that flags rather than ejects; and the client/room disagreement published as a signal.
  • A mutation-tested rejection case — an implausible sustained power for the declared mass —
    with the mutation and what went red in the pull request body (CLAUDE.md §5).
  • An admissible-but-extreme case that is not rejected, so the rule is not a function that
    rejects everything. A single 1800 W sample is a sprint; an 1800 W five-minute mean is not a
    person (ADR 0028 D-2 rule 2).
  • An inadmissible report coasts the rider at zero power and is never extrapolated (rule 1),
    asserted rather than described.
  • Q3's ceilings are answered with their provenance recorded, or the function takes them as a
    parameter and the caller supplies them — whichever the answer to Q3 makes true.

Two things the same work should pick up, both from #486's review

  1. The coefficient set ADR 0028 D-1 names lives under apps/, where a room cannot read it.
    RIDING_POSITIONS and GAME_ROLLING_RESISTANCE_COEFFICIENT are in apps/web/src/game/rider.ts,
    and eslint.config.js's boundaries/dependencies block forbids packages/ importing apps/
    (CLAUDE.md §4d). Move them into packages/ and have the game read them from there — one set
    rather than two that can drift. D-1 says so and points here.
  2. A second vector in packages/physics/src/agreement.test.ts at the race's own configuration.
    Today that file pins the package's defaults, which are the base every race configuration is built
    on but not the configuration a race runs (D-1's table). A vector at the race's actual drag area
    and C_RR was deliberately not added in Offline correctness and racing groundwork: the stale rung numbering (#485), the tab left behind by another tab's update (#483), the live-racing patent read (#466) and the race-fairness ADR (#465) #486: the numbers live across a boundary that package
    may not import, so a copied literal would pin a configuration this package cannot see move —
    silently stale, which is the defect shape this repository keeps closing. Once (1) is done the
    vector costs five lines and has a constant to point at.

What this is NOT

Refs #465 · Refs #486 · Refs #16 · Refs #7 · Refs #69

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedWaiting on another issuegameVirtual world, physics, renderingsecuritySecurity-related work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions