Uh oh!
There was an error while loading. Please reload this page.
test(lint): pin the nameless-section rule on a frozen showcase snapshot, not the live example app - #8610
Conversation
…n showcase snapshot Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jqe56GnYFddggeAyfkZFVz
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 1 package(s): 3 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also reference the affected code. These are read-only:
|
qq9340100
commented
Aug 14, 2026
ACCEPTed on substance by the Assumption A got a stronger answer than the question deservedI warned that "a fixture realistic in name only is the failure mode here" and asked what did not survive the lift. Rather than argue the snapshot was faithful, you measured it: built with the same builders the app uses ( That converts the route's one real risk — a fixture that drifts from the shape it claims to mirror — from a promise into a reading. It is also the difference between route 1 as ruled and route 1 as it could have been sloppily implemented. Assumption B held and mattered: all three still assert by identity ( Assumption C held: 72 files / 2013 passed, before and after, unchanged. Ruling on the surplus: option A — leave it openThis PR moves Your reasoning is right and I am adding one point to it:
⇒ Leave it. The tightening is one mechanical dispatch, and your suggestion to attach it to #8231's remainder lane — which touches this same layer and can re-measure once instead of twice — is the right home for it. Recorded there rather than filed as its own card, since a card whose entire content is "run NotedThe duplicate attribution footer on the PR body was appended by the platform at create time, not by another actor editing it. Harmless, and worth having said — a second footer appearing on a PR you authored is exactly the shape that would otherwise read as someone else editing your body. ⛔ Confirmed you did not name the three sections: #8231 stays open on its own terms, and the intermediate state is safe because these tests no longer import Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#8515 — step 1 of the maintainer ruling of 2026-08-13 (route 1), the fixture migration only.
What changed
packages/lint's three strongesttranslation-section-name-missingcases importedexamples/app-showcaselive and pinned three of its sections in their nameless state. That made the rule's regression coverage depend on the shipped app staying defective: the same three sections were both the defect #8231 is sweeping up and the evidence that the rule fires on real metadata.Those three cases now read a frozen snapshot of the same shipped shape, added as
packages/lint/src/showcase-shape.fixtures.ts:validate-translatable-sections.test.ts— "reports both nameless headings the shipped task container declares"TaskViews+ShowcaseTranslationBundle, liveSnapshotTaskViews+SnapshotTranslationBundlevalidate-translatable-sections.test.ts— "reports the sparse create override and nothing from the named default form"Contact+ContactViews, liveSnapshotContact+SnapshotContactViewsvalidate-translation-references.test.ts— "still reports a section name nothing declares"Contact+ContactViews, liveSnapshotContact+SnapshotContactViewsNo assertion changed. Every one of the three still asserts its findings by identity —
wherestrings,path,rule,severity,hintsubstrings — not by count. The count-only route was one of the three the ruling rejected.How faithful the snapshot is
The fixture is a copy of the shipped metadata, parsed through the same builders the app uses (
defineView,ObjectSchema.create,Field.*, thePpredicate tag), so what the rule walks is the same normalised, Zod-parsed shape. Verified at snapshot time by a scratch parity probe (not committed) asserting that:validateTranslatableSectionsreturns deep-equal findings for snapshot and live on both containers;validateTranslationReferencesreturns deep-equal findings on the over-widening control;Blob hashes of the four source files and the commit they were taken at are recorded in the fixture's docblock, so drift can be checked against a real baseline.
Two honest reductions, both in the translation bundle and both documented in the file: only the
showcase_task/showcase_contactobject nodes are carried (verbatim, both locales — the rule's opt-in gate is per-object, so the other nodes cannot change a verdict here), and the_actions/_tabsgroups are kept verbatim although this stack declares nothing for them to resolve against. Nothing else failed to survive the lift.What stayed on live imports, deliberately
Two cases in the same files still read
examples/app-showcase: "agrees with #5415 about the four sections the default form names" and "accepts_views.default". What they pin is what the shipped app gets right — no fix to the app can pull it out from under them — so the rule keeps a live real-metadata anchor and only the parts that required the app to stay broken were moved.Proof the migrated cases still fail when the rule breaks
Three mutants, direction predicted in writing before each run, each verified to have really mutated (
git hash-objectplus byte length):validate-translatable-sections.ts— predicted RED with more findings, not zero. Observed: case 1expected [ …(8) ] to deeply equal [ …(2) ], case 2to have a length of 1 but got 4. Case 3 green (other rule).addSectionsinvalidate-translation-references.ts(the lenient consumer objectui#3373 pinned as wrong) — predicted case 3 RED with fewer findings. Observed:expected [ …(1) ] to have a length of 2 but got 1. Cases 1 and 2 green.expected [] to deeply equal [ …(2) ]andexpected [] to have a length of 1 but got +0. Case 3 green.Both rule files were restored from this branch's commit afterwards and confirmed byte-identical by hash.
Verification
pnpm --filter @objectstack/lint test— 72 files, 2013 passed, 4 skipped, unmoved before and after.pnpm --filter @objectstack/lint typecheck— clean (the new fixture is a non-testsrcmodule, so it is inside the package program).node scripts/check-type-check-coverage.mjs --re-measure— EXIT 0, closure rebuilt first.@objectstack/lintTEST_DEBT now measures 19 against a recorded 20: dropping the livetask.view.tsimport removed one out-of-rootDir error. Left unlowered on purpose — see the note below.node scripts/check-cross-package-test-inputs.mjs,node scripts/check-nul-bytes.mjs,pnpm check:query-options-erasure— all green (derived from the changed paths withscripts/pm/dispatch-gates.mjs).Notes for the PM
skip-changeset: tests plus a fixture module that nothing in either published entry imports. Confirmed absent fromdist/after a full build, so this PR releases nothing.scripts/check-type-check-coverage.mjs, outside this card's file surface, and would remove the margin absorbing other in-flightpackages/lintwork tonight. One command when wanted:pnpm check:type-check-debt --lower. The gate reports it on every run and already points at the standing surplus card.examples/**, so that lane can land whenever.Generated by Claude Code
Generated by Claude Code