Skip to content

docs: re-measure the example CRM size (30 files, 1,844 lines, ~17.5k tokens) and state the commit it was measured at - #23876

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-23832-crm-size-pin
Oct 16, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-23832-crm-size-pin

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #23832
Clause-②: no

What this changes

Four content pages quote the size of the bundled example CRM (examples/app-crm) as 31 files, 1,929 lines and ~18,500 tokens. The count command those pages print gives 30 files and 1,844 lines on main. This PR re-measures the figure. On every page that states it, the PR also names the commit the figure was measured at and links to the source tree at that commit.

Page Location Before After
content/docs/concepts/metadata-driven.mdx section 4: the table, and the sentence that leads into the count command Files 31 · Lines 1,929 · ~18,500 tokens · "Count it yourself:" Files 30 · Lines 1,844 · ~17,500 tokens · "These figures were measured at commit 7a6ba0310 (linked), with tokens estimated at four bytes each. The example keeps changing, so count it yourself for today's numbers:"
content/docs/getting-started/how-ai-development-works.mdx "Why it's fast", one sentence "1,929 lines across 31 files, about 18.5k tokens" "1,844 lines across 30 files, about 17.5k tokens (measured at commit 7a6ba0310, linked)"
content/blog/context-window-is-the-constraint.mdx the table; the Todo and showcase paragraph; one new paragraph after it Files 31 · Lines 1,929 · ~18,500 tokens; Todo ~24.5k; showcase "91 files", ~174k Files 30 · Lines 1,844 · ~17,500 tokens; Todo ~25k; showcase "90 files", ~175k; then "These figures were measured at commit 7a6ba0310 (linked) over the non-test .ts files in each example's src/, with tokens estimated at four bytes each. The examples keep changing, so today's counts will differ a little."
content/blog/the-ontology-is-the-software.mdx one sentence "31 files and roughly 18,500 tokens" "30 files and roughly 17,500 tokens, measured at commit 7a6ba0310 (linked)"

The percentages derived from these figures stay the same. The CRM is still "about 9%" of a 200k window (8.8%). The showcase is still "about 87% of it, leaving about 13% free" (87.46%).

Every link targets https://github.com/objectstack-ai/objectstack/tree/7a6ba03109dbb7e91359eb0f7f3e64dd1263bca8/examples/app-crm. The context-window post links to .../examples instead, because its pin covers three examples.

Left alone

  • README.md:195-204 prints the count command and states no figure: "small enough for an agent to load end-to-end ... Measure it yourself". There is nothing to pin, so it is untouched.
  • The card's search terms (1,929, 1929, 18,500, 18.5k, 31 files) over content/ and README.md hit 7 lines in the four pages above. They hit one more line, content/docs/releases/v17/17-5.mdx:942, where 1929 is part of #19291. That is not this figure, and the page is release-owned.

Direction: (a), state the commit each figure was measured at

The card offers two directions short of a gate: (a) state the commit or release each figure was measured at, or (b) quote the figure once and link to it from the other pages. This PR takes (a). It is the only one of the two that stays true when the example next changes.

  • (a) A figure pinned to a commit cannot go stale. A reader who runs the count on a later main and gets a different number reads the page as dated, not wrong. Anyone can reproduce the exact figure by checking out the linked commit. The pages also now say how tokens were estimated, so the token figure is reproducible from the page.
  • (b) Quoting the figure once cuts four copies to one. But that one copy is still an unpinned constant, so it would mislead the next time the example changes, exactly as these four do now, only in one place. It is also the larger edit: the context-window post's argument is built on its table, so moving the table out would mean rewriting the post.

(a) adds one to five lines per page and changes no page's structure.

Commit, not release. A release would have to be mapped back to a tree before the figure could be checked. The commit link opens the measured tree directly.

The blog posts are re-measured, not kept with "at the time of writing". Neither post carries its time-of-writing figure today. The context-window post (dated 2026-07-17) was written with 1,792 lines and ~16,000 tokens. Both posts were rewritten to 1,929 / ~18,500 when those figures were re-measured at 3513ac778 on 2026-10-08. "At the time of writing" would be false for both. One measuring commit across all four pages lets a reader check every figure with one checkout. After this PR, no page needs re-measuring for its figure to stay true.

Measurements

Base: origin/main 7a6ba03109dbb7e91359eb0f7f3e64dd1263bca8, in this PR's worktree.

$ find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -l
1844
$ find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | wc -l
30
$ find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -c
70655

A second reading, through git rather than the filesystem, agrees on files and bytes. git ls-tree -r -l 7a6ba0310 -- examples/app-crm/src, summing the .ts files that are not .test.ts, gives 30 files and 70,655 bytes.

origin/main has since moved to 6db53acd663b. git diff --stat 7a6ba0310 6db53acd663b over examples/app-crm/src, examples/app-todo/src, examples/app-showcase/src, the four pages and README.md is empty, so every figure also holds at the current tip.

Tokens

The method is the one recovered on the previous re-measure (PR #22267): bytes / 4, rounded to the nearest 500. Applied to the tree where the figure was first written, it reproduced the original ~16,000. Applied here:

70,655 / 4 = 17,664   ->  "~17,500" (nearest 500)
17,664 / 200,000 = 8.8%   ->  "about 9%" (unchanged)

A bounded fix on the same page: the Todo and showcase sizes

The context-window post's next paragraph quotes the Todo and showcase sizes, last re-measured at 58707166f (PR #22293). At this base they had drifted the same way. By the same command and method:

app-todo:     27 files,  2,417 lines, 100,077 bytes  ->  25,019 tokens  ->  "~25k"   (page said ~24.5k)
app-showcase: 90 files, 14,253 lines, 699,704 bytes  -> 174,926 tokens  ->  "~175k"  (page said 91 files, ~174k)
174,926 / 200,000 = 87.46%   ->  "about 87% of it, leaving about 13% free" (unchanged)

git ls-tree -l at the same commit agrees: 27 files and 100,077 bytes for Todo, and 90 files and 699,704 bytes for the showcase.

These sizes are re-measured at the same commit and covered by the same pin. Otherwise they would be the one unpinned, stale figure on a page whose new paragraph says "these figures were measured at commit 7a6ba0310". All four conditions for a bounded fix in this PR hold:

  • the defect class is the card's own: a live example's size quoted as a constant;
  • the edit is mechanical, in the shape this PR pins;
  • the file is already on this card's claimed surface, and no other claim holds it;
  • the gate family is the same, and no verification surface is added.

Verification

This change is docs only. The gate list was derived from the actual diff with node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, with no path arguments: 4 paths against merge base 7a6ba0310, 40 commands. Each command ran with its exit code recorded before any pipe, and the record was reconciled:

Run reconciliation — 40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN.
✓ dispatch-gates --ran: 40 derived famil(ies) accounted for — 40 run, 0 NOT-MEASURED (a DERIVED zero — all 40 recorded an exit code and none of them is 3).
  • All 40 exit 0 at head 1f0bbe4d1. They include check:doc-anchors, check:doc-authoring, check:docs-single-h1, check:docs-transcript-drift, check:nul-bytes, check:corpus-claim-drift, check:doc-formula-expressions, check:doc-security-posture, check:docs and check:skill-examples.
  • Built inputs. @objectstack/lint... and @objectstack/client-react... were built first, under the shared verify lock (exit 0), so the gates that read dist/ measured a built tree.
  • Script names. Each pnpm --filter gate's log echoes its script name.
  • Control bytes. A control-byte scan of the four files is clean.
  • Governed surfaces. node scripts/pm/check-governed-merges.mjs --branch claude/issue-23832-crm-size-pin reports 0 of 4 paths governed and 40 changed lines (+26 / -14), which is ordinary queue landing.
  • Left to CI. The derivation names some lanes as CI-only: the Build Docs and Test Core jobs, and the type-check lanes. Those are read from this PR's check-runs.

No changeset. content/** ships in no published package.

Acceptance notes

  • No gate, generator or script is added. Triage reserved a generated figure for a third drift. These pins make the next example edit date the pages rather than falsify them, and they do not rule out that route later.
  • Adjacent claims re-checked at base. "Six objects" (6 object files) and "permission sets" (2 in security/sales-positions.ts) are still true.

Generated by Claude Code

…sured at

The four pages quoting the bundled example CRM's size (31 files, 1,929
lines, ~18,500 tokens) drifted again: the pages' own count command
prints 30 files and 1,844 lines at 7a6ba03. Re-measure with that
command and the bytes / 4 token method the figure was first made with,
and state the measuring commit beside each figure, so the next edit to
the example leaves the pages dated rather than wrong.

The context-window post's Todo and showcase sizes, in the paragraph
after the CRM table, had drifted the same way (90 showcase files, not
91) and are re-measured at the same commit under the same pin.

Claude-Session: https://claude.ai/code/session_016PVjjuVPte5XEJvaQx1E4t
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation labels Oct 16, 2026
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 16, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · PR #23876 (draft, head 1f0bbe4d1, Fixes #23832) · domain:devx seat 2 · session_016PVjjuVPte5XEJvaQx1E4t · 2026-10-16T11:03Z

Checked on GitHub and against the sources, not on the report's say-so.

  • Shape:
    • 4 files, +26 / −14. All four are the pages named on the card, inside the claim's surface (6213689279).
    • Not governed: this seat ran check-governed-merges --pr 23876 and it reads 0 of 4 paths.
    • The body opens Fixes #23832, then Clause-②: no.
    • Docs only, so the seat applied skip-changeset in this act.
  • Re-measured by this seat at the PR's merge base 7a6ba03109:
    • The non-test .ts files under examples/app-crm/src number 30, and git show piped to wc -l gives 1,844 lines. Both match the pages.
    • Their blob sizes sum to 70,655 bytes. At four bytes a token that is 17,664, so ~17,500 holds.
  • Direction (a), read on the diff:
    • Each figure now names commit 7a6ba0310, linked to the tree at that sha.
    • The two table pages say tokens are estimated at four bytes each, and that the example keeps changing.
    • metadata-driven.mdx keeps its count command, now framed as the way to get today's numbers.
    • The seat accepts the reason given for not taking (b): a single quoted copy would still be an unpinned constant.
  • The bounded fix in the same file: the context-window post's Todo (~25k) and showcase (90 files, ~175k) sizes sit under the same pin. It has the same defect class and the same file, and it is declared in the body.
  • Gates:
    • Local: 40 derived, 40 exit 0, --ran 0 NOT-MEASURED.
    • README.md states no figure (command only), so it is untouched.
  • Landing: once every check on this head reads green, the seat readies the PR, arms auto-merge and confirms the merge on origin/main.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 16, 2026 11:17
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 16, 2026 11:17
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit 497518c Oct 16, 2026
44 of 45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-23832-crm-size-pin branch October 16, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants