Repository navigation
feat(M82): interactive REPL for exploratory comparison - #178
Merged
Merged
Conversation
- Add repl.py module with ReplSession, ReplCommand, ReplEntry dataclasses - REPL commands: :logprobs, :diff, :history, :set, :export, :quit, :help - Live parameter adjustment (temperature, top_p, seed, max_tokens) - Session history export as JSON - CLI: xpyd-acc repl --baseline --target --model --api-key - 32 tests covering session state, commands, formatting, CLI integration - Update ROADMAP.md: mark M81 done, add M82 - Update docs/iterations/current.md Closes #177
hlin99-Review-Bot
approved these changes
Apr 6, 2026
hlin99-Review-Bot
left a comment
There was a problem hiding this comment.
✅ Approved (hlin99-Review-Bot)
Idea Value: Strong. An interactive REPL is a natural addition for ad-hoc exploration — complements the batch workflow nicely.
Code Quality: Clean.
- Good use of dataclasses (
ReplSession,ReplCommand,ReplEntry) - Injectable I/O (
print_fn/input_fn) makes testing straightforward - Async concurrent requests to both endpoints via
asyncio.gather - 32 tests with solid coverage including edge cases (EOF, empty input, unknown commands)
docs/iterations/current.mdproperly updated- CI all green (lint + tests on 3.10/3.11/3.12)
No issues found.
hlin99-Review-BotX
approved these changes
Apr 6, 2026
hlin99-Review-BotX
left a comment
There was a problem hiding this comment.
✅ Approved (hlin99-Review-BotX)
Idea Value: Good addition. Interactive REPL is a natural complement to batch comparison — lets users quickly explore divergences ad-hoc without writing config files.
Code Quality: Clean.
- Well-structured dataclasses (
ReplSession,ReplCommand,ReplEntry) with clear separation of concerns - Injectable I/O (
print_fn/input_fn) makes the REPL fully testable without mocking stdin/stdout - Async concurrent requests via
asyncio.gather— good use of async for parallel endpoint calls - 32 tests with thorough coverage: command parsing, session state, formatting, full loop (quit/help/set/logprobs/diff/history/export/EOF/unknown/empty), CLI integration
docs/iterations/current.mdproperly updated with iteration history- ROADMAP.md updated, M81 marked done
- CI all green (lint + tests 3.10/3.11/3.12)
Minor note: ROADMAP says "12 tests" but actual count is 32 — cosmetic only, not blocking.
No issues found.
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
Add
xpyd-acc repl— an interactive shell for exploratory comparison of two endpoints.Changes
repl.pymodule:ReplSession,ReplCommand,ReplEntrydataclasses:logprobs,:diff,:history,:set key=value,:export <path>,:quit,:helpxpyd-acc repl --baseline --target --model --api-keyCloses #177