Skip to content

fix(hub): keep local sidecar state under the hub data dir - #207

Merged
etodanik merged 1 commit into
mainfrom
danny/vendor-data-folder-fix
Nov 6, 2026
Merged

etodanik merged 1 commit into
mainfrom
danny/vendor-data-folder-fix

Conversation

@etodanik

@etodanik etodanik commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

Local sidecar state was being written to vendor/interchange/data/ instead of data/hub/local-sidecars/. It showed up as an untracked folder of about 38 MB, including signing and sender keys.

The cause: the sidecar data root came from HUB_DATA_DIR ?? "data/hub", which is relative. The hub resolves it from the repo root, but spawn.ts starts the sidecar with cwd: vendor/interchange, so the same path pointed somewhere else for the sidecar.

  • apps/hub/src/sidecar/data-root.ts: resolve the sidecar data root to an absolute path.
  • apps/hub/src/sidecar/local-provisioner.ts: on restore, use the provisioner's own dataDir instead of the one saved in sidecar.json, and rewrite the manifest when they differ. Without this, a manifest written by the old code keeps pointing the sidecar at vendor/interchange/data after a restart.

For reviewers: if a hub restored a sidecar whose state was under vendor/interchange/data, that sidecar's run state stays there and isn't moved. Delete the stray folder after upgrading.

How it was verified

  • bun check --no-script: no type errors
  • oxlint --deny-warnings apps/hub/src/sidecar: clean
  • bun --conditions=intx-src test apps/hub/src/sidecar apps/hub/src/provisioning: 2 pass
  • No unit test covers the restore path. Not yet checked against a live hub: start one with an old relative dataDir in sidecar.json, run a workflow, and confirm state lands under data/hub/local-sidecars/sidecar/ and vendor/interchange/data doesn't come back.

@corbits-triage

corbits-triage Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Merged before Triage finished on 8d67d9e.

The sidecar data root was relative to the hub's working directory, but
sidecars run from vendor/interchange, so their state landed in
vendor/interchange/data. Resolve the root to an absolute path, and on
restore replace a stale relative dataDir in a saved manifest.
@etodanik
etodanik force-pushed the danny/vendor-data-folder-fix branch from 4ddeae7 to 8d67d9e Compare November 6, 2026 11:40
@etodanik
etodanik merged commit 26defcb into main Nov 6, 2026
9 checks passed
@etodanik
etodanik deleted the danny/vendor-data-folder-fix branch November 6, 2026 11:47
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