docs(test): the guest-leftovers header cites the measured middleware path - #1526
Merged
os-sales merged 1 commit intoSep 3, 2026
Merged
Conversation
…path `test/case-guest-branch-leftovers.test.ts`'s header still told a reader that nobody had measured the `plugin-security` middleware path, and instructed them how to read a failure of the cases below it on that basis. The premise had been answered: PR #1515 retired the identical sentence from `src/objects/case.hook.ts` after driving the path against a real server, and this file was the surviving twin. Left standing it would make the next reader either redo a measurement that already exists or under-read a real red. The replacement CITES that measurement rather than re-taking it, and says so in the header itself — the route readings are marked inherited from #1515 and explicitly not re-run here, and the header points at `case.hook.ts`, which carries the full route table at the branch these cases exercise, instead of keeping a second copy that could drift from it. Two things are held rather than flattened into a reassuring sentence. The answer is per-column: `web_to_case` declares exactly `subject`, `description`, `type` and `priority`, so `escalation_reason` is dropped before ObjectQL and before the hook, while `priority` IS declared and a guest does reach that column by design — which is the column item 2 of the file is about. And the 401s do not make the guest branch redundant: what holds is the form's declared field list, a product decision rather than a security declaration, measured as such in #1515. Comment only. The executable code is byte-identical — comment-stripped and blank-stripped, both revisions are 132 lines with sha256 e7cd06ef49c80e610787a26708c7e5dc1cc1009f797af76e2f65b939fa757641. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019hUuCQStzXGMFSX4dzww5t
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
Fixes #1516
test/case-guest-branch-leftovers.test.ts's header still said theplugin-securitymiddleware path was unmeasured, and used that to instruct a reader how to read a failure of the cases below it. The premise had been answered — PR #1515 retired the identical sentence fromsrc/objects/case.hook.tsafter measuring the path — and this file was the surviving twin. Located by text (git grep -n "nobody has measured"), one hit, in the header docblock.Which route this took, stated up front
Route 2 of the card: cite the measurement, do not re-take it. No server was started for this PR and none of the six anonymous routes was replayed. The header says so in its own words — the readings are marked INHERITED from PR #1515 and explicitly "NOT re-run when this paragraph was rewritten" — because a header that reads as a fresh measurement when nobody re-took it is the exact defect this card exists to fix.
The header also points at
src/objects/case.hook.ts, which carries the full route table at the branch these cases exercise, rather than keeping a second copy of that table here. One producer, one consumer; a copy is a thing that can drift.The one reading that WAS taken here is
web_to_case's declared field list, read offsrc/views/case.view.tson9f59f6a7:subject,description,type,priority. The header marks that asymmetry explicitly rather than blurring it into the inherited half.Why the rewrite is per-column
The suggested one-line summary — "every anonymous write route returns 401 except the form submit, which filters against declared fields" — is true, but flattening it into "so a guest does not reach these columns in production" would have been false of one of the two columns this file pins:
web_to_case's declared list?escalation_reasonprioritypriorityis the column item 2 of the file is about, andsrc/views/case.view.tssays so in its own comment ("this form asks the guest for it"). Writing the reassuring version would have put a false sentence directly above the case that measures the opposite.What the rewrite deliberately keeps
#1133boundary is untouched — that sentence is carried over verbatim, and nothing here widens or narrows it.Verification
pnpm verify(validate && typecheck && lint && lint:i18n-gate && hygiene && hygiene:tokens && build && test) green on the tree that is nowf0ee484f:The suite is identical before and after, measured rather than asserted. Comment-stripped (via the token ratchet's own
stripComments) and blank-stripped, both revisions of the file are 132 lines with the same digest:The target file on its own was green before the edit too (
1 passed / 4 tests), and is inside the 158-file run above.Changeset
.changeset/guest-leftovers-header-cites-the-measurement.md, empty frontmatter — the sanctioned "this PR releases nothing" declaration that.github/workflows/changeset-check.ymldocuments, on par with theskip-changesetlabel. Justification: the diff is one docblock in a test file plus this changeset; nothing undersrc/moved, so no object, field, view, label, page or hook reaches a user. 68 of the 121 changesets onmainuse this form for the same reason, so noskip-changesetlabel is needed or applied.🤖 Generated with Claude Code
https://claude.ai/code/session_019hUuCQStzXGMFSX4dzww5t
Generated by Claude Code