Skip to content

Each translated page adds about 172 KiB to the Worker upload, so full ja coverage (#388) would exceed Cloudflare's 64 MiB Worker limit #395

Closed

Description

@objectstack-fleet

Finding

The card thread measured this while it worked on #393 (PR #394). It found the problem on main's own code, not on #394's change.

  • A build with every missing ja page filled in produces a 66,780 KiB Worker. Cloudflare's limit is 65,536 KiB.
  • The Worker bundle fits the size budget CI step holds the upload to 61,440 KiB.
  • Each added ja page grows the upload by about 172 KiB of page modules.
  • The upload is about 55,400 KiB on main 09784e7, and about 56,600 KiB with fix(search): keep one locale index and read search text from build output (#393) #394's search data.

So the budget has room for about 28 more translated pages. Then, in the #388 batches:

Phase 3 of the locale plan, a second locale at full coverage, would need about 17 MB more.

CI goes red on the budget step before deploy, so this cannot take the live site down. It does block the locale plan.

Ask

Make the per-page cost of a translated page small enough that every planned locale fits under the budget with headroom. The target is ja fully covered plus at least one more full locale.

  1. Measure where the 172 KiB per page goes. Look at the compiled MDX module, the highlighted code, the per-route server chunk, and any prerendered output that opennext also ships in the Worker.

  2. Choose the cut from the measurement. Possible directions:

    • Serve the docs pages fully static, so that their modules do not need to be in the Worker.
    • Move highlighting cost out of the server bundle.
    • Share one module between a locale page and its English source.

    Say which one you chose and why, with before and after upload sizes.

  3. Keep the Worker bundle fits the size budget step as the gate. Add a projection, for example a self-test or a summary line, that shows the KiB per page and the pages left before the budget. That way the next content batch can see its room before it is written.

Acceptance

Activity

  1. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: Worker size per translated page, blocking #388 · 2026-10-29T12:35Z
    Session: session_01QsR2jTaZ2GeyfjANMwstiw (seat thread; the dev is card thread session_01QsR2jRsjbApbf83iyTDDXm, which also holds #388, identity by branch)
    Account: zhuangjianguo
    Branch: claude/project-thread-u7eoxi (platform-assigned; restarted from main)
    Worktree: the card thread's own docs.objectos.ai checkout
    Domain: domain:docs (single-lane repository)
    Seat: repo:docs.objectos.ai#1
    File surface: apps/docs/ build and route configuration (next.config.*, open-next.config.*, source.config.ts, app/[lang]/docs/** route files, lib/source.ts, scripts/), and the Worker bundle fits the size budget step in .github/workflows/ci.yml, plus any script it calls and that script's SELF_TESTED entry. No content files. If the work goes beyond this surface, stop and explain why in the report.
    Container & model: S, mode:thread, model: default tier (TIER_DEFAULT — sister repository, hand-derived: no packages/spec, no protocol-semantic surface), effort: project default
    Clause-②: no
    Metadata-protocol: none
    Responsibility: capacity limit found while working on #393. It blocks phase 2 of the locale plan.
    Thread-read: none
    Premise: confirmed by #396's CI. The upload is 59,172 KiB against the 61,440 KiB budget, and the 11 re-landed pages cost about 235 KiB each, so #388 PR 3 (14 pages) does not fit.
    Tier: none.
    Serial constraints cleared: the lane is serial. #396 (the #390 re-land) lands first. #388 then pauses until this card lands, and PRs 3–7 follow it.

  2. added 2 commits that reference this issue on Oct 29, 2026
  3. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    Landing · 2026-10-29T13:32Z · session_01QsR2jTaZ2GeyfjANMwstiw · seat repo:docs.objectos.ai#1

    #397 merged as aa65aa7, and it closed this card. Main CI run 40881898383 is green: build success, with the Worker upload at 38,916 KiB against the 61,440 KiB budget and a per-page projection of about 86 KiB. Publish success, the new version is serving, and the smoke check passed. #388 resumes with PR 3 (#398).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions