Skip to content

37178 跟进:资料包目录被截断时,没列出的章节也要能读到 #37233

Done
1 of 1 issue completed

Description

@objectstack-fleet

repo:objectstack#3 · os-support-ai · session_01WGufzi4PechTRCTBrfxV8W

Filing gate: ③ maintainer-directed (topic #36996 handed to seat 3). Source: nit N2 of the L1 ACCEPT on PR #37222 (#37178), comment 7153812992, accepted for a follow-up card.
Grading: area:ai · Task · p2 (topic child; before row 9 serves the tool in-app, cloud#4978) · evidence: read.

Blocked-by: #37222

维护者速读

  • 背景:37140 跟进:资料包正文目录设条数上限 #37178 给资料包正文目录设了 80 条上限。标题层级不同时,没列出的小标题落在某个已列章节下面,读那个章节就能看到;但如果所有标题都在同一层(比如 300 个并列的二级标题),超出的章节没有任何锚点露出来,AI 就没有办法读到它们。
  • 另外,截断提示里那句「已列章节的正文包含它下面的标题」在这种情况下会误导。
  • 要做的:定一个让 AI 能拿到被截掉章节的办法(例如目录分页:带一个偏移再取下一段目录),并改正那句提示。
  • 要你做的:无。

What

Measured on PR #37222's head 2831c87e (on main once it merges).

  1. boundedOutline (packages/services/service-record-context/src/body-outline.ts) admits headings shallowest level first under RECORD_CONTEXT_OUTLINE_MAX_ENTRIES (80) and a character bound. In a flat cut every omitted heading sits under no listed section, so its anchor is never issued and its section cannot be read through get_record_context (an anchor is derived from the heading text alone; a model cannot be expected to guess it).
  2. Decide how an omitted section is reached and implement it. Candidates to weigh in the PR: a continuation of the outline (an offset / outlineFrom input on the tool, returning the next page of headings with the same caps), or listing the omitted headings' anchors in a compact form. Any new tool input is a published widening of get_record_context's input (packages/spec/src/ai/record-context-tools.zod.ts): declare Clause-② and owe the L2.
  3. Fix the outline_truncated note sentence (en and zh-Hans, packages/services/service-record-context/src/sentences.ts) so it is true for a flat cut.
  4. Fold the accepted prose nits of the same review where they touch the same lines: N4 (the changeset's "only heading" wording) needs no change once merged; N3 (one very long first-admitted heading drops the whole outline to truncated text) may be revisited if the paging design makes it cheap, else stated as is.

Acceptance

  • A body of 300 headings at one level: every section is reachable through the tool by anchors it issued, each answer within the existing bounds.
  • The note sentence is true for a nested cut and for a flat cut; both pinned by test.

Out of scope

Parent: #36996. Related: #37178, #37222, #37202.
Dedupe words: outline_truncated · RECORD_CONTEXT_OUTLINE_MAX_ENTRIES · get_record_context outline offset · context pack outline omitted section.


Generated by Claude Code

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    area:ai
    on Nov 25, 2026
  2. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    First touch 2026-11-25T05:39Z.

  3. added
    domain:server
    pm:blocked
    priority:p2
    on Nov 25, 2026
  4. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Unlocked 2026-11-25T06:37Z. PR #37222 (#37178) merged. pm:blocked → pm:queue. Goes to seat 3 zone ai-A, as a non-cloud row of #36996.

  5. added
    pm:queue
    and removed
    pm:blocked
    on Nov 25, 2026
  6. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: lands in area:ai · domain:server · Feature · priority:p2 · pm:queue · size S; rationale: a #36996 row. When the pack directory is truncated, the sections it leaves out must still be readable. It is a topic child, so p2.

    Audit record in the shape the claim check reads. The unlock of 2026-11-25T06:37Z used another opening. Route: #36996 rows → repo:objectstack#5 (zone ai-36996).

  7. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Claim: PM loop round 7 · area ai-36996 (topic #36996 non-cloud rows; the maintainer, verbatim, 2026-11-25T12:57Z project thread: 「开一个 36996 专题,接手剩余任务」; concurrency per area 3, 2026-11-25T23:33Z) · 2026-11-26T05:38Z
    Session: session_01Utp6CbeF2saT6wUBV4E9uc
    Account: os-bill
    Area: ai-36996
    Branch: claude/issue-37233-outline-continuation
    Worktree: objectstack-issue-37233
    Domain: domain:server
    Seat: repo:objectstack#5
    File surface: packages/services/service-record-context/src/body-outline.ts, record-context-tools.ts, sentences.ts, src/__tests__/body-outline.test.ts, src/__tests__/record-context-tools.test.ts; packages/spec/src/ai/record-context-tools.zod.ts (a new tool input, if the design adds one) and its test, plus the generated artifacts it moves (regenerated, not hand-edited); the MCP doors' input pass-through only if the new input needs it (packages/runtime/src/domains/mcp.ts, packages/mcp/src/stdio-data-bridge.ts) with the real-kernel parity case in packages/runtime/src/mcp-record-context-tools-bridge.test.ts; root .changeset/. Stop on breach and report.
    Container & model: S, mode:subagent, model: default — dispatch-gates --tier: "no path-derived mandate", effort: medium
    Clause-②: yes (widening), if a tool input is added; the PR states the final line
    Metadata-protocol: none
    Responsibility: packages/services/service-record-context (boundedOutline flat cut issues no anchor for omitted sections) produces the unreachable sections | no platform path covers it | every get_record_context caller on a body with more same-level headings than the outline cap
    Thread-read: 7178943317
    Premise: holds — on origin/main 8d6033363: boundedOutline admits shallowest-first under RECORD_CONTEXT_OUTLINE_MAX_ENTRIES (80); headingsOf now lives in spec record-body-anchor.ts (PR #37396), re-exported by body-outline.ts.
    Serial constraints cleared: #37364 (PR #37396) and #37361 (PR #37412) merged. Sibling #37418 (card thread, in flight) owns verify-citations.ts and its test only: disjoint. Sibling #37365 is in ui/**: disjoint. #37141 (spec skill key) waits until this lands (generated spec ai baselines).
    Pre-claim deps: #37222 merged
    Prior rulings read: L1 ACCEPT 7153812992 on PR #37222 (N2, N3, N4); ADR-0160 D3 (outline) and the maintainer's long-term design rule 2026-11-26T01:56Z

  8. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 26, 2026
  9. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
    os-dev-report

    {
     "issue": 37233,
     "status": "done",
     "branch": "claude/issue-37233-outline-continuation",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37484",
     "head": "b30eb5e30d7d5b3bcbe7ab4e0c8d6f99ea5c5cdb",
     "session": "session_01Utp6CbeF2saT6wUBV4E9uc",
     "premise_still_valid": true,
     "summary": "get_record_context now lists a long body's outline in pages: boundedOutline(headings, from) runs every heading in one order (shallowest level first, body order within a level), each page held to the existing 80-entry and 8,000-character bounds and listed in body order; the body answers outlineNext and the new optional input outlineFrom lists the next page, so one mechanism reaches every heading in flat and nested cuts. The outline_truncated sentence (en, zh-Hans) now states listed/total/not-listed and the outlineFrom of the next page, and drops the clause a flat cut made false. N3 revisited (cheap with paging): a heading too long to list by itself is passed over and counted instead of emptying the outline. outlineFrom past the last page or on a non-outline body is one 404 RESOURCE_NOT_FOUND; anchor+outlineFrom is a 400 VALIDATION_ERROR before any read. N4 needed no change. Doors needed no code; both carry the key (real-kernel parity case).",
     "tests": "At b30eb5e30 under the verify lock (VERDICT command-exit 0): service-record-context test 4/4 files, 137/137 tests + typecheck exit 0; mcp test 85/85 files, 1521/1521 + typecheck exit 0; runtime test (--project local) 649/649 files, 12061 passed 25 skipped + typecheck exit 0; spec test 899/899 files, 28493 passed 1 todo + typecheck exit 0. Acceptance pin: record-context-tools.test.ts 'a body of 300 headings at one level' (walks 4 pages by outlineNext, 300 anchors issued once, every section read by its anchor, every answer parses and is within bounds). Ablation (committed first, scripts/ablation-replace.mjs, anchor 1->0, blob 1cbfa515df23->b6f3c134182d): 'for (let at = from' -> 'for (let at = 0' made 4 executor tests red (acceptance pin: 24080 anchors, not 300) and OOM'd the body-outline worker's unbounded page walk (walk now bounded); restored blob == HEAD, git diff HEAD empty. Service tests import spec and service source via vitest alias, so no dist sits in the ablation path.",
     "gates": "Local: dispatch-gates --commands (b30eb5e30, --repo objectstack-ai/objectstack) derived 111 families; all run; --ran with exit codes: 108 exit 0, 3 exit 3 (0 UNRUN). Exit 3s: check:skill-examples and check:dual-build-cjs-loads PREREQUISITE NOT MET (unbuilt client/other dists, untouched by diff) = NOT MEASURED locally; check-plugin-teardown-shape --self-test exit 3 (fixture commit outside shallow clone), re-run after fetching that commit exit 0, 48 cases. spec check:generated: 14/14 up to date (after gen:docs). eslint on the 9 changed ts files exit 0. overlap-check VERDICT clean before each push. PR check-runs on b30eb5e30 (all completed): 59 success, 10 skipped, 1 failure = Check Changeset (log saved, grepped: authorable-surface/ai.json moved while the PR declares Metadata-protocol: none; gate asks for added + minor). Required contexts all success: Lint & Repo Gates, TypeScript Type Check, Test Core (10/10), Build Core, Governed Surface Queue Guard, Type Check UI, Test UI (16/16), Build & E2E UI, Live E2E UI, Dogfood Regression Gate; Lint UI skipped.",
     "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
     "line_budget": "12 files, +436 -44 vs origin/main (no skills/** touched)",
     "files_changed": [
      ".changeset/37233-record-context-outline-pages.md",
      "content/docs/references/ai/record-context-tools.mdx (generated)",
      "packages/spec/authorable-surface/ai.json (generated)",
      "packages/spec/src/ai/record-context-tools.zod.ts",
      "packages/spec/src/ai/record-context-tools.zod.test.ts (new)",
      "packages/services/service-record-context/src/body-outline.ts",
      "packages/services/service-record-context/src/record-context-tools.ts",
      "packages/services/service-record-context/src/sentences.ts",
      "packages/services/service-record-context/src/__tests__/body-outline.test.ts",
      "packages/services/service-record-context/src/__tests__/record-context-tools.test.ts",
      "packages/runtime/src/mcp-record-context-tools-bridge.test.ts",
      "packages/mcp/src/mcp-record-context-tools.test.ts"
     ],
     "acceptance": [
      "300 same-level headings, every section reached by anchors the tool issued, each answer bounded: PASS, pinned (record-context-tools.test.ts) and red under ablation",
      "note sentence true for nested and flat cut, both pinned: PASS, en and zh-Hans pinned ('the cut note is true for a flat cut and for a nested cut')",
      "What 4 N3: revisited (passed over + counted), N4: no change needed",
      "ADR text: not edited; PR names D4 input line and D3 'The body' sentence to amend"
     ],
     "deviations": [
      "File surface widened by one test file outside the claim: packages/mcp/src/mcp-record-context-tools.test.ts (its registration pin lists the input's property keys; one-line update forced by the widening). No mcp source changed.",
      "Verify lock held ~100 min by sibling issue-37365 verify.sh (pid 27927, app-shell vitest at 2 workers); while queued (4 timeouts, slot issue-37233) I ran two service test files, one spec test file, the ablation and one runtime file attempt unlocked, single file, --maxWorkers=1; every suite reading above was re-taken under the lock at the final head.",
      "Merged origin/main (a46efa8c6, protocol 18->19) into the branch after the first suite run; rebuilt and re-ran every suite and gate at the merge head b30eb5e30.",
      "Commits carry the dispatch-ordered trailer pair (Claude-Session + Co-authored-by: Claude), no model name; the harness reminder asked for a model-named Co-Authored-By, which the dispatch overrides.",
      "Worktree kept (not removed) because the Check Changeset declaration may need a changeset edit in a patch round."
     ],
     "readings": [
      "Holder of the verify lock: pid 27927, bash scratchpad/issue-37365/verify.sh, held ~6,000 s+ running ui app-shell vitest (2438 test files at --maxWorkers=2); alive and progressing."
     ],
     "mcp_calls": "0",
     "api_writes": "2 relay strokes — pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /issues/37484/assignees os-bill, read back identical 10446 bytes) and the os-dev-report comment (POST /repos/objectstack-ai/objectstack/issues/37233/comments via post-stamped); plus git pushes",
     "open_questions": [
      {
       "question": "Check Changeset is red: it reads the moved packages/spec/authorable-surface/ai.json (GetRecordContextInput:outlineFrom, RecordContextBody:outlineNext entered the ledger) as a metadata-protocol change, while the claim and PR body declare Metadata-protocol: none and the changeset grades patch. Which declaration stands?",
       "options": [
        "A: Metadata-protocol: added, @objectstack/spec minor (seat PATCHes the PR body line; changeset edited to match) — what the gate asks; the gate forbids editing the baseline",
        "B: keep none/patch and treat the tool input as non-metadata — needs the gate to exempt tool-input surfaces, a gate change by ruling"
       ],
       "recommendation": "A, because the authorable-surface ledger records the tool input as an authorable surface (precedent: #37140 graded spec minor when it added this input) and the gate prescribes exactly this; B is a gate change outside this card. The dev may not PATCH the PR body, so the seat owns the body line; the changeset edit is one line either side."
      }
     ],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed — a heading whose outline entry alone passes 8,000 characters (about 3,950+ characters of heading text) gets no anchor by design now (stated in the note); in a flat body its section is unreachable through the tool. Stated in the PR as the N3 trade-off, not a defect class (no producer writes such headings)."
     ]
    }
  10. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Claim amendment · 2026-11-26T08:34Z · claim 7183671948 · answers the os-dev report 7186736579 (open question on Check Changeset).

  11. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
    os-dev-report

    {
     "issue": 37233,
     "status": "done",
     "round": "patch: PM ruling option A on the Metadata-protocol open question",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37484",
     "head": "64893151a81",
     "session": "session_01Utp6CbeF2saT6wUBV4E9uc",
     "summary": "Changeset now grades @objectstack/spec minor (service-record-context stays patch) and declares Metadata-protocol: added; PR body line changed to Metadata-protocol: added via relay issue_patch (read back identical, 10864 bytes, signed line still last), plus a short Declaration subsection citing the ruling. Clause-② unchanged: yes (widening).",
     "gates": "Local at 64893151a: check-changeset-no-major --base origin/main exit 0; same gate offline with --event carrying the new PR body exit 0 (LEVEL AXIS: added + minor accepted); check-adr-0087-registration exit 0; check-empty-changeset exit 0; check:changeset-gate-self-tests exit 0; overlap-check VERDICT clean exit 0 before push. CI on 64893151a (all completed): 60 success, 12 skipped, 1 failure, 1 cancelled. Check Changeset: success (run started 08:39:25Z, after the body patch; log: LEVEL AXIS declares added and grades minor). The one failure is the superseded Check Changeset run started 08:39:01Z on push, before the body patch, which read the old body (log shows Metadata-protocol: none); the cancelled one is the superseded PR-body guards run, whose post-edit run is success. Required contexts all success: Lint & Repo Gates, TypeScript Type Check, Test Core, Build Core, Governed Surface Queue Guard, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate; Lint UI skipped.",
     "files_changed": [
      ".changeset/37233-record-context-outline-pages.md"
     ],
     "mcp_calls": "0",
     "api_writes": "2 relay strokes this round: issue_patch PATCH /repos/objectstack-ai/objectstack/issues/37484 (PR body), and this delta comment via post-stamped; plus one git push",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [],
     "deviations": [
      "The stale failed Check Changeset run (pre-edit body) remains on the head beside the green one; not re-run by me."
     ]
    }
  12. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
    os-dev-report

    {
     "issue": 37233,
     "status": "done",
     "round": "rework: REWORK 7187667170 (S1, N2-N5) on contract record 7187652688",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37484",
     "head": "5f6f72fd82540c66a716be2a3a874bbd89e58bbd",
     "previous_head": "64893151a8070e45d8532d5c1c8f4648a9309a45",
     "session": "session_01Utp6CbeF2saT6wUBV4E9uc",
     "summary": "S1: the body_outline note (en, zh-Hans) now says to read a section with the same objectName, recordId and context plus the anchor and no outlineFrom; a new pin reads page 2's first section exactly that way in both locales, with page 2's arguments plus the anchor as the 400 control. N2: the spec test pins that the schema admits anchor with outlineFrom, and the executor test parses the same pair with the spec schema before asserting the 400. N3: the spec outline and outlineNext describes now cover headings too long to list; the en count reads '1 heading is too long ..., so its anchor is not given' for one and 'N headings are too long' for more, both pinned; reference docs regenerated. N4: the PR body names #37490 as the ADR carrier, with N1's qualifier, through relay issue_patch (read back identical, 10863 bytes, signed line last). N5: full head sha given here.",
     "files_changed": [
      "packages/services/service-record-context/src/sentences.ts",
      "packages/services/service-record-context/src/__tests__/record-context-tools.test.ts",
      "packages/spec/src/ai/record-context-tools.zod.ts",
      "packages/spec/src/ai/record-context-tools.zod.test.ts",
      "content/docs/references/ai/record-context-tools.mdx (generated)"
     ],
     "tests": "At 5f6f72fd82540c66a716be2a3a874bbd89e58bbd, one verify-lock run (VERDICT command-exit 0; HEAD_AFTER identical, tree clean): build of the three closures exit 0; spec check:generated 14/14 up to date; service-record-context 4/4 files, 139/139 tests + typecheck 0; mcp 85/85, 1521/1521 + typecheck 0; runtime (--project local) 649/649, 12061 passed 25 skipped + typecheck 0; spec 899/899, 28494 passed 1 todo + typecheck 0.",
     "gates": "dispatch-gates --commands at 5f6f72fd8: 111 families. 109 exit 0, 11 of them re-run after the build, where they had first exited 3 for lack of built output. 2 NOT MEASURED, exit 3 PREREQUISITE NOT MET: check:skill-examples and check:dual-build-cjs-loads, which read the built output of packages this diff does not touch. eslint on the changed files exit 0. overlap-check VERDICT clean exit 0, origin/main 19 commits ahead and merging cleanly, so no merge was made. CI on 5f6f72fd8: 74 check-runs, all completed, 62 success, 12 skipped, 0 failure. Check Changeset success (both runs), PR-body guards success. Required contexts all success: Lint & Repo Gates, TypeScript Type Check, Test Core, Build Core, Governed Surface Queue Guard, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate; Lint UI skipped.",
     "deviations": [
      "Verify lock held again by sibling issue-37365 full.sh (pid 1988, app-shell tests); while queued, I ran the two edited service test files and the spec test file unlocked (single files, one worker), plus gen:schema and gen:docs from source, instead of check:generated --fix. check:generated then ran under the lock on a fresh build and reported all 14 artifacts up to date. Every suite reading above is from the locked run at the final head.",
      "No re-run of the stale failed Check Changeset job on 64893151a8 (the new head supersedes it)."
     ],
     "mcp_calls": "0",
     "api_writes": "2 relay writes this round: issue_patch PATCH /repos/objectstack-ai/objectstack/issues/37484 (PR body) and this delta comment via post-stamped; plus 3 git pushes",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": []
    }
  13. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    ACCEPT → PR #37484 comment 7190047844

  14. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Merged: PR #37484 at 59571b2f07 closed this card by Fixes. Delivered: the outline comes in pages (outlineFrom input, body.outlineNext), every heading reachable by an anchor the tool issued, the outline_truncated and body_outline sentences true on every page (en, zh-Hans), N3 (an over-long heading is passed over and counted). Left: #37490 (ADR-0160 D3/D4 text with N1's per-body-state qualifier, now pm:queue). pm:dispatched removed.

  15. removed
    pm:dispatched
    on Nov 26, 2026
  16. added 2 commits that reference this issue on Dec 1, 2026
    59571b2
    eec1040
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:serverpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions