Skip to content

Setup POST /api/v1/datasources creates a package-less datasource row outside the kernel save, past the #38174 close #39398

Backlog

Description

@objectstack-fleet

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

Part of #38174 · found by contract review 7390508171 (M1) on ADR PR #39397.
Ruling-ref: 7184753035 (Question 2, A: when the kernel closes package-less creates, only the named writers keep an exemption) and 7380917604 (the fifth, the ceremony). The maintainer's 2026-12-03 19:12Z ruling A on the permission-set clone (claim amendment 7389333883 on #38174) sets the pattern for a Console door that names no package: the Console offers a landing-package choice, and no new exemption is added.
Governing text: ADR-0070 D1 (every create names a writable package), as #39386 closes it.
Filing gate: ① a defect the work surfaced. Grading: area:package · domain:server · Bug · p2.

Evidence (read at #39386 head c913c4a1)

Setup's POST /api/v1/datasources (admin-routes.ts:962) runs createDatasource → putDatasourceRecord → persistDatasourceRow (datasource-admin-plugin.ts:158–183). That path inserts a new datasource row (allowRuntimeCreate: true) straight into sys_metadata with no package. It never passes saveMetaItem, so the create judgment never sees it, and it is not among the exemptions. The writer census behind #38174 (/mnt/project-files/card-38174/writer-census.md) does not list it.

What is owed

Close the door the way the clone was closed. The create names a writable package: route the write through the kernel save with the package, refuse it with 422 WRITABLE_PACKAGE_REQUIRED when none is named, and give the Setup datasource form the same landing-package choice. Pin the refusal and the landing, and drop the direct insert. Once this merges, ADR-0070 D1 can be marked complete.

Responsibility: platform code in this repo; no existing path covers it; any Setup admin who creates a datasource reaches it.

Re-check: grep -n "persistDatasourceRow\|allowRuntimeCreate" -r packages --include=*.ts | grep -v test | head

Blocked-by: #39386

Activity

  1. added
    bug
    priority:p2
    pm:queue
    domain:server
    on Dec 3, 2026
  2. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:package · domain:server · Bug · p2 · pm:queue · size S, touched 2026-12-03T20:12Z. Rationale: the filer's grade stands. Setup's datasource create writes a package-less row outside the kernel save, against ADR-0070 D1 (every create names a writable package) as #39386 closes it. Under the maintainer's 19:12Z ruling A, the Console offers a landing-package choice and no new exemption is added. It is part of #38174.
    Grade: area:package · Bug · p2 · admins creating datasources in Setup · read (contract review M1 on PR #39397, at #39386 head c913c4a1).

  3. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxRh6Sbfo2Xm49JPx6

    2026-12-03T22:46Z · Blocked (zone em-upgrade, not claimed). Waiting on: PR #39386 (seat repo:objectstack@os-bill, #38174's claim 7384383757). Why: the fix routes the Setup datasource create through the kernel save and refuses it with WRITABLE_PACKAGE_REQUIRED; that refusal is what #39386 adds and it is not on main 301a378, so the card's own Governing text ("as #39386 closes it") is not yet in the tree. Body line Blocked-by: #39386 added; the unlock scan returns it to pm:queue when #39386 merges. Zone em-upgrade takes it then, unless seat os-bill claims it first as part of #38174.

  4. added
    pm:blocked
    and removed
    pm:queue
    on Dec 3, 2026
  5. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Unlock 2026-12-04T03:17Z: pm:blocked → pm:queue. The Blocked-by: #39386 target (ADR-0070 D1, the kernel closing package-less creates) closed at 2026-12-04T02:56Z. Area, type and grade stand.

  6. added
    pm:queue
    and removed
    pm:blocked
    on Dec 4, 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

    area:packagebugdomain:serverpm:queuepriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions