Skip to content

The dashboard publish gate resolves widget.dataset against the boot-time stack, so a dataset saved through PUT /meta/dataset is a phantom widget-dataset-unknown until the runtime restarts #15950

Description

@hotlong

Observed while running cloud's objectui pin-smoke (cloud#2008) against a local
run-stack.sh --with-ui --prod-like --seed runtime at framework e581457baaaf.

What happened

  1. PUT /api/v1/meta/dataset/p2008_users?package=com.pin2008.smoke200
    {"success":true,"seq":2,"state":"active","message":"Saved dataset 'p2008_users' (env-wide, state=active)"}

  2. GET /api/v1/meta/dataset/p2008_users200, the item comes back with
    _packageId: "com.pin2008.smoke" and _diagnostics: { valid: true }.
    GET /api/v1/meta/dataset lists it alongside the five code-package datasets.

  3. PUT /api/v1/meta/dashboard/p2008_dash?package=com.pin2008.smoke with three widgets, each
    dataset: "p2008_users"422, three widget-dataset-unknown issues:

    dataset "p2008_users" does not resolve to a declared dataset.
    hint: Declared datasets: sys_user_metrics, sys_organization_metrics, sys_session_metrics,
    sys_package_installation_metrics, sys_audit_log_metrics

    The hint enumerates ONLY the code-package datasets — the just-saved, readable,
    valid: true runtime one is missing from the gate's resolution universe.

  4. POST /api/v1/meta/dataset/p2008_users/publish → 200. Retry step 3 → same 422.

  5. Restarted the runtime process (nothing else changed — same workdir, same tenant DB).
    Replayed step 3 byte for byte → 200, dashboard saved, and it renders correctly.

So the dashboard author-time gate resolves widget.dataset against a universe built at kernel
boot, while GET /meta/dataset reads through to the store. A dataset and a dashboard authored
in the same session cannot be saved in that order without a restart, and the 422 names the
author's own dataset as nonexistent while the read API returns it.

Why this reads as a defect rather than a config

runtime-gate.ts documents datasets as "the live dataset declarations (stack key datasets)
… the resolution universe validateWidgetBindings links a widget's dataset / dimensions /
values against", added by objectui#7529 precisely so a per-write dashboard snapshot does not
report phantom widget-dataset-unknown on a board bound to a real dataset. The phantom shape
that docblock describes is exactly what a runtime-stored dataset still produces — the
collection appears to be populated from the boot-time stack rather than from the live metadata
store, so the fix that landed for declared datasets does not reach authored ones.

This is the door AI authoring goes through: an agent that creates a dataset and then a
dashboard in one turn gets a hard 422 blaming its own artifact, with a hint that lists
everything except the thing it just made.

Repro

Any runtime with --prod-like; a writable package; the two PUTs above in that order.

Filed from cloud#2008 (objectui pin bump). Not fixed there — cloud only pins objectui.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions