Repository navigation
Description
TS already checks known homes, real writer locks, owner identity and changes before submission. It always requires an explicit selected home with one live writer. Python also supports implicit selection of the unique stable live writer, an explicit inactive-queue opt-in, and structured home-resolution/queue metadata. These are partial parity gaps, not missing writer protection.
Scope and completion criteria
-
Without --codex-home, select only a unique stable live writer across bounded known homes. An explicit conflicting home, unknown owner, unreadable inventory or multiple writers must still refuse.
-
Add --allow-inactive-codex-home only with an explicit home and verified all-inactive candidates; keep ordinary inactive sends refused and never start a session implicitly.
-
Expose sanitized codexHomeResolution and native queueId when available; diagnose an unsaved first-turn writer separately from a missing UUID.
-
Revalidate all candidate/owner evidence immediately before queueing. Dry-run, unknown submission outcomes and retryAllowed:false must retain their existing meaning.
-
Cover implicit/explicit/conflicting/duplicate/inactive/unsaved cases, queue ID parsing and evidence races with real lock fixtures. Do not write native Codex state or queue databases directly.
-
Keep default/environment/Orca/configured home-source semantics and diagnostic terminology consistent with feat(discovery): list all supported agents across known Codex homes #16 while retaining stricter send validation. Listing availability must not substitute for writer evidence.
Dependencies and priority
Dependencies: No hard dependency on #16. The existing writer.homes() / resolveWriter() already provide bounded home inventory and collision checks, so send resolution and combined listing can proceed in parallel. Coordinate the shared home-source and diagnostic models with #16.
Planning priority: P1 (P1 = foundational/common workflow; P2 = subsequent or optional capability). Milestone is a planning group, not a release or deployment approval.
Evidence
Compared Python 1.0.2 (47c2371) with TS 0.1.0 (0edc4f8), both main heads verified on 2026-09-27.
- session-peer/session_peer_core/codex.py
- session-peer/tests/codex/test_homes.py
- session-peer/tests/codex/test_dispatch.py
- session-peer-ts/src/send.ts
- session-peer-ts/src/writer.ts
Independent review follow-up — 2026-09-28 / PR #38
A bounded antigravity-cli review (gemini-3.1-pro-high) of #16 identified an existing list/send configuration-policy difference. Codex rechecked it against source; this is follow-up scope here, not a new regression introduced by the shared helper and not a demonstrated security vulnerability.
- Define and test the
SESSION_PEER_CODEX_HOMEStruth table for unset, empty string, whitespace,[], malformed JSON, relative/non-string/NUL paths and valid absolute/~/paths. feat(discovery): list all supported agents across known Codex homes #16 listing rejects a set empty string; the existing writer treats it as unset. Align the new feat(codex): expose safe implicit home selection and opt-in inactive queueing #17 send resolver with the documented configuration contract, or retain an explicitly reviewed compatibility exception with migration guidance. Do not change this silently while adding implicit resolution. - Explicitly classify missing
CODEX_HOMEversus optional default/Orca homes and configured homes for implicit and explicit sends. feat(discovery): list all supported agents across known Codex homes #16 listing requires named environment homes, while the prior TS writer inventories that source only when its DB exists. Verify the Python source behavior rather than assuming list and send policies are identical. - Preserve refusal on any unreadable/unresolved competing writer candidate (including EACCES and symlink failures), with
submitted:falseand zero queue calls. Successful rows from best-effort listing must never authorize sending through an incomplete inventory. Canonicalization errors are structured refusals, not a reason to skip a candidate. - Keep pinned listing's inventory bypass distinct from explicit send: selecting a home for send must still examine competing known homes. Cover both paths in regression tests alongside owner/lock revalidation.
Evidence at PR #38 head 3949cc125edb145a1117f79b144e8940cac54adf:
- Shared sources and partial listing
- Existing strict writer policy
- Policy regression tests
- Documented list/send distinctions
The existing 0.2.0 — Core usability / P1 milestone and priority remain appropriate. No duplicate issue is needed for this shared home-resolution work.
Activity
abruption commentedon Sep 28, 2026
Implemented in PR #39 (ready for review), head
ee564ae94a2340df071a4bdbb6265325e4390872.All scope items and the PR #38 independent-review follow-ups are covered: implicit/explicit selection, explicit inactive opt-in, unsaved diagnostics, optional sanitized result fields, whole-inventory pre-submit revalidation, configuration truth table and strict failure on unreadable competitors. PARITY.md documents the stricter missing named-home policy and migration from empty configuration values.
Local: 47 tests passed, 3 Windows-only skipped. Latest CI 36368527657: macOS/Linux and Windows x64 × Node 22/24, package smoke and release gate all passed. Bounded independent review (
gemini-3.1-pro-high) reported no actionable finding; Codex validated its conclusions and recorded the evidence in the PR. No duplicate follow-up issue is needed.Issue closes on PR merge. Milestone remains 0.2.0 — Core usability; this is source implementation, not npm publication or a live-recipient ACK claim.