Repository navigation
chore(ratchet): delete the interface-data-api guardrail ratchet - #85
Merged
Merged
Conversation
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.
Why
Antony's goal: every AntelopeJS
guardrails.ratchet.jsondeleted through verified PRs oncampaign/integration, with no fallback and no hidden assertion. interface-data-api had 3 rows left after #84 (W7) removed the 12metadata.tsrows. None needs an AntelopeJS type change. This is the repo's last step: two rows take the ruled countedoxlint-disable-next-line(Antony's 2026-10-31 evening ruling), the third is refactored away, andratchet:updatedeletes the file. Based oncampaign/integrationd20fad6.What changed
Three commits.
chore(ratchet):oxlint-disable-next-linelines,guardrails.suppressions.jsonraise,guardrails.ratchet.jsondeleted bypnpm run ratchet:update.build(sync):pnpm run syncdrops the ratchet step fromlefthook.yml,package.jsonandAGENTS.md.test(data-api): the verifier's fix round.readJson<T>(response)becomesreadJson(schema, response)and returnsschema.parse(JSON.parse(...))(2026-11-02 ~08:20 ruling: a type argument on a client call is an unchecked claim).zod4.5.4 is a devDependency (already in the lockfile). All 91 callers in 17 test files pass a schema;ListResponse<Row>andCreatedRowbecamelistResponseSchema(row)andcreatedRowSchemainsrc/tests/internal/http.ts.validateObjectandvalidateObjectListinsrc/tests/utils.tstake two type parameters (Tfor the parsed row,Efor the expected one).Two traps of the parse, handled:
z.looseObject, so keys a schema does not name pass through and theto.equal(undefined)absence assertions still bite. Proof: withpasswordmade readable inaccess_control.test.ts, the suite goes from 192 passing to 190 passing and 2 failing (expected 'very-secure-qwerty123' to equal undefined); reverted.Product[]typedaddedAtas a Date while the wire gives a string.ShelfListed.bookclaimedauthorId, which the route does not return (the test lists the keys). A list row whose foreign reference is null came back with the key absent, notnull(modifier_key.test.tslist), so its schema isnullish. The schemas state what the wire gives.Rows
CI state (node 24.22.2,
distremoved,GITHUB_BASE_REF=campaign/integration). With every ceiling at 0 on pack 0.2.17,pnpm run ratchetprinted 3 rows.ratchet:updatethen printedDeleted guardrails.ratchet.json: no debt left.Rows before -> after: 3 -> 0.src/internal/field-types.ts:51RowFieldsindex signatureanti-slop/no-unsafe-dictionary-typetype RowFields = Record<string, unknown>(the rule reports it too); a table row holds relation instances and getter results, so no schema-derived value type existssrc/internal/deferred-joined-stream.ts:110(stream as any)[name](...args)typescript/no-unsafe-returnReflect.getinto anunknownlocal,isFunctionguard,Reflect.apply, returnunknown: the finding moves tono-reflect-get,no-reflect-applyandno-unknown-returns, so reverted. The existingSAFETY:stayssrc/tests/internal/http.ts:41readJson<T>typescript/no-unsafe-returnNone is a W7 row and none needs a published-type change.
Suppression budget, approved for these two lines only: lint
anti-slop/no-unsafe-dictionary-type0 -> 1 (field-types.ts:51),typescript/no-unsafe-return0 -> 1 (deferred-joined-stream.ts:110).Proofs
Head dc81892.
CI=true GITHUB_BASE_REF=campaign/integration pnpm run checks,distremoved:Checks: 7 passed, 1 failed.The one failure issuppressions, only on the approved raise. Land withLAND_ADMIN=1or land-raise.sh.pnpm run test: 192 passing.API: 1 packages, 26 entries unchanged against origin/campaign/integration (committed HEAD).
API: skipped test-helper entry ./dist/.d.ts in .; test helpers need a test runner and are outside both proof halves.
Runtime API: 1 packages, 23 entries unchanged against origin/campaign/integration (committed HEAD).
Runtime API: skipped test-helper entry ./dist/.js in .; test helpers need a test runner and are outside both proof halves.
No behavioural probe ran.
Suppressions in authored code files (origin/campaign/integration and committed HEAD). A lint directive counts once per rule it names;
*is a directive naming none.anti-slop/no-unsafe-dictionary-typetypescript/no-unsafe-return@ts-expect-error@ts-ignoreSAFETY:commentsAttention