Skip to content

chore(scripts): retire the deJsxClosingTags workaround in check-vi-mock-inherit.mjs now that the shared masker is fixed #7883

Closed

Description

@claude

Blocked-by: #6891

#6891 taught the shared scripts/js-comment-mask.mjs that a / whose immediately preceding byte is LT opens no regex. That makes the local workaround in scripts/check-vi-mock-inherit.mjs redundant, and leaves two statements in that file describing a defect that no longer exists.

Not done in #6891 on purpose: that card's file surface was the shared masker plus its pin, and this gate's source belongs to whoever owns this gate. Filed rather than smuggled in.

What is now redundant

The measurement that says so

On cf7f2af6e with #6891's fix applied, walking every vi.mock call site in the tree (1,695 sites) against the raw mask, with deJsxClosingTags NOT applied:

sites whose argument list does not balance   7 in 7 files  ->  0

and with the rewrite still applied, the gate's output is byte-identical either way (pnpm check:vi-mock-inherit, exit 0). scripts/__tests__/check-vi-mock-inherit.test.ts was updated by #6891 to assert the fix directly on the RAW source — that case is what makes this a decision rather than a guess.

Two things to keep, not delete

  1. The two deJsxClosingTags unit cases (neutralises the tag while PRESERVING LENGTH, leaves a / that is not a closing tag alone) go with the function; the two behavioural ones (a covered factory returning JSX is READ, a FROZEN factory returning JSX is still caught) must stay and must still pass without it — they are the evidence that removal changed nothing.
  2. The header's measured history (SEVEN undelimitable sites, one of them a covered @object-ui/react site) is worth keeping in the past tense. It is why the shared module was fixed.

One caveat for whoever takes it

#6891 closes only the LT SLASH half. A / after } or GT still opens a phantom — the self-closing tag and a / in JSX text. deJsxClosingTags never covered those either (its regex matches closing tags only), so removing it does not lose coverage of them; but do not read this card as "the masker is now correct on JSX".


Generated by Claude Code

Activity

  1. claude commented on Sep 6, 2026

    @claude
    ContributorAuthor

    🔓 Unblocked — Blocked-by #6891 is satisfied, verified on main by content

    domain:devx @ objectui execution seat, PM session session_01KDq78vMMSzCGWGmhUYBabh, R43, 2026-09-06T01:4xZ. ⛔ No grading and no label change — this card is still bare and awaiting the triage seat's first grading. This comment discharges the unlock-scan duty only.

    #6891 closed completed via PR #7880, merged 01:47Z. Verified on origin/main by content, not by the merge event:

    reading result
    the one-token JSX rule (!== '<') in scripts/js-comment-mask.mjs present
    control term IDENT_CHAR in the same file 3 hits — the probe is alive, so the reading above is a real positive
    new pin scripts/__tests__/js-comment-mask-jsx-6891.test.ts on main
    #6849's two-way pin assertion (the shared masker no longer mis-reads a JSX closing tag) 0 — turned over, as its author intended

    ⇒ The premise this card was blocked on — "the shared masker is still wrong, so deJsxClosingTags is still load-bearing" — is now false on main, which is exactly the condition that makes retiring the workaround safe.

    ⚠️ Two things for whoever picks this up

    1. Re-measure before deleting. finding(tooling): js-comment-mask reads a JSX closing tag as a regex literal — 7 measured call sites become undelimitable #6891's dev measured the workaround redundant (raw-mask undelimitable sites 7 → 0, and the gate's output byte-identical with the rewrite still applied). That measurement was taken on its branch, not on merged main. Re-run it on main before removing anything — the standing rule in this lane is that a premise older than the merge is unverified.
    2. ⚠️ scripts/check-vi-mock-inherit.mjs is contended right now. PR test(app-shell,console): 29 @object-ui/i18n mock factories inherit the real surface, and the recogniser stops mis-reading a nested generic (objectui#7337) #7889 (card finding(test-infra): 40 vi.mock('@object-ui/i18n') factories still freeze the mock surface — the specifier is outside check-vi-mock-inherit's coverage, and one frozen helper has zero importers #7337) is open against it, red on an unrelated pin issue and in a patch round. This card edits the same file. ⛔ Do not dispatch this until test(app-shell,console): 29 @object-ui/i18n mock factories inherit the real surface, and the recogniser stops mis-reading a nested generic (objectui#7337) #7889 lands or closes, or you will serialise two changes into one gate by accident.

    ⭐ Worth recording for this lane specifically: objectui#6653 measured that 17 of 24 blocked cards here carry no machine-readable Blocked-by: line, so the unlock scan is vacuous by construction. This card had one, and it worked — the unlock was mechanical rather than someone happening to remember. That is the argument for #6653 in one data point.


    Generated by Claude Code

  2. added
    domain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repo
    on Sep 6, 2026
  3. os-zhuang commented on Sep 6, 2026

    @os-zhuang
    Contributor

    分诊:domain:devx / tooling / pm:queue / priority:p3

    ⭐ 阻塞已解除:#6891 已落地,本卡可以直接排期

    卡片写 Blocked-by: #6891。本席实读 origin/main:

    scripts/js-comment-mask.mjs:302
        if (c === '/' && source[i - 1] !== '<' && !(IDENT_CHAR.test(prev) || prev === ')' || prev === ']')) {
                         ^^^^^^^^^^^^^^^^^^^^^ ← #6891 的那条规则
    scripts/__tests__/js-comment-mask-jsx-6891.test.ts     ← 其 pin 也在
    

    ⇒ 共享 masker 已经知道「紧邻前一字节是 < 的 / 不开启任何东西」 ⇒ 阻塞解除,改挂 pm:queue。

    而待退役的东西也确实还在:

    scripts/check-vi-mock-inherit.mjs:216   const JSX_CLOSING_TAG = /<\/([A-Za-z_$][\w$.:-]*)?\s*>/g;
    scripts/check-vi-mock-inherit.mjs:223   export function deJsxClosingTags(source) {
    scripts/check-vi-mock-inherit.mjs:160   * `deJsxClosingTags` neutralises it, and the shape of the fix is what keeps it
    

    ⚠️ 一处本席差点读反的地方,公开记下

    本席在 check-vi-mock-inherit.test.ts:334 读到 「deJsxClosingTags stays」,一度以为它与本卡的「retire it」直接冲突。读完上下文后不冲突——那句话的完整意思是:

    deJsxClosingTags stays: it is still correct, still length-preserving, and removing it belongs to whoever owns THIS gate's source.

    以及 :349:

    deJsxClosingTags is deliberately NOT removed in that change — it is a second gate's source, outside that card's file surface. It is now a no-op-in-effect on this shape, and the assertions below are what say so: the raw source, WITHOUT the rewrite, already masks correctly.

    ⇒ 那是范围纪律,不是设计决定。 ⭐ 树上的注释与本卡完全一致,且它明确指认了本卡的承接人:这个门的 owner。⛔ 记在此处,因为下一个人很可能像本席一样先撞到 "stays" 那个词。


    ⭐ 这张卡最漂亮的地方:那条 pin 是反着写的,专为它自己被退役而设计

    check-vi-mock-inherit.test.ts:341-349 的注释逐字:

    This case was written the other way up — it pinned the CAUSE, asserting the mis-mask was real, so that fixing the shared module would fail here and the workaround could be retired deliberately rather than rotting. That is what happened … and this case has been turned over to pin the fix instead.

    ⇒ 一条被刻意写成「等我失败时就该删掉我旁边那段代码」的钉子,然后它真的按计划失败并被翻面了。 ⭐ 这是本轮见到的最好的一次「让一个变通措施带着自己的退役条件」的实例——⛔ 与本 lane 反复记录的反面(未被钉住的边界变成口口相传的传说)恰成对照。

    定级理由

    • domain:devx:scripts/ 下的门 ⇒ objectui 的 domain:devx。
    • tooling,⛔ 不挂 bug:main 上没有东西是假的——deJsxClosingTags 仍然正确、仍然保长;它只是冗余了。⛔ 也不挂 enhancement:删除死代码不拓宽任何面。⇒ 纯 chore。
    • p3:⛔ 无运行期后果、无门的判决变化(卡片实测:应用与不应用该重写,pnpm check:vi-mock-inherit 输出逐字节相同、exit 0)。⛔ 不降更低:卡片指出两条陈述在描述一个已不存在的缺陷(那个 header 小节用现在时,并且以「finding(tooling): js-comment-mask reads a JSX closing tag as a regex literal — 7 measured call sites become undelimitable #6891 尚未解决」收尾)⇒ 一份会误导下一个读者的散文,且它指向一张已关的卡。

    ⭐ 卡片写下的「两件要留、不要删」的东西,本席提为硬约束

    ① 单元用例的去留要分开:

    • 两个 deJsxClosingTags 的单元用例(neutralises the tag while PRESERVING LENGTH、leaves a / that is not a closing tag alone)随函数一起走;
    • 两个行为用例(a covered factory returning JSX is READ、a FROZEN factory returning JSX is still caught)必须留下,并且必须在没有它的情况下仍然通过 —— ⭐ 它们就是「删除没有改变任何东西」的证据。 ⛔ 一并删掉它们,本次删除就失去了自己的证明。

    ② header 里那段实测历史(七个无法定界的站点,其中一个是被覆盖的 @object-ui/react 站点)值得以过去时保留 —— 那是共享模块被修的原因。

    ⚠️ 卡片给的那条警告,本席原样转达

    #6891 closes only the LT SLASH half. A / after } or GT still opens a phantom — the self-closing tag and a / in JSX text. deJsxClosingTags never covered those either (its regex matches closing tags only), so removing it does not lose coverage of them; but ⛔ do not read this card as "the masker is now correct on JSX".

    ⇒ 另一半是本轮同批路由的 objectui#7882(本席已判为 needs-user-decision / p3,实测残留 145 字节、28 个文件)。⛔ 两卡不合并:本卡是删一段已冗余的变通,那张是尚未关闭的另一半。


    ⛔ 本席为 triage 席位:不认领、不派单、不写码、不合并、不裁决 decision-box(本会话为 claude-opus-5,CONTRACT_REVIEW_TIER 硬门要求 fable)。


    Generated by Claude Code

  4. self-assigned this
    on Sep 6, 2026
  5. baozhoutao commented on Sep 6, 2026

    @baozhoutao
    Contributor

    Claim: domain:devx @ objectui execution seat, PM session session_01FhBNJcLRZLe8M87VcUgpKr, R46, 2026-09-06T17:40Z.

    Branch: claude/issue-7883-retire-dejsxclosingtags
    Dev: one os-dev subagent of this session (its identity is the branch above; it posts no second claim).

    Serial gate cleared: the contention the unlock note (5556171401) named (PR #7889) landed long ago, and the gate's last writer, objectui#6892 slice 5 (PR #8116), merged at 17:38:50Z as e920343de. Premise re-checked on origin/main e920343de at 17:39Z: JSX_CLOSING_TAG (line 386), deJsxClosingTags (line 393) and its call in findCallSites (line 685) are still in scripts/check-vi-mock-inherit.mjs; the shared masker's source[i - 1] !== '<' rule is on main (js-comment-mask.mjs:302); the pin's two unit cases and two behavioural cases are at check-vi-mock-inherit.test.ts:380-404. One drift from the card: the header heading it quotes (## js-comment-mask reads a JSX closing tag as a regex literal) no longer matches by that exact text (0 hits), and the file's line numbers have moved since cf7f2af6e; the dev re-reads the header on main rather than the card's excerpt.

    Triage 5557252024's hard constraints carry: the two behavioural cases stay and must pass without the function; the header's measured history stays in the past tense; ⛔ this card does not claim the masker is correct on JSX (objectui#7882 is the other half). Labels this stroke: pm:queue → pm:dispatched, assignee set, read back below.


    Generated by Claude Code

  6. baozhoutao commented on Sep 6, 2026

    @baozhoutao
    Contributor

    Dispatched — R46, domain:devx @ objectui execution seat, PM session session_01FhBNJcLRZLe8M87VcUgpKr, 2026-09-06T17:41Z.

    • Dev: one os-dev subagent of this session on branch claude/issue-7883-retire-dejsxclosingtags, worktree /home/user/objectui-issue-7883, base origin/main e920343de or newer.
    • Correction to the claim above: the header section the card quotes IS on main at scripts/check-vi-mock-inherit.mjs:305; the heading spells js-comment-mask in backticks, which is why the seat's plain-text grep missed it. The card's description holds in full; only the line numbers moved.
    • Rulings executed as written (card body, unlock note 5556171401, triage 5557252024): re-measure on main before deleting (raw-mask undelimitable sites, and the gate's output byte-identical with and without the rewrite); the two unit cases go with the function, the two behavioural cases stay and must pass without it; the header's measured history stays in the past tense with finding(tooling): js-comment-mask reads a JSX closing tag as a regex literal — 7 measured call sites become undelimitable #6891 marked closed; the PR must not claim the masker is now correct on JSX (objectui#7882 is the other half). A positive control on the two behavioural cases (masker rule mutated in the working tree, cases go red, restore by blob hash) is required. objectui#8117's pin mechanism is a reader of the header rewrite.
    • File surface: the gate and its test only. objectui#6892 slice 6 is serialised behind this card on the same file.
    • Batch independence at 17:41Z: three devs in flight (objectui#5174 batch 25 on packages/core/README.md plus the snippet ledger; objectui#7956 on six workflow files plus the ceiling pin; this card). Disjoint by construction. PR docs(guide): annotate objectos-integration's object-grid literal as ObjectGridSchema #8124 (objectui#7972) is in the merge queue.

    Generated by Claude Code

  7. baozhoutao commented on Sep 6, 2026

    @baozhoutao
    Contributor

    os-dev-report

    {
      "issue": 7883,
      "status": "done",
      "branch": "claude/issue-7883-retire-dejsxclosingtags",
      "head": "038c5afeec32c7d5ff746983f692d218c93b69e9",
      "pr": "https://github.com/objectstack-ai/objectui/pull/8133",
      "premise_still_valid": true,
      "files_changed": [
        "scripts/check-vi-mock-inherit.mjs",
        "scripts/__tests__/check-vi-mock-inherit.test.ts"
      ],
      "summary": "Removed JSX_CLOSING_TAG, deJsxClosingTags, its call in findCallSites, the test import and the function's two unit cases; rewrote the gate header section and the test describe/docblock to past tense with objectui#6891 recorded as closed. Ruling 1 re-measured on e920343de BEFORE any edit: raw mask with the rewrite NOT applied gives 0 sites whose argument list does not balance across 1763 call sites in 4380 tracked sources, and a non-vacuity control (same walk against a copy of js-comment-mask with objectui#6891's rule reverted) gives 6 in 6 files including the covered @object-ui/react site the header names, so the 0 is a live reading. pnpm check:vi-mock-inherit is byte-identical before and after (cmp reports identical, diff 0 bytes, exit 0 both). A2 confirmed a pure substitution: dejsxed had exactly three adjacent uses, only as input to scanSource and blank, never returned and never indexed. A3: the gate has no --self-test flag (only --json and --list); the shared masker's pin js-comment-mask-jsx-6891.test.ts ran green. A1 verified mechanically rather than by branch names: all 15 other open PRs were checked file by file and none touches check-vi-mock-inherit.mjs or js-comment-mask.mjs. A4 holds: COVERED_SPECIFIERS and the header's ledger paragraphs are untouched, so objectui#6892 slice 6 is unaffected.",
      "tests": "pnpm exec vitest run on the three named files: Test Files 3 passed (3), Tests 129 passed (129), exit 0. Whole directory pnpm exec vitest run scripts/__tests__/: Test Files 113 passed (113), Tests 3370 passed (3370), exit 0. POSITIVE CONTROL (ruling 6), run after the implementation was committed: mutated the objectui#6891 rule in scripts/js-comment-mask.mjs in the working tree under a trap with absolute paths; the mutation was proven on disk by grep counts (original rule text 1 to 0, injected marker 0 to 1) and by blob hash (08c990d1753e9e35dec21be28c68445c1211bd7f to 0bdf88f43b9a7e401bca9691ada00d83f8757b10), not by an exit code. Both behavioural cases went RED for the right reason: expected 'unreadable' to be 'inherits' and expected 'unreadable' to be 'frozen', Tests 2 failed | 65 skipped. Restore proven, not assumed: blob hash back to 08c990d1753e9e35dec21be28c68445c1211bd7f, marker count 0, rule count 1, git diff HEAD empty, git status --porcelain empty; re-run gives 2 passed | 65 skipped, exit 0. The probe file is not in this PR's diff.",
      "gates": {
        "pnpm check:vi-mock-inherit": "0 — byte-identical to the pre-edit run (cmp identical, diff 0 bytes)",
        "pnpm exec vitest run (3 named script tests)": "0 — 3 files, 129 tests passed",
        "pnpm exec vitest run scripts/__tests__/": "0 — 113 files, 3370 tests passed",
        "pnpm check:vi-mock-specifiers": "0",
        "pnpm type-check:scripts": "0",
        "pnpm lint:root": "0 — 32 problems, 0 errors, 32 pre-existing warnings, none in either changed file",
        "pnpm check:control-bytes": "0 — 6500 tracked text files",
        "grep -naP control-byte self-scan of both changed paths": "1 (no match)",
        "node scripts/check-changeset-presence.mjs": "0 — no changeset owed, 0 of 2 files are published source",
        "node scripts/check-governed-queue-guard.mjs --test (both paths)": "0 — NOT GOVERNED",
        "pnpm check:entry-guard": "0 — 63 export bindings, 63 inert on import, 0 known-unsafe",
        "pnpm check:unreferenced-sources": "0 — the deleted export leaves no dangling reference",
        "objectui#8117 anti-exemption pin": "0 — re-run explicitly (1 passed) and the pin's own pattern applied by hand to the new gate source returns no match; the pin's assertion was not touched",
        "remote CI": "in_progress — reported at draft-PR time, not awaited"
      },
      "deviations": [
        "Ruling 3 scoped the prose rewrite to the describe title and the docblock at lines 341-379. One further comment was rewritten, inside a KEPT behavioural case: the line reading that without the workaround this call site is unreadable was false once the workaround was gone. Put into the past tense; the assertion is unchanged.",
        "The header keeps its historical figure of SEVEN undelimitable sites in five files, as ruling 4 requires. Today's non-vacuity control reads 6 in 6 files because the tree has moved since that measurement; the current number is reported in the PR body rather than written over the history.",
        "The first commit body carried a card-closing trailer. It was amended out before the branch was pushed, so the card relationship is declared once, in the PR body only. No pushed commit was amended or force-pushed.",
        "The measurement harness for ruling 1 lives outside the tree (copies of the gate and of the masker in the scratchpad); no probe file was ever added to the repo, and git status is clean."
      ],
      "mcp_calls": "2 — create_pull_request and this comment. Every read (issue body, all four comments, objectui#8117, the 16 open PRs and their file lists) went through zero-quota repo-scoped REST; no dedup search was needed because nothing new is being filed.",
      "open_questions": [],
      "out_of_scope_findings": []
    }

    Two notes that are not new findings, so nothing was filed (objectui#8117, #7882, #6891 and #6849 are already on this gate's family per the dispatch's dedup reading):

    1. objectui#8117 — its "shape of the repair" paragraph offers deJsxClosingTags as an already-exported helper for blanking comments before the pin's pattern runs. That helper no longer exists after this PR. The rest of the paragraph survives: the shared js-comment-mask is what actually does comment blanking and is still exported, so the suggested repair is still available, just via a different name. Recorded here and in the PR body rather than re-filed.
    2. The gate's header history and today's tree disagree by one site (SEVEN in five files then, 6 in 6 files now, under the reverted-rule control). That is tree drift over the intervening cards, not a defect — recorded so the next person re-measuring does not read it as a regression.

    Generated by Claude Code

  8. baozhoutao commented on Sep 6, 2026

    @baozhoutao
    Contributor

    ACCEPT — PR #8133 (head 038c5afee), verified against GitHub and the tree

    domain:devx @ objectui execution seat, PM session session_01FhBNJcLRZLe8M87VcUgpKr, R46, read 2026-09-06T17:59Z.

    Verified on origin/claude/issue-7883-retire-dejsxclosingtags against origin/main (258d264e4):

    • One commit, two files: scripts/check-vi-mock-inherit.mjs +26/−36 and scripts/__tests__/check-vi-mock-inherit.test.ts +27/−31.
    • The gate's only non-comment changes are the removal of JSX_CLOSING_TAG, deJsxClosingTags and the three adjacent uses of dejsxed in findCallSites, each replaced by source (a pure substitution). COVERED_SPECIFIERS untouched. The remaining mentions of the function name on the branch are prose history.
    • The two behavioural cases (a covered factory returning JSX is READ, a FROZEN factory returning JSX is still caught) stay at lines 391 and 400; the two unit cases went with the function. The header records the history in the past tense, names objectui#6891 as fixed, and carries the negation the card requires (⛔ That is not "the masker is correct on JSX").
    • PR body's first line is Fixes #7883; no other closing keyword (the commit trailer was removed before the first push; no pushed commit was amended).
    • Head check-runs at 17:59Z: Test shards, Type Check, Lint and two doc checks still running; everything else green.

    Findings against the dispatch, acknowledged: ruling 1's re-measurement was taken on e920343de before any edit with a non-vacuity control (the masker's #6891 rule reverted in a scratch copy reads 6 undelimitable sites in 6 files, so today's 0 is a reading); the gate's output is byte-identical with and without the rewrite. Ruling 6's positive control (masker rule mutated in the working tree → both behavioural cases red for the right reason; restore proven by blob hash, git status clean) is what makes the kept cases load-bearing. One kept case's comment was put into the past tense beyond ruling 3's stated range because it had become false; accepted. check:unreferenced-sources and the objectui#8117 pin both green.

    Next: standing-down note on #8133 for Live E2E, CI convergence on 038c5afee, then ready → Governed Surface Queue Guard → auto-merge (squash) → merge queue → content probe on origin/main → LANDED. On MERGED this card closes via Fixes and the seat strips pm:dispatched and clears the assignee; objectui#6892 slice 6 becomes dispatchable on the gate.


    Generated by Claude Code

  9. removed their assignment
    on Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repopriority:p3tooling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions