Repository navigation
fix(hub): keep local sidecar state under the hub data dir - #207
Merged
Merged
Conversation
|
Merged before Triage finished on |
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
force-pushed
the
danny/vendor-data-folder-fix
branch
from
November 6, 2026 11:40
4ddeae7 to
8d67d9e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Local sidecar state was being written to
vendor/interchange/data/instead ofdata/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, butspawn.tsstarts the sidecar withcwd: 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 owndataDirinstead of the one saved insidecar.json, and rewrite the manifest when they differ. Without this, a manifest written by the old code keeps pointing the sidecar atvendor/interchange/dataafter 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 errorsoxlint --deny-warnings apps/hub/src/sidecar: cleanbun --conditions=intx-src test apps/hub/src/sidecar apps/hub/src/provisioning: 2 passdataDirinsidecar.json, run a workflow, and confirm state lands underdata/hub/local-sidecars/sidecar/andvendor/interchange/datadoesn't come back.