Skip to content

fix(lsp): accept the verify redirect first-useful-action now carries - #4758

Merged
EffortlessSteven merged 7 commits into
mainfrom
claude/project-thread-dorywc
Sep 29, 2026
Merged

EffortlessSteven merged 7 commits into
mainfrom
claude/project-thread-dorywc

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Before: in a workspace where the generated CI workflow (or ripr reports first-action) has run, ripr lsp rejects target/ripr/reports/first-useful-action.json as malformed_command_payload. It drops the file and reports cache_limited, with the recovery "run ripr check to regenerate gap artifacts", which cannot help. The wave-3 release smoke found this: run ripr init --ci github, run the workflow's shell steps on a sample Rust PR, then start the LSP in that checkout.

After: the artifact validates (gap_artifacts=2, no rejection, status no longer cache_limited), and the MCP workspace-status projection can carry its verify command again.

Two merged PRs interact here. #4306 made commands.verify save its output where the receipt reads it (... --json > <root>/target/ripr/workflow/agent-verify.json, anchored at the root by #3938). command_payload_is_safe in the LSP refuses every >.

How: command_payload_is_safe splits off exactly one trailing > <target> and checks the body with the existing rules. The target must be a single shell_arg-rendered token that names a file under <root>/target/ripr/. Still refused: append and stderr redirects, a second redirect, a target outside the root or outside target/ripr/, ./.. segments, trailing tokens, $(...), and the '\'' escape. This matches the root-anchored redirect check the VS Code client added in #4222.

Proof:

🤖 Generated with Claude Code

https://claude.ai/code/session_01K1VFBpSNieHMxC6fdFSCEk

#4306 persists agent verify output where the receipt reads it, so
first-useful-action commands.verify ends in a root-anchored
`> <root>/target/ripr/workflow/agent-verify.json` (#3938). The LSP gap
artifact validator refused every `>`, so each first-useful-action the
generated CI workflow or `ripr reports first-action` writes was dropped as
malformed_command_payload and the editor reported cache_limited with a
recovery (rerun ripr check) that cannot help.

command_payload_is_safe now splits off exactly one trailing `> <target>`
whose target is a single shell_arg token naming a file under
<root>/target/ripr/, then validates the body as before. Any other redirect
(append, stderr, second redirect, outside the root or target/ripr, `.`
or `..` segments, trailing tokens, escaped quotes) stays refused.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1VFBpSNieHMxC6fdFSCEk
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven EffortlessSteven self-assigned this Sep 29, 2026
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 26 minutes.

Check out review usage here.

View limit details

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

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: e1e47098-4b13-4dad-9213-7d5c38fb2140

📥 Commits

Reviewing files that changed from the base of the PR and between df1b435 and 5a9c911.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • crates/ripr/src/lsp/gap_artifacts.rs

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

Comment @coderabbitai help to get the list of available commands.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review September 29, 2026 04:07
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 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-09-29T04:10:25.837768Z cb44504 Draft marked ready
ℹ️ 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: cb445047d7

ℹ️ 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 crates/ripr/src/lsp/gap_artifacts.rs Resolved

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

Devin Review

Comment thread crates/ripr/src/lsp/gap_artifacts.rs Resolved
Comment thread crates/ripr/src/lsp/gap_artifacts.rs Resolved
smoke and others added 3 commits September 29, 2026 04:13
PowerShell closes a single-quoted span on U+2018-U+201F, so a quoted target
such as 'target/ripr/a<U+2019> ; Write-Output injected #.json' exposed a
command. Refuse those characters, as substitution_is_quoted and the VS Code
client already do (Codex review on #4758).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1VFBpSNieHMxC6fdFSCEk
…ify redirect

Pins the loader path, not only command_payload_is_safe: the artifact with
the exact agent_verify_command #4306 renders validates, and a redirect
outside the root is still rejected as malformed_command_payload (Devin
review on #4758).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1VFBpSNieHMxC6fdFSCEk

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Exact-head self-review of f4aac64. The code is identical to 382dfaf; this head only merges main, with a CHANGELOG conflict that keeps both entries.

What I inspected:

  • The full diff: strip_workspace_redirect, shell_arg_token and redirect_target_is_ripr_artifact in lsp/gap_artifacts.rs, plus two tests.
  • The semantic owner and its consumers. command_payload_is_safe is used by gap-artifact validation (verify and receipt commands) and by lsp/actions.rs when filtering copyable commands. Both now accept only one trailing root-anchored redirect under target/ripr/, and the body is still checked for every metacharacter, including a second >.
  • The producer this has to match: loop_commands::agent_verify_command + anchored_redirect_target + shell_arg (bare charset, or single-quoted). Parity with the VS Code client's redirectTargetMatches (#4222).
  • Adversarial shapes: append, stderr, a second redirect, outside the root, outside target/ripr, ./.., trailing tokens, ;, $(...), '\'', and PowerShell typographic quotes (the Codex/Devin finding, fixed in 51bc33d). Removing the guard makes each new test fail.
  • The loader path: first_useful_action_with_the_producers_verify_redirect_validates.
  • End to end, ripr lsp on a checkout where the generated CI workflow ran no longer rejects the artifact.
  • CI on 382dfaf (same code): Rust gates, Rust-only feature lane, ub-review, cargo-deny and dependency-review all passed.

Missing reviews: CodeRabbit is rate-limited, Gemini is out of quota, and droid was skipped. None of these count as a clean review. Codex and Devin both reviewed, and all of their findings are addressed and resolved.

No findings remain.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven enabled auto-merge (squash) September 29, 2026 05:39
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