Skip to content

test(verify): the two untimed requires-knowledge cases take the file's 120_000 budget - #37708

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-37700-knowledge-verify-timeout
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-37700-knowledge-verify-timeout

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #37700
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:只改了一份内部测试的等待上限,产品行为前后不变。
  • 为什么做:知识库能力的一条新测试在主干定时全量构建里超时,把主干标红;本改动让它在繁忙的构建机上也有足够时间。
  • 出错会怎样:最坏只是这条测试仍偶发超时,主干再红一次,可直接撤回,不影响任何用户。
  • 要你做什么:无。

What changes

packages/verify/src/harness.required-providers.test.ts only. The two cases in the requires: ['knowledge'] describe that still ran on vitest's 5000 ms default now take the file's per-case 120_000, which every other boot/import case in the file already carries. Each carries a comment with its measurement:

  • an install without the optional libSQL store (the failing case). It clears the module cache (vi.resetModules()) and constructServedProviders then re-imports the provider graph. Local: 1138 / 1358 / 1365 ms over three runs. The scheduled run 45888214247 (job 140145134703, Test Core 10/10) read this file's tests at 57.8 s, which is 52.8 s outside this case against 16.2 s locally, so 3.3x. 1365 ms x 3.3 = 4.5 s, which leaves no margin under 5000 ms. The case was killed at 5000 ms.
  • a host that mounts the service itself. The same constructServedProviders shape, and it had no timeout either. 111-114 ms in file order, 431 ms alone on a cold cache (-t). x 3.3 = 1.4 s cold. It is not failing today; it gets the same budget so the risk is covered the same way.

The other three knowledge cases already carry 120_000. I chose a per-case timeout over a shared boot (the #28631 shape) because the slow case is not a repeated boot. Its cost is a module re-import that it causes on purpose, and nothing could share it. The file's own convention is a per-case 120_000. Nothing is skipped.

Tests

File run on the final head, plus three earlier measurement runs
head fdf439c4e: pnpm --filter @objectstack/verify exec vitest run --maxWorkers=2 --reporter=verbose src/harness.required-providers.test.ts
 ✓ ... a host that mounts the service itself keeps its own, and the runtime adds no store 235ms
 ✓ ... an install without the optional libSQL store: ... says so once 1487ms
 Test Files  1 passed (1)
      Tests  15 passed (15)
os-verify-lock: VERDICT command-exit 0

measurement runs (base 9476092c7, verbose): libSQL case 1138 / 1358 / 1365 ms; host case 114 / 113 / 111 ms;
file tests 17.44 / 17.19 / 17.55 s; host case alone (-t) 431 ms
pnpm --filter @objectstack/verify typecheck  -> VERDICT command-exit 0 (check:test-typecheck: OK, the test layer compiles)

Acceptance notes

  • overlap-check: #37676 (shares packages/verify/src/harness.required-providers.test.ts): merges cleanly, VERDICT clean exit 0. The overlap is textual only.
  • The file's test-budget: 28 header is out of date. The CI run above read the file at 57.8 s (including the 5 s timeout), and its own text says "the first CI reading after the knowledge boots re-measures it". This PR does not re-set the budget, because that is outside the card's acceptance. Noted here for the lane.
  • No changeset. The diff is a *.test.ts under src/. @objectstack/verify ships dist, README.md and CHANGELOG.md. After pnpm --filter @objectstack/verify build, grepping dist finds 0 hits for the case title, and the positive control bootStack is found (dist/index.js, dist/index.cjs). The PR carries skip-changeset.

Verification

Read first: the one hunk at the end of the knowledge describe (the libSQL case's closing }, 120_000); and its comment).

Two-minute check: pnpm --filter @objectstack/verify exec vitest run --reporter=verbose src/harness.required-providers.test.ts should print 15 passed, with the libSQL case at about 1-1.5 s locally. The real proof is the next scheduled full run going green on Test Core 10/10.


Generated by Claude Code

…file's 120_000

The install-without-libSQL case clears the module cache and re-imports the
provider graph: 1.1-1.4 s locally, past 5000 ms on the loaded last Test Core
shard of the scheduled full run. It and the host-mounts case were the only
cases in the file left on vitest's default; both now carry the file's per-case
budget, with the measurement in a comment.

Claude-Session: https://claude.ai/code/session_01Utp6Cb4BAjgQ43tqy1DvVJ
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 Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs.

What this run could not see

Coarse fallback — 0 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 411138078994e7b0e5856655cec5d17efd103d63 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head fdf439c · 2026-11-26T22:15Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: TIER_DEFAULT
Head-sha: fdf439c4e9659cb2317f942e01b4e992300b6138
Local-runs: none

Inputs read: card #37700 (body, claim, os-dev-report), PR #37708 (body, file list, the net diff against origin/main), and the check-runs on the head. The diff touches one file, packages/verify/src/harness.required-providers.test.ts, with 10 lines added and 2 removed. It does two things: the two requires: ['knowledge'] cases that had no timeout now close with }, 120_000);, and each gets a comment that states its measurement.

① Derived judgments

  • Accept-set: no change. Right. No assertion, fixture, mock or case order changes. The libSQL case is still LAST in the file, which it must be because it clears the module cache. Nothing is skipped, and no .skip, .todo or skipIf is added. This meets the card's "never a skip".
  • Public surface: no change. Right. The only file is a *.test.ts under src/. @objectstack/verify publishes files: ["dist", ...], and no code outside tests is touched.
  • The fix matches the failure. The failing case named on the card ("an install without the optional libSQL store …", Test timed out in 5000ms, run 45888214247 / job 140145134703) now has the file's per-case 120_000. The sibling host-mounts case uses the same constructServedProviders shape and had no timeout either, so it is covered the same way. There is no testTimeout in packages/verify/vitest.config.ts, so before this change both cases really did run on vitest's 5000 ms default.
  • The measurement holds up. In the failing job, the file's tests took 57.8 s. Taking out the 5 s that was spent on the timeout leaves 52.8 s, against 16.2 s locally outside this case, which gives 3.3x. The local worst reading is 1365 ms, and 1365 ms x 3.3 = 4.5 s. That is under the 5000 ms default with almost no margin, which explains why the case was killed on a loaded shard and not in the push or queue runs.
  • The reason for rejecting a shared boot is true at this head. The case calls no bootStack, so there is no boot for a beforeAll to share. It calls vi.resetModules() and vi.doMock('@objectstack/knowledge-turso', …) and then constructServedProviders, which reaches the providers through dynamic import(pkg) (packages/verify/src/required-providers.ts:96, and :182 for the optional extra). Those imports go through the registry the case has just cleared, so this cost is the subject of the case and cannot be shared. The timings agree: 1138–1365 ms for this case, against 111–114 ms for the same two constructServedProviders calls in file order on a warm cache.
  • Check-runs are all completed. Every run that was not skipped concluded success, including Test Core and Test Core (1/10) through (10/10), TypeScript Type Check, Lint & Repo Gates and every Lint lane, Build Core, Governed Surface Queue Guard, PR-body guards, Check Changeset, Check PR Size, Test UI, Live E2E UI, Dogfood Regression Gate, and Flag docs affected. 21 runs were skipped (UI matrix, opt-in and queue-only lanes). None failed and none is pending. The real proof is the next scheduled full run on Test Core 10/10, which comes after merge. The card's "4-hourly full run: red on main (CI) #37636 closes" depends on that run and on plugin-security insert-check-post-image sqlite-wasm arm times out at 5000 ms on a saturated CI runner (first wasm boot) #37494, not on this PR alone.

Findings:

  • N1. 120_000 follows the file's convention and is not sized from the measurement. The scaled worst case is 4.5 s, so 120 s leaves about 26x margin. The trade-off is that a real hang in either case now surfaces after 120 s and not after a few seconds. It is acceptable: the card accepts "a per-case timeout", every other boot or import case in the file already carries 120_000, and a tighter one-off value would be a new convention in a file that has none. No change requested.

② Semver level

  • skip-changeset is right. The diff publishes nothing: one test file is changed, and it is not in dist. The skip-changeset label is on the PR, and Check Changeset concluded success.
  • The Clause-②: line on the PR body reads Clause-②: no. That is consistent: the change is test-only, narrows nothing and declares nothing. The claim also carries Clause-②: no. The Metadata-protocol: none line is also consistent.

③ Boundary flags

  • open_questions: none (the report has []).
  • Dev flag 1 (out-of-scope): the file's // test-budget: 28 header is stale. Answered: a follow-up is owed, and the problem is more than staleness. Under readTestBudget (scripts/measure-test-shard-timings.mjs), SECONDS must be the CI reading x CEILING_HEADROOM (1.25) rounded UP to the next 10 s. A value off the 10 s grid is REFUSED ("the budget 28 s is not on the 10 s grid"), and a refusal is the timing script's one non-zero exit. The 28 was written by PR feat(core): requires knowledge mounts the knowledge service and one vector store #37442 (87af66e5b6), which raised the header from 20. It is already on main, and this PR does not touch it. It is out of the card's acceptance, so it is not a finding against this diff. It should go to the timing-refresh lane as a card: re-measure on the first green full run after this lands and set a value on the grid. With 52.8 s as the reading that excludes the timeout, x 1.25 = 66 s, so 70.
  • Dev flag 2: two local gate families were NOT MEASURED, because of prerequisites (a shallow clone, and dists that were not built). Their CI counterparts on this head concluded success, so nothing is left open.
  • Overlap with PR feat(spec,service-knowledge)!: knowledge_source is a governed metadata type with its loader, its registry and two authoring guards #37676 on the same file: the dev's overlap-check reports it merges cleanly. Whichever lands second merges main, as the claim's serial constraint says.
  • SQL push-down: does not apply. The diff adds no data path, no id materialisation and no join.

Implemented-by: claude/issue-37700-knowledge-verify-timeout
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对

Head-sha: fdf439c4e9659cb2317f942e01b4e992300b6138
ACCEPT — L1, seat repo:objectstack#5

  1. Shape: draft against main. 1 file, +10/−2, test only. Not governed. skip-changeset and Clause-②: no are right. Not security-touching.
  2. Premise: the failing libSQL-absent case and the host-mounts case, which has the same shape, take the file's per-case 120_000. Each carries its measurement in a comment: 1138–1365 ms cold locally × 3.3 on the loaded shard ≈ 4.5 s, against the 5000 ms default. Nothing is skipped. A shared boot is rightly rejected: the case re-imports the provider graph after vi.resetModules(), and it does not boot. No other case in the file is left on the default with that shape.
  3. Gates: contract record 7204570619 (TIER_DEFAULT, declaration face) reads PASS, with no must-fix or should-fix. CI on this head: 37 success, 21 skipped, 0 failed. The proof is the next scheduled full run after merge.
  4. Accepted deviations: N1 (120_000 is the file's convention, not a size derived from the measurement).
  5. Out of scope and where it went: the file's test-budget: 28 header was set by feat(core): requires knowledge mounts the knowledge service and one vector store #37442 and is already on main. It is off the 10 s grid that readTestBudget requires, and stale (CI took 57.8 s, which gives about 70). The area files a follow-up card for the timing refresh, to re-measure after this lands.
  6. Landing terms: Tier S. The area lands it through the queue with --land. After the next 4-hourly full run is green on this file, triage closes 4-hourly full run: red on main (CI) #37636 for this cause.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6Cb4BAjgQ43tqy1DvVJ

Landing · 2026-11-26T22:20Z · zone ai-37000

Probe Reading
Head fdf439c4e9659cb2317f942e01b4e992300b6138 = ACCEPT 7204584166 head (record 7204570619 PASS)
Checks on head success=37 skipped=21, 0 failure; mergeable clean
Governed check-governed-merges.mjs --pr 37708: NOT governed, 12 lines ≤ 3000; Clause-② no, Metadata-protocol none

State change: ready for review + auto-merge (merge queue). p1 main-red fix for #37636's second cause; #37700 closes on merge. N1 accepted; the stale test-budget header goes to a follow-up card.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 22:21
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit 6b60f88 Nov 26, 2026
59 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-37700-knowledge-verify-timeout branch November 26, 2026 22:47
os-elon-musk pushed a commit that referenced this pull request Nov 27, 2026
… from the post-#37708 CI reading (53.7 s x 1.25, 10 s grid)

Reading: scheduled CI run 45914939800, job Test Core (10/10) 140232535871, head 80519b5 (after PR #37708).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

2 participants