Skip to content

test(vitest): one shared root preset for the 18 identical package configs (#26092 part 2) - #26267

Merged
os-zhuang merged 2 commits into
mainfrom
claude/project-thread-6xbguc
Oct 26, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/project-thread-6xbguc

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #26092

This is PR 2 of 2, the vitest half. PR 1, the tsconfig half, was #26203 and is merged.

Clause-②: no
Metadata-protocol: none

What changes

  • vitest.preset.mts (new, repo root) holds the one setting the 18 byte-identical package configs carried, test.disableConsoleIntercept: true, with its rationale once. It is a plain object, not defineConfig(...): the root package declares no vitest dependency, so importing vitest/config there resolves only through pnpm hoisting and adds a TS2307 to the root program (root DEBT measured 26 to 27 with the import, 26 without).
  • The 18 configs (former md5 0d3c266a...) become a copyright line, one comment line and export { default } from 'REL/vitest.preset.mts';.
  • scripts/check-console-intercept-disarm.mjs. The card's premise that the gate "reads the effective config; it goes green by construction" does not hold: the gate greps each config's comment- and literal-masked source for the setting, and with the preset alone it went red on all 18 (measured by the handoff thread). The gate is kept and learns one narrow shape: a package-root config whose only statement is a bare re-export of the root vitest.preset.mts is judged by the preset's source, with the same disarm, re-arm and projects checks, and the finding names the re-export. A config that imports the preset and wraps or merges it is not recognised and must still carry the setting itself. Five self-test cases added (battery floor 11 to 16).
  • turbo.json: the test task's inputs gain $TURBO_ROOT$/vitest.preset.mts, so an edit to the preset re-runs the re-exporting suites instead of replaying cache.
  • scripts/check-cross-package-test-inputs.mjs: TURBO_ROOT_FILE_INPUTS gains vitest.preset.mts (its self-test pins the set of repo-root files turbo.json declares as inputs and went red on the new input without it).
  • .github/workflows/ci.yml: the core filter lists vitest.preset.mts beside the two tsconfig bases, so a diff confined to the preset still starts Test Core. node scripts/check-ci-filter-parity.mjs and its --self-test both exit 0 with the line (it is not judged a leftover).

Verification (head c382986, on main 81bba6c)

  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 107 commands on this head; all 107 ran, each exit captured before any pipe: 107 exit 0. --ran reconciliation (record carries every exit code): 107 derived, 107 run, 0 NOT-MEASURED, 0 UNRUN. Prerequisites first: clone unshallowed, every non-ui package built (76/76 tasks).
  • node scripts/check-console-intercept-disarm.mjs --self-test: self-test OK: 15 cases + real-tree population floor (the five new cases among them); the scan: OK: 77 vitest-running package(s), every one disarms console interception at the package root.
  • node scripts/check-ci-filter-parity.mjs and --self-test: exit 0.
  • Package tests, turbo run test --force over all 18 re-exporting packages: 81/81 turbo tasks successful (dependency builds included); all 301 test files passed (driver-turso: 95 files, 34 tests skipped by its own environment guards). The same 18 also passed with this patch on main df8aac41f2 before the rebase. The suites were not re-run without the patch: every one passes with it, so none moved from pass to fail.
  • Acceptance md5: the card's command as written (md5sum ... | sort | uniq -c) counts whole lines, hash plus path, so it prints 1 for any tree. Counting hashes only (awk '{print $1}' before sort | uniq -c), the top count is 13: identical copies of the one-line preset re-export, which the card allows. The other 5 re-exporters differ only in the relative depth. The remaining duplicate pairs predate this card (the create-objectstack blank template's src/dist copy; knowledge-memory/knowledge-ragflow).
  • Gate ablation (handoff thread, same patch): removing the preset's disableConsoleIntercept: true reds the gate on all 18 re-exporters (exit 1); restored (hash-checked), exit 0.

Landing

Tier H: .github/workflows/ci.yml is a governed surface. This PR stays a draft until a GOVERNED_APPROVERS approval; the owning seat lands it after that.

No changeset (skip-changeset): the diff touches package vitest configs, a root config file, turbo.json, ci.yml and repo-internal gate scripts; no package's files[] ships a vitest config.

Acceptance notes

维护者速读(草稿)


Generated by Claude Code

…disarm

The 18 byte-identical package vitest configs re-export vitest.preset.mts
at the repo root, which carries disableConsoleIntercept: true and its
rationale once. check-console-intercept-disarm judges a bare re-export of
the root preset by the preset's own source, so the gate stays and still
reds every re-exporter by name if the preset loses the setting. turbo's
test task takes the preset as an input so an edit to it reruns the suites.

Claude-Session: https://claude.ai/code/session_01EaorEqkvnJBed5uX9BjSUG
Co-authored-by: Claude <noreply@anthropic.com>
vitest.preset.mts (arriving with the vitest half of the base split) is a
test input outside every package; list it in the core filter beside the
two tsconfig bases so a diff confined to it still runs Test Core.

Claude-Session: https://claude.ai/code/session_01EaorEqkvnJBed5uX9BjSUG
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 16 changed file(s) yielded no anchor (packages/connectors/connector-imap/vitest.config.ts, packages/connectors/connector-mcp/vitest.config.ts, packages/connectors/connector-rest/vitest.config.ts, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 16 changed package(s)).

What this run could not see
  • 16 changed file(s) yielded no anchor (packages/connectors/connector-imap/vitest.config.ts, packages/connectors/connector-mcp/vitest.config.ts, packages/connectors/connector-rest/vitest.config.ts, …) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 40 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 0453fabef70c1b2a8276508d37c350d3487badce → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · devx seat 2 · 2026-10-26T18:05Z

Seat domain:devx#2 (#20163) · session_01Q4MDXRbEJCNdPAP4SiXwp9 · reviewed head c3829861f6 · card #26092, claim 6421431330 (delta M, amended). This is PR 2; PR 1 #26203 merged at 17:10Z. PR carries Fixes #26092.

  • Scope: 23 files, +148/−317. ⛔ Tier H, because of one line in .github/workflows/ci.yml (the core filter gains 'vitest.preset.mts'). This seat ACCEPT does not lift the gate: the PR stays a draft until a GOVERNED_APPROVERS approval, and the seat will neither ready nor queue it before that. Nothing under ui/.
  • The preset: vitest.preset.mts carries exactly test.disableConsoleIntercept: true with the finding: any late console.* in a vitest worker can fail a fully green suite — the #9371 amplifier is upstream and still live #10374 rationale. It is a plain object, not defineConfig, so the root program type-checks without a root vitest dependency.
  • The 18 configs, by hash on this head: 13 are byte-identical and 5 more differ only in relative depth. Each is the one-line export { default } from '<rel>/vitest.preset.mts'. Configs that carry their own options (e.g. packages/core) are untouched, as the card asked.
  • The cache inputs move together. turbo.json test.inputs gains $TURBO_ROOT$/vitest.preset.mts, and check-cross-package-test-inputs pins it in TURBO_ROOT_FILE_INPUTS. The ci.yml line means a preset-only diff starts the core jobs, and check-ci-filter-parity is green with it, so it is not a leftover.
  • check-console-intercept-disarm learns exactly one re-export shape and judges the preset in its place. A config that wraps or merges the preset must still carry the setting itself. 15 self-test cases pass, including the 5 new ones.
  • Dev evidence: 107 derived gates exit 0. On the 18 affected packages, turbo test --force ran 81/81 tasks and 301 test files, all passing.
  • Note on the card's md5 acceptance command: it de-duplicates on hash + path, so it always prints 1. The seat counted by hash instead (above).
  • Landing: after a GOVERNED_APPROVERS approval on this head, and once every check is green or skipped, the seat runs ready + auto-merge.

Generated by Claude Code

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

Labels

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

Projects

None yet

3 participants