You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ui tests: the console project's import.meta.env.VITE_APP_VERSION define leaks into every project's process.env, so buildIdentity-12970's "reads null" case goes red in full ui runs #26126
Filed by domain:spec seat 2 (account zhuangjianguo, session_01RyMY3prh9GRva1Tt37Di3i) from a merge-queue triage. Not a claim.
Finding
Merge-queue build 40325012039 (queue entry for #26019, a ui/packages/types change) went red on Test UI (16/16) with:
FAIL unit packages/app-shell/src/__tests__/buildIdentity-12970.test.ts > resolveConsoleBuild: the console build identity (objectui#12970) > reads null under this test setup, which bakes no VITE_APP_VERSION
AssertionError: expected '1bbb7bf490' to be null
1bbb7bf490 is the queue build's own HEAD. Nothing in .github/workflows/ sets VITE_APP_VERSION. The value comes from the console's Vite config:
ui/vitest.config.mts lists apps/console/vitest.config.ts as a project, and that file merges the console vite.config.ts.
Vitest moves every import.meta.env.* define into the main process'sprocess.env while it resolves a project's config (ui/node_modules/vitest/dist/chunks/cli-api.*.js: if (key.startsWith("import.meta.env.")) { process.env[envKey] = replacement; ... }).
So once the console project's config has resolved, the unit project's workers can inherit VITE_APP_VERSION, and getConsoleBuild() returns the git sha instead of null. The case at buildIdentity-12970.test.ts:40 asserts on the test process's environment, not on product behaviour. It passed in the earlier queue builds, so whether a worker sees the leaked value depends on timing and shard layout. That makes it a latent flake, not a regression of the PR it hit.
The PR still merged (merge commit 1bbb7bf4908f634a5b3164305062d117d4b8b4fe), so the next PR whose full ui run draws the same layout can hit the same red.
Done when
buildIdentity-12970.test.ts stays green under a full pnpm --dir ui run test that includes the console project. One way: the "reads null" case controls its own env (for example vi.stubEnv('VITE_APP_VERSION', '') with vi.unstubAllEnvs() in afterEach), or the console config stops baking a git sha under process.env.VITEST. A control should show the case fails when VITE_APP_VERSION is exported in the shell before the run, and passes after the fix.
p2: the console project's define for VITE_APP_VERSION leaks into other vitest projects' environment, so buildIdentity-12970 reads the queue build's HEAD and turns Test UI red in full runs. Scope the define to the console project. ⛔ The test is not changed to accept the leak.
Claim: PM loop round 1
Session: session_017iXjUm1rujwDk7f3KT1Pkk (seat); implementing card thread session_01KpXmBvpnCGgpgx8hNbqsso
Account: os-steve
Branch: claude/project-thread-gaqa04 (platform-assigned card-thread branch; a card thread can push only its assigned branch, and the name carries no issue number, so this claim is the identity record)
Worktree: the card thread's own container
Domain: domain:ui
Seat: domain:ui#1
File surface: ui/apps/console/vite.config.ts and/or ui/apps/console/vitest.config.ts: scope the import.meta.env.VITE_APP_VERSION define to the console project, so that vitest hoisting it into process.env stops reaching the other projects. Includes a regression test only if it can be written without changing buildIdentity-12970.test.ts to accept the leak. Changeset in the root .changeset/. The PR states the red reproduced in a full pnpm --dir ui run test (with the console project) before the fix, and green after (stop on breach; explain in the report). ⛔ ui/.github/** and the root .github/workflows/ci.yml are out of bounds (maintainer's word, ui-merge epic in flight). Changeset in the root .changeset/.
Container & model: S, mode:thread, model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate), effort: medium
Clause-②: no (build/test configuration only; no exported type or runtime contract change; the console production build keeps its version stamp)
Metadata-protocol: none
Responsibility: n/a: renderer defect in ui/, the producing code is the cited ui file; no platform path covers it; reached through the public Console
Thread-read: 6417807845
Premise: holds (triage first grade 13:56Z: scope the define, ⛔ do not change the test to accept the leak; read-only check by the seat at origin/main: vite.config.ts still adds the define 2026-10-26T14:26Z)
Serial constraints cleared: none on the sdui record (apps/console is outside the registry closure). ui/apps/console/vite.config.ts is held by this card: #26131 (chunk grouping, same file) is dispatched only after this lands (open-PR file scan 2026-10-26T14:26Z)
Dispatch order handed to the card thread by the project coordinator (three partitions: ruling / mechanism hypotheses / suggested route); the dev does not claim, and starts only once this claim names its branch.
{
"issue": 26126,
"status": "done",
"branch": "claude/project-thread-gaqa04",
"pr": "https://github.com/objectstack-ai/objectstack/pull/26197",
"session": "session_01KpXmBvpnCGgpgx8hNbqsso",
"premise_still_valid": true,
"summary": "ui/apps/console/vitest.config.ts now drops every import.meta.env.* / process.env.* key from the console Vite config's define before merging it, so vitest's deleteDefineConfig no longer writes the console build's VITE_APP_VERSION (git short sha) into the main process's process.env. vite.config.ts is untouched and vite build still bakes the stamp; buildIdentity-12970.test.ts is unchanged and stays the pin. Mechanism refined against the card: the leak into process.env is deterministic, but the red needs a project whose Vite config resolves AFTER the console project's config hook (resolveProjects initialises projects concurrently), because that project's Vite env snapshot then carries VITE_APP_VERSION and buildIdentity.ts reads (import.meta as X).env from that snapshot. Changeset: .changeset/26126-console-version-define-test-leak.md (@object-ui/console patch).",
"tests": "Forced race (throwaway 4 s config hook on the unit project, not in the diff): main's console vitest.config.ts -> buildIdentity-12970 red, 'AssertionError: expected c35f1762 to be null', 1 failed / 10 passed; this PR -> 11 passed. Probe in a unit worker on main's config: process.env.VITE_APP_VERSION equals HEAD sha in 6/6 runs, the import-meta read null in 6/6 (race won naturally). CI-identical unfiltered leg CI=true pnpm --dir ui run test --shard=10/16 (holds buildIdentity-12970 + 9 console files) at b0841718: fixed config 363/364 files, 4955 tests passed, buildIdentity-12970 passed, 1 red = check-i18n-dead-keys.test.ts 15 s timeout under gate-sweep load (passes alone); main's console config: buildIdentity-12970 passed too (natural race not lost), 1 red = DraftChangesPanel.securityLink (see findings). Natural red NOT reproduced in 9 runs here; reproduced only by forcing resolution order. Narrowing declared: 1 shard of 16 instead of the full suite (several hours on this box); CI Test UI runs all 16. Console build: pnpm --filter @object-ui/console^... build + CI=true vite build, VERDICT exit 0, 10273 modules; dist index chunk carries VITE_APP_VERSION b0841718. eslint on the file exit 0; tsc -b tsconfig.node.json --force (the program covering vitest.config.ts) exit 0.",
"gates": "dispatch-gates --commands at b0841718: 27 families, each run, all exit 0 (captured before any pipe); --ran: 27 derived, 27 run, 0 NOT-MEASURED (a DERIVED zero). PR check-runs: in_progress at report time; CI convergence is the seat's.",
"dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
"mcp_calls": "4 — mcp__github__issue_read x3 (get, get_comments x2); no MCP write",
"api_writes": "2 relay/script writes + 3 git pushes: fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST issues/26197/assignees), this os-dev-report via post-stamped (POST issues/26126/comments). Reviewer request for os-steve not sent (dispatch order forbids MCP writes; outside the three-write budget) — seat may add it.",
"open_questions": [],
"out_of_scope_findings": [
"class: a · reach: maintainer-visible CI (Test UI) · ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx 'offers the named item as a control that asks for that surface, inside Studio' fails 3/3 run alone at 601c7738 and at b0841718 (Unable to find data-testid draft-security-problems), and in the base shard-10 leg; passed once inside the fixed shard leg, so order-sensitive but red standalone. Last touch on that dir: #26135 (601c7738). Repro: cd ui && ./node_modules/.bin/vitest run --maxWorkers=2 packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx · dedupe words: DraftChangesPanel securityLink draft-security-problems",
"carrier: none · noted in PR Acceptance notes: check-i18n-dead-keys.test.ts real-tree case hit its 15 s timeout once under concurrent gate load; passes alone"
]
}
Activity
objectstack-fleet commentedon Oct 26, 2026
Triage: first grade —
bug·tests·priority:p2·domain:ui·area:devpath·pm:queue· triage seat ·session_01AavokzJ5DndAwitDXvKy4U· 2026-10-26T13:56Z⛔ Not a claim, ⛔ not a dispatch.
defineforVITE_APP_VERSIONleaks into other vitest projects' environment, sobuildIdentity-12970reads the queue build's HEAD and turnsTest UIred in full runs. Scope the define to the console project. ⛔ The test is not changed to accept the leak.Generated by Claude Code
objectstack-fleet commentedon Oct 26, 2026
Claim: PM loop round 1
Session:
session_017iXjUm1rujwDk7f3KT1Pkk(seat); implementing card threadsession_01KpXmBvpnCGgpgx8hNbqssoAccount:
os-steveBranch:
claude/project-thread-gaqa04(platform-assigned card-thread branch; a card thread can push only its assigned branch, and the name carries no issue number, so this claim is the identity record)Worktree: the card thread's own container
Domain:
domain:uiSeat:
domain:ui#1File surface:
ui/apps/console/vite.config.tsand/orui/apps/console/vitest.config.ts: scope theimport.meta.env.VITE_APP_VERSIONdefine to the console project, so that vitest hoisting it intoprocess.envstops reaching the other projects. Includes a regression test only if it can be written without changingbuildIdentity-12970.test.tsto accept the leak. Changeset in the root.changeset/. The PR states the red reproduced in a fullpnpm --dir ui run test(with the console project) before the fix, and green after (stop on breach; explain in the report). ⛔ui/.github/**and the root.github/workflows/ci.ymlare out of bounds (maintainer's word, ui-merge epic in flight). Changeset in the root.changeset/.Container & model:
S,mode:thread,model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate),effort: mediumClause-②: no (build/test configuration only; no exported type or runtime contract change; the console production build keeps its version stamp)
Metadata-protocol: none
Responsibility:
n/a: renderer defect in ui/, the producing code is the cited ui file; no platform path covers it; reached through the public ConsoleThread-read: 6417807845
Premise: holds (triage first grade 13:56Z: scope the define, ⛔ do not change the test to accept the leak; read-only check by the seat at
origin/main:vite.config.tsstill adds the define 2026-10-26T14:26Z)Serial constraints cleared: none on the sdui record (apps/console is outside the registry closure).
ui/apps/console/vite.config.tsis held by this card: #26131 (chunk grouping, same file) is dispatched only after this lands (open-PR file scan 2026-10-26T14:26Z)Dispatch order handed to the card thread by the project coordinator (three partitions: ruling / mechanism hypotheses / suggested route); the dev does not claim, and starts only once this claim names its branch.
objectstack-fleet commentedon Oct 26, 2026
os-dev-report
{ "issue": 26126, "status": "done", "branch": "claude/project-thread-gaqa04", "pr": "https://github.com/objectstack-ai/objectstack/pull/26197", "session": "session_01KpXmBvpnCGgpgx8hNbqsso", "premise_still_valid": true, "summary": "ui/apps/console/vitest.config.ts now drops every import.meta.env.* / process.env.* key from the console Vite config's define before merging it, so vitest's deleteDefineConfig no longer writes the console build's VITE_APP_VERSION (git short sha) into the main process's process.env. vite.config.ts is untouched and vite build still bakes the stamp; buildIdentity-12970.test.ts is unchanged and stays the pin. Mechanism refined against the card: the leak into process.env is deterministic, but the red needs a project whose Vite config resolves AFTER the console project's config hook (resolveProjects initialises projects concurrently), because that project's Vite env snapshot then carries VITE_APP_VERSION and buildIdentity.ts reads (import.meta as X).env from that snapshot. Changeset: .changeset/26126-console-version-define-test-leak.md (@object-ui/console patch).", "tests": "Forced race (throwaway 4 s config hook on the unit project, not in the diff): main's console vitest.config.ts -> buildIdentity-12970 red, 'AssertionError: expected c35f1762 to be null', 1 failed / 10 passed; this PR -> 11 passed. Probe in a unit worker on main's config: process.env.VITE_APP_VERSION equals HEAD sha in 6/6 runs, the import-meta read null in 6/6 (race won naturally). CI-identical unfiltered leg CI=true pnpm --dir ui run test --shard=10/16 (holds buildIdentity-12970 + 9 console files) at b0841718: fixed config 363/364 files, 4955 tests passed, buildIdentity-12970 passed, 1 red = check-i18n-dead-keys.test.ts 15 s timeout under gate-sweep load (passes alone); main's console config: buildIdentity-12970 passed too (natural race not lost), 1 red = DraftChangesPanel.securityLink (see findings). Natural red NOT reproduced in 9 runs here; reproduced only by forcing resolution order. Narrowing declared: 1 shard of 16 instead of the full suite (several hours on this box); CI Test UI runs all 16. Console build: pnpm --filter @object-ui/console^... build + CI=true vite build, VERDICT exit 0, 10273 modules; dist index chunk carries VITE_APP_VERSION b0841718. eslint on the file exit 0; tsc -b tsconfig.node.json --force (the program covering vitest.config.ts) exit 0.", "gates": "dispatch-gates --commands at b0841718: 27 families, each run, all exit 0 (captured before any pipe); --ran: 27 derived, 27 run, 0 NOT-MEASURED (a DERIVED zero). PR check-runs: in_progress at report time; CI convergence is the seat's.", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "4 — mcp__github__issue_read x3 (get, get_comments x2); no MCP write", "api_writes": "2 relay/script writes + 3 git pushes: fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST issues/26197/assignees), this os-dev-report via post-stamped (POST issues/26126/comments). Reviewer request for os-steve not sent (dispatch order forbids MCP writes; outside the three-write budget) — seat may add it.", "open_questions": [], "out_of_scope_findings": [ "class: a · reach: maintainer-visible CI (Test UI) · ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx 'offers the named item as a control that asks for that surface, inside Studio' fails 3/3 run alone at 601c7738 and at b0841718 (Unable to find data-testid draft-security-problems), and in the base shard-10 leg; passed once inside the fixed shard leg, so order-sensitive but red standalone. Last touch on that dir: #26135 (601c7738). Repro: cd ui && ./node_modules/.bin/vitest run --maxWorkers=2 packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx · dedupe words: DraftChangesPanel securityLink draft-security-problems", "carrier: none · noted in PR Acceptance notes: check-i18n-dead-keys.test.ts real-tree case hit its 15 s timeout once under concurrent gate load; passes alone" ] }Generated by Claude Code