Skip to content

feat(compat): the acceptance list as a file, held to the replay and the recorder; the panic lints on the crate - #129

Merged
aRustyDev merged 3 commits into
mainfrom
chore/compat-acceptance-list
Nov 12, 2026
Merged

aRustyDev merged 3 commits into
mainfrom
chore/compat-acceptance-list

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

What

Third and last change for #51 (#126 is merged; #127 is open and this is stacked on it, so the base is its branch).

  • The acceptance list is a file. crates/thrust-compat-plane/tests/parity/acceptance.csv: 53 rows (S01 to S48, X01 to X03, and X04 and X05, the two routes the 48 rows lack), written by tools/compat-record/gen-acceptance.py from research/0003 section 8.1 and joined with the pinned route inventory, so every route in it is a route of the pin. The state column is data, not derived from the fixtures, so "the fixtures match the served rows" compares two independent things.
  • Held to the replay and the recorder. parity_the_acceptance_list_and_the_replay_name_the_same_rows (in cargo nextest run) and scripts/check-acceptance-list.sh (CI job deps): comm -3 of the served rows with the fixtures' rows and with the recorder's rows (record.py --list-rows, which needs no oracle), of the fixtures' names with the recorder's step names, and no pending row has a fixture. It refuses to pass on an empty list.
  • The change classifier now runs the Rust jobs for tools/compat-record/, the research table and the inventory CSV. Without it, a PR that only drops a step from record.py would skip deps, which is the PR the guard is for.
  • thrust-compat-plane gets the panic lints ([lints] workspace = true, ADR-0006), as thrust-api-v1 and thrust-plane-types have.
  • docs/src/testing/status.md G-28: the 17 breaks-clients quirks that name an internal or auth route and where each is held, which are held by a deviation instead, and the 500s that are not reproduced.

#51's acceptance criteria

Criterion Where
parity_plane_500_bodies, each variant against a fixture, a changed byte fails #126
INTERNAL_SERVER_ERROR over compat and v1 sources matches only the helper #126: scripts/check-plane-500.sh, stricter (it matches nothing, the helper is in its own crate)
A contract test reproduces one recorded 500 on a route of the list on all four targets; the next request succeeds #127 (per_page=0 on S47, recorded on the pin). Its four-target CI result is on #127's merge-commit run
The replay and oracle route set come from the list, and comm -3 is empty this PR
EX-001 and EX-002 read rust_expectation: reproduce already so in tools/oracle-v1/exceptions.yaml (vendored by #58); the fork-branch copy the issue names is the pre-import one

Evidence

Check Result
cargo nextest run -p thrust-compat-plane -p thrust-plane-types -p thrust-api-v1 1267 passed (2 new)
Controls for the guard --self-test runs 11 cases (a missing, an extra and a pending row, a row nothing records, a list with no rows, a recorder that lists nothing, a missing or empty fixtures directory) plus the generator's (an invented route is refused). With S45.json taken out of the real tree, both comparisons name S45 and the script exits 1. The Rust test has its own control that disagrees on purpose. A bug in the self-test itself was found and fixed on the way: a shell function was overwriting its caller's label, so every case was reported under another case's name.
Classifier (.github/scripts/tests/test-ci-scripts.sh, under dash) passed=56 bad=0, four new cases, one of them a look-alike path that must stay docs
clippy --workspace --all-targets -D warnings, the Worker's wasm32 clippy, cargo fmt --all --check, scripts/check-deps.sh, scripts/check-plane-500.sh all clean

The lints

The library had eight sites (seven indexes and an expect), each in range by construction; each is now a lookup that cannot panic and answers what it answered, and the compat tests pass unchanged. The test code had many more, all in helpers that clippy.toml's #[test] exemption does not reach, so those files take the file-level #![allow(.., reason = "..")] that clippy.toml documents and the v1 tests use. The asset stage's own library code (merged while this was open) needed no change.

Read before merging

Fixes #51

🤖 Generated with Claude Code

aRustyDev and others added 3 commits November 11, 2026 19:17
…e of 0 and PQ-403

The internal API answered a failure with thrust-api's own shape,
{"error":{"code":"internal",...}}, an object where the React client reads a
string (research/0007 PQ-107), and an unavailable identity provider as a 502.
PlaneError now answers CoreError::Internal and ::Upstream as the pin's catch-all
500 through thrust_plane_types::plane_500, in into_response, so it holds for `?`
on a CoreError and for a PlaneError::Other built by hand. PlaneError::internal
(cause) is for a request the pin fails on purpose; the cause is the log's and is
never in the body. Every other CoreError answers exactly as before.

S47 (the work-item list) answered 400 for a page size of 0 or less, in a comment
that said the pin answers 500. That was read from the pin's source. It is now
recorded: tools/compat-record/record.py gets nine exchanges, from two recordings
on two fresh stacks (X02 included in the second), and only S47.json changes.
The pin answers 500 for per_page 0, -1 and 0 with a cursor, and for a cursor to
the previous page whose size is not the page size (PQ-403, which the catalogue
had from source only). It is the pin's last check: a cursor that is no cursor,
a window that would start before the first row (page x size < 0), a change date
that is no date and filters that are not JSON each answer their own 400 first,
and a size of 0 on a page before the first has offset 0 and is a 500. The list
now does the same: the offset check takes the size into account, and the 500 is
made in window(), after every other check.

A test is edited on purpose. a_page_size_is_a_whole_number_from_one_to_the_cap
had the cases zero and negative asserting Thrust's own 400, and its comment said
"the pin's being a 500". That was a placeholder for a deviation which round 27
(reproduce every 500) superseded and which the recording now shows is wrong about
the pin, so the test was wrong, not the code. The two cases are not removed
into nothing: they are in the_pins_500_is_the_last_check_of_the_page (nine cases,
each an exchange of the S47 fixture, with the order of the checks) and in two
generated tests over the size range.

Also: a contract test on every target (the 500, its exact body, no cause in it,
the next request answered, and the controls); EXPECT_MAIN 57 to 58; DEVIATIONS
D-028 (4) no longer lists the page size as a deviation.

Not done: D-028 (4) also lists `is_draft: true` and `archived_at` on a creation,
for which the pin answers 500. The S48 fixture holds no such exchange, so it is
from source and is not reproduced here.

Refs: plane-byd.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Brings in the asset stage (#124). The three conflicts are the contract suite's
expected count (main 59 plus this change's one test is 60), the architecture
page's sentence about the compat crate, and DEVIATIONS D-028. The tree is the
one of the rebased commit that was tested: 1265 tests in the three Plane-shaped
crates, the contract suite's main pass 60 of 60 on native-memory, and clippy
clean over the workspace.

Refs: plane-byd.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…he recorder; the panic lints on the crate

F-X13 as revised in round 29 says the compat plane's replay and oracle
obligation is the acceptance list. It existed only as a table in research/0003
and the 290-row inventory of round 26. It is now a file,
crates/thrust-compat-plane/tests/parity/acceptance.csv: 53 rows (S01 to S48, X01
to X03, and X04 and X05, the two routes the 48 rows lack), written by
tools/compat-record/gen-acceptance.py from the table and joined with the pinned
route inventory, so every route in it is a route of the pin. The state column
is data and not derived from the fixtures, so "the fixtures match the served
rows" compares two things.

It is held to the rest in two places. parity_the_acceptance_list_and_the_replay_
name_the_same_rows runs in cargo nextest, with a control that disagrees on
purpose. scripts/check-acceptance-list.sh runs in the deps job and takes the
`comm -3` of the served rows with the fixtures' rows and with the recorder's
(record.py --list-rows, which needs no oracle), of the fixtures' names with the
recorder's step names, and requires that no pending row has a fixture; it
refuses to pass on an empty list, and its --self-test refuses a missing, an
extra and a pending row. With S45.json taken out of the real tree both
comparisons name S45.

The change classifier now runs the Rust jobs for tools/compat-record/, the
research table and the inventory CSV: a change to the recorder alone, such as
dropping a step, was the one this guard is for and would have skipped it.

thrust-compat-plane now has [lints] workspace = true (ADR-0006), as thrust-api-v1
and thrust-plane-types do. The library had eight sites, seven indexes and an
expect, each in range by construction (an index built by the same function, a
key a check above had found, an object made a line before); each is now a lookup
that cannot panic and answers what it answered, and the compat tests pass
unchanged. The test code had many more, in helpers that clippy.toml's #[test]
exemption does not reach; those files take the documented file-level
#![allow(.., reason = "..")], as the v1 tests do. The asset stage's own library
code needed no change.

docs/src/testing/status.md gets G-28: the 17 breaks-clients quirks of
research/0007 that name an internal or auth route, and where each is held; which
are held by a deviation instead (D-022, D-024, D-028 (1), next_path.rs); the 36
that are not mapped; and the 500s on a route of the list that are not reproduced
and so not claimed.

Refs: plane-byd.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Base automatically changed from feat/compat-plane-500 to main November 12, 2026 00:59
@aRustyDev
aRustyDev merged commit bd64f84 into main Nov 12, 2026
34 checks passed
@aRustyDev
aRustyDev deleted the chore/compat-acceptance-list branch November 12, 2026 00:59
aRustyDev added a commit that referenced this pull request Nov 12, 2026
main moved by #127 and #129. Three conflicts, and three things the merge made necessary:

- scripts/contract.sh: EXPECT_MAIN is 62 (main's 60, and the two sign-out contract tests).
- status.md: main took G-28 (the acceptance list); the sign-out's row is G-29. PLAN.md keeps
  main's text and this branch's #44 sentence.
- X06 joins the acceptance list (tools/compat-record/gen-acceptance.py EXTRA, regenerated
  acceptance.csv: 54 rows), since the list is now held to the fixtures and the recorder.
  POST /auth/sign-out/ is a route of the pinned inventory, which the generator checks.
- tests/sign_out.rs carries the crate's test-code lint allowance, now that the panic lints
  apply to thrust-compat-plane (#129).

Refs: plane-byd.3
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.

chore(api): one plane_500() helper for reproduced 500s; compat parity scoped to the acceptance list

1 participant