Skip to content

console Setup overview: meta/object is read twice (package-filtered and full), and session → discovery → permissions → app → bundle → views → data run as 7 serial layers #34211

Closed
1 of 1 issue completed

Description

@objectstack-fleet

repo:cloud#3 · os-warren · session_01JQwxbZqfEd7pcckjz3pGqn

Filing gate: ① a measured defect behind objectstack-ai/cloud#4563 (hosted page load, p2). It was measured locally on cloud main d97754b, pin b914e72 (objectstack 18.5.0), with HotCRM 6.4.0 and sample data in a free-plan hosted environment. The readings are in the cloud#4563 os-dev-report (6904212540). The cloud lane files this card; first touch is left to triage.

Measurement context (shared by the cloud#4563 split)

Locally the same amplification as staging appears: the customer-list request set (31 requests) answered one at a time sums to
≈ 0.5 s of runtime; the same set at once sums to ≈ 7.2 s (≈ 14×; staging reported ≈ 13×). Under the burst the db member stays at
1–2 ms per request and meta stays flat, while the runtime's CPU over the burst (≈ 600–650 ms) is the burst's wall (≈ 510–550 ms):
the single Node event loop is saturated and every request queues behind every other request's CPU. Small requests amplify most
(×30–×60, they have the most awaits per unit of work); the app bundles amplify least (×1.4–×2, they ARE the queue). So the amplifier
is event-loop CPU, not the database connection pool and not metadata reads; the biggest single CPU item is metadata bundle
compile
, recomputed on every request including a 304. Staging's tenant DB is remote Turso, which local SQLite cannot reproduce: an
owner-run staging reading (no config change) settles how much of staging's per-request time is db.

This card

  • Reading (customer list, local, warm): layer 1 runtime/config, auth/get-session (21→107 ms) · then a ~340 ms client gap · layer 2 discovery (443) · layer 3 permissions / organization / i18n / meta/app / sys_user_preference (515–715) · layer 4 meta/object?package=…, me/apps, bundle (732–960) · layer 5 view / doc / packages / book / meta/object/sys_user / ai/agents (1068–1343) · layer 6 data reads (1490–1630) · layer 7 explain (1725–1811). Setup: meta/object?package=com.objectstack.setup (6 ms) then meta/object full (47 ms runtime, 93 ms CPU).
  • Ask: (1) start discovery with get-session, not after it; (2) one meta/object read; (3) start the bundle with meta/app (it waits for meta/object today). Acceptance: list page ≤ 5 serial layers, one meta/object on Setup.
  • Related: console first load: plugin-grid, plugin-form and RecordDetailView are still in the eager closure (split from #33293) #33581 (eager closure on first load), objectstack#34097 (Home reads once, landed).

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-warren · session_01JQwxbabAdcWyApSTGBYJNY

    Ruling-ref: maintainer 14:43Z 「立一张专题卡,开始执行」 and 15:56Z 「domain 和优先级 不是已经定了吗?为什么现在不能改卡」 · regrade v3 under epic #35205

    Grade: p2 (was p3) · area:ux · Feature · UX × not every user every time · 「console Setup overview: meta/object is read twice (package-filtered and full), and session → discovery → pe…」; UX has no p3 (15:07Z 「和 cloud 对齐」)

  3. added
    priority:p2
    and removed on Nov 18, 2026
  4. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ

    Claim: PM loop round 2 · area ux-2 (lease:ux-2; the maintainer, verbatim, 2026-11-19 project chat: 「接手 area:ux」「优先 p1 p2」) · 2026-11-19T01:44Z
    Session: session_01Utp6CZrgaiMgTJCnswR6jQ
    Account: os-bill
    Branch: claude/issue-34211-console-load-layers
    Worktree: objectstack-issue-34211
    Domain: domain:ui
    Seat: repo:objectstack#5
    File surface: the console first-load request orchestration in ui/packages/app-shell/src/** (session/discovery start, meta/object reads in providers/MetadataProvider.tsx and the Setup overview, the app-bundle start) and ui/apps/console/src/** boot only, their tests, root .changeset/. ⛔ ui/packages/app-shell/src/views/RecordDetailView.tsx and ui/packages/components/src/renderers/layout/containers.tsx (#35135 in flight, same area). ⛔ No server, spec or packages/** edit. Stop on breach and report.
    Container & model: M, mode:subagent, model: default — no path-derived mandate, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the objectstack console (app-shell) sequences its first-load reads into 7 serial layers and reads meta/object twice on Setup; no platform path covers it (#34097 fixed Home only); every console user on every first load, amplified on hosted (cloud#4563)
    Thread-read: 6984778026
    Premise: holds as filed (measured on cloud main d97754b, objectstack 18.5.0, os-dev-report 6904212540 on cloud#4563); the dev re-measures the layers on origin/main first and stops if they no longer reproduce
    Serial constraints cleared: none — no open PR touches the console boot or MetadataProvider.tsx (live read of all 47 open PRs' files at claim time); #35135 holds RecordDetailView.tsx / containers.tsx, fenced above
    Pre-claim lane: domain:ui (ui/packages/app-shell/**, ui/apps/console/**)
    Pre-claim deps: none named; related #33581 (eager closure, with the seat) and #34097 (landed) are not blockers; overlap with open PRs: none
    Prior rulings read: console, first load, discovery, get-session, meta/object, bundle, serial, layers → ADR hits are term noise, none rules on read ordering; thread: none (regrade 6984778026 only); #34097 is the Home precedent

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

    @objectstack-fleet
    ContributorAuthor

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

    {
      "issue": 34211,
      "status": "done",
      "branch": "claude/issue-34211-console-load-layers",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/35304",
      "head": "93c21bff",
      "session": "session_01Utp6CZrgaiMgTJCnswR6jQ",
      "premise_still_valid": true,
      "summary": "Asks (1) and (2) reproduced on origin/main d6d96450 and are implemented; ask (3) does not reproduce. (1) index.html now sends GET /api/v1/discovery during parse beside get-session (startEarlyDiscovery, slot Symbol.for('objectui.earlyDiscovery')); the console's shared discovery reader moved to src/lib/early-discovery.ts (readConsoleDiscovery), takes that request once, and main.tsx starts it on every boot (before, a device with a stored language left discovery to the adapter's connect(), after the session), so the adapter's connect() joins the answer. Discovery went from 581-613 ms to 16-31 ms, in layer 1 with get-session. (2) The root of an app whose package holds no objects of its own (Setup) no longer falls back to the whole registry: it reads like that app's object routes (package list, then its requiresObject names in one presence read), and a presence read (batched names scope) now answers a name the entered app's bundle holds from the bundle. Setup's object reads go from ?package= (49 B) + whole registry (862,486 B) to ?package= (49 B) + ?names=sys_package_installation (49 B, the system_overview dashboard's widget gate for an object this runtime does not register). (3) The bundle already starts on meta/app's answer, in the same render as meta/object?package= and me/apps and often before the package read answers (useAppObjectScopePrefetch); it cannot start earlier without the app name, which only meta/app answers. The PR body says Part of #34211, because neither acceptance number is reached: the list page goes from 7 to 6 layers in the card's grouping (11-12 by the chain-depth measure, mostly client render and chunk gaps), and Setup sends two empty object reads, not one; see open_questions.",
      "a1_readings": {
        "method": "production console build (pnpm console:build) served by objectstack dev --ui --seed-admin from examples/app-showcase on port 38611; sign-in through the login page; headless Chromium 1440x900; one warm-up load, then a fresh page per load; Resource Timing entries for /api/ from navigation to network idle + 3 s. A request's layer is 1 + the deepest layer of any request that ENDED before it STARTED (the longest chain of strictly sequential requests).",
        "before_tree": "objectstack origin/main d6d96450",
        "after_tree": "objectstack b48d9672 (product files byte-identical to head 998d59a3/93c21bff)",
        "list_showcase_task_chain_layers": { "before": [13, 12], "after": [11, 12, 12] },
        "setup_open_chain_layers": { "before": [13, 12], "after": [11, 13, 10] },
        "list_card_grouping_layers": { "before": 7, "after": 6 },
        "discovery_start_ms": { "before": "581-613 (get-session 19-23)", "after": "16-31 (get-session 16-32), layer 1" },
        "setup_meta_object_list_reads": { "before": "?package=com.objectstack.setup (49 B) + whole registry (862,486 B)", "after": "?package=com.objectstack.setup (49 B) + ?names=sys_package_installation (49 B)" },
        "bundle_vs_meta_object": "bundle starts 35-50 ms after meta/app answers, in the same group as meta/object?package= (list before run 1: package 731-758, bundle from 741); the claim that it waits for meta/object does not reproduce"
      },
      "a2_readings": "The three asks are independent. (1) and (2) still reproduced on origin/main; (3) is already met by useAppObjectScopePrefetch (objectstack#28645), which enters the bundle as soon as the app list names the app; #34097 touched none of the three.",
      "tests": "Pins: sessionCheckBootDedup.test.tsx new describe (4 cases), MetadataProvider.bundleFirstReads-28645.test.tsx new describe (3 cases), the root pins in AppContent.emptyPackageScope-13046 and AppContent.objectScope-12811 (before: CONTROLs pinning ?package= then the whole registry). On 998d59a3, under the lock: cd ui && pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/console/ packages/app-shell/src/providers/ packages/app-shell/src/hooks/ packages/app-shell/src/views/__tests__/ apps/console/src/ gave Test Files 847 passed (847), Tests 7836 passed (7836), VERDICT command-exit 0. pnpm --filter @object-ui/app-shell --filter @object-ui/console run type-check: VERDICT command-exit 0. On head 93c21bff after the merge: 7 targeted files, 82 tests passed, plus app-shell type-check, VERDICT command-exit 0. Ablations through scripts/ablation-replace.mjs (no dist involved: the tests import src relatively and read index.html raw), each restored with blob == HEAD and git diff HEAD empty: early-discovery.ts takeEarlyDiscovery bypassed, 1 failed / 21 passed ('to have a length of 1 but got 2'); appObjectScope.ts root exception restored, 2 failed / 13 passed; MetadataProvider.tsx bundle hit disabled, 2 failed / 18 passed.",
      "gates": "Local: node scripts/pm/dispatch-gates.mjs --commands on 998d59a3, 39 families derived and 39 run, each exit 0 captured before any pipe; pnpm --dir ui exec vitest run scripts/ gave 171 passed, 2 skipped; --ran reconciliation: 39 derived, 39 run, 0 NOT-MEASURED, 0 UNRUN. pnpm check:new-line-citations (ui): 0 new, exit 0. CI on the PR head 93c21bff when reported: in_progress (Check Changeset, Lint families, Type Check families, Governed Surface Queue Guard, PR-body guards); the required UI families had not started.",
      "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
      "line_budget": "n/a: no skills/** or ratcheted ledger touched; diff d6d96450..998d59a3 is 12 files, +309 -57",
      "files_changed": [
        ".changeset/34211-console-load-layers.md",
        "ui/apps/console/index.html",
        "ui/apps/console/src/lib/early-discovery.ts",
        "ui/apps/console/src/languageSeed.ts",
        "ui/apps/console/src/main.tsx",
        "ui/apps/console/src/__tests__/sessionCheckBootDedup.test.tsx",
        "ui/apps/console/src/__tests__/main.nativeBridgeVersion-29330.test.tsx",
        "ui/packages/app-shell/src/console/appObjectScope.ts",
        "ui/packages/app-shell/src/providers/MetadataProvider.tsx",
        "ui/packages/app-shell/src/console/__tests__/AppContent.emptyPackageScope-13046.test.tsx",
        "ui/packages/app-shell/src/console/__tests__/AppContent.objectScope-12811.test.tsx",
        "ui/packages/app-shell/src/providers/__tests__/MetadataProvider.bundleFirstReads-28645.test.tsx"
      ],
      "deviations": [
        "ui/apps/console/index.html is outside the claim's listed file surface (ui/apps/console/src/** boot). Ask (1) needs it, because get-session starts there. The change follows its two sibling parse-time scripts. Declared in the PR body.",
        "The PR body says Part of #34211, not Fixes, because the card's acceptance numbers are not reached.",
        "The before/after browser readings come from a local showcase server, not a hosted environment. The chain-depth measure counts client render gaps, so it reads higher than the card's grouping. Both measures are reported.",
        "Ablations were not rebuilt through dist: the tests import their subjects by relative src path and index.html as raw text, so no build or dist preflight applies."
      ],
      "mcp_calls": "0",
      "api_writes": "2: pr_create via the fleet-write relay (repository_dispatch, which ran POST /repos/objectstack-ai/objectstack/pulls draft and POST /repos/objectstack-ai/objectstack/issues/35304/assignees); this os-dev-report comment via post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/34211/comments)",
      "open_questions": [
        {
          "question": "The card's acceptance asks for at most 5 serial layers on the list page and exactly one meta/object read on Setup. After this PR the card's grouping is 6 layers, and Setup sends two meta/object reads (49 B each, both empty). How should the rest be handled?",
          "options": [
            "A. Accept the readings in this PR. The registry (862 KB) and the discovery layer are gone, and the card closes on merge with its acceptance restated. Cost: none; work: none.",
            "B. Open a server-side follow-up (carrier: objectstack runtime). The app item or bundle would say that a package holds no objects, or the bundle would answer absence, so Setup can skip both empty reads. The bundle route would also take a package id, so the bundle and package read can start from the URL before meta/app answers, which brings the list to 5. Cost: a contract change (spec plus REST); work M.",
            "C. Start the package read and the bundle from the URL segment on the client, guessing that the segment is the package id. Cost: a speculative request when the segment is an alias, plus a second dialect for the app name; work S. Not recommended."
          ],
          "recommendation": "A for this card, plus B as its own contract-review card if the hosted readings (cloud#4563) still show these layers. The remaining waits are real data dependencies, and only a server answer removes them."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none. Noted, not filed: the list page reads sys_user twice (meta/object?names=sys_user presence at about 1015 ms, then meta/object/sys_user by name at about 1571 ms). Not traced; the second read's consumer is unidentified. Dedupe words: sys_user, by-name, presence, duplicate meta/object."
      ]
    }
  7. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

    Seat ruling record · 2026-11-19T03:42Z

    Ruling-ref: maintainer 2026-11-19T03:40Z on seat 5's decision card, option chosen verbatim: 「A 照实测数字收卡」. Analysis: project file objectstack-seat5/area-ux/decision-34211.md.

    Execution:

    1. PR fix(console, app-shell): discovery starts with the session check; Setup's open reads no whole object registry #35304 goes through L1-a and lands as usual. It stays Part of #34211.
    2. After it merges, ux-2 closes this card by hand with a close-out that states the numbers. Discovery now starts beside get-session (0.58–0.61 s → 0.02–0.03 s). Setup no longer reads the 862 KB registry; it sends two empty 49 B reads, which answer two different questions. The list page measured on showcase went from 7 to 6 layers; the card's own seventh layer (security/explain) was removed earlier by fix(plugin-grid): ask row Edit/Delete verdicts when the row actions are first used, not on first paint #34227, and HotCRM has not been re-measured. Ask (3) cannot be met client-side, because the bundle route is keyed by app name and the URL carries the package id. ⛔ Do not write this up as "target met".
    3. The client double read of a lookup target goes to console list page: a lookup target object is read twice (presence read, then by name), adding one request layer #35306 (lease ux-2, condition 2).
    4. Cloud lane: please re-measure the HotCRM account list on hosted (cloud#4563) after the next release. A server/contract card (bundle by URL address) is filed only if that reading still shows the app-list → bundle step as significant, and then as a decision card under design(metadata): address behavioural metadata by package — key flows, actions, jobs and other non-object types by (package, name); re-open ADR-0028 (replaces #30806 phase 3 renames) #31527. No "empty package" marker.
  8. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ

    Correction to the os-dev-report above (comment 6998718205), open_questions option A: it says "the card closes on merge". That is wrong. PR #35304 declares Part of #34211, so the merge does not close this card. Under option A (ruled, 6999004977) the seat closes it by hand after the merge, with its acceptance restated.

    L1-a rework (6999021746) pushed as 072a87ef: the parse-time discovery read keeps the 10 s bound, and the parse-time request and the reader's own request both carry the stored Bearer.

  9. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ

    Closed by hand · area ux-2 · 2026-11-19T04:39Z

    Ruling-ref: maintainer 2026-11-19T03:40Z on seat 5's decision card, option chosen verbatim: 「A 照实测数字收卡」 (seat record 6999004977). This is not "target met": the card closes on the measured numbers below.

    reading value
    PR #35304 MERGED through the merge queue as de8d54975c (Part of #34211); L1-a ACCEPT 6999565782 after REWORK 6999021746
    ask (1) discovery now starts beside get-session, at parse time: 0.58–0.61 s → 0.02–0.03 s, bounded at 10 s, Bearer sent when stored
    ask (2) Setup meta/object the 862,486 B whole-registry read is gone; Setup sends two empty 49 B reads (?package= and ?names=sys_package_installation), which answer two different questions — not the one read the card asked for
    list page layers (showcase, local) 7 → 6 in the card's grouping (card asked ≤ 5); the card's own seventh layer (security/explain) was already removed by #34227; HotCRM was not re-measured
    ask (3) bundle with meta/app cannot be met client-side: the bundle already starts on meta/app's answer, and the bundle route is keyed by app name while the URL carries the package id

    Follow-ups: the client double read of a lookup target → #35306 (lease ux-2). Cloud lane: re-measure the HotCRM account list on hosted (cloud#4563) after the next release; a server/contract card (bundle by URL address) is filed only if that reading still shows the app-list → bundle step as significant, as a decision card under #31527.
    State: pm:dispatched removed; card closed completed.

  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:uxdomain:uienhancementpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions