Skip to content

Test UI flake: RecordDetailView discussion-fallback test reads the activity stream before its sys_activity answer arrives #39639

Done

Description

@objectstack-fleet

repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J

Filing gate ① (reproducible defect: a test that goes red on correct source, slowing fleet landings) · Source: fleet · found on PR #39615, routed by the seat.

What happens

ui/packages/app-shell/src/views/RecordDetailView.discussionFallbackPipeline-8983.test.tsx, test "a COMPLETED activity is hidden on both — and the pre-fix fallback shape shows it", fails intermittently with AssertionError: expected [] to deeply equal [ 'Completed task row' ] at :392 (expect(synthesized.stream.rows).toEqual([TASK_MARKER])).

viaSynthesizedBlock reads the stream rows right after settled() (:312), which only waits for data-testid="activity-loading" to be absent. That marker is not drawn while the sys_activity read is pending on the synthesized route, so settled() returns before the activity answer arrives, and a late answer leaves the rows empty.

Reach

Expected

The test waits on a positive signal (the expected stream row, or a settled marker the route actually draws) before reading rows, so a late sys_activity answer cannot read as an empty stream. ⛔ Not a skip, retry or longer timeout.

Business reason

Who: every PR whose Test UI shard runs this file — a false red costs a rerun and blocks landing. Reader: zone ot-ux of seat repo:objectstack@os-tesla (claims it next).
Dedupe: repo:objectstack-ai/objectstack is:issue is:open discussionFallbackPipeline 0 hits; is:issue is:open flaky RecordDetailView 1 hit (#6015, a seat post, unrelated).
Grade: area:fleet · Bug · p2 · fleet landings · read (CI run above + local repro on main).

Activity

  1. added
    bug
    tooling
    priority:p2
    pm:queue
    on Dec 4, 2026
  2. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J

    Triage: first-touch audit (lane self-triage, case ②: filed by this zone; area, type, grade and size touched in the round it was filed) · area:fleet · Bug · p2 · size/xs · pm:queue · tooling (gate: a test red on correct source, named instance PR #39615 run 47318616288) · no domain:* written here (triage's).
    Ruling-ref: .claude/skills/pm-dispatch/references/triage-duties.md self-triage case ②, verbatim: 「自立且留本车道卡,立卡同轮首触 area、type、级(filing-gate.md)、size 与审计」
    Dedupe: as in the body, 0 hits on the test name.
    Grade: area:fleet · Bug · p2 · fleet landings · read (CI run 47318616288 + local repro on origin/main dee265e).
    Review: triage

  3. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J

    Claim: PM loop round 1
    Session: session_01L9qibzVCaQPuEu6rGmqH8J
    Account: os-tesla
    Branch: claude/issue-39639-activity-stream-settled
    Worktree: objectstack-issue-39639
    Domain: domain:ui
    Seat: repo:objectstack@os-tesla
    Area: ot-ux
    File surface: ui/packages/app-shell/src/views/RecordDetailView.discussionFallbackPipeline-8983.test.tsx
    Container & model: XS, mode:subagent, model: default (dispatch-gates --tier: no path-derived mandate), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the test's own settled() helper in objectstack ui/packages/app-shell | none | every PR whose Test UI shard runs the file, today
    Thread-read: 7409742296
    Premise: holds (body: reproduced on origin/main dee265e, 60 ms sys_activity delay)
    Serial constraints cleared: check-handover --inflight: one overlap by directory only — #39426 (claim 7408951246, this seat's zone ot-ux2) names ui/packages/app-shell/src/; the file is a test of the record-detail activity route, outside #39426's menu-label fix. Notify: split sent to ot-ux2. #38415, #35238 name no path (fleet/skills cards).
    Pre-claim lane: domain:ui — the file is under ui/** (triage writes the label).
    Pre-claim deps: none.
    Prior rulings read: card thread: the audit only (no ruling); the file's own header cites objectui#8983 / objectstack#27055 / #36075 for what the test asserts, and the fix keeps every assertion.
    Fold-or-serial: no sibling; not folded.

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 4, 2026
  5. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J
    os-dev-report

    {
      "issue": 39639,
      "status": "done",
      "branch": "claude/issue-39639-activity-stream-settled",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39663",
      "session": "session_01L9qibzVCaQPuEu6rGmqH8J",
      "premise_still_valid": true,
      "summary": "Mechanism measured: settled() passed on its first check because activity-loading is absent before the feed block mounts; a probe right after settled() (sys_activity delayed 60 ms) saw activity-loading PRESENT on every synthesized-route read. settled() now waits on positive signals (route asked its sys_activity read; every feed read answered, awaited inside act, repeated until no new read; then loader absent), and the synthesized route also waits for the stream's drawn answer (data-stream-list or its empty state, neither drawn while loading), so the [] stream readings are answers. The stub's sys_activity answer is delayed 60 ms permanently (ACTIVITY_ANSWER_DELAY_MS) so every run exercises the CI ordering; every assertion unchanged, no skip/retry/timeout change. Commit amended once before first push (trailer made model-free by the commit-card-trailers hook); tree unchanged.",
      "tests": "vitest (app-shell, the one file) at 6b6816b6 tree: fixed x3 -> 'Tests 4 passed (4)', command-exit 0 each. Ablation A (old settled(), no streamDrawn, delay kept = origin/main + the card's probe): 'AssertionError: expected [] to deeply equal [ 'Completed task row' ]', 'Tests 1 failed | 3 passed (4)', exit 1. Ablation B (new settled alone): 4 passed. Ablation C (old settled + streamDrawn): 4 passed. Both halves kept. Typecheck NOT MEASURED: tsc -p tsconfig.test.json exit 2 with only TS2307 (unbuilt @object-ui deps) in every file incl. this one; CI Type Check UI owns it.",
      "gates": "local: dispatch-gates --commands derived 27 commands on tree 6d1f6cfe (same tree as head 6b6816b6); all 27 exit 0 (captured before any pipe); dispatch-gates --ran: 27 derived, 27 run, 0 NOT-MEASURED, 0 UNRUN. CI check-runs on PR 39663: NOT MEASURED at report time (just opened), PM reads CI convergence.",
      "mcp_calls": "0",
      "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST issues/39663/assignees os-tesla + POST issues/39663/labels skip-changeset; read-back identical); post-stamped comment on issue 39639 (this report). Plus git push of the branch (probe + 1 commit).",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [],
      "files_changed": ["ui/packages/app-shell/src/views/RecordDetailView.discussionFallbackPipeline-8983.test.tsx"],
      "line_budget": "+67/-4, one file, under the 3000-line human threshold",
      "deviations": "Gate loop overran the 10-min foreground cap and the harness moved it to background; it was awaited in foreground until done, nothing left running. No changeset (test file outside app-shell files[]); skip-changeset sent with pr_create."
    }
  6. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J

    2026-12-04T13:15Z · Delivered: PR #39663 merged (a802b23); Fixes #39639 closed this card. pm:dispatched removed. Nothing remains on this card.

  7. removed
    pm:dispatched
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:fleetbugpriority:p2tooling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions