Repository navigation
feat(compat): the acceptance list as a file, held to the replay and the recorder; the panic lints on the crate - #129
Merged
Conversation
…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]>
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]>
This was referenced Nov 12, 2026
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.
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).
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 bytools/compat-record/gen-acceptance.pyfromresearch/0003section 8.1 and joined with the pinned route inventory, so every route in it is a route of the pin. Thestatecolumn is data, not derived from the fixtures, so "the fixtures match the served rows" compares two independent things.parity_the_acceptance_list_and_the_replay_name_the_same_rows(incargo nextest run) andscripts/check-acceptance-list.sh(CI jobdeps):comm -3of 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.tools/compat-record/, the research table and the inventory CSV. Without it, a PR that only drops a step fromrecord.pywould skipdeps, which is the PR the guard is for.thrust-compat-planegets the panic lints ([lints] workspace = true, ADR-0006), asthrust-api-v1andthrust-plane-typeshave.docs/src/testing/status.mdG-28: the 17breaks-clientsquirks 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
parity_plane_500_bodies, each variant against a fixture, a changed byte failsINTERNAL_SERVER_ERRORover compat and v1 sources matches only the helperscripts/check-plane-500.sh, stricter (it matches nothing, the helper is in its own crate)per_page=0on S47, recorded on the pin). Its four-target CI result is on #127's merge-commit runcomm -3is emptyrust_expectation: reproducetools/oracle-v1/exceptions.yaml(vendored by #58); the fork-branch copy the issue names is the pre-import oneEvidence
cargo nextest run -p thrust-compat-plane -p thrust-plane-types -p thrust-api-v1--self-testruns 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). WithS45.jsontaken out of the real tree, both comparisons nameS45and 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'slabel, so every case was reported under another case's name..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--workspace --all-targets -D warnings, the Worker's wasm32 clippy,cargo fmt --all --check,scripts/check-deps.sh,scripts/check-plane-500.shThe 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 thatclippy.toml's#[test]exemption does not reach, so those files take the file-level#![allow(.., reason = "..")]thatclippy.tomldocuments and the v1 tests use. The asset stage's own library code (merged while this was open) needed no change.Read before merging
Fixes #51is on this PR, and some of what chore(api): oneplane_500()helper for reproduced 500s; compat parity scoped to the acceptance list #51's round-27 decision covers is not done. The issue's own criteria are met (table above), but these are 500s of the pin on a route of the list that I have not reproduced, because none is recorded:is_draft: trueandarchived_aton S48's creation (D-028 (4)); a body that is no JSON object on X03 and, by PQ-108, the other internal writes (the pin 500s, here a 400); anIntegrityErroron S14 that is not a unique violation (PQ-407, no known trigger); aper_pagebeyondi64(the pin would very likely 500). They are listed in G-28. I have not filed an issue for them: say so if you want one, and I will draft it. If you would rather chore(api): oneplane_500()helper for reproduced 500s; compat parity scoped to the acceptance list #51 stay open until they are done, remove the keyword.breaks-clientsquirks is partial. The 17 rows for internal and auth routes are done; the other 36 (PQ-0xx, 3xx, 5xx, 6xx) describe/api/v1or both planes and are not mapped to the list one by one. G-28 says so.mainafter feat(compat): answer a reproduced 500 as the pin does; S47's page size of 0 and PQ-403 #127 merges.Fixes #51
🤖 Generated with Claude Code