feat(qoder): add Qoder CLI harness - #79
Open
HappyWalkers wants to merge 1 commit into
Open
HappyWalkers wants to merge 1 commit into
HappyWalkers wants to merge 1 commit into
Conversation
Qoder CLI stores sessions in Claude Code's JSONL format, so the harness reuses the Claude Code codec and adds Qoder's own store: - the project directory name: every UTF-16 unit outside [A-Za-z0-9] becomes "-", and names over 200 characters are cut to 200 and suffixed with "-" and a hash of the full path - titles (custom-title wins over ai-title) and fork lineage (forkedFrom) - discovery that lists only files holding a session record - a delete that removes only the .jsonl, like `qodercli --delete-session` from_common writes the conversation lines, an ai-title line and a final active-leaf line. Resume was checked against qodercli 1.1.65 in both directions with Claude Code and Codex. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PsZXW7oFJkaFWqY6GmtQAG
This branch has not been deployed
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.
Issue: #78
What changed and why?
txcript can now read, list, and write Qoder CLI sessions. The harness id is
qoder.Before, a Qoder session was invisible to txcript, and there was no way to continue a Claude Code or Codex session in Qoder.
After:
Qoder stores sessions in Claude Code's format, so
src/harness/qoder.rsreuses the Claude Code codec (the way Campfire reuses pi) and adds what is Qoder's own:~/.qoder/projects/<project>/<session>.jsonl, or$QODER_CONFIG_DIR/projects. Discovery reads only the session files and never the<session>/side folders.[A-Za-z0-9]becomes-(counted in UTF-16 units, so an emoji is two dashes). Names over 200 characters are cut to 200, then-, then a hash of the full path. I worked the hash out from real folders and checked it against three of them.custom-titlewins overai-title.forkedFromon the copied lines gives the parent session as a fork.from_commonwrites the conversation lines like Claude Code does, plus anai-titleline and a finalactive-leafline. Qoder'sstate.jsonside files are not needed, so they are not written..jsonl, the same asqodercli --delete-session. It only touches a file at<root>/<project>/<session>.jsonl, and a symlink there is unlinked itself rather than followed.The China build (
qoderclicn,~/.qoder-cn) uses the same format but ignoresQODER_CONFIG_DIRitself. Point txcript at it withQODER_CONFIG_DIR=~/.qoder-cnand resume withTRANSCRIPT_QODER_RESUME_CMD='qoderclicn --resume {id}'.How I checked it
I used the real CLIs, with a codeword in each session and three or more tries per case, because one answer from a small model can be wrong by chance.
discoverandloadagree on every field, text round trip is exact.-D warnings: fmt, clippy (both configs),cargo test --workspace --all-features(482 tests), and the two wasm32 checks.cargo test -p txcript --no-default-featurespasses exceptstore_delete::antigravity_delete_roundtrip, which fails the same way onmain. I built with Rust 1.97.1 and did not run the MSRV (1.96) check.discoverlisted any.jsonlfile, even an empty one (it now needs a record with atypeand asessionId);deletefollowed a symlink to its target (it now unlinks the link itself); a session could end up as its own fork parent; and theactive-leaftimestamp could come from a later line than the leaf.Not covered: I did not open the Qoder TUI by hand; resume was exercised through
qodercli --resumein print mode. The 200-character cut-off was observed kept at 160 characters and cut at 239, 256, and 315, not at exactly 200 and 201. Fork lineage is read but not written, like the other harnesses.🤖 Generated with Claude Code
https://claude.ai/code/session_01PsZXW7oFJkaFWqY6GmtQAG