Skip to content

feat(M82): interactive REPL for exploratory comparison - #178

Merged
hlin99 merged 1 commit into
mainfrom
feat/m82-interactive-repl
Apr 6, 2026
Merged

hlin99 merged 1 commit into
mainfrom
feat/m82-interactive-repl

Conversation

@hlin99

@hlin99 hlin99 commented Apr 6, 2026

Copy link
Copy Markdown
Member

Summary

Add xpyd-acc repl — an interactive shell for exploratory comparison of two endpoints.

Changes

  • repl.py module: ReplSession, ReplCommand, ReplEntry dataclasses
  • REPL commands: :logprobs, :diff, :history, :set key=value, :export <path>, :quit, :help
  • Live parameter adjustment (temperature, top_p, seed, max_tokens)
  • Session history JSON export
  • CLI: xpyd-acc repl --baseline --target --model --api-key
  • 32 tests covering session state, commands, formatting, CLI integration
  • ROADMAP.md: M81 ✅, M82 added
  • docs/iterations/current.md updated

Closes #177

- 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 hlin99-Review-Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.md properly updated
  • CI all green (lint + tests on 3.10/3.11/3.12)

No issues found.

@hlin99-Review-BotX hlin99-Review-BotX left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.md properly 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.

@hlin99
hlin99 merged commit 8e04e8f into main Apr 6, 2026
5 checks passed
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.

feat(M82): Interactive REPL for Exploratory Comparison

3 participants