Skip to content

objectql: the 503 ERR_DATASOURCE_UNAVAILABLE text for a failed datasource always blames a startup connect under OS_ALLOW_DRIVER_CONNECT_FAILURE, which is false for an install-time or Setup-created datasource #28135

Closed

Description

@objectstack-fleet

domain:server#3 · os-elon-musk · session_016WV4czuTWNgKR22fKv7jia

Finding

DatasourceUnavailableError (packages/objectql/src/driver-connect-errors.ts, the non-remote, non-blocked arm, ~L268-271 on main 549203d) explains every failed datasource the same way:

it failed to connect at startup and the server was started with OS_ALLOW_DRIVER_CONNECT_FAILURE. Nothing re-runs the connect — the server must be restarted once the datasource is reachable.

That is true only for a code datasource whose boot connect failed under that flag. It is false for:

The message then tells an operator to restart a server that was never started with the flag, and names a cause that did not happen.

Expected

The text names the cause the connection service actually retained for that datasource (or a neutral "failed to connect; see Setup → Datasources"), and says "restart" only where a restart is what re-runs the connect.

Scope

packages/objectql/src/driver-connect-errors.ts and its pins. No new error code; the 503 and ERR_DATASOURCE_UNAVAILABLE stay. Found while reviewing PR #28132; not in that PR's scope.

Activity

  1. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · os-tesla · session_01L9qibz8HEj53Wx2uphTo2o

    Claim: PM loop round 4 · cross-lane · 2026-10-31T05:44Z
    Session: session_01L9qibz8HEj53Wx2uphTo2o (seat; implementation by card thread session session_01L9qibwanr5nGX9vQKHm1Cu, mode:thread)
    Account: os-tesla (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/project-thread-cl22x4 (the card thread's designated push branch, the recorded platform exception to claude/issue-<n>-<slug>)
    Worktree: objectstack-issue-28135
    Domain: domain:server (the card keeps its lane; dispatched by ui seat 3)
    Seat: domain:ui#3
    File surface: packages/objectql/src/driver-connect-errors.ts and its tests, the two docs and two plugin-security fixtures that quote the old sentence, one root changeset; ⛔ no packages/spec edit (widening IDataEngine.markDatasourceUnavailable is a follow-up) (stop on breach; explain in the report)
    Container & model: S, mode:thread, model: default (dispatch-gates --tier re-run on the actual diff), effort: high
    Clause-②: no (message text only)
    Metadata-protocol: none
    Responsibility: the failed-arm text predates install-local (#28039 / PR #28132) and Setup-created datasources
    Thread-read: none
    Premise: re-measured by the card thread on main 69c39b16 before this claim (premise holds)
    Serial constraints cleared: server seat 2 answered "No objection: take both" on #28284 (6539522584) and holds no overlapping work; server seat 1 was notified on #6367 and raised no objection within the 20-minute window. ui seat 3 siblings share no file with this card.

    Maintainer 2026-10-31 05:10Z 「座位之间可以协调,你有空你就可以派」. Notice: #28284 6539514907 (+ amendment 6539527220). Order: /mnt/project-files/ui-seat-3/r2026-10-31/dispatch-28135.md.

  2. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · os-tesla · session_01L9qibwanr5nGX9vQKHm1Cu

    os-dev-report

    {
     "issue": 28135,
     "status": "done",
     "branch": "claude/project-thread-cl22x4",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/28361",
     "session": "session_01L9qibwanr5nGX9vQKHm1Cu",
     "premise_still_valid": true,
     "summary": "DatasourceUnavailableError's failed arm no longer claims a startup connect under OS_ALLOW_DRIVER_CONNECT_FAILURE: it says the last connect attempt failed and points to Setup → Datasources or the server log; a conditional restart sentence is added only while the flag is set (read via resolveAllowDriverConnectFailure, process-safe). Measured: boot-under-flag, boot autoConnect, install-local hot/rehydrate and Setup create/update all record the same {kind:'failed'}, so the engine cannot tell origins apart without widening IDataEngine.markDatasourceUnavailable in packages/spec (follow-up named in the PR body, not filed). Two docs and two plugin-security fixtures quoting the old sentence re-worded; patch changeset.",
     "tests": "head ea7bffd6: objectql test 502/502 files, 9767/9767 tests (VERDICT command-exit 0); plugin-security test 237/237 files, 5119 passed + 45 skipped (VERDICT command-exit 0); objectql typecheck exit 0. Ablation via ablation-replace.mjs on committed head (anchor 1→0 each leg): guard→'if (false)' reds the flag-unset pin (1 failed); guard→'return' reds the flag-set pin (1 failed); restored, git diff HEAD empty, blob 82ec394a = HEAD blob. Source-imported test (relative ./engine.js), no dist leg.",
     "gates": "dispatch-gates --commands on ea7bffd6: 94 derived; --ran: 90 run exit 0, 4 NOT-MEASURED exit 3 PREREQUISITE NOT MET (check-plugin-teardown-shape --self-test: shallow clone; spec check:skill-examples: client .d.ts unbuilt; check:dual-build-cjs-loads: full build absent; check:i18n: CLI unbuilt), 0 UNRUN. PR check-runs: in_progress at report time.",
     "line_budget": "106 added / 24 deleted, 7 files; under the 3000 human-merge threshold",
     "deviations": [
      "Order asked per-origin pins; origins record identically, so the pins are by flag state (flag set = boot-under-flag origin; flag unset = install-local and Setup origins), as approved by the seat before Begin.",
      "4 derived gates NOT MEASURED locally (exit 3 prerequisite refusals), left to CI."
     ],
     "files_changed": [
      ".changeset/28135-datasource-unavailable-failed-cause.md",
      "content/docs/api/wire-format.mdx",
      "content/docs/data-modeling/external-datasources.mdx",
      "packages/objectql/src/datasource-unavailable.test.ts",
      "packages/objectql/src/driver-connect-errors.ts",
      "packages/plugins/plugin-security/src/controlled-by-parent-sharing.test.ts",
      "packages/plugins/plugin-security/src/store-fault-fail-closed.test.ts"
     ],
     "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
     "mcp_calls": "5 — reads only: issue_read get, issue_read get_comments x2, pull_request_read get x2 (0 writes)",
     "api_writes": "2 — relay pr_create (fleet-write run 41176816348, PR #28361); post-stamped comment on #28135 (this report)",
     "open_questions": [],
     "out_of_scope_findings": [
      "carrier: seat (domain:ui#3) · noted, not filed · the engine records no origin for a failed connect; naming it needs IDataEngine.markDatasourceUnavailable widened in packages/spec, whose docblock (and ObjectQL.markDatasourceUnavailable's) still describe failed as degraded-boot only · dedupe words: markDatasourceUnavailable origin, DatasourceUnavailableKind, failed connect origin",
      "carrier: none · noted, not filed · handleFailure prints a DEGRADED BOOT banner for an install-local connect failure while the flag is set"
     ]
    }
  3. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · os-tesla · session_01L9qibz8HEj53Wx2uphTo2o

    Landed · 2026-10-31T09:46Z

    probe reading
    PR #28361 merged through the queue at 2026-10-31T07:13:09Z, merge commit 2db3281fdd (ACCEPT 6540280219)
    this card closed completed by the PR's Fixes line

    State: pm:dispatched removed (closed card).

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions