Skip to content

rest(public forms): GET /forms/:slug never passes pairBundle, so a .custom pair's own translation of its override text never reaches the public form #34806

Closed

Description

@objectstack-fleet

repo:objectstack#2 · os-steve · session_01ADHkmRfW5u1LRmhWwaYHRp

Finding from the L1 review of #34784 (#33952), comment 6946048217, deviation D1. A seat-filed card; grading and domain:* are triage's.

Suggested-grade: p2 · domain:server · size S–M

What the code does

On origin/main 6091b64, packages/rest/src/form-routes.ts translates the public form's object schema (around line 383) and the matched view (around line 419) with translateMetadataDocument(…, bundle, { ...translateOptionsFor(i18n, locale), packagedBase }). Neither call passes pairBundle.

The /meta reads in packages/rest/src/meta-item-read-gate.ts do pass it (pairTranslationBundleOf(protocol, type, document), lines ~3561–3570 and ~3640–3644; #30062, ADR-0146 D2). That is the first rank of a changed slot: a .custom pair's own translation rows for the text its declared override wrote.

What follows from that (read from code, not measured live)

A string that a .custom pair's override changed on an object or a form view is translated from the pair's own translations on /meta, but on GET /forms/:slug the anonymous visitor gets the override text as written, in every locale. The same document, two surfaces, two answers. #33952 (PR #34784) adds the patch rank to the form route; the pair rank under it is still missing there, and that is older than #34784.

Notes for whoever picks it up

  • The form route rebuilds the object schema as { name, label, fields } before it translates. servedOverrideBaseOf(type, document) reads the envelope the read stamped on the served document, so it probably has to be asked about the object as served (obj), not about the rebuilt objectSchema. Check this before wiring.
  • The pin would sit beside packages/rest/src/public-form-section-i18n.test.ts: a pair override's zh-CN row served on the form, with a CONTROL leg on the same fixture through /meta.
  • Not measured: whether a pair override of a form view's section headings reaches the form the same way.

Activity

  1. added
    bug
    finding
    on Nov 17, 2026
  2. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → p2 · domain:server · pm:queue · 2026-11-17T10:59Z

    ⛔ Not a claim.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRfW5u1LRmhWwaYHRp

    Same family, added here by the seat's call rather than as a separate card: the metadata write door has never passed pairBundle either. Contract review 6948153780 on PR #34784, outside that diff (read from code, not executed): restoreTranslatedEchoes (packages/metadata-protocol/src/protocol-translated-echo.ts) translates its sources without the pair rank, so where a .custom pair translates a slot in the request locale, the /meta read serves the pair's text and a whole-body save cannot recognise it as an echo; the translated text is stored. This is on main as well, and #34784 neither adds nor widens it.

    So the pair rank is missing on two surfaces: the public form's read (this card's original finding) and the write door's inverse. A fix that gives both the same pair-bundle selection the /meta reads use (pairTranslationBundleOf) closes both.

  5. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

    Ruling-ref: maintainer 2026-11-19T00:39Z, decision card in seat repo:objectstack#5's project session, option chosen verbatim: 「ux-3 做读取那半」.

    Routing and scope:

  6. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me

    Claim: PM loop round 2 (area-lease ux-3 of repo:objectstack#5; the maintainer's ruling 6995998752, verbatim 「ux-3 做读取那半」) · 2026-11-19T01:49Z · READ half only
    Session: session_01Utp6CZiaBg6rk7dpy1s9Me
    Account: os-bill
    Branch: claude/issue-34806-public-form-pair-bundle
    Worktree: objectstack-issue-34806 (os-dev worktree in the ux-3 container)
    Domain: domain:server
    Seat: repo:objectstack#5
    File surface: packages/rest/src/form-routes.ts (the view translate call ~:428-431 only), a new test file named for this card beside packages/rest/src/public-form-section-i18n.test.ts, changeset. ⛔ packages/metadata-protocol/** (write-door half split off by the ruling); ⛔ the object translate call ~:389-394. Stop on breach and report.
    Container & model: S, mode:subagent, model: default — no path-derived mandate, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: platform — packages/rest/src/form-routes.ts translates the public form's view without the pairBundle rank /meta passes (objectstack); pairTranslationBundleOf in meta-item-read-gate.ts already covers it on /meta; an anonymous visitor to a public form whose view a .custom pair overrides and translates.
    Thread-read: 6995998752
    Premise: holds — on main e8a78c4 form-routes.ts ~:428-431 passes packagedBase and no pairBundle (seat analysis /mnt/project-files/objectstack-seat5/area-ux/decision-34806.md); whether match.view carries the override envelope is measured by the dev first.
    Serial constraints cleared: seat repo:objectstack#4 listed this card in its form-routes.ts serial queue (not a claim) and has been told through its mailbox (ruling 6995998752); PR #34784 merged; no open PR touches form-routes.ts at claim time.
    Pre-claim lane: server — packages/rest/src/** (domain:server).
    Pre-claim deps: "after #34784" → merged 2026-11-17T18:08Z.
    Prior rulings read: ruling 6995998752 (this card: read half only); 6631250894 on #30062 (label precedence: pair translation, then override text, then base translation); 6942920667 on #33952; ADR-0146 D2; served-override.ts (an object never answers servedOverrideBaseOf).
    Lease: lease:ux-3

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

    @objectstack-fleet
    ContributorAuthor

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

    {
     "issue": 34806,
     "status": "done",
     "branch": "claude/issue-34806-public-form-pair-bundle",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/35290",
     "head": "8d14c223ba64dbf2d2f2628a139a7de028c130cb",
     "session": "session_01Utp6CZiaBg6rk7dpy1s9Me",
     "premise_still_valid": true,
     "summary": "READ half only, per ruling 6995998752. GET /forms/:slug now asks pairTranslationBundleOf(p, 'view', match.view) and passes the answer as pairBundle to the existing view translate call in packages/rest/src/form-routes.ts. That is the same question the /meta/view reads ask, so a .custom pair's own translation of its form-view override (title, section headings) reaches the anonymous form in the ruled order: pair, then override text, then base translation. The object translate call is unchanged. Its comment ('this route passes no pairBundle') was made false by this change and now states the object-specific reason (ADR-0146 D10). packages/metadata-protocol was not touched. A1 holds: the view the route matches carries _packageId = base and overrides.package = base, and servedOverrideBaseOf answers the base. A2 holds: red leg measured before the fix.",
     "readings": {
      "A1": "HOLDS. On the real ObjectStackProtocolImplementation, getMetaItems({type:'view'}) serves the pair's override of ticket.contact with _packageId 'com.example.helpdesk' and overrides.package 'com.example.helpdesk', and servedOverrideBaseOf('view', served) answers 'com.example.helpdesk'. Pinned as the first test of the new file; it passed on the unfixed route.",
      "A2": "HOLDS. At 8390e3c7b6 (test only, route unchanged), the zh-CN cell was red on /forms: title 'Contact the helpdesk (pair override)' and about 'About you (pair override)' where the pair text was expected. The /meta/view control assertion in the same cell passed first. Tests 1 failed | 4 passed (5)."
     },
     "tests": "New packages/rest/src/public-form-pair-translation.test.ts: 5 cases, each with a /meta/view control leg on the same fixture. Red leg at 8390e3c7b6: 1 failed | 4 passed (5). Green with the fix (f62c05f8a0), together with public-form-section-i18n.test.ts: Test Files 2 passed (2), Tests 24 passed (24). pnpm --filter @objectstack/rest test: VERDICT command-exit 0, Test Files 420 passed (420), Tests 8621 passed | 350 skipped (8971). pnpm --filter @objectstack/rest typecheck: VERDICT command-exit 0, and check:test-typecheck OK (the test layer compiles under tsconfig.test.json). Ablation via scripts/ablation-replace.mjs --delete of the pairBundle spread on the committed fix: mutation landed (anchor 1 -> 0, blob 8e7901ca4b96 -> b16cb626e1da), 1 failed | 4 passed (5), restored (blob == HEAD, git diff HEAD empty). The subject is imported from source, so no dist rebuild. These code runs were on f62c05f8a0. The later commits 8a81c3c7dd (changeset wording) and 8d14c223ba (ledger row) change no code.",
     "gates": "Closure build pnpm --workspace-concurrency=2 --filter '@objectstack/rest^...' build: VERDICT command-exit 0. dispatch-gates --commands --repo objectstack-ai/objectstack derived 74 families: 66 at f62c05f8a0, plus 8 more after the ledger file joined the diff. --ran reconciliation with exit codes: 74 derived, 72 run, 2 NOT-MEASURED, 0 UNRUN, exit 0. All 72 run families exited 0. check:engine-double-contract first answered exit 1, 'RETAINED [findOne]' for the new test's double (new pinned coverage). After node scripts/check-engine-double-contract.mjs --write (one add-only row), the re-run exited 0. NOT MEASURED: check:dual-build-cjs-loads, exit 3, PREREQUISITE NOT MET (only the rest dependency closure was built). NOT MEASURED: check:type-check-debt, exit 124, the repo-wide re-measure timed out at 300s on the shared box; CI's Type Check debt ledger runs it. Re-run at final head 8d14c223ba, all exit 0: check-adr-0087-registration --base origin/main, check-changeset-no-major, check-empty-changeset, check:nul-bytes, check:issue-citations. overlap-check --branch: VERDICT clean exit 0 (merges cleanly with origin/main f848e3739f and with #34999, which shares the ledger file; that needed git fetch --deepen=1500 first). CI check-runs on 8d14c223ba at report time: Type Check (workspace, source gates, debt ledger, consumer gates), the Lint lanes, Governed Surface Queue Guard, Check Changeset, Check PR Size and PR-body guards in_progress; opt-in, schedule and queue rows skipped. No conclusion yet.",
     "dogfood_battery": "n/a: no '!' in the PR title and no (narrowing) arm",
     "line_budget": "n/a: no skills/** or ratcheted ledger touched. Diff: form-routes.ts +15/-3, new test +296, changeset +11, engine-double ledger +5",
     "files_changed": [
      "packages/rest/src/form-routes.ts",
      "packages/rest/src/public-form-pair-translation.test.ts",
      ".changeset/34806-public-form-pair-translation.md",
      "scripts/engine-double-contract.pinned.json"
     ],
     "deviations": [
      "File surface widened by one generated ledger row: scripts/engine-double-contract.pinned.json (+1 entry for the new test's findOne double, written by check-engine-double-contract --write). The gate requires it for a new file pinning a double; it is add-only and declared in the PR.",
      "Comment-only edit inside the object block of form-routes.ts (the claim fences the object call): the comment said the route passes no pairBundle, which this change made false. The call itself is untouched.",
      "The claim places the pin in a new file. AGENTS.md says a pin for a component that already has a shared harness file goes into that file; public-form-section-i18n.test.ts is a protocol double, not the /meta precedence host this pin needs, so the new file was kept as claimed and the choice is noted in Acceptance notes.",
      "The harness-written Co-Authored-By trailer in the session attribution names a model; commits carry the model-free pair 'Co-authored-by: Claude' instead, per AGENTS.md."
     ],
     "mcp_calls": "0",
     "api_writes": "2: (1) relay pr_create, request fw-20261119T022939Z-b3dd92 (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/35290/assignees os-bill), read-back identical, 7089 bytes; (2) post-stamped os-dev-report comment on issue #34806. git push is not counted.",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed: whether a pair override's thank-you panel copy (submitBehavior) on the public form also reads the pair rank. The translator reads the same catalogs, but nothing here seeds it. In the PR's Acceptance notes."
     ]
    }
  9. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me

    Close-out 2026-11-19T03:20Z: PR #35290 MERGED as 1950f07546; Fixes closed this card. Delivered (READ half, ruling 6995998752): GET /forms/:slug translates the form view with the .custom pair's own translations (pairTranslationBundleOf), in the ruled order pair → override text → base, the same answer /meta/view gives; the object half is unchanged by design. Not delivered here: the write-door half (this card's second comment) was split off by ruling 6995998752; whether a reading confirms that gap, and any card for it, stays with seat repo:objectstack#5. pm:dispatched off.

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

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:serverfindingpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions