fix(codex): restore Desktop discovery and lifecycle tracking#280
fix(codex): restore Desktop discovery and lifecycle tracking#280hyiiiii wants to merge 1 commit into
Conversation
|
Heads-up: #267 is now merged (ed6f1bb), since it was ready first and covered the core 'Desktop sessions show live status' value. This PR's additional scope is still very much wanted — the |
29c7fb3 to
e63ef06
Compare
|
The requested rebase and follow-ups are now complete:
The release builds for both The PR is ready for the full review pass. |
Summary
mainafter fix: support Codex Desktop hosted by ChatGPT #267 and keep its canonicalturnStatus/hasActivityJSONL parsing, Cursor question handling, and CodeIsland's resource usage became significantly higher. #278 tail-offset fix.com.openai.codexbundle identifier, including the renamedChatGPT.app.codexapp:<thread-id>identity while leaving Codex CLI on the raw provider ID.~/.codex/state_5.sqliteas a best-effort enhancement when the shared app-server reports/as its CWD.Relationship to #267
#267 is the foundation for this change and remains authoritative wherever the two branches overlapped. This PR retains #267's event parsing and layers only the additional recovery and lifecycle behavior on top.
The SQLite reader is never the only discovery path: missing, locked, corrupt, incompatible, or future-schema databases fail closed to rollout/app-server discovery. Reads are
READONLY | NOMUTEX, schema-inspected, batched, and tolerate bothupdated_atandupdated_at_ms.Reliability details
thread/closedrecords a generation tombstone: late idle DB flushes and terminal hooks cannot revive the card; a realthread/started,SessionStart,UserPromptSubmit, or newer processing observation can start a new generation.Verification
mainat9e3a1eb(includes fix: support Codex Desktop hosted by ChatGPT #267, CodeIsland's resource usage became significantly higher. #278, and v1.0.31).swift build -c release --product CodeIsland.swift build -c release --product codeisland-bridge.git diff --check origin/main..HEAD.JSONLTailerharness, repeated five times: attachment-token propagation, same-ID generation isolation, replacement reattach, and detach cancellation.swift test --filter 'AppStateCodex|JSONLTailerTests'— this machine only has CommandLineTools; the test target cannot importXCTest(and debug previews also lackPreviewsMacros). CI or a full Xcode installation is required to execute the XCTest suite.The release build emits the pre-existing Swift 6 warning for the captured
cachevariable inAppState.refreshClaudeUsageIfStale(); this PR does not introduce that warning.