Skip to content

tests: 56.5% of spec files are per-issue pins costing 52.5% of suite time — pilot a shared-setup consolidation on the 95 StudioDesignSurface files and split cli-bin.test.ts (74.6 s) #25911

Closed

Description

@os-zhuang

Filing gate ③: a maintainer-directed task. Maintainer, 2026-10-24, verbatim: 「同意:建议新建:与合并无关、独立成卡的产品/契约项(可现在建)」, approving the review's list of independent product / contract cards. Batch-of: 13 (this review batch; the per-fire quota is overridden by the maintainer's direction).

维护者速读

5,773 个 spec 文件里 3,263 个(56.5 %)是 -NNNN 议题 pin,占实测套件时间 19,542 s 的 52.5 %;每文件固定开销主导(中位 4.49 s)。ListView* 112 个文件、StudioDesignSurface* 95 个、ObjectView* 76 个。最重的单文件 StudioDesignSurface.autosaveSwitch-11232.test.tsx 76.6 s、cli-bin.test.ts 74.6 s、date-only-zone-pins-10183.test.ts 54 s。不横扫;用 StudioDesignSurface.* 做共享 render setup 的合并试点,并拆两个最重的 spawn 文件。先量 setup 与断言的占比再决定推广。

Measured (2026-10-24, HEAD 7981384; scripts/test-shard-timings.json measured 2026-10-12 plus the live spec list)

Task

  • Measure first: setup vs assertion time per file (instrument above); publish the reading in this card.
  • Pilot: consolidate the 95 StudioDesignSurface.* files onto one shared render setup, keeping each issue number in its describe; report the before/after seconds.
  • Split cli-bin.test.ts to share one built CLI (the Lint job already builds it) and collapse date-only-zone-pins-10183 into one spawn with a zone matrix.
  • Rule for new pins: a pin that needs the same setup as an existing X.behaviour.test.tsx joins that file.

Who acts: objectui domain:ui seat. Effort M (pilot) to L (if generalised). Risk: a merged file hides which pin broke — the describe names keep the issue numbers.

Filed by the read-only whole-repo review session https://claude.ai/code/session_01BDtwYUWhLGyWLzYQjZ95Cf on 2026-10-24, written through the maintainer's own account token (the session holds no fleet-bot credential). Evidence files: that session's scratchpad (objectui-review-report.md, findings-*.md). ⛔ Not a claim; triage grades and routes; suggested labels are suggestions only.


Generated by Claude Code

Activity

  1. added
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    domain:uiDomain lane — seat card indexed by label:pm:seat
    on Oct 24, 2026
  2. added
    area:devpathThe road — create, dev, verify, publish/install, connect an agent, iterate
    pm:queueReady for the PM dispatch loop
    and removed
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    on Oct 24, 2026
  3. objectstack-fleet commented on Oct 24, 2026

    @objectstack-fleet
    Contributor

    Triage: first grade — tests · priority:p3 · domain:ui · area:devpath · pm:queue · triage seat · session_01AavokzJ5DndAwitDXvKy4U · 2026-10-24T17:07Z

    ⛔ Not a claim, ⛔ not a dispatch.
    finding comes off.

    • Scope: the StudioDesignSurface.* shared-setup pilot and splitting the two heaviest spawn files. Measure setup versus assertion share first, then decide whether to extend. ⛔ No test is deleted to save time; consolidation keeps every assertion.

    Generated by Claude Code

  4. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    Contributor

    Transferred 2026-10-26T03:49Z from objectstack-ai/objectui#13468, with its comments and timeline; the old URL redirects here. objectui moved into this repository as the ui/ workspace (epic #25677) and is being archived (#25854). The body is left exactly as filed.

    Paths. Read every repository path in the body with a ui/ prefix: scripts/test-shard-timings.json is now ui/scripts/test-shard-timings.json; scripts/__tests__ is now ui/scripts/__tests__; scripts/test-file-timings.mjs is now ui/scripts/test-file-timings.mjs.

    Not found under ui/ or at the root on main e167956e3f: scripts/__tests__/cli-bin.test.ts; re-check that premise before work starts.

    References. The bare issue numbers in the body were written in objectui and now resolve against this repository by mistake; read them as objectstack-ai/objectui#3010, objectstack-ai/objectui#12208, objectstack-ai/objectui#12405.

    No stale pm:dispatched or assignee to strip.


    Generated by Claude Code

  5. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Oct 26, 2026
  6. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    Contributor

    Claim: PM loop round 1
    Session: session_017iXjUm1rujwDk7f3KT1Pkk (seat); implementing card thread session_012Vh1mJSJN3FeocpnWPNdH1
    Account: os-steve
    Branch: claude/project-thread-5g7620 (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: pilot only, test-only: (a) a shared setup for the StudioDesignSurface.* test files under ui/packages/app-shell/src/**/__tests__/ (one shared helper module plus those files' imports of it); (b) split the two heaviest spawn-based test files, re-measured on main and named in the PR. Every assertion is kept. ⛔ No test is deleted, skipped or loosened. The PR states setup versus assertion share and wall time before and after; extension beyond the pilot comes back to the seat first. skip-changeset (test-only). PR says Part of #25911 (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: M, mode:thread, model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate), effort: medium
    Clause-②: no (test files only)
    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: 6407801200
    Premise: holds (triage first grade 2026-10-24 17:07Z: pilot plus two spawn files, measure first; the dev re-checks which spawn files are heaviest now, since the transfer note says cli-bin.test.ts is gone; read-only check by the seat 2026-10-26T16:10Z)
    Serial constraints cleared: none on the sdui record (tests only). The Studio test files are not edited by any open seat 1 PR; the dev re-scans open PRs for the chosen files before coding (2026-10-26T16:10Z)

    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.

  7. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    Contributor

    os-dev-report

    {
      "issue": 25911,
      "status": "done",
      "branch": "claude/project-thread-5g7620",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/26255",
      "session": "session_012Vh1mJSJN3FeocpnWPNdH1",
      "premise_still_valid": true,
      "summary": "Slice 1, which the seat scoped as the pilot only. Measured the 95 StudioDesignSurface.* files at f143cd88 (656 tests): fixed cost (env+prepare+setup+import) is 678 s, 66.4 % of 1022 s CPU; the median file is 6.8 s fixed against 1.2 s of tests. Folded the ten Interfaces-rail label pins that share the same three mocks into StudioDesignSurface.railLabels.test.tsx, one top-level describe per former file, with the client double installed per block through a vi.hoisted slot. Before/after over the whole family at --maxWorkers=2: 95 files to 86, 656 tests to 656, CPU 1022.1 s to 977.1 s, wall 528.4 s to 504.8 s; the ten pins alone go from 78.7 s to 29.4 s CPU. date-only-zone-pins-10183 premise stale: it is already one spawn for all 26 pins (73 s), so the seat ruled out the split. The cli-bin split is slice 2, held for the seat's review of slice 1. Card has no assignee; the PR assignee os-steve was set at pr_create per the requester line.",
      "tests": "head 29fe41668, from ui/: `pnpm exec vitest run packages/app-shell/src/views/studio-design/StudioDesignSurface.railLabels.test.tsx --maxWorkers=2` gave Test Files 1 passed, Tests 56 passed (VERDICT command-exit 0). `pnpm exec vitest run packages/app-shell/src/views/studio-design/StudioDesignSurface --maxWorkers=2` gave Test Files 86 passed (86), Tests 656 passed (656), Duration 504.83s (VERDICT command-exit 0); at base f143cd88 it gave 95 passed (95), 656 passed, 528.40s. Textual equivalence against the ten files at f143cd88: the it-title sorted lists match 50/50, and expect( counts 153/153. Type-check: `pnpm --filter '@object-ui/app-shell^...' build` then `tsc -p tsconfig.test.json --noEmit` in packages/app-shell gave 0 `error TS`; --listFilesOnly includes railLabels.test.tsx. eslint on both changed files: 0 errors (the 14 warnings are pre-existing react-hooks ones in StudioDesignSurface.tsx). No ablation: no tested behaviour changed.",
      "gates": "local: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 24; all 24 ran at cd45ab272 with exit 0 (check:query-options-erasure hit a 300 s wrapper timeout, exit 124, and its re-run exited 0). Re-run at final head 29fe41668: check:nul-bytes, check:cross-package-test-inputs and check:test-source-alias, exit 0. `--ran` with exit codes: 24 derived, 24 run, 0 NOT-MEASURED (a derived zero). CI check-runs on #26255: in_progress at report time.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "6 — issue_read x2 (get, get_comments), list_pull_requests x1, pull_request_read x1 (get), plus ToolSearch loads; no MCP write tool",
      "api_writes": "3 — git push (branch claude/project-thread-5g7620), relay pr_create (POST pulls with assignees and the skip-changeset label, fw-20261026T171807Z-e7e1fc), this os-dev-report comment via post-stamped",
      "open_questions": [
        {
          "question": "#26255 has 1661 additions and 1796 deletions, 3457 changed lines in all, which is over the 3,000-line class (c) bar in AGENTS.md section 7. Nearly all of them are moved lines. How should it land?",
          "options": [
            "A: keep one PR; it lands by an authorized approval or a human merge",
            "B: split into two PRs of five folded files each (two files, about 1,700 changed lines each), both under the bar"
          ],
          "recommendation": "B, because each half then lands through the normal queue, and the before/after reading is per half anyway."
        },
        {
          "question": "Does a JSDoc-only change in StudioDesignSurface.tsx (tsc keeps comments, so dist differs by one comment) take skip-changeset?",
          "options": ["A: skip-changeset as sent", "B: add a patch changeset for @object-ui/app-shell"],
          "recommendation": "A, because no symbol or behaviour ships."
        }
      ],
      "out_of_scope_findings": [
        "carrier: #25911 · StudioDesignSurface.autosaveSwitch-11232.test.tsx is 94 s, 72 s of it in tests waiting out 19 real 2.5 s debounce sleeps (pastDebounce). That is not setup cost; noted, not filed."
      ]
    }

    Generated by Claude Code

  8. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    Contributor

    os-dev-report

    {
      "issue": 25911,
      "status": "done",
      "branch": "claude/project-thread-5g7620",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/26309",
      "head": "f62241cf7a7378e5e911eb6d9a4c041173797b94",
      "session": "session_012Vh1mJSJN3FeocpnWPNdH1",
      "premise_still_valid": true,
      "summary": "Slice 1b, the follow-up to #26255 per the seat's ruling (d). Started from main 366e4aa69 after #26255 merged. Folded the other five Interfaces-rail label pins (interfacesRailLabelMap-11158, interfacesAppLabelMap-11181, railServedLabels-12688, zhPillarNames-11801, navEntryIdentity-11774) into StudioDesignSurface.railLabels.test.tsx, one top-level describe per former file; navEntryIdentity-11774 registers an object-view recorder in ComponentRegistry in beforeAll, so it is the last block. Test-only, 1,896 changed lines (under the 3,000 bar), no src file, no sdui record, skip-changeset. Family before/after at --maxWorkers=2: 95 files (f143cd88) -> 91 (#26255) -> 86 (this PR); 656 tests throughout; CPU 1021.7 s -> 979.8 s -> 954.9 s; wall 528.4 s -> 507.0 s -> 493.8 s (shared box). The ten pins alone, this PR: 6 files -> 1, fixed CPU 41.4 s -> 7.6 s, total 48.8 s -> 13.8 s. Slice 2 (cli-bin split, one shared build behind a lock directory) is next.",
      "tests": "from ui/: `pnpm exec vitest run packages/app-shell/src/views/studio-design/StudioDesignSurface --maxWorkers=2` gave Test Files 86 passed (86), Tests 656 passed (656), Duration 493.75s (VERDICT command-exit 0); the folded file reports 56 tests, the same 56 the six files reported at 366e4aa69. Textual equivalence against the ten former files on main: sorted it-title lists match 50/50, expect( counts 153/153; the five new blocks carry 25 it and 83 expect(. Type-check: `pnpm --filter '@object-ui/app-shell^...' build` then `tsc -p tsconfig.test.json --noEmit` in packages/app-shell gave 0 `error TS` (before the dependency rebuild, 12 errors from stale dependency dist, none in the changed file). eslint on the changed test file: 0 problems. No ablation: no tested behaviour changed.",
      "gates": "local: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 24 on this diff; all 24 ran with exit 0. `--ran` with exit codes: 24 derived, 24 run, 0 NOT-MEASURED (a derived zero). CI on #26309: pending at report time.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0 GitHub MCP calls this slice (subscribe_pr_activity only, a session tool); no MCP write tool",
      "api_writes": "3 — git push (branch claude/project-thread-5g7620, new branch after the merged one was deleted), relay pr_create (fw-20261026T200818Z-edb455, assignees os-steve, label skip-changeset), this os-dev-report comment via post-stamped",
      "open_questions": [],
      "out_of_scope_findings": []
    }

    Generated by Claude Code

  9. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    Contributor

    os-dev-report

    {
      "issue": 25911,
      "status": "done",
      "branch": "claude/project-thread-5g7620",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/26333",
      "head": "b810bfa4ce5ad35cef929b38bc9530674a1c7ee8",
      "session": "session_012Vh1mJSJN3FeocpnWPNdH1",
      "premise_still_valid": true,
      "summary": "Slice 2, per the seat's ruling (c), from main 3249e204a after #26309 merged. ui/packages/cli/src/__tests__/cli-bin.test.ts (74.1 s in test-shard-timings.json, second-heaviest Test UI file) is split into cli-bin.surface.test.ts (24 read-only tests: identity, --version, --help, flags) and cli-bin.test.ts (24 tests: commands that write, refuse or validate). A new harness, cliBin.ts, holds run/tree/CLI_BIN/PKG_PATH and ensureCliBuilt. ensureCliBuilt takes an mkdir lock under the OS temp dir (keyed by package path, stale after 10 min, 170 s wait cap) before checking dist/ and building, so the second file waits for the first build. The build spawns and BUILD_ENV stay in each test file because the spawned-build VITEST gate finds spawns only in *.test.ts files and resolves env only in-file; that gate's population comment now names both files. Before/after, from ui/ at --maxWorkers=2 under the lock (shared box): cold (types+cli dist and tsbuildinfo removed) 87.2 s -> 57.5 s wall; warm 45.6 s -> 24.6 s. Caveat stated in the PR: the lock is per machine, so if the sequencer puts the halves on different Test UI legs each leg builds once (about 35 s more CI CPU), while the heaviest file drops from about 87 s to about 57 s cold. Test-only, 593 changed lines, no src, no sdui record, skip-changeset.",
      "tests": "from ui/: `pnpm exec vitest run packages/cli/src/__tests__/cli-bin --maxWorkers=2` cold: Test Files 2 passed, Tests 48 passed, Duration 57.54s; warm: 2 passed, 48 passed, 24.63s (VERDICT command-exit 0). Before, same command on the single file: cold 48 passed in 87.22s, warm 45.62s. In the cold run each file spent about 34 s in beforeAll, one building and one waiting on the lock; no lock directory is left afterwards. Title equivalence against the file on main: sorted it/describe titles 41/41 identical, expect( 89/89. `pnpm exec vitest run packages/cli --maxWorkers=2`: 31 files, 417 tests passed. `scripts/__tests__/spawned-build-vitest-env-8598.test.ts`: 4 passed (now 4 spawns in 2 files, all scrubbed). `pnpm --filter @object-ui/cli type-check` after `pnpm --filter '@object-ui/cli^...' build`: exit 0. eslint on the 4 changed files: 0 problems. No ablation: no tested behaviour changed.",
      "gates": "local: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 24; all 24 ran with exit 0 in the end. check-comment-mask-corpus first exited 1 (ENOENT on ui/.objectui-tmp/tsc-gate-*), because a packages/cli vitest run I had going in the same checkout deleted that directory mid-walk; its re-run with nothing else running exited 0 (18255 files, 0 disagree). `--ran` with exit codes: 24 derived, 24 run, 0 NOT-MEASURED (a derived zero). CI on #26333: pending at report time.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0 GitHub MCP calls this slice (subscribe_pr_activity only, a session tool); no MCP write tool",
      "api_writes": "3 — git push (branch claude/project-thread-5g7620, fresh after the merged branch was deleted), relay pr_create (#26333, assignees os-steve, label skip-changeset), this os-dev-report comment via post-stamped",
      "sdui_record_moved": false,
      "open_questions": [],
      "out_of_scope_findings": [
        "carrier: #25911 · root scripts/check-comment-mask-corpus.mjs still walks the working tree with readdirSync (line 184), so a concurrent test that writes and deletes ui/.objectui-tmp/tsc-gate-* can make it throw ENOENT. ui's copy moved to tracked files for the same race (objectui#11040). Noted, not filed."
      ]
    }

    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratedomain:uiDomain lane — seat card indexed by label:pm:seatpriority:p3tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions