fix(scripts): give the objectui changeset digest #6923's leading-blank-line preamble, and widen the family assertion to that row (#7044) - #7162
Merged
os-project-manager merged 1 commit intoAug 10, 2026
Conversation
…k-line preamble (#7044) `objectui-changeset-digest.mjs` is the fourth carrier of this repo's changeset frontmatter parser. #7004 aligned its entry regex with the three gates; it never got #6923's other half, so it still required the opening fence on line 1. A changeset opening with a single blank line therefore declared nothing here, which makes it read `release-nothing` and drops the commit out of the release digest entirely -- #4731's harm, reached through the parser. Measured with @changesets/parse@0.4.3 (the version this repo resolves): every leading-blank-line form below is a real `major` to changesets, and was `{}` to this file. Second half, and the one that stops the recurrence: #7004's family-agreement assertion in `check-empty-changeset.mjs`'s self-test now covers the fence preamble as well as the entry regex. Per file it asserts the opening fence is tested at the cursor the blank-line skip advanced (never at a literal `lines[0]`), and that the statement immediately above that test is the family's byte-identical skip. Extraction is by position, not by content, so the agreement is a real comparison; a shared-but-stale statement is rejected by name. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F8q5J1MQyocgtNspb15fSn
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
os-project-manager
marked this pull request as ready for review
August 10, 2026 02:30
os-project-manager
deleted the
claude/issue-7044-digest-leading-blank-line
branch
August 10, 2026 02:46
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 #7044
What was wrong
scripts/objectui-changeset-digest.mjsis the fourth carrier of this repo's changeset-frontmatter parser. #7004 aligned its entry regex with the three gates. It never got #6923's other half — it still required the opening fence on line 1:The three gates all skip leading blank lines first. So a changeset opening with a single blank line declared, to this file, nothing at all — which makes it read
release-nothing, and the commit leaves the release digest entirely. Not a red or a green: a silent DROP, #4731's harm class, worst for exactly the class #4731 says must never vanish.Measured here rather than inherited from the card, with
@changesets/parse@0.4.3(the version this repo resolves) loaded against the shippedparseChangeset:changesets honours the bump in every row. The digest saw none of them — and handed back the raw frontmatter text as the entry
summaryon top of it.Half 1 — the parser
parseChangesetnow carries the family's preamble, byte for byte, and tests the fence at the cursor that skip advanced. Unfenced input is unaffected: the trailing blank-skip that follows already consumed those lines, sobodyandsummaryare identical to before (pinned as D7).Half 2 — the family assertion (the half that stops the recurrence)
#7004's family-agreement assertion (in
check-empty-changeset.mjs's self-test) covered the entry regex and the whole-line-comment guard. It did not cover the fence preamble — which is precisely why this row survived three alignment passes with nothing mechanical holding it.It now covers that row too. Per file, it asserts:
lines[0]— the objectui-changeset-digest's frontmatter parser never got #6923's leading-blank-line fix — a changeset opening with a blank line drops out of the release digest #7044 shape itself, so a preamble sitting dead beside a survivinglines[0]is caught;Comment lines are blanked before scanning (indices preserved): two of these files quote the old
lines[0]spelling in their headers while explaining why it was wrong, and a scan that read prose would find the defect inside the account of its own fix.check-empty-changeset.mjsalso gains the behavioural half on its own parser. Its existing leading-blank row (isEmptyDeclaration('\n---\n\n---\n\nbody\n')) is empty either way and cannot fail on the preamble's removal; a declaring file opening with a blank line can, and now does.Verification — both directions, run and quoted
105 -> 118assertions incheck-empty-changeset --self-test; 7 new D-rows in the digest's.A. Digest preamble removed (the issue's own shape) — predicted D1-D4 red on
packagesgoing{}, D5 red the other way (the summary becomes the fence text), D6/D7 green. All four halves as predicted:and the family assertion, in the same state:
B. Preamble present but DEAD (skip restored, fence left at
lines[0]) — 1 failure, the cursor assertion. This is the case a spelling-only check would have passed.C. Preamble removed from a GATE instead (
check-adr-0087-registration.mjs, digest correct) — the agreement fires naming that file. The assertion is symmetric across the family, not digest-specific.D. All four identically stale — the agreement is satisfied (one distinct spelling) and the fourth assertion refuses it by name:
the shared statement before the fence test must be the leading-blank-line skip itself (#6923) -- found "let i = 0;".check-empty-changeset's two new behavioural rows go red in the same state, andcheck-changeset-no-major --self-testreports its three #6923 fixtures red — the family's existing coverage, still load-bearing.Restored state, all green:
Changeset
None, and the
skip-changesetlabel instead. The diff is twoscripts/*.mjsfiles: it releases no package, and an empty-frontmatter changeset is exactly whatcheck-empty-changeset.mjsrejects. Same disposition as #7048 / #7008 / #6983 / #6917 / #7104 / #7106.Honest negatives
pnpm check:type-check-debtcould not be run locally: it refuses to measure without the built workspace closure ([finding][devx]check:type-check-debt的 ledger 余量会让新写的 pin 变哑:mongodb 曾有 33 条余量吞掉一次真实回退,另有 5 条目前带 4–19 余量 #6376) and this diff builds no packages. It touches zero TypeScript, so the ledger cannot move; CI builds the closure before that step and is the real read.Generated by Claude Code