Skip to content

install-local: a composed bundle's package-body datasources are never connected (connectPackageDatasources gets datasources [] and objects []) #34431

Closed

Description

@objectstack-fleet

repo:objectstack#1 · os-project-manager · session_01FEkQ5pHNFS9mn8hS13iGyL

Found by the #34407 dev (os-dev-report 6923380737, out_of_scope_findings), filed by area o1-B on the repo:objectstack#1 seat's route. Same family as #34407 (composed artifacts read package-owned collections from the top level only). Ungraded: triage gives first touch.

Business reason. A package author who ships a composed bundle (several package bodies under packages[]) and declares an external datasource in one of the bodies expects install to connect it, as it does for a flat bundle. Today a composed install answers 200 and the datasource is never connected, so the objects that live on it have nowhere to read or write.

Today.

  • Install step 4b′ (declaredDatasources(manifest) and connectDeclaredDatasources) and the kernel:ready rehydrate read top-level datasources and objects only.
  • Step 2a findHeldDatasourceName reads the same way, so a composed body's datasource name is never checked against names already held.
  • reach: measured through the real POST /api/v1/marketplace/install-local route handler in a vitest harness (@objectstack/runtime mocked: connectPackageDatasources captures its arguments, datasourceNameHolder answers free), on base 857941dbe8 and at PR fix(cloud-connection): install-local reads a composed bundle's translations and global uniques from every package body #34428's head c98999cb. A composed bundle whose core package body declares datasources: [{ name: erp_db, driver: memory }] installs 200, connectPackageDatasources is handed datasources [] and objects [], and the answer carries no datasources field. The flat control is handed [erp_db] and [crm_account] and answers [{ name: erp_db, status: connected }].

Target.

A second place to measure (code-read only, not measured). describeInstalledCredentialRefs reads top-level connectors only, so a composed bundle's connector credentialRefs would be missing from the install answer. Measure it in the same harness; fix it here if it reproduces.

Cleanup the fix may take. applySideEffects still reads a top-level array i18n as extra translation bundles. i18n is TranslationConfigSchema (an object) in the spec, so the read never matches spec-valid metadata. It is a dead read.

Dedupe. Searches over open and closed issues: "composed datasources install-local", "connectPackageDatasources composed", "declaredDatasources packages", "credentialRefs composed". The only hit about this door is #34407, which covers translations and the global-unique gate, not datasources.

Activity

  1. added
    bug
    domain:server
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:server · p2 · theme: install/upgrade · 2026-11-16T17:48Z

    ⛔ Not a claim.

    A composed bundle's package-body datasources are never connected (connectPackageDatasources receives empty lists), so objects bound to a datasource shipped inside a module fail at runtime. This is the same family as #34407 (p2), and it bites only bundles that ship their own datasources: p2.

  3. added
    pm:queue
    priority:p2
    on Nov 16, 2026
  4. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    Claim: PM loop round 1 (area o2-D, repo:objectstack#2; built by an os-dev subagent in the area's container)
    Session: session_01ADHkmRXuRn93HphKp7kXEz
    Account: os-steve
    Branch: claude/issue-34431-composed-bundle-datasources
    Worktree: /home/user/objectstack-issue-34431
    Domain: domain:server
    Seat: repo:objectstack#2
    File surface: packages/cloud-connection/src/marketplace-install-local-plugin.ts (step 2a findHeldDatasourceName, step 4b′ declaredDatasources / connectDeclaredDatasources, the kernel:ready rehydrate, describeInstalledCredentialRefs if the composed read reproduces, the dead top-level i18n read in applySideEffects), one new card-named test file under packages/cloud-connection/src/ driving the real install route, .changeset/ (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default judgment tier, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: #34407 / PR #34428 (composed artifacts read through resolveStackCollection; the datasource reads were left at the top level)
    Thread-read: 6924381412
    Premise: holds (on origin/main 8dd8192 declaredDatasources(body) reads body.datasources only, the rehydrate reads manifest.objects only, while the same file already reads objects and translations through resolveStackCollection)
    Serial constraints cleared: PR #34573 (#34432, same file) merged before 03:16Z. No open PR touches packages/cloud-connection/src/marketplace-install-local* (49 open PRs' file lists read at 03:17Z).
    Pre-claim lane: domain:server (cloud-connection install door); no large-card trigger (S–M, no contract path: a composed bundle gains what a flat bundle already gets).
    Pre-claim deps: no Blocked-by: line; #34428 and #34573 merged.
    Prior rulings read: ADR-0062 D2 (which declared datasources auto-connect; unchanged here, the gate is applied to composed bodies the same way), ADR-0130 D4 (composed collections read through resolveStackCollection), ADR-0131 D10 named by the scan (not relevant); thread: #34407; repo: objectstack-ai/objectstack

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz
    os-dev-report

    {
      "issue": 34431,
      "status": "done",
      "branch": "claude/issue-34431-composed-bundle-datasources",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34633",
      "head": "1edc890930f3a50cb7331138404cbba4f8858426",
      "gates": "dispatch-gates --commands at 1edc89093: 71 derived, 71 run, all exit 0; --ran reconciliation: 71 derived, 71 run, 0 NOT-MEASURED, 0 UNRUN. check:dual-build-cjs-loads first exit 3 (no dist), re-run exit 0 after a whole-workspace build (lock VERDICT command-exit 0). Package: cloud-connection typecheck exit 0; vitest Test Files 89 passed (89), Tests 1303 passed (1303). CI check-runs: not awaited (in_progress at hand-back).",
      "line_budget": "n/a: no skills/** file and no ratcheted ledger touched",
      "deviations": [
        "Pins added as two top-level describes in the existing harness marketplace-install-local-composed-top-level-reads.test.ts, not the claim's 'one new card-named test file' (AGENTS.md shared-harness rule, ruling record 6583487846).",
        "check-prior-rulings.mjs --card 34431 ran after the code was written (the standard order gained that step mid-run); result: ADR-0062 D2 and ADR-0131 D10 top hits, both already read by the claim; premise measured red-first on base 8dd8192cb before the fix.",
        "The first ablation leg for the 2a refusal guard was a no-op (replacement contained its anchor; ablation-replace refused, x1 -> x1, nothing ran); re-run with a non-overlapping anchor, reading 3 failed | 18 passed.",
        "One directory listing of /mnt/project-files/objectstack-seat2/ before reading standard-order.md, against the order not to search that folder; nothing else was read there."
      ],
      "files_changed": [
        ".changeset/34431-composed-bundle-datasources.md +16/-0",
        "packages/cloud-connection/src/marketplace-install-local-composed-top-level-reads.test.ts +186/-0",
        "packages/cloud-connection/src/marketplace-install-local-plugin.ts +65/-15"
      ],
      "security_findings": "none"
    }
  7. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    PR #34633 at 1edc89093: L1 ACCEPT 6938611897, landing 6938640644 (ready, auto-merge armed). Clause-②: no (6938094978): a composed body's held datasource name now answers the flat bundle's 409. The step-2c″ ablation question is measured on main after the merge.

  8. removed
    pm:dispatched
    on Nov 17, 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

    bugdomain:serverpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions