Skip to content

ci(filter-parity): judge every ui test read outside ui/, pin the ui scheduling, and admit every out-of-tree markdown read - #38286

Draft
objectstack-fleet[bot] wants to merge 7 commits into
mainfrom
claude/issue-38132-ui-test-inputs
Draft

objectstack-fleet[bot] wants to merge 7 commits into
mainfrom
claude/issue-38132-ui-test-inputs

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread
Fixes #38132
Fixes #38133
Fixes #38134
Clause-②: no
Metadata-protocol: none

repo:objectstack#1 · os-elon-musk · session_016WV4cxRDKprCtjpEdtiPFW

维护者速读

  • 用户能看到什么变化:用户无感;开发者这边,只改 ui 测试会读的那些 ui 目录外文件的 PR,现在也会跑 ui 测试;CI 配置里任何让 ui 测试少跑或多跑的改动,都要同时更新一份调度基线,否则检查会拦下。
  • 为什么做:CI 与合并队列的 ui 调度;替维护者堵住“ui 测试在 PR 上被静默跳过、合进主干才暴露”的漏洞。
  • 出错会怎样:最坏是某个只改这几个文件的 PR 多跑一轮 ui 测试,或改 CI 配置的人需要顺手更新调度基线;可直接撤回本 PR。
  • 要你做的:本 PR 改了 CI 工作流,按规定需你审批合并。

What changes

  • ui test scheduling: ui tests that read files outside ui/ that no ui filter row covers, beyond docs/adr #38133: the fifth subject of check:ci-filter-parity covers every file outside ui/ that a ui test reads, not only the root docs/adr.
    • The population is still derived by the shared walker (scanPathExpressions). Imports resolve through check-cross-package-test-inputs's own resolveImportTarget, which is exported with a root parameter and has no behaviour change.
    • Rework M1: a one-piece relative literal that climbs out of ui/ and names a file is a read. This covers the await import(new URL('../…', import.meta.url).href) spelling the walker does not read. That is how metadata-form-option-names.test.ts loads packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts, which now has a ui: row.
    • Rework S4: a module a test loads runs its own first-party imports, so each is a read of that test. The gate uses firstPartyModuleClosure, attributed as TEST (via MODULE). This brings in scripts/invoked-as.mjs, which scripts/ci-shard-matrix.mjs imports, and it gets a row.
      • The header states the bound: file reads and computed import()s inside a loaded module are not followed.
      • The walker module that the ui selector loads by a computed import(), scripts/check-cross-package-test-inputs.mjs, is a row above the heading, held by the pin.
    • Measured on this head: 16 reads outside ui/ over 7253 tracked ui test files. 15 are covered by ui or ui_consumers and one is the declared trade-off packages/mcp/src/skill-md.ts.
    • The rows sit in a reads group at the end of the ui: list, under a UI TEST READS OUTSIDE ui/ heading. The gate holds that group to the reads in both directions.
    • Rework N3: a trade-off's reason now runs over its continuation comment lines.
  • The ui selector (ui/scripts/select-affected-tests.mjs) treats a new URL(literal, import.meta.url) that leaves the tree as a disk read. The test goes to the always-on lane, as M1 asked to verify.
    • Measured with --explain on a probe diff that touches only the platform pack: the always-on count goes from 525 to 526, and the one addition is metadata-form-option-names.test.ts.
  • ci filter parity: pin the whole input of the ui paths-filter step and the shape of every ui job condition, not only the filter rows #38132: a new sixth subject pins how ci.yml schedules the ui jobs against scripts/ci-filter-parity.ui-pin.json. Every part is held EXACTLY, as a ratchet (rework S2):
    • the paths-filter step's with: keys;
    • the filter outputs the ui jobs read;
    • the rows of ui (above the reads group) and of ui_consumers. A row gone reds as missing, and a row added reds as unpinned until the pin names it, so its later removal is caught;
    • the if: of every job that reads a ui output, 9 jobs, compared in CNF:
      • A clause added, a disjunct dropped or an atom rewritten reds as narrowed.
      • A clause dropped or a disjunct added reds as wider than the pin.
      • Rework S1: a condition with no status function carries GitHub's implicit success() clause. Dropping !cancelled() or always() is therefore a narrowing.
    • A ui job with no pin is red, and so is a pinned job that is gone. No job's if: is changed.
    • Rework N2: the header bounds now name the workflow's own on: paths, paths-ignore and branches filters as not judged.
  • markdown-test-inputs: the adjudicated ledger only admits out-of-tree markdown reads under content/docs, so other root markdown reads by ui tests are missing from it #38134: deriveCandidates() in ui/scripts/markdown-test-inputs.mjs admits markdown read outside ui/, not only content/docs.

Tests

  • node scripts/check-ci-filter-parity.mjs --self-test: 227 assertions. Battery (12) has 43 cases and (13) has 43, at those floors.
    • New in (12):
      • a scratch new URL import read with its module's import attributed through it;
      • a directory literal read as nothing;
      • an unresolvable module import refused;
      • a synthetic literal ignored;
      • the platform pack and invoked-as.mjs read on the real tree;
      • both new rows rolled back off the real ci.yml, each reported by path;
      • the multi-line trade-off reason.
    • New in (13):
      • a row added reds as unpinned, goes green once pinned, and reds as missing when removed after that;
      • the walker-module row pinned;
      • the reads-group rows kept out of the pin;
      • a dropped conjunct reds as wider;
      • the implicit success() clause, with !cancelled() and always() dropped, an absent if:, and always() rewritten to !cancelled();
      • !cancelled() dropped from the real test-ui-plan job reds it.
  • Gate-code ablations, each mutated on disk, run, then restored and checked with cmp. Every one turns the self-test red:
    • escaping literals removed: 8 assertions red;
    • module closure removed: 8;
    • implicit success() limited to an absent if:: 4;
    • unpinned-row detection removed: 1;
    • wider-condition detection removed: 2;
    • trade-off continuation removed: 1.
  • ui vitest, markdown-test-inputs.test.ts, select-affected-tests.test.ts and check-pending-changeset-literals.test.ts: 3 files, 110 of 110 pass.
    • The S3 ablation, the out-of-tree filter removed, reds the ledger test and the S3 scratch case.
    • The selector ablation, the new URL rule removed, reds makes the closure unbounded.

Acceptance notes

  • Rework N4, the pin file on the governed register, is not in this push. Adding the row to GOVERNED_SURFACES reds check:pm-governed-merges and check:pm-governed-prose. Those gates require the governed-surface lists in AGENTS.md and .claude/skills/pm-dispatch/SKILL.md to name it, which makes this a fleet-rule change (Rule-change: yes). It is left for the seat to route.
  • ui/scripts/check-pending-changeset-literals.mjs matches only the ui/.changeset/ prefix. It goes to the seat as a follow-up card and is not filed here.
  • The bounds of both subjects are stated in the gate header.

Verification

Run node scripts/check-ci-filter-parity.mjs --list. Expect each of the 16 reads outside ui/ printed ok (the mcp one as trade-off), then ok the paths-filter input, the ui outputs, the pinned rows and every ui job condition hold.

Read first, by risk:

  1. scripts/check-ci-filter-parity.mjs, conditionClauses (the implicit success() clause) and judgeUiScheduling (the exact ratchet).
  2. scripts/check-ci-filter-parity.mjs, uiRootReadsOf (escaping literals and the module closure).
  3. ui/scripts/markdown-test-inputs.mjs, the ui:-filter admission in deriveCandidates().
Local gates, at head 807ec4f
  • The gate set comes from dispatch-gates --commands --repo objectstack-ai/objectstack, which derived 75 families from the tree at 807ec4fd51. The --ran reconciliation shows 75 derived, 75 run and 0 unrun.
  • 70 families exit 0, among them check:ci-filter-parity (both legs), check:cross-package-test-inputs, check:pm-dispatch-gates, check:nul-bytes, check:required-contexts and check-self-test-workflow-commands.
  • NOT MEASURED: check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure and check:sourcemap-no-sources-content. Reason: each exits 3 with PREREQUISITE NOT MET because this worktree has no built dist/. The diff touches no package, and Build Core runs all four in CI.
  • ui vitest run scripts/ on the shared box: 150 files pass and 22 fail, all for lack of build output in this worktree.
    • Most fail with Cannot find package '@objectstack/spec/...' or cannot resolve @objectstack/spec/ui.
    • The rest need built ui packages: console-optimize-deps, check-doc-snippet-types, and date-only-zone-pins-10183, whose pinned tests ran no case.
    • The three files this diff changes or adds tests to pass, 110 of 110, in the run under Tests. Test UI in CI is the reading of record.
  • overlap-check --branch=HEAD --base=origin/main: VERDICT clean, exit 0, against origin/main 3ad3b41599.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · 48bd006 · 2026-11-28T11:45Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 48bd006b72fecacf731f0b7c35e3fc4bec8b9574
Local-runs: probe — the dispatching thread allowed one probe for the two self-tests. Run from a detached worktree of the head inside the scratchpad (root node_modules symlinked from the clone, since the gate needs yaml): check-ci-filter-parity.mjs --self-test exit 0 with 204 assertions, the same script with --list exit 0 (13 reads, 9 ui jobs), and ui/scripts/markdown-test-inputs.mjs --audit exit 0 (84 candidate tests, 60 entries; that script has no --self-test leg, --audit is its checking leg). In the same worktree, one 20-line reading script of my own listed every one-piece ../ string literal in a tracked ui test that resolves to an existing path outside ui/. The worktree is removed. Nothing was built, no vitest run, no gate ablated.
Scope: .github/workflows/ci.yml + scripts/check-ci-filter-parity.mjs, scripts/ci-filter-parity.ui-pin.json, scripts/check-cross-package-test-inputs.mjs, ui/scripts/markdown-test-inputs.mjs
Security-touching: no

First record on this PR. Read: cards #38132, #38133 and #38134 with every comment (triage, claim, and the dev report on #38132), PR #38286 body, file list and its one comment (the review claim), the net diff of the head against merge base e42520c67bcef027552f8db83655ff9b54d32cef (6 files, +837 / -130), and the check-runs on the head. Read outside the diff, to judge it: ui/scripts/select-affected-tests.mjs, scripts/check-workflow-status-functions.mjs, ui/scripts/check-pending-changeset-literals.mjs, scripts/ci-shard-matrix.mjs, the test-ui-plan and test-ui jobs, lint.yml around the gate's step, and four ui test files.

Result in one line: #38132 and #38134 are implemented as their cards ask, with the gaps graded below; #38133 is not true on this head, because one ui test read outside ui/ is unscheduled and undeclared while the gate prints OK.

① Derived judgments

  • Three new ui: rows. CONTRIBUTING.md, packages/plugins/plugin-auth/src/admin-import-users.ts, scripts/ci-shard-matrix.mjs. Each read is real in the tree: quick-reference-commands-4149.test.ts line 81 reads the root CONTRIBUTING; identityImportFields.endpointColumns-34536.test.ts line 44 reads the endpoint source; four tests under ui/scripts/__tests__/ import the shard roster reader. Each row can only turn ui from false to true. Read against what then runs: the selector answers mode=affected for such a diff, and each reader lands in the always-on lane (a disk read the walker names outside the tree makes readRadius return null; a relative import that leaves the tree reaches a module that imports node:fs outside every package). So the row starts the job and the reader is in the selection. RIGHT.
  • The trade-off line for packages/mcp/src/skill-md.ts. Comment only. Its claim holds: crosspkg carries ui/apps/console/src/pages/developer/objectstack-skill.ts (ci.yml line 712, CI: a pull request that edits only the MCP server's SKILL.md renderer skips the Console test that pins its download mirror #31017), and the comment above that row names skill-md.test.ts in Test Core as the server half. RIGHT as a declaration of an existing trade-off.
  • Scheduling of every existing diff. No if:, output, input or pre-existing row changed; the parsed lists differ from the merge base by exactly the three rows. No job can skip where it ran before. RIGHT.
  • Cost. Every edit of the root CONTRIBUTING.md now starts the whole ui battery (Build UI Deps, Type Check UI, Lint UI, Test UI, Build and E2E UI, Live E2E UI), not only Test UI, because ui is read by all of them. The card accepts named files over subtrees; the cost is stated here because the ci.yml comment does not state it. RIGHT, noted.
  • New enforced surface. scripts/ci-filter-parity.ui-pin.json is a new record that every later edit of the ui scheduling in ci.yml must agree with. It equals the head exactly: 20 rows above the heading, 7 ui_consumers rows, 4 outputs, 9 conditions, each compared by reading. RIGHT.
  • resolveImportTarget exported with a root parameter. Both existing call sites pass one argument through an arrow (lines 1686 and 3601 of the sibling gate), never as a bare .map callback, so the default applies and nothing changes for them. RIGHT.
  • deriveCandidates admission widened to the monorepo root. The ledger gains the ADR-0084, CONTRIBUTING and skill-bundle reads it used to drop. It also makes the ledger test depend on documents outside ui/ that no row schedules: WRONG as shipped, see S3.
  • The fifth subject's OK line ("all 13 path(s) outside ui/ read by the 7251 tracked ui test file(s) are covered"). WRONG on this head, see M1.
  • Check-runs on the head. No failure, nothing pending. Lint · CI, release & engine gates (the lane that runs this gate), Test UI, Test UI (1/16), Test UI (2/16), Plan Test UI shards, Build Core, Test Core, Governed Surface Queue Guard and Check Changeset are success; every other conclusion is a skip of an opt-in, queue, schedule or main-only job.

② Semver level

Clause-②: no. A workflow file, two root scripts/ gates, one JSON record beside them and ui tooling under ui/scripts/; nothing published, no package source. The skip-changeset label matches the diff and Check Changeset is green.

③ Boundary flags

  • open_questions in the dev report: empty.
  • Out-of-scope note 1 (check-pending-changeset-literals.mjs matches only a path starting .changeset/, so a ui test naming a pending root changeset, now offered as ../.changeset/NAME.md, is not flagged). Confirmed by reading isPendingDeclaration. No such read today. It is a direct consequence of this PR's widening and it carries no card: escalated to the seat to file a follow-up, not left as a note.
  • Out-of-scope note 2 (the sixth subject's bounds are in the header). Read; the list is incomplete, see N2.
  • The four gates the dev marked NOT MEASURED locally (check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure, check:sourcemap-no-sources-content) are answered by Build Core success on the head.
  • Commits: all four are titled wip:. The repository squashes only, with the PR title as the commit title and the PR body as the message, so no wip: title lands. The title that lands is the conventional ci(filter-parity): ... one. The body that lands opens with an HTML attribution comment and a "Requested by" line with a project-thread link; the seat may want those trimmed before landing. No effect on the tree.
  • The PR is a draft and governed (ci.yml); the claim routes it to the seat at Tier H. Unchanged by this record.
  • SQL push-down: not applicable, no data access in the diff.

④ Design judgment

.github/workflows/ci.yml (hits). The reads group and its heading parse as the gate reads them (one heading, four rows, one trade-off line, the group ending at the comment that introduces ui_consumers). The three rows and the trade-off line hold against the tree, as ① says. The header paragraph above ui: is accurate about what the gate does. What does not hold is the sentence "Each file outside ui/ that a ui test reads, named verbatim": M1 names one that is missing.

scripts/check-ci-filter-parity.mjs, subject five (implementing).

M1 (must-fix) — a ui test reads a file outside ui/ that has no row and no trade-off, and the gate is green. ui/packages/app-shell/src/views/metadata-admin/metadata-form-option-names.test.ts (lines 39 to 45, on main since #37698) does await import(new URL('../../../../../../packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts', import.meta.url).href) and holds the Console's zh-CN option maps equal to that pack "byte for byte". packages/platform-objects/** is in neither ui nor ui_consumers, and the path is absent from the 13 reads --list prints, because the walker does not read the new URL(literal, import.meta.url) spelling. A diff confined to the generated pack (a regeneration with one changed option name) starts no ui job on the PR or in the queue and reds this test on main: the #37935 shape, on the head that closes #38133. The card's rule ("every file a ui test reads outside ui/ either has a ui filter row, or is a declared trade-off") is false here while the gate reports all reads covered. A row under the heading alone will not close it: the gate would call that row a leftover, since it sees no reader. The collector has to see the read (this spelling, or a plain resolver of one-piece relative literals that land outside ui/ as a second candidate source, the way the sibling gate adds repoRelativeLiterals to the walker's answer), with a battery case for it. Also check the reader is then selected: the test imports no fs, so by my reading of select-affected-tests.mjs it is placed in app-shell and is not in the always-on lane; a row that starts Test UI without running this file would schedule the battery and still miss the pin. --explain on a pack-only diff answers that.

S4 (should-fix) — the stated bound (a read inside a module the test imports is not seen) has live, unnamed instances. ui/scripts/select-affected-tests.mjs imports the root scripts/check-cross-package-test-inputs.mjs at run time (loadPathWalker), and ui/scripts/__tests__/select-affected-tests.test.ts asserts on that walker; scripts/ci-shard-matrix.mjs, which four ui tests import and which now has a row, itself imports scripts/invoked-as.mjs. Neither file has a ui row. The selector even has a rule for a walker change that can never fire on a diff confined to the walker, because no ui job starts. The gate already imports firstPartyModuleClosure for subject three; either close the import targets through it, or name these two above the heading with their reason. This PR itself edits the walker file.

  • The rest of subject five agrees with its header sentence by sentence: population from git ls-files under ui/, kind decided on disk, coverage by the pure-string rule against the lists the real test-ui condition names, leftovers and stale trade-offs judged in the group alone, refusals for a missing or doubled heading and an unreadable trade-off line. The real-tree rollbacks of each new row and of the trade-off line are capable of failing.

scripts/check-ci-filter-parity.mjs, subject six, and scripts/ci-filter-parity.ui-pin.json (implementing).

  • The pin is hand-authored: no writer exists in the diff, and readPin is its only reader. What keeps ci.yml at or above it is this gate on every lint run. What keeps the pin at ci.yml is nothing (S2).
  • conditionAtLeast is sound for the boolean reading: each actual clause must contain every disjunct of some pinned clause. I tried mixed top-level operators, quoted strings holding an operator, a negated group, a trailing disjunct outside the parentheses and an absent if:; each either reds or is in fact wider. The parse treats a || b && c as (a || b) && c, which is the narrower reading, so a green on it is still safe. Outputs and with: keys are exact; an edit to the paths-filter step's own if:, id or continue-on-error can only empty the outputs, which the pinned || 'true' turns into "run everything". Those directions hold.

S1 (should-fix) — dropping the status-function clause is judged a widening, and it is a narrowing. conditionAtLeast passes any dropped clause. GitHub wraps an if: that names no status function in an implicit success() (ci.yml says so itself at lines 398 to 406), so test-ui without !cancelled() skips whenever a needed job was skipped or failed, and borrowed-verdict is skipped on every pull request (it is on this head). The gate would report that edit green and print the job as "wider than the pin". Today a second gate, check:workflow-status-functions, reds that edit for all nine jobs, since each if: reads a needs.*.outputs.*, so nothing lands; but this subject's "Sound and syntactic" claim is false as written, the header does not cite that gate, and the self-test's widening control drops only the shards clause. Make a pinned status-function clause required in the actual condition, or cite the sibling gate as the reason and pin the case in battery (13).

S2 (should-fix) — the pin does not ratchet. A row added above the heading, or a disjunct added to a condition, is free and unpinned; removing it later is an edit that makes a ui job skip where it ran before, and the gate stays green. Wider conditions are at least reported in the OK line; wider rows are reported nowhere. Card #38132 asks that any such edit turn the gate red and that the step's whole input be pinned. Holding the rows above the heading exactly, as inputs and outputs already are, costs one pin line per new row and closes it; the reads group below the heading stays with subject five.

  • Population and refusals of subject six agree with the header: nine jobs read a ui output and nine are pinned; a new reader with no pin and a pinned job gone are both red; a pin missing a part or a ui output is a refusal; main() reds on an absent pin file.

scripts/check-cross-package-test-inputs.mjs (implementing). One function exported with a defaulted root; behaviour for the existing callers is unchanged (① above).

ui/scripts/markdown-test-inputs.mjs (implementing). The admission agrees with its comment: any existing file under the monorepo root, node_modules excluded, labelled relative to ui/. It misses nothing it saw before. Card #38134's acceptance is met: the ADR read is a candidate and is in the ledger, the scratch-monorepo case has a control and an above-root negative, and the dev reports the ablation red. The audit is green on the head.

S3 (should-fix) — the widening turns the existence of documents outside ui/ into inputs of ui tests, with no row for them. Because the monorepo root is a resolution base and every hit is now admitted, a bare 'README.md' or 'packages/core/README.md' in a ui test resolves to the monorepo's own file, and 30 tests now carry such entries in notRead. auditTree reds on a notRead entry the scanner no longer offers (stale-not-read) and on a new unadjudicated hit, and markdown-test-inputs.test.ts asserts the audit is empty. So deleting or renaming the root ROADMAP.md, SECURITY.md, ARCHITECTURE.md, AGENTS.md, CLAUDE.md, CHANGELOG.md, README.md, .changeset/README.md, examples/README.md, examples/AGENTS.md or apps/docs/README.md reds a ui test on a diff that starts no ui job: eleven new instances of the class #38133 exists to close, invisible to subject five because the probe sits in a helper. Narrow what the monorepo-root base admits (for example, not a bare name that already resolves inside ui/; I did not check every content/docs read against that rule), or schedule or declare these documents.

Nits, no effect on correctness or the contract:

  • N1: the monorepoRoot default in deriveCandidates branches on root === REPO_ROOT, and both arms give the parent of root.
  • N2: the sixth subject's known bounds do not name the workflow's own on: path and branch filters, which also decide whether a ui job starts.
  • N3: a trade-off's reason is read from the marker line alone, so the stored reason for the mcp line is the single word "the"; the sentence continues in comment lines the gate does not read.
  • N4: the pin file is not on the governed register, so a PR that lowers only the pin is green and is reviewed at the default tier; the narrowing of ci.yml that would follow it is still governed.

Implemented-by: claude/issue-38132-ui-test-inputs
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): REWORK at head 48bd006b72fecacf731f0b7c35e3fc4bec8b9574 (Fixes #38132, #38133, #38134).

Review summary

The three new ui read rows and the trade-off line hold, the resolveImportTarget export leaves its caller unchanged, and the squash title is the conventional one, so the wip: commit titles do not land. Contract record 7238884860 is FAIL at this head, with its tier verified.

Owed before landing:

  1. M1 of 7238884860: an unscheduled ui read with the gate green. ui/packages/app-shell/src/views/metadata-admin/metadata-form-option-names.test.ts (lines 39 to 45) loads packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts through await import(new URL(literal, import.meta.url).href). I checked: ci.yml at this head names platform-objects nowhere, and the walker does not read that spelling, so --list omits it. ui test scheduling: ui tests that read files outside ui/ that no ui filter row covers, beyond docs/adr #38133's rule is false on the head that closes it. The collector has to see the read, a row has to schedule it, and the selector has to run that test, which the record suspects it does not.
  2. S1 of 7238884860: conditionAtLeast judges a dropped !cancelled() or always() a widening, though the implicit success() makes it a narrowing.
  3. S2 of 7238884860: the hand-authored pin does not ratchet up. A row added later is unpinned, and its removal is green.
  4. S3 of 7238884860: the widened deriveCandidates makes the ledger test depend on 11 root documents with no ui row. Deleting ROADMAP.md would red a diff that starts no ui job.
  5. S4 of 7238884860: two reads inside imported modules sit outside the stated bound: scripts/check-cross-package-test-inputs.mjs and scripts/invoked-as.mjs.

With the same push (nits N1 to N4):

  • N1: a redundant monorepoRoot default.
  • N2: the bounds list omits the workflow on: filters.
  • N3: the trade-off reason is captured as the single word "the".
  • N4: the pin file is not on the governed register.

The dev's note on root pending changesets goes to the seat for a follow-up card.

Next: the fix earns a delta contract review and a delta L1. After that it goes to seat 1 (Tier H, ci.yml).

…he ui pin

M1: the fifth subject reads a one-piece relative literal that climbs out of
ui/ (the `new URL(literal, import.meta.url)` import of the platform zh-CN
forms pack), and the ui selector puts such a reader in the always-on lane.
S4: a loaded module's first-party imports are reads of the test (closure).
S1: a condition naming no status function carries the implicit success().
S2: the pinned rows and every ui job condition are held exactly.
S3: an out-of-tree markdown document is a ledger candidate only when the
root `ui:` filter covers it; the root-noise notRead entries are gone.
N1-N3: monorepoRoot default, the on: bound, multi-line trade-off reasons.

Claude-Session: https://claude.ai/code/session_016WV4cxRDKprCtjpEdtiPFW
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl and removed size/l labels Nov 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · 807ec4f · 2026-11-28T12:55Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 807ec4fd51db264f282c8a1c5c39e228c98af83f
Local-runs: probe — the dispatching thread allowed one probe. Run from a fresh detached worktree of the head inside the scratchpad (root node_modules symlinked from the clone; worktree removed afterwards): check-ci-filter-parity.mjs --self-test exit 0 with 227 assertions; the same gate bare, exit 0; with --list, exit 0 (16 reads over 7253 ui test files, 9 ui jobs); ui/scripts/markdown-test-inputs.mjs --audit exit 0 (82 candidate tests, 60 entries); and my own 20-line literal scan from the first round, re-run unchanged. Nothing was built, no vitest run, no gate ablated, the selector not run.
Scope: .github/workflows/ci.yml + scripts/check-ci-filter-parity.mjs, scripts/ci-filter-parity.ui-pin.json, scripts/check-cross-package-test-inputs.mjs, ui/scripts/markdown-test-inputs.mjs, ui/scripts/select-affected-tests.mjs
Security-touching: no

Delta record. It follows record 7238884860 (at 48bd006b72fecacf731f0b7c35e3fc4bec8b9574, with M1 and S1 to S4 open). Read for this record: the author commit 1f21b20f1a in full (7 files, +436 / -117), both merges of main, the net diff of the head against the new merge base 3ad3b415997e28d37e74cc50ea05af9fac7faeaf (8 files, +1142 / -116), dev report 7239539578 on #38132, the current PR body, the check-runs on the head, and scripts/first-party-closure.mjs outside the diff.

M1: closed

S1: closed

S2: closed

S3: closed

S4: closed

① Derived judgments

  • History. On the first-parent chain after 48bd006b72 the head holds a merge of main (6680dac039), the author commit 1f21b20f1a, and a second merge of main (807ec4fd51). The remerge diff of each merge is empty: no conflict was resolved by hand and no line was changed inside a merge. No force-push. RIGHT.
  • What main brought. 17 commits between the old and the new merge base. Of the files this PR touches or leans on (the eight in the diff, first-party-closure.mjs, invoked-as.mjs, ci-shard-matrix.mjs) main changed only ci.yml (+38 / -24). The pin is now exact, and the bare gate exits 0 on the merged head, so that change moved no ui row above the heading, no ui_consumers row, no pinned output and no ui job condition. The literal scan over the merged tree (two more ui test files than last round) finds no new read outside ui/. main undercuts nothing. RIGHT.
  • Three new ui: rows. scripts/invoked-as.mjs and the platform zh-CN forms pack under the heading, scripts/check-cross-package-test-inputs.mjs above it and in the pin. Each can only turn ui from false to true. The walker row means every edit of that root gate now starts the whole ui battery; that is the price of the selector importing it, and the ci.yml comment says why it sits above the heading. RIGHT.
  • The pin is exact. A row added above the heading or to ui_consumers, and a condition wider than its pin, now red until the pin names them. This is a new duty on every later PR that widens the ui scheduling: one pin line in the same PR. RIGHT, and what card ci filter parity: pin the whole input of the ui paths-filter step and the shape of every ui job condition, not only the filter rows #38132 asks.
  • Selector. A relative new URL(literal, import.meta.url) that leaves the tree makes the closure unbounded, so its reader joins the always-on lane on every affected run. It can only add files to a selection. One reader today. RIGHT.
  • Ledger. An out-of-tree document is a candidate only when a root ui: row covers it. Narrower than the first head, wider than main. RIGHT; one residue, N5.
  • Check-runs on the head, at the time of this record. 27 success, 13 skipped (the same opt-in, queue, schedule and main-only jobs as before), 0 failed, 13 in progress: Test UI (1/16), Test UI (2/16), Test Core shards 1 to 7 of 12, Build & E2E UI, Lint · CI, release & engine gates (the lane that runs this gate), Lint · PM dispatch-gates and Lint · scoped · slot lookup & corpus. The aggregates Test UI, Test Core and Lint & Repo Gates have not published yet. This record judges the tree; the gate verdicts are those runs, and they are not in. The seat should not land before they conclude green.

② Semver level

Clause-②: no. Unchanged: a workflow file, root scripts/ gates with one JSON record, and ui tooling under ui/scripts/. Nothing published. skip-changeset stands.

③ Boundary flags

  • Open question N4 (put the pin on the governed register). The deferral is acceptable, and option A (a follow-up PR marked as a rule change, for the maintainer) is the right carrier if it is wanted at all. Two reasons. The register edit needs AGENTS.md and the dispatch skill to name the path, which is outside all three cards. And the risk N4 named is gone on this head: with the pin exact, a PR that lowers only the pin no longer passes, because the pin must equal ci.yml; the only way to lower it is together with a ci.yml edit, which is governed. Answered: defer, not blocking.
  • Out-of-scope finding (check-pending-changeset-literals.mjs and a pending root changeset). Now carried by the seat as a follow-up card. On this head the hazard is smaller than last round: a root .changeset file is a ledger candidate only if a ui: row covers it, and none does. Accepted.
  • The PR body now describes the ratchet and the 227 assertions; the stale floor wording is gone. The squash still takes the PR title and body, so no wip: title lands.
  • The four gates the dev marks NOT MEASURED locally are Build Core's, and Build Core is success on this head.
  • SQL push-down: not applicable.

④ Design judgment

.github/workflows/ci.yml (hits). The reads group parses as the gate reads it: one heading, six rows, one trade-off whose reason now runs over its continuation lines. Each row has a reader the gate sees; the walker row sits above the heading with its reason and is pinned. The paragraph above ui: and the group's own comment are true of the tree.

scripts/check-ci-filter-parity.mjs, subject five.

  • M1, the fix. uiRootReadsOf adds a second candidate source: a one-piece ../ literal that resolves outside ui/ from the test's own directory and names a file on disk. The zh-CN pack is in --list with its reader, covered by its literal row. The battery case is capable of failing (a URL import outside ui/, a directory literal that must not count, a literal naming nothing), and the real-tree rollback of the row reports exactly that path. The reader is then selected: by reading, closureSummaries sets readsDisk for it and the always-on branch takes it; the dev reports --explain moving 525 to 526 on a pack-only diff. I did not run the selector.
  • My literal scan, re-run on this head, lists 11 paths. Every one is in the gate's 16, each covered by a row or subtree, or the declared mcp trade-off. No other ui test read outside ui/ that the scan can see is unscheduled. The scan sees one-piece ../ literals only; reads spelled another way are the walker's, and the bounds below.
  • S4, the fix. The two instances named last round are closed: scripts/invoked-as.mjs is in the population through ci-shard-matrix.mjs and has a row; the walker module, which the selector loads by a computed import, has a row above the heading, and the header states that bound in words.

S5 (should-fix) — the closure follows only JavaScript modules, and the header says otherwise. firstPartyModuleClosure stops at any file that is not .js or .mjs (the extension test inside its walk in first-party-closure.mjs), so for a .ts module it returns the entry alone. The gate's MODULE_FILE admits .ts, and the header says a loaded module's first-party imports are each a read of the test; for the TypeScript modules ui tests load that is not done, and the known bounds do not say so. Live case: objectstack-skill.test.ts imports packages/mcp/src/skill-md.ts, which imports ./ask-skill.generated.js (a .ts on disk); that file is in no list, has no trade-off line, and is absent from --list. Nothing breaks unseen today: its parent is the declared trade-off and the same Test Core pin covers it, and the other .ts entries sit under ui_consumers subtrees. But a .ts module outside those subtrees gets a row for itself and silence for what it imports. Either resolve the .js specifier to its .ts source (the gate already imports resolveImportTarget) and walk it, or state the bound in the header and name the mcp member in the trade-off line.

Subject six and scripts/ci-filter-parity.ui-pin.json.

  • S1, the fix. conditionClauses appends an implicit-success clause to any condition that names no status function, and an absent if: is that clause alone. Every pinned condition names one, so dropping !cancelled() or always() adds a clause the pin does not imply, and reds as narrowed. Presence of a status function anywhere in the expression is the test, which is GitHub's own rule. Pinned on the real test-ui-plan job.
  • S2, the fix. Rows of each pinned filter are compared both ways, the reads group left to subject five; a condition implied by its pin but not equal in clause form reds as wider. The pin equals the head: the bare gate exits 0. The former green controls are now red controls, followed by green once the pin names the change, then red again on removal. That sequence is the ratchet the card asks for.

ui/scripts/markdown-test-inputs.mjs. S3, the fix. An out-of-tree resolution is admitted only when a root ui: glob matches it, read from the real ci.yml as text; an unreadable entry throws, an empty list throws. The 58 root-noise entries are gone and a new test holds every ../ entry of the ledger to a ui: row. The existence of an unscheduled root document is no longer an input of the ledger test. Card #38134's pin still holds: the ADR read is a candidate because its row exists.

ui/scripts/select-affected-tests.mjs. The new rule agrees with its comment and its three tests. It is pure text, so a literal naming nothing still makes the reader always-on: the safe direction.

scripts/check-cross-package-test-inputs.mjs. Unchanged since the first record.

Nits, no effect on correctness or the contract:

  • N1, N2, N3 from the first record: done.
  • N4: deferred with a carrier, see ③.
  • N5: the ledger consults the ui: list only, so a markdown document a ui test really read under a ui_consumers subtree would be scheduled but absent from the ledger. No such read today.
  • N6: one new self-test line calls uiReadsGroupOf on the whole workflow text, where the gate itself passes the filters: string. It finds the same list today.

Implemented-by: claude/issue-38132-ui-test-inputs
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): REWORK (delta) at head 807ec4fd51db264f282c8a1c5c39e228c98af83f (Fixes #38132, #38133, #38134). This follows REWORK 7238896656.

Review summary

M1 and S1 to S4 are closed:

  • The zh-CN forms pack import is now in --list with a row, and its test lands in the always-on lane.
  • Dropping a status function reds as a narrowing.
  • The pin is exact both ways.
  • Out-of-tree ledger candidates are limited to ui: coverage.
  • scripts/invoked-as.mjs has its row.

The delta record re-ran its literal scan: all 11 paths are covered. Both remerge diffs are empty. The N4 deferral to a follow-up card is acceptable, since an exact pin closes the risk it named. Delta contract record 7239624342 is PASS at this head with its tier verified, and it opens one new graded item.

Owed before landing: S5 of 7239624342, the import closure stops at .ts modules. The gate header says each of a loaded module's first-party imports is a read of the test. firstPartyModuleClosure follows only .js and .mjs files. I checked the live case: packages/mcp/src/skill-md.ts imports ./ask-skill.generated.js, which is a .ts on disk, and it is in no list and absent from --list. Nothing is unscheduled today, because its parent is the declared mcp trade-off. Fix either way:

  • resolve the .js specifier to its .ts source and walk it; or
  • state the bound in the header and name the member in the trade-off line.

With the same push (nits):

  • N5: a markdown read under a ui_consumers subtree would be scheduled but absent from the ledger. There is none today.
  • N6: one self-test line passes the whole workflow text to uiReadsGroupOf.

Gates. At this head the check-runs read 27 success, 13 skipped, 0 failed and 13 in progress, including the lane that runs this gate.

Next: the fix earns a delta contract review and a delta L1. After that it goes to seat 1 (Tier H, ci.yml).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd size/xl skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

2 participants