Skip to content

fix(headless): address review feedback on history persistence#135

Merged
eitsupi merged 2 commits intomainfrom
fix/pr134-review-feedback
Mar 29, 2026
Merged

fix(headless): address review feedback on history persistence#135
eitsupi merged 2 commits intomainfrom
fix/pr134-review-feedback

Conversation

@eitsupi
Copy link
Copy Markdown
Owner

@eitsupi eitsupi commented Mar 29, 2026

Summary

  • Warn when set_headless_history is called more than once instead of silently ignoring the duplicate
  • Skip whitespace-only commands in headless history (Evaluate and UserInput paths) to match REPL behavior
  • Fix doc comment in test that incorrectly mentioned start_timestamp verification

Addresses review feedback from Copilot on PR #134.

Test plan

  • cargo fmt --check passes
  • cargo clippy --workspace passes
  • cargo test -p arf-console (requires R runtime)

🤖 Generated with Claude Code

eitsupi and others added 2 commits March 29, 2026 08:14
- Warn when set_headless_history is called more than once instead of
  silently ignoring the duplicate
- Skip whitespace-only commands in headless history (Evaluate and
  UserInput paths) to match REPL behavior
- Fix doc comment in test that incorrectly mentioned start_timestamp
  verification

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Verify that whitespace-only strings sent via evaluate and user_input
are not persisted to the history database.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refines headless-mode history persistence behavior to better match the REPL and addresses prior review feedback related to history recording and test documentation.

Changes:

  • Emit a warning (instead of silently ignoring) when set_headless_history is called more than once.
  • Skip persisting whitespace-only commands to headless history for both IPC evaluate and user_input paths.
  • Update the headless history persistence test to remove an incorrect mention of start_timestamp verification and add assertions for whitespace-only command skipping.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
crates/arf-console/tests/headless_tests.rs Updates test documentation and adds coverage ensuring whitespace-only commands are not persisted.
crates/arf-console/src/ipc/mod.rs Warns on duplicate headless history initialization and filters whitespace-only commands before saving history.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@eitsupi eitsupi merged commit 2950aaa into main Mar 29, 2026
14 checks passed
@eitsupi eitsupi deleted the fix/pr134-review-feedback branch March 29, 2026 08:20
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.

2 participants