You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs site: measure and shrink the Vercel deploy output (~920 MB, ~12.8k files per deploy) — server chunks, prebuilt OG images, per-page payloads #36192
Filing gate: ③ maintainer-directed · Source: maintainer. Ruling-ref: the maintainer, 2026-11-21 ~22:0xZ, verbatim: 「文档站优化立卡」, after asking 「是哪个网站,一次要上传约 920 MB、1.2 万多个文件,体量不小,如何优化?」. Dedupe: docs deploy size, vercel output size, OG image prebuilt (no open card). ⛔ Not a claim.
apps/docs/next.config.mjs notes "589 MB of server chunks against 5.8 MB of client" (a build-memory measurement), which points at server-side bundles as the largest share.
apps/docs/app/og/docs/[...slug]/route.tsx prerenders a 1200×630 OG image for every page through generateStaticParams.
One language (en), ~494 docs pages plus blog, llms.mdx per page.
Ask
Measure. Add a step after the build that prints the size of .vercel/output by top-level part (static/, each functions/*.func, prerendered pages, OG images), and record one reading on this card.
Cut the largest share. Expected: serve the docs pages fully static (no per-page server function), or trim what each function bundles (output file tracing excludes); keep search and any route that truly needs a server.
OG images. Generate on request with caching instead of prerendering ~500 at build, unless the reading shows they are small.
Triage: lands in domain:devx (apps/docs, docs-deploy.yml) · pm:queue; rationale: area:build · Task · measure and shrink the docs deploy output (~920 MB, ~12.8k files per upload; two uploads aborted on 11-21); filed on the maintainer's 「文档站优化立卡」 → p2 · size M.
Premise corrected: the deploy output is measured, not guessed — run 46118151955 uploaded 954.6 MB / 13,039 files; content-deduplicated 742.8 MiB: prerendered HTML + RSC + segments 57% (≈168 MiB of it the full sidebar tree repeated per page), function code 29%, OG images 5.6%, llms-full.txt 3.7%. The card's "well under half" is not a promise this card can keep with reader-invisible changes: routes 1 + 2 below are estimated at 57–70% of today. Done-when becomes the measured reduction from routes 1 + 2 with CI's own reading; the remaining large block (fetching the tree client-side) is reader-visible and goes to the maintainer as a decision after the merged reading.
Claim: PM loop round 1
Session: session_01L9qibyUSf2nKJWW6qBemSU
Thread session: session_01L9qibzZRa3nLMmeQvLoDWE
Account: os-tesla
Branch: claude/project-thread-7y20tj
Worktree: objectstack-issue-36192
Domain: devx
Area: o3-build (area:build p2, a seat card thread)
Seat: repo:objectstack#3
Seat rulings on the pre-claim report (/mnt/project-files/card-36192/pre-claim-report-bd5407ec.md, main bd5407e):
Route, two PRs in order on this branch:
PR 1 (Part of #36192), apps/docs/** only: (1) trim the client page tree (drop page description / $ref / undefined keys; prev/next footer served from the server), reader-invisible; (2) dynamicParams = false on docs / blog pages to drop the fallback function, and trim the search / llms.mdx function traces. OG stays prerendered (the card's "small, leave it" clause).
PR 2 (Fixes #36192), after PR 1 merges: the measurement step in .github/workflows/docs-deploy.yml (governed, Tier H), printing upload size and file count per deploy.
Every reader-visible change is out: if (1) or (2) turns out visible (a broken page, a missing link, search behaviour), stop and report.
The docs site deploys every 6 h: the report carries the local offline vercel build reading before and after (file count and deduplicated size), and the first CI deploy reading after merge is posted on the card.
File surface:
PR 2: .github/workflows/docs-deploy.yml only.
Stop on breach and explain in the report.
Container & model: M, mode:thread, model: claude-opus-5-5 (default tier — dispatch-gates.mjs --tier: "no path-derived mandate"), effort: high, reason: the thread session serves this tier
Writes: the PRs only through the relay pr_create; comments, labels and bodies only through the relay write tools; report both numbers.
Clause-②: no
Metadata-protocol: none
Thread-read: 7070406363
Responsibility: each docs deploy uploads far less (target −110 to −335 MiB) so deploys are faster and cheaper, with nothing a reader sees changed.
Premise: holds in its goal, measured on origin/main bd5407e; its size target corrected above
Serial constraints cleared: none — re-run overlap-check before the first push
Readings owed in the report: offline build size and file count before / after per route, a page-by-page check that the sidebar, prev/next and search work on a sample of pages, derived gates.
{
"issue": 36192,
"status": "done",
"branch": "claude/project-thread-7y20tj",
"pr": "https://github.com/objectstack-ai/objectstack/pull/38264",
"session": "session_01L9qibzZRa3nLMmeQvLoDWE",
"premise_still_valid": true,
"summary": "PR 1 of the claim (Part of #36192, apps/docs only, skip-changeset). Route 1 shipped: the page tree DocsLayout serialises into every docs page drops $ref, page description and undefined-valued keys (apps/docs/lib/client-page-tree.ts), and the previous/next footer gets its two items from the server with the client's own ordering, so its text is unchanged. Offline vercel build: 742.8 -> 631.7 MiB distinct contents (-111.1 MiB, -15.0%), 13,039 deployment files both sides. Route 2 measured void and reverted on the branch: dynamicParams = false bought 6 output entries and 0 MiB because Vercel keeps a function behind every prerender; the 188.5 MiB of function code is two copies of one ~90 MiB chunk holding the whole compiled docs collection (page graph and route-handler graph), imported on purpose by search and llms.mdx, so shrinking it is reader-visible and goes back to the seat. Also adds apps/docs/scripts/measure-deploy-output.mjs, the per-part reading PR 2 will call from Docs Deploy.",
"tests": "No unit test (behaviour = unchanged site). Readings at b60d067d vs bd5407ec: all 512 prerendered page HTML files compared with scripts and hashed asset URLs normalised: 512 identical, 0 differ. Browser (next start + Playwright, 5 sample pages): sidebar with active page, footer neighbours with descriptions, folder expand 28 -> 47 links, client-side nav through the footer matches a direct load, search dialog returns results. curl: /docs 200, a .mdx twin 200, /llms.txt 200, /api/search 200, unknown slug 404, /blog 308. Ablation n/a (no tested behaviour changed).",
"gates": "pnpm --filter @objectstack/docs typecheck: VERDICT command-exit 0; eslint --no-inline-config on the 4 changed files: exit 0; dispatch-gates --commands: 24 derived families, each exit 0, --ran: 24 derived, 24 run, 0 NOT-MEASURED (derived zero); overlap-check: VERDICT clean, 0 PR heads. CI families: the PR's check-runs, in_progress at report time.",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "13 — issue_read x3, actions_list x2, get_job_logs x1, get_session x1, subscribe_pr_activity x1, send_later/delete_trigger x2 (scheduling, not GitHub), no GitHub write tool",
"api_writes": "2 — fleet-write relay pr_create (POST pulls, then the assignee and label legs), this os-dev-report comment",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": ["carrier: seat 3 · the remaining large block of the deploy (function code 188.5 MiB = the compiled collection twice; page payloads still carry the trimmed tree, ~48 KB per page twice) needs a reader-visible change (static search index, llms.mdx from files, or the tree fetched client-side); for the maintainer's decision after the merged CI reading, per the claim"]
}
By the CLI's own bar: −211.8 MB (−22.2%). The file count does not move, as the offline reading predicted: the same files, smaller.
The CLI drop is larger than the offline one (−15.0%). The gap between the two scales was already open before perf(docs): send each docs page a trimmed sidebar tree, and measure what a deploy uploads #38264 (954.6 MB bar vs 742.8 MiB deduplicated) and is still not reconciled; that the after-bar reads 742.8 is a coincidence of digits, not the same quantity. Both readings agree on direction and on the file count.
Ruling-ref: Tesla, verbatim 「到此为止」 (project chat, the same day), answering the seat's question on the reader-visible remainder (search and llms.mdx data fetching, client-side sidebar tree; note at /mnt/project-files/card-36192/ruling-ask.md).
Recorded 2026-11-28T13:10Z: no further slimming card is filed. #36192 ends when PR 2 #38297 (awaiting os-zhuang) merges. The live reading after PR 1 is 954.6 → 742.8 MB uploaded (−22.2%, run 46146191991, 7239573592). The first per-part table from PR 2's step will be read once, and the size-gap note (N2) will be recorded here, with no new card.
Activity
objectstack-fleet commentedon Nov 21, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:devx(apps/docs,docs-deploy.yml) ·pm:queue; rationale: area:build · Task · measure and shrink the docs deploy output (~920 MB, ~12.8k files per upload; two uploads aborted on 11-21); filed on the maintainer's 「文档站优化立卡」 → p2 · size M.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Premise corrected: the deploy output is measured, not guessed — run 46118151955 uploaded 954.6 MB / 13,039 files; content-deduplicated 742.8 MiB: prerendered HTML + RSC + segments 57% (≈168 MiB of it the full sidebar tree repeated per page), function code 29%, OG images 5.6%, llms-full.txt 3.7%. The card's "well under half" is not a promise this card can keep with reader-invisible changes: routes 1 + 2 below are estimated at 57–70% of today. Done-when becomes the measured reduction from routes 1 + 2 with CI's own reading; the remaining large block (fetching the tree client-side) is reader-visible and goes to the maintainer as a decision after the merged reading.
Claim: PM loop round 1
Session:
session_01L9qibyUSf2nKJWW6qBemSUThread session:
session_01L9qibzZRa3nLMmeQvLoDWEAccount:
os-teslaBranch:
claude/project-thread-7y20tjWorktree:
objectstack-issue-36192Domain:
devxArea:
o3-build(area:build p2, a seat card thread)Seat:
repo:objectstack#3Seat rulings on the pre-claim report (
/mnt/project-files/card-36192/pre-claim-report-bd5407ec.md, main bd5407e):Part of #36192),apps/docs/**only: (1) trim the client page tree (drop pagedescription/$ref/ undefined keys; prev/next footer served from the server), reader-invisible; (2)dynamicParams = falseon docs / blog pages to drop the fallback function, and trim the search / llms.mdx function traces. OG stays prerendered (the card's "small, leave it" clause).Fixes #36192), after PR 1 merges: the measurement step in.github/workflows/docs-deploy.yml(governed, Tier H), printing upload size and file count per deploy.vercel buildreading before and after (file count and deduplicated size), and the first CI deploy reading after merge is posted on the card.File surface:
apps/docs/**(skip-changeset, private package)..github/workflows/docs-deploy.ymlonly.Stop on breach and explain in the report.
Container & model:
M,mode:thread,model: claude-opus-5-5 (default tier — dispatch-gates.mjs --tier: "no path-derived mandate"),effort: high, reason: the thread session serves this tierWrites: the PRs only through the relay
pr_create; comments, labels and bodies only through the relay write tools; report both numbers.Clause-②: no
Metadata-protocol: none
Thread-read: 7070406363
Responsibility: each docs deploy uploads far less (target −110 to −335 MiB) so deploys are faster and cheaper, with nothing a reader sees changed.
Premise: holds in its goal, measured on origin/main bd5407e; its size target corrected above
Serial constraints cleared:
none — re-run overlap-check before the first pushReadings owed in the report: offline build size and file count before / after per route, a page-by-page check that the sidebar, prev/next and search work on a sample of pages, derived gates.
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibzZRa3nLMmeQvLoDWE
os-dev-report
{ "issue": 36192, "status": "done", "branch": "claude/project-thread-7y20tj", "pr": "https://github.com/objectstack-ai/objectstack/pull/38264", "session": "session_01L9qibzZRa3nLMmeQvLoDWE", "premise_still_valid": true, "summary": "PR 1 of the claim (Part of #36192, apps/docs only, skip-changeset). Route 1 shipped: the page tree DocsLayout serialises into every docs page drops $ref, page description and undefined-valued keys (apps/docs/lib/client-page-tree.ts), and the previous/next footer gets its two items from the server with the client's own ordering, so its text is unchanged. Offline vercel build: 742.8 -> 631.7 MiB distinct contents (-111.1 MiB, -15.0%), 13,039 deployment files both sides. Route 2 measured void and reverted on the branch: dynamicParams = false bought 6 output entries and 0 MiB because Vercel keeps a function behind every prerender; the 188.5 MiB of function code is two copies of one ~90 MiB chunk holding the whole compiled docs collection (page graph and route-handler graph), imported on purpose by search and llms.mdx, so shrinking it is reader-visible and goes back to the seat. Also adds apps/docs/scripts/measure-deploy-output.mjs, the per-part reading PR 2 will call from Docs Deploy.", "tests": "No unit test (behaviour = unchanged site). Readings at b60d067d vs bd5407ec: all 512 prerendered page HTML files compared with scripts and hashed asset URLs normalised: 512 identical, 0 differ. Browser (next start + Playwright, 5 sample pages): sidebar with active page, footer neighbours with descriptions, folder expand 28 -> 47 links, client-side nav through the footer matches a direct load, search dialog returns results. curl: /docs 200, a .mdx twin 200, /llms.txt 200, /api/search 200, unknown slug 404, /blog 308. Ablation n/a (no tested behaviour changed).", "gates": "pnpm --filter @objectstack/docs typecheck: VERDICT command-exit 0; eslint --no-inline-config on the 4 changed files: exit 0; dispatch-gates --commands: 24 derived families, each exit 0, --ran: 24 derived, 24 run, 0 NOT-MEASURED (derived zero); overlap-check: VERDICT clean, 0 PR heads. CI families: the PR's check-runs, in_progress at report time.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "13 — issue_read x3, actions_list x2, get_job_logs x1, get_session x1, subscribe_pr_activity x1, send_later/delete_trigger x2 (scheduling, not GitHub), no GitHub write tool", "api_writes": "2 — fleet-write relay pr_create (POST pulls, then the assignee and label legs), this os-dev-report comment", "open_questions": [], "security_findings": "none", "out_of_scope_findings": ["carrier: seat 3 · the remaining large block of the deploy (function code 188.5 MiB = the compiled collection twice; page payloads still carry the trimmed tree, ~48 KB per page twice) needs a reader-visible change (static search index, llms.mdx from files, or the tree fetched client-side); for the maintainer's decision after the merged CI reading, per the claim"] }objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibzZRa3nLMmeQvLoDWE
2026-11-28T12:55Z
First CI deploy reading after #38264, as the claim (7237738388) owes.
4f7aa88a)3ad3b415, contains1618e3952= #38264)UploadingtotalDownloading N deployment filesDeployed:, aliased,Ready in 2m)measure-deploy-output.mjs)apps/docs/content, +437 −57 lines of prose (e.g. docs: the docs and spec comments describe trackHistory by the field-history model #38238, docs(spec): the open self-hosted restriction profile lists the whole node vocabulary, not the plugins a kernel runs #38245), too small to move hundreds of MB; the reduction is perf(docs): send each docs page a trimmed sidebar tree, and measure what a deploy uploads #38264's.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Ruling-ref: Tesla, verbatim 「到此为止」 (project chat, the same day), answering the seat's question on the reader-visible remainder (search and
llms.mdxdata fetching, client-side sidebar tree; note at/mnt/project-files/card-36192/ruling-ask.md).Recorded 2026-11-28T13:10Z: no further slimming card is filed. #36192 ends when PR 2 #38297 (awaiting os-zhuang) merges. The live reading after PR 1 is 954.6 → 742.8 MB uploaded (−22.2%, run 46146191991, 7239573592). The first per-part table from PR 2's step will be read once, and the size-gap note (N2) will be recorded here, with no new card.