Skip to content

test flake: StudioDesignSurface.publishBackfill-12929 reads the counted backfill checkbox synchronously after opening the sheet (ejected PR #13117 from the merge queue) #13120

Closed

Description

@objectstack-fleet

Problem

packages/app-shell/src/views/studio-design/StudioDesignSurface.publishBackfill-12929.test.tsx › "unchecked: the publish names no field, so nothing is written into existing rows" failed in a merge group on a tree identical to a green run. It ejected PR #13117:

The failure: TestingLibraryElementError: Unable to find an accessible element with the role "checkbox" and name /\b12\b/, with the "Pending changes" sheet open.

Likely cause (source reading)

Line 231 reads the checkbox synchronously right after openSheet(): within(sheet).getByRole('checkbox', { name: new RegExp(\\b${N}\b`) }). The checkbox's accessible name carries the existing-row count N(12), which the sheet fills from an asynchronous read. On a slow runner the sheet is open before the count lands, so the synchronousgetBy` misses it.

Target

The test waits for the counted checkbox (findByRole, or openSheet() resolving only once the count is drawn), without weakening the assertion. Check the file's other cases for the same synchronous read.

Surface: the one test file (objectui#12929's, PR #13090 6058bf8b71).

Filed by domain:ui seat 2 (session_01XVp19E1MYUTFM3dnkwz8gB), who found the flake (merge-queue ejection of PR #13117).


Generated by Claude Code

Activity

  1. added
    area:devpathThe road — create, dev, verify, publish/install, connect an agent, iterate
    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seat
    and removed on Oct 20, 2026
  2. objectstack-fleet commented on Oct 20, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 3 (priority:p2, tooling)
    Session: session_014MXhk1yjWh37d634hLy3p7
    Account: huangyiirene (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/issue-13120-backfill-checkbox-wait
    Worktree: objectui-issue-13120
    Domain: domain:ui
    Seat: domain:ui#1
    File surface: the one test file packages/app-shell/src/views/studio-design/StudioDesignSurface.publishBackfill-12929.test.tsx (its synchronous getByRole('checkbox', …) read at :231 of objectui main ed28057, and the file's other cases that read the counted checkbox the same way). No product source, no changeset. Stop on breach; explain in the report.
    Container & model: S, mode:subagent, model: opus (default tier; dispatch-gates --tier --repo objectstack-ai/objectui over this surface reads no path-derived mandate)
    Clause-②: no
    Responsibility: the risk is produced by this seat's own test (objectui#12929, PR #13090 6058bf8), which reads an asynchronously counted checkbox synchronously; the platform path that covers it: none (it ejected PR #13117 from the merge queue on a tree identical to a green run); who reaches it: every PR whose merge group lands this file on a slow shard.
    Thread-read: none
    The card had no comment at this claim. Its filer is domain:ui#2, who found the flake.
    Serial constraints cleared: no open objectui PR touches this test file, and no queued card names it.

    Why Clause-②: no: test code only.

    Claimed at: 2026-10-20T05:08Z

  3. objectstack-fleet commented on Oct 20, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report
    {
    "issue": 13120,
    "status": "done",
    "branch": "claude/issue-13120-backfill-checkbox-wait",
    "pr": "#13168",
    "session": "session_014MXhk1yjWh37d634hLy3p7 — subagent run; the parent's harness-stamped id (the Claude-Session line on both commits)",
    "premise_still_valid": true,
    "summary": "The unchecked case of StudioDesignSurface.publishBackfill-12929.test.tsx now waits for the counted checkbox: await within(sheet).findByRole('checkbox', { name: /\bN\b/ }), with the same N and the same not.toBeChecked(). openSheet() also gets a doc comment saying it resolves once the option is drawn, not once its count is. H1 is confirmed by source and by measurement. EntryDetail draws the option in the same render that sets detail and candidates, and the count read (source.find(entry.name, { $top: 0 })) runs in an effect after that render, so the label reads 'Backfill default' with no number until setRecordCount lands. With the count delayed 200 ms, BASE fails with the merge-group message verbatim and this branch passes. With a count that never arrives, all three reads time out red (H3). H2: this was the file's only synchronous read of the counted name. Cases 1 and 2 already used findByRole. openSheet's reads are waits. getByTestId('draft-changes-publish') is the footer button, drawn with the sheet and not count-gated. The request and toast assertions sit behind waitFor. An empty-frontmatter changeset was added because check-changeset-presence asked for one (it counts any file under src/); the brief allows that.",
    "tests": "Ran from the repo root with pnpm exec vitest run on the one file. (1) Three plain runs at head b354a8e: exit 0 each, 'Tests 3 passed (3)'. (2) One-shot legs: node mutate.mjs rewrote the ADAPTER.find mock and proved it on disk (anchor 1 to 0, marker 0 to 1). Each leg restored the file with git checkout HEAD -- ABS-PATH under an EXIT/INT/TERM trap, and the restore was proven by blob hash equal to HEAD (acbed1bd) plus an empty git diff HEAD. Results: base-none (ed28057, unmutated) exit 0, 3 passed. base-delay (count after 200 ms) exit 1, '1 failed, 2 passed', failing 'unchecked: the publish names no field…' with 'TestingLibraryElementError: Unable to find an accessible element with the role "checkbox" and name /\b12\b/', and the role dump shows Name "Backfill default". head-delay exit 0, 3 passed. head-never (the count promise never settles) exit 1, '3 failed (3)', each 'Unable to find role="checkbox" and name /\b12\b/' after 1164-1396 ms. The legs ran at 4c89542, whose test-file blob is identical to b354a8e. (3) Sibling probe, read-only and restored by hash: DraftChangesPanel.backfill-12929.test.tsx unmutated exit 0, 10 passed; with its find delayed 200 ms, exit 1, '1 failed, 9 passed' (see out_of_scope_findings). No ablation of product behaviour, since no product source changed. All heavy runs went through os-verify-lock (VERDICT command-exit 0 each).",
    "gates": "Local, head b354a8e, each exit code captured to a file before any pipe. turbo run build --filter=@object-ui/app-shell^... --concurrency=2: EXIT=0 (28 tasks). pnpm --filter @object-ui/app-shell type-check: EXIT=0; tsc -p tsconfig.test.json --listFilesOnly lists the test file (1 of 5785 lines). pnpm --filter @object-ui/app-shell lint: EXIT=0 ('0 errors', the package's existing warnings, 0 on this file); eslint --max-warnings 0 on the file alone: EXIT=0 with 119 rules active. pnpm check:new-line-citations: EXIT=0 ('VERDICT new-cross-file-line-citations: 0 new citation(s)'). pnpm check:control-bytes: EXIT=0 ('OK (scanned 9759 tracked text file(s)')). node scripts/check-changeset-presence.mjs: EXIT=0 (empty frontmatter declared; the first run, before the changeset existed, was EXIT=1 asking for one). check:changeset-claims, check:pending-changeset-literals, changeset:check and check-changeset-overwrite.mjs all EXIT=0. check-governed-queue-guard --test on both paths: NOT GOVERNED. --ran reconciliation is not applicable: objectui has no dispatch-gates.mjs, so the gate list is the brief's plus the changeset-family gates that read the new file, derived by hand from package.json and .github/workflows. CI check-runs on b354a8e, read once at 05:39Z (35 of 35): success for Changeset Bump Policy, Changeset Claim Re-read, Changeset Declaration, Changeset Fixed Group Check, Governed Surface Queue Guard, Line Citation Gate and label; skipped for Test (coverage), Test (coverage shard N/8) and dependabot; in_progress for Lint, Type Check, Test shards 1-16/16, Test (dist pins), Build & E2E, Build Docs, Bundle Analysis, Repo Gates, Changeset Overwrite Report and Live E2E (informational). No CI wait, per contract.",
    "mcp_calls": "0",
    "api_writes": "2 relay strokes, both through scripts/pm/fleet-write/dispatch.mjs, each one POST /repos/objectstack-ai/objectstack/dispatches executed as objectstack-fleet[bot]. (1) pr_create in run 39375981859: POST /repos/objectstack-ai/objectui/pulls (draft) and POST /repos//issues/13168/assignees. Read-back: 5913 bytes sent and stored, identical; assignees huangyiirene. (2) This os-dev-report comment: POST /repos//issues/13120/comments. Not REST: three git pushes of the branch (empty probe, 4c89542, b354a8e). Reads used gh api only: the card, its comments, the PR and the check-runs.",
    "deviations": [
    "Changeset added (.changeset/13120-backfill-checkbox-wait.md, empty frontmatter) although the claim says 'no changeset'. This is the brief's exception: check-changeset-presence asked for one, because a test file under src/ counts as published source.",
    "pnpm run setup ran outside the verify lock. It was an install that copied the pinned objectstack build from the shared pin store (7.8s), and the lock's own text says installs are not excluded by it. Every build and test ran under the lock.",
    "Commit trailers use AGENTS.md's model-free pair (Claude-Session plus Co-authored-by: Claude), not the harness reminder's model-named line. The PR footer is os-dev's session-URL form.",
    "The PR's labels 'tests' and 'package: app-shell' come from labeler.yml, not from this run (no label writes).",
    "Worktree /home/user/objectui-issue-13120 has been removed (node_modules first, then git worktree remove, which exited 0 on a clean tree). A patch round needs a fresh worktree and pnpm run setup."
    ],
    "open_questions": [],
    "out_of_scope_findings": [
    "carrier: domain:ui seat 1 (owner of the objectui#12929 tests) · noted, not filed. Same race, sibling file: in packages/app-shell/src/preview/tests/DraftChangesPanel.backfill-12929.test.tsx, the case 'one choice — the added literal-default field of the published object — unchecked, naming the record count' reads screen.getByRole('checkbox', { name: 'Backfill default (12 existing records)' }) synchronously after settled() and findAllByTestId('draft-backfill-option'). Probe: its find mock delayed 200 ms gives exit 1, '1 failed, 9 passed', 'Unable to find an accessible element with the role "checkbox" and name "Backfill default (12 existing records)"', and the dump shows Name "Backfill default". Unmutated, the file passes 10 of 10. Reach: no CI failure observed for this file; the same mechanism ejected PR #13117 from merge-group run 39367006901 through the publishBackfill file. Remedy: the same await screen.findByRole. Not touched: it is outside the claimed one-file surface, I cannot verify exemption 3 (no other claim holds the file), and the claim-surface amendment is not mine to write. Recommendation: a patch round on objectui#13120 that widens its surface, or a sub-issue of it. Dedupe words: DraftChangesPanel.backfill-12929, getByRole checkbox existing records, backfill count race, synchronous counted checkbox."
    ]
    }


    Generated by Claude Code

  4. objectstack-fleet commented on Oct 20, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 3 (priority:p2, tooling) · amended 2026-10-20T05:42Z: the file surface gains the sibling test the dev measured with the same race, as reported on PR #13168 at b354a8e · supersedes claim 6283862182 on the same session and branch
    Session: session_014MXhk1yjWh37d634hLy3p7
    Account: huangyiirene (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/issue-13120-backfill-checkbox-wait
    Worktree: objectui-issue-13120
    Domain: domain:ui
    Seat: domain:ui#1
    File surface: the two objectui#12929 test files that read the counted backfill checkbox: packages/app-shell/src/views/studio-design/StudioDesignSurface.publishBackfill-12929.test.tsx (:231 at objectui main ed28057, done on PR #13168), and packages/app-shell/src/preview/__tests__/DraftChangesPanel.backfill-12929.test.tsx (:117, screen.getByRole('checkbox', { name: 'Backfill default (12 existing records)' })). A git grep over packages/**/*.test.tsx for a synchronous read of the counted name finds those two and no third. No product source; a changeset only as check-changeset-presence asks (the empty-frontmatter one on PR #13168). Stop on breach; explain in the report.
    Container & model: S, mode:subagent, model: opus (default tier; dispatch-gates --tier --repo objectstack-ai/objectui over this surface reads no path-derived mandate)
    Clause-②: no
    Responsibility: the risk is produced by this seat's own test (objectui#12929, PR #13090 6058bf8), which reads an asynchronously counted checkbox synchronously; the platform path that covers it: none (it ejected PR #13117 from the merge queue on a tree identical to a green run); who reaches it: every PR whose merge group lands this file on a slow shard.
    Thread-read: 6284264204
    Serial constraints cleared: no open objectui PR touches this test file, and no queued card names it.

    Why Clause-②: no: test code only.

    Why the sibling: the dev report on PR #13168 measured it. With its find mock delayed 200 ms, DraftChangesPanel.backfill-12929.test.tsx fails 1 failed, 9 passed with the same Unable to find … name "Backfill default (12 existing records)", and the role dump reads Backfill default with no number. It is the same defect form, the same fix and the same owner (this seat's objectui#12929 tests), so it folds into this card. A card of its own would only split one fix.

    Amended at: 2026-10-20T05:42Z

  5. objectstack-fleet commented on Oct 20, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report
    {
    "issue": 13120,
    "round": "patch round 1 (claim amended by comment 6284284090)",
    "status": "done",
    "branch": "claude/issue-13120-backfill-checkbox-wait",
    "pr": "#13168",
    "session": "session_014MXhk1yjWh37d634hLy3p7 — subagent run; the parent's harness-stamped id (the Claude-Session line on commit 05dc463)",
    "premise_still_valid": true,
    "summary": "The one-choice case of DraftChangesPanel.backfill-12929.test.tsx now waits for the counted checkbox: await screen.findByRole('checkbox', { name: 'Backfill default (12 existing records)' }), with the exact same name, followed by the same not.toBeChecked(). A two-line comment gives the reason. The empty changeset's text now names both test files. Round-0 work is untouched. The race reproduces deterministically: with the count delayed 200 ms, BASE goes red with 1 failed and 9 passed, and this head is green. A count that never arrives turns the case red at the waiting read. Every other read in the file is listed under tests with the reason it was left; none is a count-gated synchronous read. The :166 prefix read (/^Backfill default/) passed under the 200 ms delay, so it was measured as not count-gated. The PR body now covers both files, with a per-file measurement table. Head 05dc463.",
    "tests": "Ran from the repo root with pnpm exec vitest run on the file. Each leg rewrote the beforeEach find mock with node mutate2.mjs and proved it on disk (anchor 1 to 0, marker 0 to 1). The file was then restored with git checkout HEAD -- ABS-PATH under an EXIT/INT/TERM trap, and the restore was proven by blob hash equal to HEAD (c8502f90) plus an empty git diff HEAD. Results: BASE ed28057 unmutated: exit 0, 10 passed. BASE with the count after 200 ms: exit 1, '1 failed, 9 passed', the one-choice case, 'Unable to find an accessible element with the role "checkbox" and name "Backfill default (12 existing records)"'. Head with the count after 200 ms: exit 0, 10 passed. Head with the count never resolving: exit 1, '1 failed, 9 passed', the one-choice case, 'Unable to find role="checkbox" and name "Backfill default (12 existing records)"' after 1306 ms; the other nine cases do not read the counted name. Head unmutated, three runs: exit 0 each, 'Tests 10 passed (10)'. File 1 unmutated at 05dc463: exit 0, 3 passed. Extra probe for H2 on case 2 ('names no number…'): its find was given a NUMERIC total (7), and the case went red, exit 1, 'Unable to find role="checkbox" and name "Backfill default"', so its waiting read does discriminate. Its name is also the pre-count name, so slowness can only push it toward green, never red. Reads left: in the one-choice case, options[0] and '= false' (drawn with the option, not count-gated) and the waitFor on find calls. Case 2's waiting exact-name read. The no-package and no-Publish cases' synchronous absence reads after settled() (no option is drawn and no count is read; an absence read cannot go red from slowness). The footer cases' /^Backfill default/ prefix reads, including the synchronous one after the click: all 10 cases are green under the 200 ms delay on head. getByTestId('draft-changes-publish') (the footer). The backfillCandidates cases are pure. All runs went through os-verify-lock (VERDICT command-exit 0).",
    "gates": "Local, head 05dc463, each exit code captured to a file before any pipe. turbo run build --filter=@object-ui/app-shell^... --concurrency=2: EXIT=0 (28 of 28 cached). pnpm --filter @object-ui/app-shell type-check: EXIT=0. pnpm --filter @object-ui/app-shell lint: EXIT=0 ('0 errors'; the existing warnings, 0 on either file). eslint --max-warnings 0 on both test files: EXIT=0. pnpm check:new-line-citations: EXIT=0 ('0 new citation(s)'). pnpm check:control-bytes: EXIT=0. node scripts/check-changeset-presence.mjs: EXIT=0 ('2 source file(s) of 1 released package(s) changed … declares 1 changeset(s)'). check:changeset-claims, check:pending-changeset-literals, changeset:check and check-changeset-overwrite.mjs: EXIT=0 each. check-governed-queue-guard --test on all 3 paths: NOT GOVERNED. --ran reconciliation is not applicable: objectui has no dispatch-gates.mjs, and the list was derived by hand as in round 0. CI check-runs on 05dc463, read once at 06:00Z (35 of 35): success 31 (Build & E2E, Build Docs, Bundle Analysis, Changeset Bump Policy, Changeset Claim Re-read, Changeset Declaration, Changeset Fixed Group Check, Changeset Overwrite Report, Governed Surface Queue Guard, Line Citation Gate, Lint, Live E2E (informational), Repo Gates, Test (dist pins), Test shards 1-8 and 10-16 of 16, Type Check, label); skipped 3 (Test (coverage), Test (coverage shard N/8), dependabot); in_progress 1 (Test (shard 9/16)). No CI wait, per contract.",
    "mcp_calls": "0",
    "api_writes": "2 relay strokes this round, both through scripts/pm/fleet-write/dispatch.mjs, each one POST /repos/objectstack-ai/objectstack/dispatches executed as objectstack-fleet[bot]. (1) issue_patch in run 39377905961: PATCH /repos//issues/13168 (the PR body). Read-back: 7297 bytes sent and stored, identical; the session-URL footer survived, and the first line is still 'Fixes #13120'. (2) This os-dev-report comment: POST /repos//issues/13120/comments. Not REST: one git push (b354a8e to 05dc463). Reads used gh api only: the amended claim, the PR and the check-runs.",
    "deviations": [
    "pnpm run setup ran outside the verify lock, as in round 0: an install that copied the pinned build from the shared pin store (7.4s). Every build and test ran under the lock.",
    "The PR body was edited once through the relay's issue_patch op, the issue endpoint (fleet-write has no pull-body op). Ownership of the body now reverts to the seat.",
    "Worktree /home/user/objectui-issue-13120 has been removed again (node_modules first, then git worktree remove, which exited 0 on a clean tree; the head equals the remote branch)."
    ],
    "open_questions": [],
    "out_of_scope_findings": []
    }


    Generated by Claude Code

  6. objectstack-fleet commented on Oct 20, 2026

    @objectstack-fleet
    ContributorAuthor

    ACCEPT → PR #13168 comment 6284526201 · no contract-review face hit (Clause-②: no) · domain:ui#1 · session_014MXhk1yjWh37d634hLy3p7 · 2026-10-20T06:02Z. CI is green on head 05dc463; the seat flips to ready and enables auto-merge.

  7. objectstack-fleet commented on Oct 20, 2026

    @objectstack-fleet
    ContributorAuthor

    LANDED · domain:ui seat 1 · session_014MXhk1yjWh37d634hLy3p7 · 2026-10-20T06:16Z · pm:dispatched cleared

    reading value
    PR #13168 merged through the merge queue at 2026-10-20T06:16Z. The squash commit 96036bd has one parent, and git merge-base --is-ancestor places it on origin/main (exit 0)
    queue no gh-readonly-queue/main/pr-13168-* branch remains
    landed content on origin/main, StudioDesignSurface.publishBackfill-12929.test.tsx reads the counted checkbox only through await within(sheet).findByRole (3 hits, 0 synchronous). DraftChangesPanel.backfill-12929.test.tsx reads it through await screen.findByRole (1 hit, 0 synchronous)
    records claim 6283862182, amendment 6284284090 (the sibling file); dev reports 6284264204 and 6284511151; ACCEPT 6284526201 on PR #13168 (no contract-review face hit)
    closing closed completed at 2026-10-20T06:16Z through the PR's Fixes #13120, the only card closed since the merge; pm:dispatched is removed in this act

    The race that ejected PR #13117 from merge-group run 39367006901 is gone from both of this seat's objectui#12929 tests. Each was reproduced red on BASE with a 200 ms count delay, and a count that never arrives still fails red.

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:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpriority:p2tooling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions