[codex] Repair session parser drift from format audit#90
Open
bbingz wants to merge 3 commits into
Open
Conversation
… references Sequester the session-saving mechanism of the two primary sources so we never re-investigate per task. Produced by a 16-agent research workflow (5 parallel dimension researchers per tool -> synthesize -> adversarial completeness critic -> patch), every claim cross-checked against the REAL on-disk store AND both Engram adapters (on-disk reality wins on conflict). - docs/session-formats/claude-code.md (1529 lines): three-layer type model (top-level record .type vs nested content-block .type vs attachment/system subtypes); cwd->dir encoding is lossy (decodeCwd never trusted; real cwd from the cwd field); modern compaction = system/compact_boundary + isCompactSummary (no top-level summary record); dispatch tool renamed Task->Agent; subagent parent linkage is PATH-based (<parent>/subagents/<child>.jsonl), not isSidechain; full Engram-mapping table with TS+Swift file:line per row; 16 anonymized line samples. - docs/session-formats/codex.md (1547 lines): dual-layer architecture - rollout JSONL (authoritative for content) + SQLite (authoritative for state/index/ relationships). state_5.sqlite documented column-by-column (threads = rollout index joined by id; thread_spawn_edges = native subagent graph; memories_1/ goals_1/logs_2); dispatch detection via session_meta.originator=="Claude Code". Docs-only; no code or runtime touched. Verified live: state_5 threads schema column-for-column, 2510 threads / 1561 spawn_edges / migration 39; spot-checked Claude Engram-mapping file:line citations. Open items flagged in each doc's gotchas section. CHANGELOG.md updated for cross-AI handoff.
…eb-confirmation Complete the docs/session-formats/ reference set: every Engram source adapter now has an English authoritative doc + a Simplified-Chinese reading copy, with an official web-confirmation layer folded in. 34 files (17 EN + 17 ZH), ~28.2k lines. - Tools: claude-code, codex, gemini-cli, qwen, iflow, kimi, opencode, qoder, commandcode, cline, cursor, vscode, copilot, windsurf, antigravity + the two Claude-Code-derived overlays minimax, lobsterai. - Grounding: each doc cross-checked against the real on-disk store (or repo tests/fixtures) AND the Engram Swift+TS adapters; on-disk reality wins. - Web-confirmation: open questions checked against official sources, preferring open-source repo SOURCE CODE (openai/codex, google-gemini/gemini-cli, QwenLM/qwen-code, sst/opencode, cline/cline, MoonshotAI kimi-cli, microsoft/vscode) > docs > community. Findings folded in as "Confirmed (official):" with inline [source] links + a "## References (official sources)" section per doc; refuted body claims fixed (Codex 8 corrections + 1 refutation, Gemini CLI 7/3, Qwen 4, iFlow 3, Kimi 3). - EN authoritative (AI read/write); ZH is a 1:1 structural mirror (identifiers/ code/JSON/SQL/paths/file:line kept English). Every EN/ZH pair verified for heading + fenced-code-block parity. - Known gap: vscode web-confirmation blocked by an automated content-safety filter (false positive on benign editor-session-storage docs); documented honestly in-doc, no sources fabricated. CHANGELOG.md updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.project_root,.jsonlchat logs, sidecar filtering, and SHA-256 project dirs.memoryandCHANGELOG.mdValidation
npx vitest run tests/adapters/cline.test.ts tests/adapters/commandcode.test.ts tests/adapters/gemini-cli.test.ts tests/adapters/kimi.test.ts tests/adapters/qwen.test.ts tests/adapters/vscode.test.ts tests/core/project-move/gemini-projects-json.test.ts tests/core/project-move/orchestrator.integration.test.ts tests/core/project-move/sources.test.ts tests/core/resume-coordinator.test.ts tests/web/server.test.tsnpm run typecheck:testnpm run lint(exit 0; existing warning remains intests/scripts/screenshot-compare.test.ts:136)npm run buildnpm run check:adapter-parity-fixturesnpm run check:fixturesgit diff --checkxcodebuild test -project Engram.xcodeproj -scheme EngramCoreTests -destination 'platform=macOS'\n\n## Notes\n- Resume command shape remains unchanged; the fix is that current Gemini CLI logs are indexed and therefore discoverable by the existing DB-backed resume flow.\n- Several documented source-format gaps remain intentional product/backlog items rather than parser regressions fixed here.