fix(agents): add file_not_found correlation status for missing transcripts - #538
gokhanozdemir wants to merge 3 commits into
Conversation
1bb4605 to
2991cec
Compare
2991cec to
6a7b7f6
Compare
…ripts Interactive Claude sessions don't persist transcripts at the reported path for PTY-driven sessions. The correlation logic now checks if the transcript file actually exists on disk before marking it as 'matched'. If the file doesn't exist, correlation status is set to 'file_not_found' instead, preventing metrics processing failures and providing better error handling for interactive sessions where transcript persistence is expected to be absent. Fixes codemie-ai#523
6d94c0f to
1cf15ff
Compare
Adversarial reviewCritical regression:
Nothing anywhere ever rewrites Broken pre-existing test: Other issues:
Fix applied in a follow-up push: only mark |
…ted transcript An empty transcript_path is a deliberate "not known yet" signal from codemie-code, codex, copilot-cli, opencode, and pi at SessionStart, not a failure. The previous check treated it the same as a reported path that doesn't exist, permanently stranding those sessions at file_not_found and silently dropping their metrics/conversation sync. Also dedupes the existsSync/warn logic into one helper and updates the codemie-ai#523 skip guard in agent-model.test.ts to match the actual status this fix now produces. Generated with AI Co-Authored-By: codemie-ai <[email protected]>
|
Cherry-picked the Windows CI teardown fix from #537 ( That commit matches an existing established pattern already used in several test files in this codebase ( Not a hack — it's the codebase's already-established idiom for this class of flaky Windows teardown, applied here to the migration runner test that was failing on our Windows CI job. |
Summary
Interactive Claude sessions can fail to persist transcripts at their expected file paths. PTY-driven sessions weren't validated for file existence, so the correlation logic incorrectly marked non-existent files as "matched," producing empty session metrics. This adds a
file_not_foundcorrelation status so missing transcripts are handled gracefully instead.Fixes #523
Changes
file_not_foundstatus to the correlation type systemImpact
No user-facing behavior change for existing successful correlations; missing-transcript cases now report a clear status instead of silently producing empty metrics.
Checklist