Skip to content

fix(id): reject malformed REPL flags - #3092

Merged
dezren39 merged 3 commits into
mainfrom
queue/4318-2274-repl-flags
Nov 2, 2026
Merged

dezren39 merged 3 commits into
mainfrom
queue/4318-2274-repl-flags

Conversation

@dezren39

@dezren39 dezren39 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

 find/search/show/peek arguments
-  silently drop unknown or incomplete flags
+  reject malformed arguments before searching
+  validate output paths, formats and peek line counts

Closes #2274.

Evidence

  • Before: mistyped --fist 2 silently became an extra query; bare > yielded an empty path.
  • After: cargo test --no-default-features --lib repl::runner::tests passed 25 tests, including malformed-argument regressions. git diff --check passed. Workspace-wide cargo fmt --check reports existing formatting differences in unrelated files; the changed file was formatted.

Merge Danger

Door: Two-way

Blast Radius: REPL

@dezren39
dezren39 requested a review from a team as a code owner October 31, 2026 14:27
@coderabbitai

coderabbitai Bot commented Oct 31, 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 41 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: 0170b6eb-a3be-4095-a260-502a6bde45d3
Commits

Reviewing files that changed from the base of the PR and between 3af111d and 763816a.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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-02T10:27:25.766014Z 763816a 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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 06fc15565d

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pkgs/id/src/repl/runner.rs Resolved
@dezren39

dezren39 commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

Merge pass 2026-11-01: parking this PR. A trial merge of main into the branch gives 7 conflict hunks in pkgs/id/src/repl/runner.rs and they are semantic: the branch hard-errors on missing flag values via a new required_value helper, while main now soft-records a --format error (format_error) at the same call sites. Which semantics win is the REPL owner's call, not a merge-resolution guess. The trial merge was aborted and the branch is untouched. Resolution task: #3821

@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · picked up

@dezren39 dezren39 added work/assigned Queue worker lifecycle state queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state and removed queue/queued Has a queued task in the Supabase agent queue labels Nov 2, 2026
@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · parked

@dezren39 dezren39 added queue/parked Queue task is parked (waiting on CI, time, or an event) status/parked Deliberately paused with a recorded resume condition and removed status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state labels Nov 2, 2026
@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1
event: triaged
task: 6070 (repo-health-code-pilot, lane E worker shift)
state: triage complete — routed to follow-up task 6151 (pr_shepherd).
findings (fresh, 2026-11-02):

  • The malformed-flag rejection is ABSENT on current main fa28f49: pkgs/id/src/repl/runner.rs parse_find_args (:654) / parse_peek_args (:1244) have no 'unknown flag' bail and no required_value helper; unknown flags still fall through to query handling. Merged PR fix(id/repl): reject nonnumeric result limits #4072 was narrower (nonnumeric limits only).
  • This PR is fleet work, NOT a Drew-owned hard stop: branch queue/4318-2274-repl-flags is task 4318's queue branch, and no held / user/owned / do-not-merge / do-not-auto-edit labels are present. The earlier hard-stop park rested on dezren39 authorship/assignment — the shared fleet account (documented false positive).
  • Ownerless state named: this PR carried queue labels with no live queue task after task 4318 ended; that is the gap the fleet monitor flagged.
  • One undispositioned Codex P2 rides along (thread 4432040016): hyphen-prefixed exclusion values (--exclude -draft) are rejected as missing — task 6151 dispositions it (fix + regression test, or reasoned reply), re-verifies, and merges this PR so id(repl): find/search/show/peek parsers silently swallow unknown and mistyped flags — a typo'd flag vanishes and its value becomes a query #2274 closes. No competing PR will be opened.

@dezren39 dezren39 added queue/queued Has a queued task in the Supabase agent queue and removed status/parked Deliberately paused with a recorded resume condition queue/parked Queue task is parked (waiting on CI, time, or an event) work/assigned Queue worker lifecycle state labels Nov 2, 2026
@dezren39
dezren39 force-pushed the queue/4318-2274-repl-flags branch from 06fc155 to 4358a32 Compare November 2, 2026 10:24
@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

Shepherd pass (task 6012): PR #4072 merged first (c8a2191, #2009 closed). This PR rebased onto current main: 06fc155 -> 3f5f52a + fmt fix 4358a32 (worktree ~/git/fleet/6012 on the laptop). Conflict resolution in runner.rs: kept main's newer designs where they superseded this branch (format_error deferred reporting from 3488a51; validate_result_limits and bare --first/--last/--lines defaults from #4072; peek >file redirect from #4161), took this branch's required_value missing-value errors for -o/--output/--dir/--exclude/--format and the bare-> redirect error in peek, and adapted two superseded test expectations (invalid --format now asserts format_error; bare --lines asserts the default) with comments naming the superseding change. Remaining before merge: cargo test repl::runner suite on the rebased head + a clean Codex round — both gated on laptop load (96+ at push time; cargo verification is fleet-gated at this load). Parked 1h.

required_value rejected any hyphen-prefixed token as a missing value,
but exclusion patterns are data and may start with a hyphen (Codex P2
on PR #3092: --exclude -draft). --exclude in both parsers now uses
required_pattern, which accepts any non-empty next token; the other
value flags keep the strict check. Regression assertions added for
find and peek.
@dezren39
dezren39 merged commit 72774b5 into main Nov 2, 2026
1 check passed
@dezren39
dezren39 deleted the queue/4318-2274-repl-flags branch November 2, 2026 14:08
@dezren39 dezren39 removed the queue/queued Has a queued task in the Supabase agent queue label Nov 2, 2026
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.

id(repl): find/search/show/peek parsers silently swallow unknown and mistyped flags — a typo'd flag vanishes and its value becomes a query

1 participant