Skip to content

refactor: share remote target registry - #37

Merged
wolfiesch merged 2 commits into
mainfrom
codex/remote-registry-boundary
Jul 18, 2026
Merged

refactor: share remote target registry#37
wolfiesch merged 2 commits into
mainfrom
codex/remote-registry-boundary

Conversation

@wolfiesch

Copy link
Copy Markdown
Collaborator

Summary

  • move remote target validation, versioned persistence, and credential handling into @t4-code/remote/registry
  • keep Electron persistence and encryption behind the existing desktop adapter boundary
  • add headless fixtures for Tailscale endpoints, malformed state, concurrent writes, rollback, and credential failure paths
  • reject persisted objects with unexpected prototypes

Verification

  • TMPDIR=/private/tmp mise exec node@24.17.0 -- pnpm check
  • TMPDIR=/private/tmp mise exec node@24.17.0 -- pnpm test

Copilot AI review requested due to automatic review settings July 18, 2026 06:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/remote/src/registry.ts
Comment thread packages/remote/src/registry.ts Outdated
@wolfiesch
wolfiesch force-pushed the codex/remote-registry-boundary branch from e669092 to 3ad0a99 Compare July 18, 2026 07:10
@wolfiesch
wolfiesch merged commit 3e1cc17 into main Jul 18, 2026
4 checks passed
@wolfiesch
wolfiesch deleted the codex/remote-registry-boundary branch July 18, 2026 07:16
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.

2 participants