Skip to content

fix(plugin-dev): load setup/account through literal specifiers, so init() makes no main-process round trip under vitest - #20452

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/issue-20376-plugin-dev-cold-start
Sep 28, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/issue-20376-plugin-dev-cold-start

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #20376
Clause-②: no

What this changes

DevPlugin.init()'s setup / account app-package loop imported both packages through one variable specifier, import(/* @vite-ignore */ spec[0]). Under vitest a variable specifier cannot be resolved when dev-plugin.ts is transformed, so every call went to the main vitest process, mocked packages included: two main-process round trips per init(), inside every clocked test window that boots DevPlugin. The main process is shared by the whole run, so on a busy CI shard those requests wait on other files' work. That is the shape of the Test Core (6/6) red on PR #20365 (job 108779589417): the mount-refusal suite's first case timed out at 5026 ms and its second took 2336 ms, while its other four took 16-72 ms, in a package run reading transform 74.29s, import 137.46s, tests 11.87s.

Route A of the seat's answer on the card: each loop entry now carries its own literal loader (() => import('@objectstack/setup'), () => import('@objectstack/account')). The try / catch and reportOptionalLoadFailure around each load are byte-for-byte unchanged. No timeout, retry or test-arrangement change.

Files:

  • packages/plugins/plugin-dev/src/dev-plugin.ts: the loop only (two tuple entries, one call line, one comment block).
  • packages/plugins/plugin-dev/src/dev-plugin-literal-imports.pin.test.ts (new): every dynamic import() in dev-plugin.ts takes a string literal, except organizationsPkg (ADR-0132); read off the TypeScript AST.
  • packages/plugins/plugin-dev/src/dev-plugin-optional-load-failure.test.ts: one case pinning that setup / account, when they cannot be imported, still reach the absent arm (one line each at warn, with the resolver's code and the failing specifier, never at error).
  • packages/plugins/plugin-dev/vitest.config.ts: two anchored alias entries for @objectstack/setup / @objectstack/account, which check:test-source-alias requires once the specifiers are literal (see Acceptance notes).
  • .changeset/20376-plugin-dev-literal-app-imports.md: @objectstack/plugin-dev patch.

Takeover record

This branch was started by a dev whose seat session ran out of tokens after pushing 952e1249 and 4160ecbe, with no PR and no report. This continuation read both commits hunk by hunk as unverified work, merged origin/main (0fcb10184c) and re-ran every measurement below itself.

  • Kept: the dev-plugin.ts code lines, the changeset's frontmatter and Clause-② line, and the pin's __dirname seed (4160ecbe).
  • Corrected in 917a31bc72: the dev-plugin.ts comment and the changeset said the loop now loads "like every other load / package", which the deliberate organizationsPkg variable specifier contradicts (now: every other declared-dependency load); the changeset said the build keeps await import("…"), while dist/index.mjs and dist/index.js both keep a native import("…") inside an arrow; the pin header carried the earlier run's load timings (44.5-102.0 ms per init(), a 5048 ms local timeout), which this run did not re-measure, and now states the counts below plus the CI job reading, which this run read from the job log itself.
  • Corrected in 35833d2a2c: the pin's private regex comment stripper was refused by check:comment-mask-adoption; the pin now walks the TypeScript syntax tree (typescript is already a devDependency of this package).
  • Added in 917a31bc72: the absent-arm pin (no existing pin covered this loop's failure path).
  • Added in a24f6ea84c: the two vitest alias entries (check:test-source-alias red without them).

Measurements (H1-H4)

H1: the round trips, counted. A throwaway vite plugin (deleted after) logged every resolveId and transform the main process served, around six back-to-back init()s in a throwaway probe with every package mocked absent. Same method, same run shape, both legs:

dev-plugin.ts main-process requests during the six init()s per init()
as on origin/main (blob b132ad3f4) 20 first: 10 (2 bare resolveId, 2 /@fs resolveId, 2 dist/index.mjs transforms, 4 resolveIds of their imports); each later: 2 (@objectstack/setup, @objectstack/account)
this branch, a24f6ea84c 0 0

The real dev-plugin-tenancy-mount-refusal.test.ts under the same logger (importer dev-plugin.ts): on origin/main, 9 resolveIds of each package (nine init()s, 18 in all) plus both dist transforms; on this branch, none in the test phase. Every leg logged both absent-app warnings on every init() (6 of 6).

H2: the pin fails when the variable specifier comes back. node scripts/ablation-replace.mjs, WRAP mode, at 35833d2a2c:

  • the call line back to await import(/* @vite-ignore */ spec[0]): ① red (1 failed | 2 passed), received [ 'spec[0]', 'organizationsPkg' ];
  • the whole hunk back to the origin/main blob b132ad3f4: ① and ③ red (2 failed | 1 passed; ③ reports 12 literal loads, none of them setup / account).

Each restore was proven by the tool: blob after restore equals the HEAD blob (1f1ac117f) and git diff HEAD is empty. The pin reads dev-plugin.ts's source text, so no dist/ leg applies.

H3: the absent-package path is unchanged. The new case is green on this branch and green with dev-plugin.ts swapped to the origin/main blob (10 passed both), so it pins behaviour the fix preserves. It goes red when that path breaks: a silent catch (if (err) continue;) gives 1 failed | 9 passed, and demoting the loop's absentLevel to info gives 1 failed | 9 passed. Restores proven as above. (A first attempt at the silent-catch leg was refused by the tool, because its replacement contained its own anchor; no test ran, and it was retried with a different anchor.)

H4: the suites pass. pnpm --filter @objectstack/plugin-dev test at a24f6ea84c: Test Files 9 passed (9), Tests 86 passed (86), mount-refusal 6/6, failfast 9/9, tenancy-posture 6/6, optional-load-failure 10/10, security-enforcement-warning 4/4, malformed-stack-posture 4/4, dev-plugin.test.ts 24/24, i18n reader 20/20, the new pin 3/3.

Verification at a24f6ea84c

  • pnpm turbo run build --filter='@objectstack/plugin-dev^...' --concurrency=2: 34/34.
  • pnpm --filter @objectstack/plugin-dev typecheck: exit 0 (tsc --noEmit and check:test-typecheck; --listFiles shows both touched test files in both programs).
  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands: 62 commands, all exit 0; --ran reconciliation: 62 derived, 62 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero: every line carries its exit code). On the way: check:comment-mask-adoption and check:test-source-alias were red on this branch's pushed state and are fixed above; check:dual-build-cjs-loads and check:type-check-debt first answered PREREQUISITE NOT MET and were re-run after pnpm exec turbo run build --filter='./packages/*' --filter='./packages/*/*' --concurrency=2 (71/71).
  • node scripts/check-issue-citations.mjs --base origin/main: exit 0 (also exit 0 with --base 0fcb10184c, the merge base).
  • pnpm lint: exit 0, no findings.
  • NOT MEASURED locally, declared to CI: the Test Core, Dogfood, Build Core and Temporal Conformance jobs and the workspace type-check lanes the derivation lists as CI-only.

Declared narrowing — verification ran UNLOCKED. scripts/pm/os-verify-lock.sh
could not take the shared verify lock on this host: no usable flock. The shared
verify lock is declared Linux-only (flock is util-linux, and a stock macOS does
not ship it), so the command below was run directly, without the lock —
a declared narrowing, not a silent one. No serialization guarantee held for this
run, nor for any sibling agent in this container while it ran.

pnpm turbo run build --filter='@objectstack/plugin-dev^...' --concurrency=2
pnpm --filter @objectstack/plugin-dev build
pnpm exec turbo run build --filter='./packages/*' --filter='./packages/*/*' --concurrency=2
pnpm --filter @objectstack/plugin-dev typecheck
pnpm --filter @objectstack/plugin-dev test
pnpm --filter @objectstack/plugin-dev exec vitest run --maxWorkers=2 (suite, probe and ablation runs)

Acceptance notes

  • File surface. packages/plugins/plugin-dev/vitest.config.ts is not in the claim's listed surface. It is the mechanical consequence of route A: literal specifiers make both packages visible to check:test-source-alias, which then requires them aliased to source. The two entries are the ones the gate printed; both packages' own imports were already aliased. The absent-arm case in dev-plugin-optional-load-failure.test.ts is the "smallest pin" the dispatch's H3 asked for.
  • Census notes carried from the seat's answer, not re-measured under load. dev-plugin-malformed-stack-posture.test.ts case 4 pays a real cold load of objectql and driver-memory inside a window widened by an explicit 60_000, and the first case of dev-i18n-packages-reader.test.ts pays a first-use cost. Neither is failing (idle maxima at a24f6ea84c: 76 ms and 28 ms). No CPU-load generator was run on this shared host.
  • Timing. This PR rests on the deterministic counts above and the CI job reading. The earlier run's under-load timings (on the card) were not re-measured here.
  • Same loop shape in the CLI. packages/cli/src/commands/serve.ts (around line 4024) loads setup / account through the same kind of variable-specifier loop (with webpackIgnore). In a spawned CLI process there is no vitest main process to call, so it costs nothing there; a vitest suite that ran that branch in-process would pay the same round trip. Not measured. Noted, not filed.
  • A stale docblock sentence. dev-plugin.ts's MODULE_NOT_FOUND_CODES docblock says the CJS build resolves these loads through require(). The current dist/index.js keeps a native import("…") for every dynamic load. It is harmless, because both codes stay in the set. Noted, not filed.
  • Bundler visibility. A consumer's bundler now sees @objectstack/setup and @objectstack/account statically, as it already saw the twelve other literal loads. Both are declared dependencies. @objectstack/organizations, which no framework package may declare, keeps its webpackIgnore variable form.

Generated by Claude Code

claude and others added 6 commits September 28, 2026 08:26
…it() makes no main-process round trip under vitest

The setup / account app-package loop in DevPlugin.init() imported
through one variable specifier (`import(spec[0])`). Under vitest a
variable specifier is resolved at call time by a round trip to the main
process, even when the package is mocked, so every init() in every
plugin-dev suite made two such round trips. Under CPU load they were the
load-dependent term in the suites' clocked windows.

Each loop entry now carries its own literal loader. The try/catch and
reportOptionalLoadFailure around each load are unchanged. A family pin
(dev-plugin-literal-imports.pin.test.ts) holds that every dynamic import
in dev-plugin.ts is literal, except the ADR-0132 organizations one.

Claude-Session: https://claude.ai/code/session_01UYBdGBzWSrAMzpW8ah3GbP
Co-authored-by: Claude <noreply@anthropic.com>
…the build config compiles src as CommonJS

`import.meta` is TS1470 under this package's NodeNext/CommonJS build
config, which `tsc --noEmit` also reads for tests. Vitest's evaluator
provides `__dirname`, the spelling the sibling plugin-auth pins use.

Claude-Session: https://claude.ai/code/session_01UYBdGBzWSrAMzpW8ah3GbP
Co-authored-by: Claude <noreply@anthropic.com>
…d round-trip counts in the pin and changeset

The takeover's re-verification of the two pushed commits corrects three
statements and adds the absent-arm preservation pin the fix was missing:

- dev-plugin-optional-load-failure.test.ts: one case holding that
  @objectstack/setup and @objectstack/account, when they cannot be
  imported, still reach the absent arm once each at warn, with the
  resolver's code and the failing specifier, never at error. No existing
  pin covered that loop's failure path.
- dev-plugin-literal-imports.pin.test.ts: the header now states the
  counts re-measured on this tree (20 main-process requests over six
  init()s through the variable specifier, 0 with literal ones; 18 in the
  mount-refusal suite) and the CI job reading, in place of timing figures
  carried from an earlier run that this takeover did not re-measure.
- dev-plugin.ts comment and the changeset: the organizations load is a
  deliberate variable specifier, so "like every other load" becomes
  "every other declared-dependency load"; the build keeps a native
  import("...") inside an arrow, not "await import".

Claude-Session: https://claude.ai/code/session_local_1d2a197c-c20e-4e90-9be8-413d4d432289
Co-authored-by: Claude <noreply@anthropic.com>
…, not a private comment stripper

check:comment-mask-adoption refused the pin's regex comment mask
(regex-block, regex-line) as a new private comment stripper. The pin now
walks the file's syntax tree: a dynamic import is a call node whose
callee is the import keyword, so a comment, a string or a regex that
mentions import( is never read as one, and a leading bundler hint is
trivia. The exception check (organizationsPkg) reads the variable
declaration's initializer instead of a source regex. typescript is
already a devDependency of this package; the file surface is unchanged.

Claude-Session: https://claude.ai/code/session_local_1d2a197c-c20e-4e90-9be8-413d4d432289
Co-authored-by: Claude <noreply@anthropic.com>
…o source in the vitest config

check:test-source-alias reds on the literal specifiers: dev-plugin.ts now
names both packages statically, and unaliased they resolve through
exports to dist/, so a test verdict would depend on build state. Two
anchored entries, exactly as the gate prescribes; both packages' own
imports (platform-objects/apps, spec/system) are already aliased. Every
suite mocks both packages, and the mocks resolve through the same
entries: the full suite stays green and the six-init probe still shows
zero main-process requests in the test phase.

Claude-Session: https://claude.ai/code/session_local_1d2a197c-c20e-4e90-9be8-413d4d432289
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling labels Sep 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/plugin-dev, touching 3 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/plugins/plugin-dev/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.

1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/kernel/services-checklist.mdx (via DevPlugin (symbol, a top-level class))
What this run could not see
  • 1 changed file(s) yielded no anchor (packages/plugins/plugin-dev/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 — 3 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 6e3e5462c6d1ad3e6b0e3e88bea17b69dfefef9d → packageMentionDocs.

Which tree this was computed on

This run read content/docs from be1eb700e1845395fdc2cc1c35c7ba097e5f200b — the merge of head a24f6ea84c3b8dbf1a8b6bf81bc29c763b0dc444 into base 6e3e5462c6d1ad3e6b0e3e88bea17b69dfefef9d, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin be1eb700e1845395fdc2cc1c35c7ba097e5f200b && git checkout be1eb700e1845395fdc2cc1c35c7ba097e5f200b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6e3e5462c6d1ad3e6b0e3e88bea17b69dfefef9d a24f6ea84c3b8dbf1a8b6bf81bc29c763b0dc444 && git checkout -B drift-repro 6e3e5462c6d1ad3e6b0e3e88bea17b69dfefef9d && git merge --no-ff a24f6ea84c3b8dbf1a8b6bf81bc29c763b0dc444

node scripts/docs-audit/affected-docs.mjs --json 6e3e5462c6d1ad3e6b0e3e88bea17b69dfefef9d

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 6e3e5462c6d1ad3e6b0e3e88bea17b69dfefef9d → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a24f6ea84c3b8dbf1a8b6bf81bc29c763b0dc444
Local-runs: none

PR #20452 (draft, base main) for card #20376. Rendered read-only by an isolated contract-review subagent from the card's body and its six comments, the PR's body, file list and net diff against main, and the head's check-runs; the recogniser template, the plugin-dev package.json, the untouched neighbourhood of dev-plugin.ts and the suite files were read from the checkout, nothing was built, run or re-run. Adopted and posted by the session named in Reviewed-by.

Check-runs on the head, read at 13:45 UTC, newest run per name: 32 runs, 26 success, 3 skipped (Build Docs, Console Pin Gate, Packed-tarball smoke (opt-in)), 0 failure, 3 still in progress: Lint & Repo Gates, Test Core (1/6), Type Check · workspace. Success includes Test Core (6/6), the shard the card's red was observed on, Test Core (2/6) to (5/6), Build Core, Check Changeset, Governed Surface Queue Guard, Temporal Conformance, all four Dogfood runs, both claim/branch guards, Part-of PR must not also close its card, and the three completed type-check lanes. The three running checks have no verdict at this read and none is inferred here. Lint & Repo Gates is the job that runs check:test-source-alias and check:comment-mask-adoption, the two gates the dev reports red-then-fixed on the way, so their CI answer is still pending. The PASS below is the contract judgment of sections ① to ③; landing still waits on those three conclusions.

① Derived judgments

  1. The load form of the setup / account app-package loop (dev-plugin.ts, one hunk). The shared variable specifier import(/* @vite-ignore */ spec[0]) becomes a per-entry literal loader, an arrow returning import('@objectstack/setup') on the first entry and one returning import('@objectstack/account') on the second, called as spec[2](). Iteration order, the await per entry, the enabled('auth') gate the loop sits under, the try / catch, and the reportOptionalLoadFailure spec in the catch (packages, the ✘ … not installed — skipping its app line at warn, outcome) are outside the hunk and unchanged. Accept-set of DevPlugin.init(): unchanged, same options, same tolerance of an absent package, same present-but-failed arm. Right.

  2. Published surface. Both packages are dependencies (workspace:^) of @objectstack/plugin-dev (package.json, not in the diff), and the shared tsup config (format: ['esm', 'cjs'], target: 'es2020', no external override, so dependencies are externalised) keeps a native dynamic import of an external in both formats and inlines nothing. The one implication: a consumer's bundler or static analyser now sees two already-hard dependency edges it could not see through the variable form. No export, option, log line or env knob is added, removed or renamed; @objectstack/organizations keeps its variable webpackIgnore form, as ADR-0132 requires. Right, and patch-shaped. The changeset's sentence that both builds keep a native import("…") is the dev's reading of the built dist; it is consistent with the build config and was not re-measured here.

  3. Dropping /* @vite-ignore */. The hint only suppresses Vite's warning on a variable specifier. A literal is resolved when the file is transformed, which is exactly the mechanism the fix rests on (the specifier stops going to the main vitest process at call time). Right.

  4. vitest.config.ts: two anchored alias entries. Exact-match regexes to packages/apps/setup/src/index.ts and packages/apps/account/src/index.ts; both files exist and their package names match; there was no earlier entry for either package, and the file's prefix-ordering caveat (@objectstack/core, @objectstack/types) does not apply to an anchored find. Effect on the suites: every suite in which the loop runs mocks both packages, seven of the eight DevPlugin-booting suites; the eighth, dev-plugin-malformed-stack-posture.test.ts, boots with auth: false, so the loop and therefore the alias are never reached there. No suite's subject changes, and the vi.mock id and the literal import now resolve through the same entry. Test-only surface, nothing published. Right. Its gate, check:test-source-alias, is answered by Lint & Repo Gates, in progress at this read.

  5. The family pin, dev-plugin-literal-imports.pin.test.ts. Walks dev-plugin.ts with the TypeScript parser, so a comment, a string or the webpackIgnore trivia cannot be misread as an import; ① the only non-literal specifier is organizationsPkg; ② that name is declared once, with the literal '@objectstack/organizations'; ③ a lit control that the walk sees setup, account and objectql as literals, so ① cannot pass vacuously. It pins the mechanism (the form of the specifier) rather than a timing, which is the "pin that it stays out" triage asked for, moved to where the measurement pointed; the PR's H2 shows ① and ③ red on the base blob under ablation with proven restores. __dirname over import.meta is right for a test program compiled as CommonJS; typescript is already a devDependency of the package. A template literal without substitutions would count as variable, which is stricter than needed and harmless. Right.

  6. The absent-arm case in dev-plugin-optional-load-failure.test.ts. The suite's own factories throw a coded ERR_MODULE_NOT_FOUND error for both packages; vitest's mocker wraps it, isModuleNotFound reads the first coded link of the chain, and loadFailureDetail renders code: … — message across the chain, so the one warn line per package carries both the code and Cannot find package '…', and nothing reaches error. Green on the base blob as well (H3), so it pins behaviour the fix preserves; red on a silent catch and on an info demotion. Right.

  7. No timeout, retry or arrangement change. No existing test's it, timeout or retry is touched, and dev-plugin-tenancy-mount-refusal.test.ts, the file the card names, is not in the file list. Triage's ⛔ holds. Right.

  8. Direction. The card's cold-start suspicion was falsified by round 1's measurement (a first-init() premium of about 10 ms; the load-dependent term is two main-process round trips per init(), on every case). The seat's route-A answer (5865888222) is the binding direction inside triage's grade, and the diff is route A exactly: the loop only, a cheap family pin, a patch changeset, plus the two additions the claim 5869085056 was amended in place to carry. Right.

Wrong: none found. The five files in the file list are the five the amended claim names, and nothing else.

② Semver level

  • .changeset/20376-plugin-dev-literal-app-imports.md: @objectstack/plugin-dev patch. The diff publishes one thing, the load form of two declared dependencies inside a released package's dist; no export, option, spec key, log line or env knob is added, removed or renamed, so patch is both the floor and the ceiling. Check Changeset is success on the head. Right.
  • The declaration line: the PR body, the amended claim and the changeset all carry the closed form no for Clause-②, with no arm. The diff widens no accept set and narrows none (nothing an author or operator writes or sees changes), so no is right and no ADR-0087 marker is owed. Right.
  • Changeset body against the code: the quoted absent line matches the absent template in the loop's catch; "every other declared dependency it loads" is accurate, since the organizations load is the deliberate exception and is not declared; the migration section is correctly absent for a non-breaking change. Right.

③ Boundary flags

Open questions.

  • Round 1 (5865793469): one, the route A / B / C decision. Answered by the seat at 5865888222 (route A, an implementation route inside triage's direction, no product-visible change); the diff executes it. Answered.
  • Final report (5871003036): open_questions: []. Nothing to answer.

Dev flags, final report (5871003036).

  1. vitest.config.ts outside the claim's listed surface: the claim 5869085056 was amended in place after the report to carry it (its current text names the two aliases); mechanical consequence of route A. Answered; the CI answer for its gate is pending in Lint & Repo Gates.
  2. One case added to dev-plugin-optional-load-failure.test.ts: amended into the same claim. Answered.
  3. Throwaway probe files lived inside the package, were copied out and deleted: the file list shows the five files only. Answered, no residue.
  4. First silent-catch ablation refused by the tool and retried with a different anchor: procedural. Answered.
  5. First label-write ran without a token and wrote nothing; the re-run made the one assignee write: procedural. Answered.
  6. origin/main moved after the merge on no touched file and the branch was not re-merged: the PR reads mergeable: true against the moved base. Answered.
  7. A full workspace build to meet two PREREQUISITE NOT MET gates: wider than the closure, no residue in the diff. Answered.
  8. Verification ran UNLOCKED (no flock on macOS): a declared narrowing, pasted verbatim in the PR body with the command list; the head's check-runs are the gate verdicts and are recorded above. Answered.
  9. Attribution: AGENTS.md's model-free trailer pair and session-URL footer over the harness reminder: right by the repo's own rule (the PR footer carries the session URL); the commit trailers themselves were not among this review's inputs. Answered.
  10. PR-body readback blank line; worktree removed after the PR opened: cosmetic and procedural. Answered.

Dev flags, round 1 (5865793469). Fence stop with no PR and one report comment (the measurement pointed into DevPlugin itself), a worktree on a newer main with an empty plugin-dev diff, one MCP job-log read after the REST redirect was refused at the proxy, CPU-load loops on the shared box with every PID cleaned, temporary source mutation for measurement with proven restores and no delivered change, no commit so the trailer was moot. All answered by the seat's route-A answer; none carries into the diff.

Takeover flags (PR body). The continuation read the dead dev's two pushed commits as unverified work, kept the code lines, corrected the comment, changeset and pin header where they overstated ("like every other load", the await import wording, un-re-measured timings), rewrote the pin as an AST walk after check:comment-mask-adoption refused the regex stripper, and added the alias entries and the absent-arm case. The diff read here is the corrected text. Answered.

Out-of-scope findings, noted and not filed.

  • packages/cli/src/commands/serve.ts loads setup / account through the same variable-specifier loop (webpackIgnore): a spawned CLI process has no vitest main process, so it costs nothing there, and there is no failing reproduction. Noted-not-filed is right; it is the same construct, so this card is the first read if an in-process suite ever shows the shape. Not escalated.
  • The MODULE_NOT_FOUND_CODES docblock says the CJS build resolves through require() while the dist keeps import(): both codes stay in the set, so it is drift with no behavioural consequence. Not escalated.
  • Census carries (dev-plugin-malformed-stack-posture.test.ts case 4's real cold load inside an explicit 60_000 window; the i18n reader's first-use cost): the seat's answer already directed that they stay in the PR's Acceptance notes unless re-measurement said otherwise, and neither is failing. Not escalated.
  • Round 1's per-suite census entries were each "covered by the route decision", and route A is what landed. Closed by the diff.

Escalations: none. Pending, not escalated: the three in-progress check-runs named above.

Implemented-by: claude/issue-20376-plugin-dev-cold-start
Reviewed-by: local_1d2a197c-c20e-4e90-9be8-413d4d432289

VERDICT: PASS

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review September 28, 2026 13:52
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 36433026729 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

失败的 job(日志抽取,best effort):

  • Test Core (1/6) — 失败步骤: Run this shard's tests

    @objectstack/spec:test:  FAIL   local  src/data/filter-number-comparand-declared-type.test.ts > [#20336] the judged positions > partition FieldOperatorsSchema's keys with the text operators and the tw
      ↳ 失败原因: @objectstack/spec:test: AssertionError: expected [ '$between', '$contains', …(16) ] to deeply equal [ '$between', '$contains', …(17) ]
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 1 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 36434111750 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

失败的 job(日志抽取,best effort):

  • Test Core (1/6) — 失败步骤: Run this shard's tests

    @objectstack/spec:test:  FAIL   local  src/data/filter-number-comparand-declared-type.test.ts > [#20336] the judged positions > partition FieldOperatorsSchema's keys with the text operators and the tw
      ↳ 失败原因: @objectstack/spec:test: AssertionError: expected [ '$between', '$contains', …(16) ] to deeply equal [ '$between', '$contains', …(17) ]
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • ⚠️ 本 PR 过去 24h 已在队列失败 1 次(不含本次)。 内容未变而反复失败 ⇒ 高度怀疑 flaky 测试或与同组 PR 的语义冲突,重排不解决。
  • 过去 24h 队列共有 3 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

Merged via the queue into main with commit 35e549b Sep 28, 2026
36 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-20376-plugin-dev-cold-start branch September 28, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

2 participants