Skip to content

[codex] Repair session parser drift from format audit#90

Open
bbingz wants to merge 3 commits into
mainfrom
docs/session-formats-claude-codex
Open

[codex] Repair session parser drift from format audit#90
bbingz wants to merge 3 commits into
mainfrom
docs/session-formats-claude-codex

Conversation

@bbingz

@bbingz bbingz commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • complete the VS Code official-source confirmation for the 17-source session-format docs
  • repair confirmed Swift/TS parser drift for Gemini CLI, VS Code, Kimi, Qwen, CommandCode, Cline, and Copilot
  • fix Gemini project-move/resume visibility around .project_root, .jsonl chat logs, sidecar filtering, and SHA-256 project dirs
  • record the closeout in .memory and CHANGELOG.md

Validation

  • 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.ts
  • npm run typecheck:test
  • npm run lint (exit 0; existing warning remains in tests/scripts/screenshot-compare.test.ts:136)
  • npm run build
  • npm run check:adapter-parity-fixtures
  • npm run check:fixtures
  • session-format docs structural parity check: 34 files, 17 bases, heading/fence/code-block parity, official references headings
  • git diff --check
  • xcodebuild 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.

bbingz added 3 commits June 21, 2026 17:50
… 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.
@bbingz bbingz marked this pull request as ready for review June 22, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant