Skip to content

Record discussion client read keeps a short list at the row budget where the record page payload answers the whole thread or the budget refusal #39296

Description

@objectstack-fleet

repo:objectstack@os-bill · os-bill · session_01Utp6Ca2yTZZiHWkyVgD2oK

立卡门类别:① 评审发现的同族缺陷(PR #39294 的 L1 评审;os-dev 报告 7373334709 范围外第 1 条)。Source: #39271
Part of #39077 · family of #39195, #39253, #39271, #39272 (a discussion read cut by the deployment's data page cap / row budget)
定级:area:data · Bug · priority:p3 · reach: a deployment that sets both a data page size and OS_DATA_QUERY_ROW_BUDGET, for a record whose discussion is past the budget or the budget is not a multiple of the page · evidence: read (code, the L1 reviewer's trace), not measured at a public door

维护者速读

  • 同一条记录,在记录页和列表页评论栏/手机评论页上看到的评论条数可能不一样。
  • 记录页(服务端)会把整串带全,超过行数上限时明确说"读不出来";另外两处(前端直接读)超过上限时只显示前几页,不提示被截断。
  • 修在前端那条读取上,让两边结果一致。

Scope and acceptance

  • Spec (Governing text): packages/spec/src/api/record-page.zod.ts, the stream row discussion: "the whole thread, as the record feed reads it" — the payload and the direct read are one read.
  • Today (after fix(rest): serve the record page discussion whole past the data page size #39294 and fix(app-shell): a record discussion the row budget declines is not shown as empty #39287): the record page payload's discussion (packages/rest/src/record-page-routes.ts readWholeStream) cuts its last page to end at OS_DATA_QUERY_ROW_BUDGET and answers a thread past the budget with QUERY_ROW_BUDGET_EXCEEDED, which the record page draws as the existing "could not load" note. The client's direct read readEveryPage (ui/packages/app-shell/src/views/useRecordDiscussion.ts, used by the list-page comments column, the phone comments page and every comment read not served by the payload) pages $top: pageSize, $skip: rows.length with no last-page cut, and on a later page's budget 400 keeps the pages read.
  • Effect: past the budget, the record page shows a refusal and the other surfaces a silently short list with a count. A thread that fits a budget that is not a multiple of the page (page 3, budget 7, 7 comments) is short by up to page−1 rows on the direct surfaces (6 shown, 7 on the record page).
  • Direction: the client read cuts its last page at the budget the way the route does (or reads the served equivalent of resolveQueryReadPageCap), and records a later page's budget refusal as declined, never a short list.
  • Acceptance: on a page-3 / budget-7 double, both doors give 7 comments; on budget 6, both give the declined state. A test pins each and goes red without the fix.
  • Clause-②: no (expected) · Metadata-protocol: none.

Dedupe: readEveryPage last page row budget, declined later page short list (open issues) → none.

Activity

  1. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:data · domain:ui · Bug · p3 · pm:queue · size S, touched 2026-12-03T10:13Z. Rationale: the filer's grade stands. Two reads of the same discussion disagree only on deployments that set both a page size and a row budget, past that budget. It is a data-correctness gap with a narrow reach, under epic #39077, and the fix is in the client's direct read.
    Grade: area:data · Bug · p3 · deployments with a page size and OS_DATA_QUERY_ROW_BUDGET, threads past the budget · read (code, L1 trace of PR #39294).

  2. added
    domain:ui
    pm:queue
    on Dec 3, 2026
  3. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6Ca2yTZZiHWkyVgD2oK

    Triage: first-touch audit (lane self-triage, case ②: filed by this zone and kept in it; area, type, grade and size touched here, about one hour after filing — the filing stroke set area and grade, this one adds type and the audit) · area:data · Bug · p3 · size S · no domain:* written here (triage's; the fix is ui/packages/app-shell/src/views/useRecordDiscussion.ts).
    Ruling-ref: .claude/skills/pm-dispatch/references/triage-duties.md self-triage case ②, verbatim: 「自立且留本车道卡,立卡同轮首触 area、type、级(filing-gate.md)、size 与审计」
    Grade: area:data · Bug · Impeded (a discussion shown short on the direct surfaces; nothing stored is wrong) · rare configuration (only deployments that set both a page size and OS_DATA_QUERY_ROW_BUDGET) · read (code, the L1 trace on PR #39294) ⇒ p3, same as its family #39271. Stays a sub-issue of topic #39077.
    Review: triage

  4. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6Ca2yTZZiHWkyVgD2oK

    Claim: PM loop, zone comments-39077 of seat repo:objectstack@os-bill (topic #39077; the maintainer's word 2026-12-02 21:55Z 「接手过来的 os-support-ai 的任务和专题不分优先级都要处理」)
    Area: comments-39077
    Session: session_01Utp6Ca2yTZZiHWkyVgD2oK
    Account: os-bill
    Branch: claude/issue-39296-client-read-row-budget
    Worktree: objectstack-issue-39296
    Domain: domain:ui
    Seat: repo:objectstack@os-bill
    File surface: ui/packages/app-shell/src/views/useRecordDiscussion.ts; ui/packages/app-shell/src/views/useRecordDiscussion.test.tsx; the existing host test harnesses RecordDetailView.feedLoadFailure-29188.test.tsx and ObjectView.phoneCommentsPage-39086.test.tsx if a host-level case is needed; a changeset. No new user-facing wording (the declined note from #39287 is the only refusal state). Reading the served row budget needs a new client/server surface ⇒ stop and report, do not add one. Stop on breach; explain in the report.
    Container & model: S, mode:subagent, model: TIER_DEFAULT (dispatch-gates --tier prints no path-derived mandate), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: this repo's own code (ui/packages/app-shell, objectstack): readEveryPage pages $top: pageSize with no last-page cut and keeps a short list on a later-page budget 400 | no platform path covers it | record-discussion direct readers on a deployment with a page size and a row budget; reachable today
    Thread-read: 7375009116
    Premise: holds on main 777da7f by the L1 trace on PR #39294 (ACCEPT 7374043559); the dev re-reads first.
    Serial constraints cleared: check-handover.mjs --inflight → NO OVERLAP READ; PR #39287 (same file) merged 2026-12-03 09:36Z.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6Ca2yTZZiHWkyVgD2oK
    os-dev-report

    {
      "issue": 39296,
      "status": "done",
      "branch": "claude/issue-39296-client-read-row-budget",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39308",
      "session": "session_01Utp6Ca2yTZZiHWkyVgD2oK",
      "premise_still_valid": true,
      "summary": "Premise held on origin/main f8086415: readEveryPage paged $top pageSize / $skip rows.length with no last-page cut and broke on a later page's declined verdict, keeping a short list, while readWholeStream in record-page-routes.ts cuts its last page at the budget and refuses past it. The budget is not served to the client (the envelope carries code and status; the number is only in message prose, not parsed), so no new surface was added and no needs_decision was raised: on a later page's QUERY_ROW_BUDGET_EXCEEDED, readEveryPage re-asks the refused page with a smaller $top, halving between the largest answered and smallest refused $top, which locates the cut exactly under the door's refuse-never-clamp contract (offset plus limit over the budget is refused). A thread ending inside the cut page is read whole; one with rows past it rethrows the server's own refusal, which the caller records as declined (the existing state and note from #39287, no new wording). The reaction read uses the same readEveryPage, so it follows the same rule (fits: all reactions; past: comments without reactions, as the payload's refused reaction read). The phone comments page host case that pinned the short-list consequence now pins the declined state.",
      "tests": "On the tree of 28e3191b (ui files byte-identical; last commit is the changeset): useRecordDiscussion.test.tsx + RecordDetailView.feedLoadFailure-29188 + ObjectView.phoneCommentsPage-39086: Test Files 3 passed, Tests 49 passed. Every ui test file naming useRecordDiscussion/readRecordComments/sys_comment: Test Files 42 passed, Tests 690 passed. New describe 'a paged discussion against the row budget': page 3/budget 7/7 comments gives 7 (reads [[undefined,undefined],[3,3],[6,3],[6,1]]); budget 6 gives declined; page 3/budget 8/10 comments gives declined; page 2/budget 5/5 reactions shows 5; 6 reactions shows the comment without reactions. Ablation via scripts/ablation-replace.mjs (fix committed first; mutation = break on declined again, anchor 1 -> 0, blob b9207fd03cad -> 1adab7c57ba6): Tests 5 failed | 12 passed (17), all 5 new cases red (6 of 7; undefined vs declined x2; [4] vs [5]; reaction reads stop at 3); restored: blob == HEAD b9207fd03cad and git diff HEAD empty. Test source imported from src, no build/dist leg needed.",
      "gates": "Local: pnpm --filter @object-ui/app-shell run type-check -> VERDICT command-exit 0, 0 error TS lines (after building the @object-ui/app-shell^... closure). dispatch-gates --commands (tree 28e3191b, 4 paths): 39 derived; 36 run exit 0 (each exit captured before any pipe), incl. pnpm --dir ui exec vitest run scripts/ (172 files passed, 2 skipped), check:nul-bytes, check:cross-package-test-inputs, check:test-source-alias, check-empty-changeset, check-adr-0087-registration, check-changeset-no-major; 3 NOT-MEASURED: node scripts/check-comment-mask-corpus.mjs (exit 124 at 240s), pnpm check:query-options-erasure (exit 124 at 150s), pnpm check:type-check-debt (exit 124 at 110s in its closure build), shared box, CI runs them. --ran: 39 accounted, 36 run, 3 NOT-MEASURED, 0 UNRUN. Also check:changeset-fixed exit 0 (roster under .changeset), ui check:new-line-citations: 0 new citations exit 0. overlap-check.mjs: origin/main dc4a2cdbd6 merges cleanly, VERDICT clean exit 0. CI families: PR #39308 check-runs not yet concluded at report time, NOT MEASURED here; the seat reads them.",
      "mcp_calls": "0",
      "api_writes": "2 relay writes: fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST issues/39308/assignees os-bill, read back identical 7812 bytes); post-stamped comment on issue #39296 (POST /repos/objectstack-ai/objectstack/issues/39296/comments). Plus git push of the branch (probe + 3 pushes).",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed: the client still does not know the row budget, so a read that meets it spends up to about log2(page size) extra probe reads (refused ones never reach the driver); a served read limit would remove them but is a new client/server surface the claim rules out. In the PR's Acceptance notes.",
        "carrier: none · noted, not filed: a later page refused with any other 400 still ends the paging with the pages read standing (pre-existing; no door is known to produce it). In the PR's Acceptance notes."
      ]
    }
  7. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6Ca2yTZZiHWkyVgD2oK

    2026-12-03T12:34Z · Close-out · PR #39308 merged (2026-12-03T12:12Z, merge commit 23e859ae39), closing this card as Fixes #39296 intended.

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

Metadata

Metadata

Assignees

Labels

area:datadomain:uipriority:p3

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions