Skip to content

fix: bind imported Codex sessions to matching machine#886

Open
dzshzx wants to merge 1 commit into
tiann:mainfrom
dzshzx:fix-codex-import-machine-id
Open

fix: bind imported Codex sessions to matching machine#886
dzshzx wants to merge 1 commit into
tiann:mainfrom
dzshzx:fix-codex-import-machine-id

Conversation

@dzshzx

@dzshzx dzshzx commented Jun 13, 2026

Copy link
Copy Markdown

Summary

  • bind imported Codex transcripts to a HAPI machine when their cwd is covered by exactly one online machine workspace root
  • preserve existing imported session machineId values and leave ambiguous/no-match imports unbound
  • add Codex direct-import regression tests for unique, ambiguous, missing, and existing machine bindings

Why

Direct Codex transcript import currently records host, os, and path, but not machineId. The web sidebar groups sessions by metadata.machineId, so imports from a connected runner can appear under the unknown machine group even when their cwd belongs to a known workspace root.

This keeps the inference conservative: only one matching online machine gets bound; ambiguous matches still stay unbound.

Tests

  • npx --yes bun@1.3.14 test hub/src/web/routes/codexDesktop.test.ts
  • npx --yes bun@1.3.14 run --cwd hub typecheck
  • npx --yes bun@1.3.14 run --cwd hub test

@github-actions github-actions Bot 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.

Findings

  • No issues found.

Summary

  • Review mode: initial
  • Reviewed the full PR diff for Codex desktop direct import machine binding. No blocker/major/minor issues found in the added path matching, unique-online-machine selection, existing metadata preservation, or regression test coverage.
  • Residual risk: I did not run the full test suite in this automation pass; relying on the PR-reported hub/Codex import tests plus static review.

Testing

  • Not run (automation)

HAPI Bot

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