Skip to content

Migrate connector delivery to canonical artifacts#106

Merged
tnunamak merged 8 commits into
mainfrom
feat/connector-distribution-consolidation
Apr 21, 2026
Merged

Migrate connector delivery to canonical artifacts#106
tnunamak merged 8 commits into
mainfrom
feat/connector-distribution-consolidation

Conversation

@tnunamak
Copy link
Copy Markdown
Member

Summary

  • move bundled connector resolution onto the shared lock/install contract from data-connectors
  • switch OTA installs to a versioned connectors store with an active manifest for atomic activation
  • remove runtime dependence on registry.json and rebuild platform metadata from bundled manifests

Validation

  • npm run connectors:check
  • npm run test -- src/lib/platform/registry.test.ts
  • cargo test connector_root_relative_to_company --manifest-path src-tauri/Cargo.toml

- scripts/ensure-connectors.js: call resolve-connectors.js directly
  instead of going through the fetch-connectors wrapper, and rename
  log strings from "fetch"/"registry" to "resolve"/"signed index" so
  they match the new distribution model.
- scripts/sync-connectors-dev.js: drop stale registry.json reference
  from the skip-list comment; replace with the current non-connector
  filenames we actually skip.
- docs/260310-adding-a-new-connector.md: point contributors at the
  signed connector index instead of registry.json.
- ecosystem/submit-data-app.md: replace the raw-main registry.json
  link with the signed connectors-latest connector-index.json and
  update the "find scopes" recipe accordingly.

fetch-connectors.js is intentionally kept as a thin wrapper around
resolve-connectors.js so existing postinstall and any external callers
keep working; it can be removed in a later cleanup wave.
Adds three targeted unit tests around the signed-distribution gate in
src-tauri/src/commands/updates.rs:

- verify_checksum_rejects_tampered_payload: flips one bit of a payload
  and asserts verify_checksum() no longer matches the recomputed
  sha256 — proves the artifact_sha256 gate actually rejects tampering.
- verify_checksum_rejects_mismatched_expected: asserts a deliberately
  wrong expected sha256 is rejected — proves the comparison is strict.
- verify_sigstore_bundle_rejects_malformed_bundle: passes junk bytes
  as the signature bundle and asserts verify_sigstore_bundle() errors
  out before reaching Sigstore verification — proves malformed input
  cannot silently bypass the signature path.

These are permanent regression checks for the signed index + signed
artifact contract on this branch. Full end-to-end Sigstore verification
against a real bundle is covered by runtime + manual QA; that requires
network access to the Sigstore TUF repo and is not a fit for unit
tests.
- ensure-connectors.js: "skip resolve" -> "skip resolution" and
  "Connector resolve completed" -> "Connector resolution completed"
  for grammar.
- fetch-connectors.js: mark the file as a legacy wrapper in a header
  comment and rename its error prefix accordingly so it is obvious
  the script exists only for backwards compatibility.
- README.md: update connectors section to say the data-connectors
  index is signed, mention `npm run connectors:check` for verifying
  the lockfile without mutating connectors/, and rewrite the runtime
  precedence paragraph to reflect the new order: active installs in
  ~/.dataconnect/connectors-store/ (via connectors-active.json) ->
  legacy ~/.dataconnect/connectors/ -> bundled connectors/.
- ecosystem/submit-data-app.md: rework the "where to get scopes"
  recipe so authors go to the repo manifest directly (which is where
  scope strings live) and list the published signed index as a
  secondary reference rather than the first stop.

No script or runtime changes in this commit.
@tnunamak tnunamak merged commit b474dc0 into main Apr 21, 2026
@tnunamak tnunamak deleted the feat/connector-distribution-consolidation branch April 21, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant