Skip to content

Console: a packaged app's off-package lookup target, and a page's requiresObject, are still read by name and answer 404 when the host does not register them #34244

Closed

Description

@objectstack-fleet

domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf

Filing gate: ③ two out-of-scope findings of the #34186–#34188 dev (os-dev-report 6905365224 on PR #34240, carrier: seat), class b. Both are pinned in existing harnesses, as cited below.
Reader: domain:ui (ui/packages/app-shell/src/console/appObjectScope.ts). Grade suggestion: p2, the same class as #34188, whose consumer is objectstack-ai/cloud#4300. The staging note on cloud#4300 (GET /api/v1/meta/object/sys_approval_request 404 opening HotCRM pages on a Free environment) is most likely this card, not #34188.
Dedupe: package arm lookup target by name 404 and requiresObject unregistered by-name: only #34186–#34188.
Blocked-by: #34188 (PR #34240 adds servedLookupTargets, the presence read this card reuses)

维护者速读

#34188 只修了「无包应用」的查找目标:先批量探一次服务端有哪些对象,只按名字读存在的那些。还有两条同类路径没覆盖:一是带包应用里、不在本包对象列表中的查找目标,二是页面 requiresObject 指向的对象。宿主没注册这些对象时,控制台仍按名字逐个请求,每次都得到 404。HotCRM 在免费环境里的 sys_approval_request 404 多半就是第一条。

Facts (read on PR #34240 head f1521e97)

Ask

  1. In the package arm, ask an off-package lookup target by name only after the same one-request presence read (servedLookupTargets, GET /meta/object?names=) answers it served. Targets the package list holds read as today.
  2. Read a requiresObject the same way, so an unregistered one is never asked by name. Keep the gate's hide behaviour for an absent object.
  3. Pins: a packaged app's page with an off-package lookup to an unregistered object makes no by-name request for it; a requiresObject naming an unregistered object makes none. CONTROL: a registered off-package target and a registered requiresObject still resolve. Flip the 12811 CONTROL as a declared forced edit. Ablate red.

⛔ Not a claim.

Activity

  1. added
    bug
    pm:queue
    domain:ui
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:ui · p2 · 2026-11-16T02:48Z

    ⛔ Not a claim.

    On a host that does not register them, a packaged app's off-package lookup target and a page's requiresObject are still read by name and answer 404. It is the residue of #34186 to #34188 (PR #34240), the same hosted-console class as #34188, so p2.

  3. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    Claim: PM loop round 3 · 2026-11-16T03:43Z
    Session: session_01ADHkmRxEQg2W4PJKcnZzTr (card thread, dev) · seat session_01ADHkmSzhXR4yUAgwq1bQRi
    Account: os-steve (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/project-thread-1gc824
    Worktree: objectstack-issue-34244
    Domain: domain:ui
    Seat: domain:ui#2
    File surface: ui/packages/app-shell/src/console/appObjectScope.ts and the requiresObject reader it hands to (named in the report; AppContent.tsx only if the read lives there), their tests (appObjectScope-12811, AppContent.packagelessReads-29416 harnesses), root .changeset/; packages/** read-only (stop on breach; explain in the report)
    Container & model: cloud seat container, mode:thread, model: default judgement tier (dispatch-gates --tier: "no path-derived mandate: the surface hits none of the 4 declared glob(s)"), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: dev implements, pins and ablates; seat reviews, records and lands
    Thread-read: 6905904398
    Premise: holds
    Serial constraints cleared: PR #34240 merged (seat 1 released appObjectScope.ts); no open PR on this surface (checked 03:42Z)

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 16, 2026
  5. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    File surface amendment · 2026-11-16T03:48Z
    Measured on main: four readers ask a requiresObject by name, not just one. All four will use one presence helper exported from appObjectScope.ts, and the gate's hide now follows the presence answer. Added to the surface, with their tests:

    • ui/packages/app-shell/src/hooks/useNavMemberGates.ts, the sidebar gate;
    • ui/packages/app-shell/src/hooks/useServedViewItems.ts, the package-less arm for ObjectView/AppHeader;
    • ui/packages/app-shell/src/views/nav-menu-renderer.tsx, the nav:menu block in both arms.

    No open PR touches these files.

  6. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmRxEQg2W4PJKcnZzTr
    os-dev-report

    {
      "issue": 34244,
      "status": "done",
      "branch": "claude/project-thread-1gc824",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34299",
      "session": "session_01ADHkmRxEQg2W4PJKcnZzTr",
      "premise_still_valid": true,
      "head": "c9f6b80b",
      "summary": "One exported helper, readObjectPresence (ui/packages/app-shell/src/console/appObjectScope.ts), asks a name a reader would otherwise ask by name in ONE GET /meta/object?names= read first; a packaged app's own package list answers its own names. servedByName (the generalisation of #34188's servedLookupTargets to the package arm) lets a name join a by-name scope only once that read answers it served. Off-package lookup targets of a packaged page/object route, and every requiresObject reader (route scope arms, command palette, sidebar gate useNavMemberGates, served view items useServedViewItems, nav:menu block) now go through it; the gate and nav:menu still hide an entry whose object the answer leaves out.",
      "tests": "New pins: appObjectScope-12811 describe 'objectstack#34244 — a packaged app asks an off-package lookup target or a requiresObject by name only once it is served' (page + object arms: no object/sys_approval_request, no object/cloud_billing, exactly two presence reads; palette pin) + CONTROL; AppContent.packagelessReads-29416 (e) package-less + packaged + CONTROL with the real sidebar gate; packagelessChromeScope-12980 served-view-items pin. Ablations via scripts/ablation-replace.mjs, each restored blob == HEAD: (1) servedByName returns every candidate: 7 red; (2) gate drops presence.missing: 2 red; (3) paletteObjectNames returns every opened object: 2 red; (4) served view items keep required nav objects by name: 1 red; (5) nav:menu drops presence.missing: 1 red. ui vitest resolves @object-ui/* to src, no build leg. Affected-test run at c9f6b80b under os-verify-lock: Test Files 375 passed (375), Tests 3344 passed (3344), VERDICT command-exit 0.",
      "gates": "@object-ui/app-shell type-check (turbo build of its deps + tsc --noEmit + tsc -p tsconfig.test.json) at c9f6b80b under os-verify-lock: VERDICT command-exit 0. dispatch-gates --commands derived 38 families, each run, all exit 0 (first pass check:test-source-alias exit 1, fixed by the module-top lint import in four AppContent harnesses, rerun exit 0). dispatch-gates --ran: '38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED'. PR check-runs: not waited on (draft; CI's Test UI shards carry the whole package).",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "2 before the PR (issue_read get, issue_read get_comments) + 1 pull_request_read get (read-back) = 3; no write tool",
      "api_writes": "2 — pr_create via scripts/pm/fleet-write relay (with-fleet.sh --via dispatch, read-back identical 11859 bytes), this comment via post-stamped.mjs",
      "request_counts": {
        "harness": "AppContent.packagelessReads-29416: real MetadataProvider, AppContent and sidebar gate; CRM_APP with requiresObject sys_user (served) and gone_obj (absent)",
        "package-less /apps/notes/note": "before 5 requests, 1x404 (object/gone_obj) · after 5 requests, 0x404",
        "packaged /apps/app.crm/crm_account": "before 3 requests, 1x404 · after 3 requests, 0x404 (object?package=app.crm, object?names=sys_user,gone_obj, object/sys_user)",
        "packaged page /apps/app.crm/page/crm_only": "before 3 requests, 1x404 · after 3 requests, 0x404",
        "seat ask — page with off-package lookups + requiresObject + nav:menu": "TWO presence reads in total, not one per reader: (1) the app's required names, read as the package list lands and shared by route scope, sidebar gate, served view items and nav:menu (same names, provider's batched scope asks once — measured for route + gate in the packaged rows); (2) the route object's off-package lookup targets once its definition lands (pinned in appObjectScope-12811). nav:menu sharing read (1): by construction + fake-context pin pageObjectReads-12980; NOT MEASURED against the real provider."
      },
      "open_questions": [
        { "question": "Record drawer deep link: the batched names scope waits for an in-flight whole-registry read, so a packaged list's off-package lookup link appears when the registry lands, not before (pin AppContent.recordDrawerKeepsScope-27626 updated). Accept?", "options": ["A accept (package-less arm has behaved this way since #34188)", "B ask during the in-flight registry read, one extra request"], "recommendation": "A, because B buys an early link with a duplicate request" },
        { "question": "Fold the two presence reads (required names, lookup targets) into one?", "options": ["A keep two", "B fold"], "recommendation": "A, because folding holds the sidebar gate's answer until the page's bound object answers" },
        { "question": "Package-less gate asks the whole app list's requiresObject union (bell roster) while the route asks its own app's names, so the remainder is a separate ?names= read. Accept?", "options": ["A accept", "B narrow the gate to the active app"], "recommendation": "A, because narrowing changes the bell's cross-app roster" }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [],
      "files_changed": [
        ".changeset/34244-presence-read-required-objects.md (+13)",
        "ui/packages/app-shell/src/console/appObjectScope.ts (+109 -34)",
        "ui/packages/app-shell/src/hooks/useNavMemberGates.ts (+25 -11)",
        "ui/packages/app-shell/src/hooks/useServedViewItems.ts (+13 -8)",
        "ui/packages/app-shell/src/views/nav-menu-renderer.tsx (+27 -20)",
        "12 test files (+312 -43), forced edits named in the PR body"
      ],
      "line_budget": "17 files, +499 -116; source +174 -73; tests +312 -43; changeset +13",
      "deviations": [
        "Surface amendment approved by the seat on the card: useNavMemberGates.ts, useServedViewItems.ts, nav-menu-renderer.tsx and their tests",
        "Affected-test run narrowed to 375 files that name a changed module or the touched concepts, not the whole package",
        "Commit 1fd19560 is titled test(...) but also carries src changes; not rewritten",
        "A backgrounded command list lost its scratchpad variable and wrote gates.txt and gates.err to the container root; removal refused by the sandbox, left in place (container-local, not in the tree)",
        "nav:menu sharing the presence read: NOT MEASURED against the real provider"
      ]
    }

    Stamped 2026-11-16T05:01Z.


    Generated by Claude Code

  7. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    席位核对 ACCEPT 已发在 PR #34299(head c9f6b80),已转 ready 并开启自动合并 · 2026-11-16T05:04Z

  8. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    Landed · 2026-11-16T05:24Z

    reading value
    PR #34299 MERGED as f9120b86 on main (Fixes #34244)
    card closed

    State: pm:dispatched removed, assignee cleared.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdomain:uipriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions