refactor: share remote target registry - #37
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors remote-target validation, persistence schema handling, and credential encryption into a shared @t4-code/remote/registry module, while keeping Electron-specific persistence/encryption behind the desktop adapter boundary.
Changes:
- Introduces a Node-compatible remote target registry + device credential store in
packages/remote/src/registry.ts. - Adds dedicated headless fixtures and tests covering malformed state, prototype poisoning, concurrent writes, rollback, and credential failure modes.
- Updates package exports and switches the desktop runtime registry module to re-export the shared implementation; trims desktop tests to focus on diagnostics redaction.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/remote/src/registry.ts | New shared registry/credential-store implementation with validation, schema decoding, and write serialization. |
| packages/remote/test/registry.test.ts | Adds unit tests for registry + credential store behaviors (malformed state, rollback, concurrency, sync-only providers). |
| packages/remote/test/fixtures/registry.ts | Adds valid/invalid fixtures for remote targets and persisted registry/credential state. |
| packages/remote/package.json | Exposes the new ./registry entrypoint. |
| apps/desktop/src/remote-runtime/registry.ts | Re-exports registry symbols from @t4-code/remote/registry to keep the desktop boundary intact. |
| apps/desktop/test/remote-runtime.test.ts | Removes registry/credential tests from desktop; keeps only diagnostics redaction coverage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wolfiesch
force-pushed
the
codex/remote-registry-boundary
branch
from
July 18, 2026 07:10
e669092 to
3ad0a99
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.
Summary
@t4-code/remote/registryVerification
TMPDIR=/private/tmp mise exec node@24.17.0 -- pnpm checkTMPDIR=/private/tmp mise exec node@24.17.0 -- pnpm test