Skip to content

fix(id): reject conflicting REPL peek mode flags (#3890) - #4501

Merged
dezren39 merged 1 commit into
mainfrom
queue/6234-3890-peek-flag-conflicts
Nov 3, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/6234-3890-peek-flag-conflicts

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Fixes #3890 (queue task 6234). Verification complete — see below.

Change

parse_peek_args (pkgs/id/src/repl/runner.rs) accepted --head-only with --tail-only and --chars with --words, then silently rendered only one member of each pair. The CLI declares both pairs conflicts_with (cli.rs); the REPL parser now rejects both pairs with a parse error before any search/fetch work, mirroring the existing --first/--last rejection shape and error-string style.

Regression tests: both conflicting pairs rejected with the exact messages; single-flag cases for each pair still accepted. No flag definitions or single-flag rendering semantics changed.

Verification status

PR #4477 merged 2026-11-02T17:52Z, clearing the references.rs compile blocker. This branch was rebased onto current main (4ee46c0) as f33808e and re-verified on the laptop by queue task 6234 (lane code-f, 2026-11-03): cargo test -p id --lib test_parse_peek_args — 18 passed, 0 failed, including the new test_parse_peek_args_rejects_head_only_tail_only_together and test_parse_peek_args_rejects_chars_words_together. cargo fmt --check diffs are pre-existing rustfmt-version drift proven identical on clean origin/main (including files this PR does not touch); this PR changes only pkgs/id/src/repl/runner.rs. Codex review on the identical pre-rebase diff: completed, no findings.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 17:51
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 49a5256b-8e00-4ef9-bcaa-37966f796a93
Commits

Reviewing files that changed from the base of the PR and between 436cb8d and f33808e.

Files selected for processing: 1
  • pkgs/id/src/repl/runner.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T01:50:35.501339Z f33808e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

parse_peek_args accepted --head-only with --tail-only and --chars with
--words, then silently rendered only one member of each pair. The CLI
declares both pairs conflicts_with (cli.rs); the REPL parser now rejects
both pairs with a parse error before any search/fetch work, mirroring
the existing --first/--last rejection shape. Regression tests pin both
conflicting pairs as errors and the single-flag cases as accepted.

Verification status: cargo test -p id --lib test_parse_peek_args cannot
complete on current main — the lib-test compile fails with only the two
references.rs errors (E0277 StoreId: Default, E0597 borrow) that PR
#4477 restores; no errors in repl/runner.rs. Rerun after #4477 merges
and this branch rebases (task 6234 park note).
@dezren39
dezren39 force-pushed the queue/6234-3890-peek-flag-conflicts branch from c2548d9 to f33808e Compare November 3, 2026 01:49
@dezren39
dezren39 merged commit c02e641 into main Nov 3, 2026
1 check passed
@dezren39
dezren39 deleted the queue/6234-3890-peek-flag-conflicts branch November 3, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant