feat(coding-agent): import Codex sessions (redo of #3714) - #3731
feat(coding-agent): import Codex sessions (redo of #3714)#3731Yeachan-Heo wants to merge 1 commit into
Conversation
Restores #3714 and #3717, reverted from dev in e657a1cf7 so that 0.12.8 could ship without a feature that hard-fails on macOS and Windows. This branch is intentionally identical to the reverted work. It exists to keep the implementation reviewable while the two blockers are resolved; it is not ready to merge as-is. Blocking before this can land: 1. Non-Linux hard failure. service.ts:1061 passes `retainSourceAuthority = true` unconditionally and codex.ts:481 throws on any non-Linux platform, so every macOS/Windows run returns `source_untrusted / discovery`. Either add a non-authority fallback path or gate the command's availability so it is not offered where it cannot run. 2. The nlink guard rejects real Codex data. readSessionMeta drops any source with `nlink !== 1`. All 2089 rollout files in a real Codex home report nlink=2, while a file freshly created in the same directory reports nlink=1, so discovery returns 0 sessions. Needs a Linux measurement to confirm whether the guard makes the feature inert on the supported platform too, then a decision on relaxing it without weakening the trusted-source model. 3. Test suite is not platform-guarded. session-import-codex.test.ts fails 15 of 34 on macOS. Needs skipIf so contributors keep a green baseline. Co-authored-by: vntrevx <20063774+vntrevx@users.noreply.github.com>
|
SIGNED VERDICT — REQUEST_CHANGES Exact review snapshot:
Blocking findings
Admission boundaryThis PR is a Codex-only prototype over local Required repairResolve the source-format/authority and platform contract first; fail closed on every scan/recovery error; enforce streaming output/discovery/batch bounds; close the redaction gaps; consume ACP-disabled invocations explicitly; guard and strengthen the platform/security fixtures; then rebuild the proposal on current Contributor ledger
Verdict is valid only for head Signed-off-by: Yeachan-Heo owner@github |
Restores #3714 and #3717, which #3730 reverts out of the 0.12.8 release.
The diff here is byte-identical to the reverted work. This branch exists so the implementation stays reviewable while the blockers are resolved, and so the revert does not read as abandoning the feature.
What has to be fixed before this can land
1. Non-Linux hard failure
service.ts:1061passesretainSourceAuthority = trueunconditionally;codex.ts:481throws on any non-Linux platform. Every macOS/Windows invocation returnssource_untrusted / discovery.Options:
2. The
nlinkguard rejects real Codex datareadSessionMetadrops any source withnlink !== 1. Measured on a real Codex home:Discovery returns 0 sessions. The guard's intent is right —
nlink == 1proves no second name exists for a TOCTOU swap, andO_NOFOLLOWcannot catch hard links — but it does not match how Codex actually writes rollout files.Needs first: the same measurement on Linux. If Linux Codex also writes
nlink=2, the feature is inert on its only supported platform and the guard has to change. If Linux isnlink=1, this collapses into blocker 1.Then a decision on relaxing the guard without weakening the trusted-source model — e.g. proving identity through the retained descriptor across the read instead of requiring a single link up front.
3. Suite is not platform-guarded
session-import-codex.test.tsfails 15 of 34 on macOS. NeedsskipIf(or a shared platform guard) so contributors keep a green baseline while the feature stays Linux-only.Notes for review
docs/session-operations-export-share-fork-resume.md:39-40already documents both the single-link and Linux-only constraints; whatever is decided above should keep those in sync.