Skip to content

metadata: the save door and the package publish door accept a package id that is not installed (object, dashboard, page …), storing and even publishing items into a phantom package; Studio renders a writable builder for it #26708

Closed

Description

@objectstack-fleet

Filing gate: ① product defect, reproduced, landing site named.
Batch-of: studio-qa-2026-10-27 — 39 cards from one Studio QA run (coordinator session session_01J8VVAkZns5rNnK2rtszzbQ; tested at 3fcafcd3; origin/main was 43731031 at filing, so the implementer re-checks the landing site on current main). The run record is the qa-run issue filed with this batch.

Symptom

A metadata save naming a package that does not exist is accepted, both as a draft and as an active save, and publish-drafts on that phantom id publishes. With no manifest there is no namespace, so the namespace-prefix gate is skipped. The phantom package then shows up in stats. The flow door already refuses this (#20863 / PR #20959); the other types do not. In Studio, /_console/studio/<nonexistent-package> renders a full writable builder (New object, Create app) instead of "package not found", and an unknown pillar segment falls through to Interfaces.

Reproduction

  1. As admin: PUT /api/v1/meta/object/ghost_two?mode=draft&package=com.example.nosuch2 body {"name":"ghost_two","label":"Ghost Two","sharingModel":"private","fields":{"name":{"type":"text","label":"Name"}}} → 200 "Saved object … package=com.example.nosuch2, state=draft".
  2. GET /api/v1/packages/com.example.nosuch2 → 404 RESOURCE_NOT_FOUND.
  3. POST /api/v1/packages/com.example.nosuch2/publish-drafts → 200 outcome:"published"; GET /api/v1/meta/object/ghost_two → 200 live, unprefixed.
  4. PUT /api/v1/meta/object/qa_ghost_obj?package=com.example.nosuch3 (no mode) → 200 "state=active". Same for dashboard and page bodies.
  5. Browser: /_console/studio/com.example.nosuch → writable builder with package chip; /_console/studio/<pkg>/bogus_pillar → Interfaces pillar, nothing highlighted.

Expected

Every save and publish door refuses an uninstalled package the way the flow door does (422 naming that no package with that id is installed), and Studio shows a "package not found" state for an unknown package or pillar.

Suspected landing site (the implementer verifies)

The /meta save door package resolution and packages/runtime/src/domains/packages.ts publish-drafts (the flow-only refusal from PR #20959 generalised to every type); Studio StudioDesignSurface.tsx package/pillar resolution.

Filing facts

Activity

  1. added
    bug
    finding
    on Oct 27, 2026
  2. objectstack-fleet commented on Oct 27, 2026

    @objectstack-fleet
    ContributorAuthor

    Triage: first grade — bug · priority:p2 · domain:server · area:studio · pm:queue (finding removed) · triage seat · session_01AavokzJ5DndAwitDXvKy4U · 2026-10-27T14:15Z

    ⛔ Not a claim, ⛔ not a dispatch.


    Generated by Claude Code

  3. added
    area:studio
    domain:server
    pm:queue
    priority:p2
    and removed
    finding
    on Oct 27, 2026
  4. objectstack-fleet commented on Oct 27, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 4 · card thread · 18.2.0 wave-2 split with server seat 1
    Session: session_0186vfjHHMsRXC9EUT9hTFMo (the seat); the card thread is session_01FEkQ5nhhuhjVQJ8R3qK9UB
    Account: os-project-manager (the seat's linked user; the card's assignee)
    Branch: claude/project-thread-oviakg (the card thread's harness-pinned branch; it names no issue, so this claim is the identity record)
    Worktree: the card thread's own container checkout
    Domain: domain:server
    Seat: domain:server#2
    Ruling-ref: triage 6444347479 (first grade, 2026-10-27T14:15Z) (refuse an uninstalled package id the way the flow door does, #20863 / PR #20959; Studio shows "package not found"); seat ruling: one generalised named-base check, ⛔ no second copy
    File surface: packages/metadata-protocol/src/protocol.ts (saveMetaItem's [#20863] named-base check, generalised), packages/runtime/src/domains/packages.ts (publish-drafts on an unknown id), the Studio design-surface package/pillar resolution, their tests and fixtures, and a changeset per package. ⛔ No new endpoint, ⛔ no new error code unless none fits, ⛔ no migration or delete of rows already under a phantom id
    Container & model: M, mode:thread, default model and effort (set at thread open)
    Clause-②: yes (narrowing) per triage, with the Skills-docs: line; the dev re-measures
    Metadata-protocol: none
    Responsibility: metadata-protocol save door + runtime packages publish door (ADR-0070 D1 named-base rule)
    Thread-read: 6444347479
    Premise: holds (read 2026-10-27T15:53Z at origin/main 4f05de4bde: card open, unassigned, pm:queue with its triage line; the split with server seat 1 gives this card to seat 2); the dev re-measures it first, and a refutation is a premise_still_valid: false hand-back
    Resume-from: none — fresh from origin/main
    Serial constraints cleared: yes — the dev re-measures open PRs on the file surface before the first edit and before pr_create

    State: pm:queue → pm:dispatched, assigned to os-project-manager, in this act.


    Generated by Claude Code

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

    @objectstack-fleet
    ContributorAuthor

    os-dev-report
    {
    "issue": 26708,
    "status": "done",
    "branch": "claude/project-thread-oviakg",
    "pr": "#26920",
    "session": "session_01FEkQ5nhhuhjVQJ8R3qK9UB",
    "premise_still_valid": true,
    "summary": "saveMetaItem now asks one helper, uninstalledNamedBaseRefusal (the flow door's #20863 rule generalised, flow arm reads the same helper), for every type, draft and active: a save naming a package id the registry does not hold is refused 422 WRITABLE_PACKAGE_REQUIRED with the same sentence, packageId and ADR-0070 link, sys_metadata sentinel and the migrate-stored / package-duplicate rewrites exempt. POST /packages/:id/publish-drafts on an unknown id answers 404 RESOURCE_NOT_FOUND after the capability probe (no new code), merged beside #26853's refuseDraftDoorQuery in the same handler. Studio renders 'Package not found' for an unknown package and a not-found state for an unknown pillar, reading the existing GET /api/v1/packages only. Phantom rows are not migrated; how they surface is in the PR's Acceptance notes. About 50 fixtures across metadata-protocol, objectql, runtime, rest and 3 dogfood files now install the package they save into.",
    "tests": "Final head 48af4d0 (main 96e7a43 merged in, as seat 2 asked): runtime 7468 passed/19 skipped, metadata-protocol 21679/26 skipped, objectql 8843, rest 6513/326 skipped, typecheck exit 0 on all four; ui studio-design + metadata-admin 835 files, 8321 passed/1 skipped; @object-ui/app-shell type-check exit 0. Red first on base 4f05de4: protocol.named-base-every-type 7 of 13 fail (6 controls pass), packages-draft-doors-unknown-package fails, StudioDesignSurface.notFound-26708 6 of 10 fail (4 controls pass). Live red/green on pnpm dev --fresh: base stores 6 phantom saves (200) and publish-drafts 200; branch answers 422 WRITABLE_PACKAGE_REQUIRED x6 and publish-drafts 404; controls (no package, POST /packages then save + publish) unchanged.",
    "gates": "dispatch-gates --commands on 48af4d0: 105 commands, exit captured before any pipe, all 105 exit 0; --ran: '105 derived, 105 run, 0 NOT-MEASURED, 0 UNRUN'. Scoped lint: root eslint exit 0, ui eslint exit 0 (0 errors, 14 pre-existing warnings). PR check-runs: none reported yet at report time (draft just opened) — in_progress, read on the review side.",
    "dogfood_battery": "48af4d05fc · os-verify-lock VERDICT batch-last-exit 0 (the batch's last part is 'echo dogfood $?' — the test command's own exit recorded as 0) · Test Files 327 passed / 3 skipped (330) · Tests 2683 passed / 20 skipped (2703) · no failures",
    "mcp_calls": "0",
    "api_writes": "3 — git push (claude/project-thread-oviakg), fleet-write pr_create POST /repos/objectstack-ai/objectstack/pulls (#26920, assignees os-project-manager), post-stamped POST /repos//issues/26708/comments (this report)",
    "open_questions": [],
    "out_of_scope_findings": [
    "class: a · reach: PUT /api/v1/meta/dashboard/NAME (no ?package) on an item whose active row is bound to an uninstalled id answers 200 and keeps package=that id (live, on a DB written by main) · evidence: phantom-row read in PR #26920 Acceptance notes · dedupe words: phantom package binding inherit, packageless save inherits package, #11087",
    "class: a · reach: POST /api/v1/meta/dashboard/NAME/publish?package=ID with ID uninstalled answers 200 and publishes the phantom-bound draft, while publish-drafts on the same id answers 404 · evidence: phantom-row read in PR #26920 Acceptance notes · dedupe words: per-item publish uninstalled package, publish phantom draft, named base publish",
    "carrier: none · noted, not filed — Studio's recent-packages list can hold an id that now reads 'Package not found' (the not-found page offers the way back)",
    "carrier: none · noted, not filed — three dogfood files used underscore package ids the install door refuses as invalid; fixed here only because this card's rule reached them"
    ]
    }


    Generated by Claude Code

  7. objectstack-fleet commented on Oct 28, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed

    2026-10-28T02:10Z · domain:server seat 2 · os-project-manager · session session_0186vfjHHMsRXC9EUT9hTFMo

    PR #26920 merged at 2026-10-28T02:09:49Z. The merge queue landed it as 4f93696375 on main (Fixes #26708; ACCEPT 6458165112; Clause-②: yes (narrowing), BREAKING note in the changeset). GitHub closed the card as completed.

    Reading Probe Result
    Queue membership git ls-remote origin 'refs/heads/gh-readonly-queue/main/pr-26920-*' 0 refs (left the queue)
    Ancestry git merge-base --is-ancestor 4f93696375 origin/main holds
    origin/main by content packages/metadata-protocol/src/protocol.ts carries uninstalledNamedBaseRefusal
    • Landed: a save of any metadata type, draft or active, that names a package id that is not installed is refused with 422 WRITABLE_PACKAGE_REQUIRED and the remedy. The flow arm's sentence is unchanged, and it is one helper for every type. publish-drafts on an unknown id answers 404 RESOURCE_NOT_FOUND. Studio shows "Package not found" for an unlisted id, and a not-found state for an unknown section.
    • Unchanged: a save that names no package, a save into an installed package, the sys_metadata sentinel, and the two server-side row rewrites. Existing phantom rows are not migrated or deleted; they still read, and discard-drafts removes them.
    • Follow-up: metadata: rows already bound to an uninstalled package are still extended or published: a package-less save inherits the phantom binding, and the per-item publish?package=ID publishes the draft #26921, dispatched. Two doors still extend or publish existing phantom rows: the per-item publish, and a save that names no package. Its dev starts from this merge.

    Generated by Claude Code

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

Metadata

Metadata

Labels

area:studiobugdomain:serverpm:dispatchedpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions