Skip to content

test(dogfood): build the commit revert cases' publish fixtures in hooks, so each case's clock times the revert it pins - #34323

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/area-E1-34271
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/area-E1-34271

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread
Fixes #34271
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:只改一个 dogfood 测试文件。两个用例在用例体内现场发布对象来造夹具,现把这些发布移到嵌套 describe 的 beforeAll 里,断言一字未改。
  • 为什么改:合并队列里该文件的「可写包的编辑提交原位恢复」用例三次超时(5.0–5.1 秒,默认 5 秒上限),把三条 PR 踢出队列。测量证明是慢 runner 上的计时悬崖,不是产品变慢。
  • 风险与回滚:只动测试,产品代码与已发布包零改动;回滚就是 revert 这一个提交。用例的 5 秒上限没有放宽。
  • 先看:packages/qa/dogfood/test/package-commit-revert-path-package.dogfood.test.ts 末尾的嵌套 describe(编辑提交夹具),以及第四个用例外层的嵌套 describe(已卸载包夹具)。
  • 两分钟验证:pnpm --filter @objectstack/dogfood exec vitest run --project isolated --reporter=verbose test/package-commit-revert-path-package.dogfood.test.ts,预期 12/12 通过,末尾用例约 0.7 秒(原约 2.6–3.0 秒)。
  • 需要你做的:无,席位落地。

What changes

packages/qa/dogfood/test/package-commit-revert-path-package.dogfood.test.ts only (a private package; nothing publishes, hence skip-changeset).

  • [#29414] control: a writable package's edit commit restores its own row in place: its two object publishes (the create, then the edit that records the edit commit) move into the beforeAll of a nested describe, with a 60 s hook budget. The case now times the revert it pins and the label read after it.
  • an uninstalled package's commit is refused 404 …: the package create and its object publish move the same way. The uninstall, both refusals and every read stay in the case.
  • Every assertion is unchanged, and so is the order the suite writes state in: each nested suite runs at the position its case had. No per-case timeout is raised, and nothing is skipped or quarantined.

Diagnosis: (a) a load/timing cliff, not a product regression and not a conflict between the roots

Failing queue builds: the reason line is a timeout, in the same case each time

Every one fails in Dogfood Regression Gate (3/3) with Error: Test timed out in 5000ms. at line 370, the last case of the file:

queue build edit-commit control uninstalled case B-rollback control (1 publish) file
43795201091 (root) 5098 ms × 3845 ms 1725 ms 35.1 s
43792843358 (independent) 5013 ms × 4020 ms 1853 ms 36.9 s
43797161496 (inherited) 5068 ms × 4251 ms 2041 ms 37.4 s

None of the roots touches the file, and the cases with no publish in them stay at 40–190 ms in the same runs.

Green history: the case's cost follows the runner's speed, and its ratio to a one-publish control does not move

The edit-commit control on green runs (scheduled main and queue builds, shard that ran the file):

  • 11-04 to 11-13 (8 scheduled runs): 2261 to 3155 ms.
  • 11-14 to 11-16 (12 runs): 2244 to 4493 ms. Fast runners on the newest trees read 2244 ms (7be32d39fa) and 2488 ms (9efb58f1ca, a later tree than the failing builds), the same as 11-06's 2350 ms.
  • Its ratio to the one-publish B rolls back control stays 2.2 to 2.6 on every run read, so the product did not get slower on this path. What changed is runner load: the file's total runs from 18 s to 37 s across runners.
Local measurement (shared 4-core box, under the verify lock; absolutes are shared-box seconds, ratios carry)

Per-call wall of the edit-commit control on origin/main (instrumented copy, three runs):

  • publish-drafts (create): 974 / 1221 / 1476 ms
  • publish-drafts (edit): 1034 / 1152 / 1478 ms
  • the revert under test: 526 / 582 / 700 ms
  • all reads: 11 to 17 ms each

So about 80 % of the case's clock went to the two fixture publishes. The uninstalled case is similar: the package create took 517 to 597 ms and the object publish 1081 to 1236 ms, against 521 to 596 ms for the uninstall.

case origin/main alone ×2 this PR alone ×2 loaded (4 workers, both files plus 2 neighbours)
edit-commit control 2611 / 3046 ms 678 / 655 ms 3750 → 761 ms
uninstalled case 2226 / 2537 ms 658 / 612 ms 2567 → 651 ms
B-rollback control (untouched) 1178 / 1195 ms 1211 / 1286 ms 1421 / 1446 ms

At the failing builds' runner factor (about 1.7 to 1.9 times local alone), the edit-commit control comes out at about 1.2 to 1.4 s against its 5 s clock, which was 5.0 to 5.1 s before. The hook does the two publishes: 2.0 to 3.0 s locally, so about 5 s at that factor, inside its 60 s budget. The file's top-level hook keeps its own 180 s.

Tests

Ablation: the moved fixture still feeds a pin that bites

The forbidden behaviour is the one that [#29414] closed: a revert restoring a row other than the committing package's own row. It was put back in the built @objectstack/metadata-protocol dist/index.js, which is the file the dogfood isolated project resolves for that package. That file is untracked build output, so no source file was touched. The restoreVersion call's packageId: commitPackageId, became packageId: null. On disk, the marker count went to 1 and the anchor count went from 2 to 1.

  • Run: vitest run --project isolated -t 'restores its own row in place' (the top-level hook and the new nested hook both ran).
  • Result, red:
AssertionError: expected 'A edited 2' to be 'A edited 1' // Object.is equality
Tests  1 failed | 11 skipped (12)
  • Restored from the saved copy. The sha256 equals the pre-mutation copy (829c9eb0…), and the marker count is 0.
  • Observation: under that mutation the case's status, success and action: 'restored' pins still pass. The label read is the pin that catches it, and it is kept as it was.

Verification

Local gate subset
  • eslint --no-inline-config on the file: exit 0.
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack on HEAD e863d61b84 derived 53 commands, and each one was run with its exit code captured before any pipe. Results are in the report on the card.
  • check:dual-build-cjs-loads answers PREREQUISITE NOT MET (exit 3, unbuilt packages outside this diff), so it is NOT MEASURED locally and left to CI.
  • test:repo, the full dogfood battery and every CI family are left to CI. Their check-runs are cited in the report.

Generated by Claude Code

🤖 Generated with Claude Code

…ks, so each case's clock times the revert it pins

The edit-commit control and the uninstalled-package case built their
fixtures (one or two cold object publishes) inside the case, under the
default 5 s per-case clock, and the edit-commit control timed out at
5.0-5.1 s on slow queue runners. Each fixture now runs in a nested
describe's beforeAll with a 60 s hook budget; the assertions are unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 16, 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 5a755791a90b2651be20dd0b9059b806abbafd4a → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6

Review claim · head e863d61 · 2026-11-16T06:34Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6

Review — PASS

Head-sha: e863d61b84a7c1437f298c6854b37d0ddc8499dd
Area: S4 / E1 · p0 · Fixes #34271 · L1, the ordinary ACCEPT read per review-checklist.md. The change is test-only, in one file, packages/qa/dogfood/test/package-commit-revert-path-package.dogfood.test.ts. It carries Clause-②: no, Metadata-protocol: none and skip-changeset (a private package), and there is no contract face.

  1. The diagnosis holds. The three failing queue builds time out in the same case at 5013–5098 ms. On green history that case's ratio to the untouched one-publish control stays 2.2–2.6×, so the product path did not slow down: the runner did. The local per-call split puts about 80 % of the case's clock in the two fixture publish-drafts calls, and the revert under test takes 526–700 ms. That is class (a), a timing cliff, and the fix targets it.
  2. What moved, and what did not. The edit-commit control's two object publishes, and the uninstalled case's package create and object publish, move into beforeAll hooks of nested describes, each with a 60 s hook budget. I compared each moved block line by line with the old case body: every assertion is unchanged, and the uninstall, both 404 refusals (RESOURCE_NOT_FOUND code, status and message) and every read stay inside the timed case. No per-case timeout is raised, and nothing is skipped or quarantined, so ⛔ "never skip to get green" holds.
  3. State order is preserved. Vitest runs a file's tests and suites sequentially in definition order, and a nested suite's beforeAll runs when that suite is reached. Each nested suite sits exactly where its case sat, so the file writes state in the same order as before. A fixture failure now fails the case through its hook rather than inside it, which is the same red with a clearer site.
  4. The pin still bites. The ablation (restoreVersion's packageId: commitPackageId changed to null on the built dist/ that the isolated project resolves) turns the label read red (expected 'A edited 2' to be 'A edited 1'), and the restore was proved by sha256. The body's observation is right that the status and action: 'restored' pins alone would not catch it, and the label read is kept.
  5. Measured effect. Locally the edit-commit control drops from 2611–3750 ms to 655–761 ms, under load included. At the failing builds' runner factor that comes to about 1.2–1.4 s against the 5 s clock, where it was 5.0–5.1 s.
  6. Check-runs on the head, latest run per check: 32 success, 17 skipped, none failed or pending. git merge-tree against origin/main 8559ee1f17 is clean. The queue's Dogfood shards run the merged tree.

Noted, not owed. The file's total wall is 35–37 s on CI runners, over AGENTS.md's 10 s per-file line, and it declares no measured budget. That predates this PR, and this PR shortens it. It is the lane's own card if the seat wants one.

The patch-id is ede2444aadfeaeeeab7898fe3de5810404f2e755. A clean main merge that keeps it keeps this PASS.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ

席位核对

ACCEPT · area S4 (E1) · p0 · Head-sha: e863d61b84a7c1437f298c6854b37d0ddc8499dd

  • Shape: Fixes #34271, base main, 1 file (packages/qa/dogfood/test/package-commit-revert-path-package.dogfood.test.ts), +56/−36, skip-changeset, test-only.
  • Premise and diagnosis: class (a), a load/timing cliff. One case times out at 5013–5098 ms in the three queue builds. On green history it sits at a stable 2.2–2.6× of its one-publish control, so the product did not slow down. About 80% of the case's clock went to fixture publishes.
  • Review: review-b L1 PASS on this head (6909316985), patch-id ede2444aadfeaeeeab7898fe3de5810404f2e755. There is no contract face.
  • Gates: check-runs on this head are 32 success and 17 skipped, none failed or pending (read by review-b). check-governed-merges --pr 34323: NOT governed. git merge-tree against main is clean.
  • Accepted deviations: the post-merge local rerun at e863d61b is NOT MEASURED, because of a lock queue on the shared box. The queue's dogfood shards run the merged tree. The ablation ran on the built dist/, with the restore proved by sha256, because the source file is out of bounds.
  • Out of scope:
    • The file's 35–37 s wall is over the 10 s per-file line. → dropped: it predates this PR, this PR shortens it, and no user effect is measured.
    • Package uninstall latency rose on green runs from 11-14 on. → dropped: no wrong answer and no attributed commit (the p3 standard).
  • No skip, no quarantine, and no raised per-case timeout: the 5 s clock is unchanged.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ

Landing (landing-operations B) · p0 · head e863d61b

Reading Value
check-runs on head 32 success, 17 expected skip, 0 pending/failed
check-governed-merges --pr 34323 NOT governed
review L1 PASS 6909316985

State change: ready + auto-merge (area authorising line). Triage jumps the queue on this ACCEPT.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 16, 2026 06:38
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 16, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

Path: none

Queue jump: pr_enqueue_front · reason (a) · 2026-11-16T06:43Z

This PR is jumped to the front of the merge queue under references/landing-operations.md L33-37, reason (a): it carries the fix for the signature that has been ejecting other PRs from the queue.

The maintainer's standing order for this duty (2026-11-15): 「这个问题严重,提前你为什么不处理」. If the read-back does not show this PR at the front, the action is FAILED and is not re-sent.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

Path: none

Queue jump FAILED: the platform refuses to jump a pull that is already queued · 2026-11-16T06:44Z

Relay run 43818768994: enqueuePullRequest(jump: true) answered "Pull request is already in the queue" and enqueued nothing. This is the case scripts/pm/fleet-write/ops.mjs left NOT MEASURED ("whether it also moves a pull that is ALREADY queued"). It is measured now: it does not. Per the rule, the action is not re-sent. The PR keeps its place in the queue, fifth behind #33995, #34303, #34312 and #34319.

The two ways left to put it at the front: the maintainer's "Jump to the front" in the merge-queue UI, or a seat-requested pr_dequeue (reason (c)) followed by pr_enqueue_front. The second costs a rebuild of every group behind it, so triage has asked the maintainer for the first.

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

Development

Successfully merging this pull request may close these issues.

Queue-flake anchor: test/package-commit-revert-path-package.dogfood.test.ts

1 participant