Repository navigation
fix(lsp): accept the verify redirect first-useful-action now carries - #4758
Conversation
#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
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedNext included review available in 26 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
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. Comment |
…-dorywc # Conflicts: # CHANGELOG.md
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
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
…-dorywc # Conflicts: # CHANGELOG.md
EffortlessSteven
left a comment
There was a problem hiding this comment.
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_tokenandredirect_target_is_ripr_artifactinlsp/gap_artifacts.rs, plus two tests. - The semantic owner and its consumers.
command_payload_is_safeis used by gap-artifact validation (verify and receipt commands) and bylsp/actions.rswhen filtering copyable commands. Both now accept only one trailing root-anchored redirect undertarget/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'sredirectTargetMatches(#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 lspon 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
…-dorywc # Conflicts: # CHANGELOG.md
…-dorywc # Conflicts: # CHANGELOG.md
Requested by Steven · project thread
Before: in a workspace where the generated CI workflow (or
ripr reports first-action) has run,ripr lsprejectstarget/ripr/reports/first-useful-action.jsonasmalformed_command_payload. It drops the file and reportscache_limited, with the recovery "run ripr check to regenerate gap artifacts", which cannot help. The wave-3 release smoke found this: runripr 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 longercache_limited), and the MCP workspace-status projection can carry its verify command again.Two merged PRs interact here. #4306 made
commands.verifysave its output where the receipt reads it (... --json > <root>/target/ripr/workflow/agent-verify.json, anchored at the root by #3938).command_payload_is_safein the LSP refuses every>.How:
command_payload_is_safesplits off exactly one trailing> <target>and checks the body with the existing rules. The target must be a singleshell_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 outsidetarget/ripr/,./..segments, trailing tokens,$(...), and the'\''escape. This matches the root-anchored redirect check the VS Code client added in #4222.Proof:
command_payload_accepts_the_producers_anchored_verify_redirectbuilds the command with the producer's ownagent_verify_commandand pins 15 refused shapes. Without the fix it fails withrefused "ripr agent verify ... > /workspace/target/ripr/workflow/agent-verify.json".cargo test -p ripr --lib lsp: 737 passed.cargo xtask precommitpasses. The head merges current main, where feat(metrics): derive rust repair-trust route-yield from observations #4673 already restored the build that perf(typescript): index line lookups once per source #4635 and fix(typescript): extract tests declared inside loops and forEach callbacks #4593 had broken.🤖 Generated with Claude Code
https://claude.ai/code/session_01K1VFBpSNieHMxC6fdFSCEk