Repository navigation
test(app-shell): pre-filter the Studio address guard's walk before parsing - #37198
Merged
objectstack-fleet[bot] merged 1 commit intoNov 25, 2026
Merged
Conversation
…rsing The guard TypeScript-parsed every ui source (about 2,400 files) inside the default 15 s budget and timed out on loaded Test UI shards. A raw-text gate now keeps the parse to sources that may spell an address: each of the matcher's three words with every character in any spelling a string, template or identifier cooks back to it (escapes, line continuations), so it is a superset of the matcher by construction. A new control holds the gate to every spelling the matcher flags and to the builder file; the walk case gets an explicit 60 s budget as the second line of defence. Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Nov 25, 2026
Closed
Contributor
Author
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
objectstack-fleet
Bot
deleted the
claude/issue-37174-studio-address-guard-timeout
branch
November 25, 2026 04:08
This was referenced Nov 25, 2026
This was referenced Nov 25, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #37174
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Test-only: one file,
ui/packages/app-shell/src/views/studio-design/studioAddress.guard.test.ts. No product file, no published file (@object-ui/app-shellis private and shipsdistonly), henceskip-changeset. This unblocks PR #37114, whose Test UI shard timed out on this case twice (queue run 45501281672; PR job 138901843717).maySpellStudioAddress, now keeps the parse to the sources that may spell an address (123 of 2,378 here)./studioplusSTUDIO_ROOT_PATHis not exact:+onSTUDIO_LANDING_PATH(it is inROOT_NAMES).'\x2fstudio','\57\163tudio','/stud\u{69}o'and a line continuation inside the word all cook to/studiowhile the raw text holds no/studio. Identifiers cook\uescapes the same way (STUDIO_ROOT_PATH).\x,\u,\u{}, legacy octal), with line continuations allowed between characters./as is), so its raw text is its text.FLAGGED_SPELLINGS: the first case's eight spellings plus ten escaped andSTUDIO_LANDING_PATHforms. Each fixture's only hit is that spelling. The control asserts the matcher flags it once and the gate passes it. It also asserts that the builder file fires the matcher and passes the gate, and that a source naming no address is dropped. The first case now asserts the matcher over the same list, so the two cannot drift apart.StudioDesignSurface.tsxandStudioRoute.tsx, and the builder still fires the matcher inside the walk case.{ timeout: 60_000 }as the second line of defence; the measured wall time is below.Tests
Wall time of the walk case, before and after (local, shared box, under os-verify-lock)
95734fef75, unchanged file):no ui source outside the builder spells one 4471ms. File total:Duration 5.79s.45151aec2b):no ui source outside the builder spells one 873ms;the pre-filter keeps every source the matcher flags 18ms. File total:Duration 1.48s,Tests 3 passed (3).Ablation 1: the gate drops everything (`MAY_SPELL_STUDIO_ADDRESS.test(text) && false`)
Made through
scripts/ablation-replace.mjs. Result:ok mutation landed: anchor 1 -> 0, blob fdd866a33090 -> b763c5694c5f.× the pre-filter keeps every source the matcher flags, failing withAssertionError: const a = '/studio';: expected false to be true.Tests 1 failed | 2 passed (3).ok restored: blob == HEAD (fdd866a33090) and git diff HEAD is empty.Ablation 2: the card's two-word filter (`/studio` or `STUDIO_ROOT_PATH` as plain substrings)
Made through the same tool. Result:
ok mutation landed: anchor 1 -> 0, blob fdd866a33090 -> dbb5d30c77b9.× the pre-filter keeps every source the matcher flags, failing withAssertionError: const a2 = '\x2Fstudio';: expected false to be true.Tests 1 failed | 2 passed (3).ok restored: blob == HEAD (fdd866a33090) and git diff HEAD is empty.Derived gates at 45151ae (`dispatch-gates.mjs --commands`, 27 commands)
pnpm --dir ui exec vitest run scripts/first went red, 22 files failing withCannot find package '@objectstack/spec/ui': the fresh worktree had nopackages/spec/dist. Afterpnpm --filter @objectstack/spec buildit went green:Test Files 172 passed | 2 skipped (174),Tests 5131 passed | 2 skipped (5133),VERDICT command-exit 0.node scripts/check-nul-bytes.mjsand a control-byte grep over the file are clean.eslint --no-inline-configon the file exits 0.@object-ui/app-shellpackage suite (2,443 test files,--maxWorkers=2on a shared box): NOT MEASURED. Reason: still running after 70 minutes when this PR was opened. The CITest UIshards own that verdict.Acceptance notes
STUDIO_LANDING_PATHand every escaped spelling (ablation 2). The filter was widened to stay an exact superset, as the dispatch asked.node scripts/pm/overlap-check.mjs:VERDICT clean exit 0(origin/main95734fef75, 0 PR heads share the file).Verification
Read first:
STUDIO_ADDRESS_WORDSand the regex builder under it. This is the risk hunk: the superset argument lives there.FLAGGED_SPELLINGSlist and the new control case.maySpellStudioAddressearly return and its{ timeout: 60_000 }.Two-minute check: from
ui/, runpnpm --filter @object-ui/app-shell exec vitest run --root ../.. --reporter=verbose packages/app-shell/src/views/studio-design/studioAddress.guard.test.ts. Expect three passing cases, with the walk case at about 1 s instead of about 4.5 s.Generated by Claude Code