Repository navigation
fix(lsp): collect* missing/malformed first args are InvalidParams - #4867
Conversation
Pin workspace/executeCommand ripr.collectContext and ripr.collectEvidenceContext so a missing or non-object first argument returns JSON-RPC -32602 naming the accepted object shape, never silent result:null. Revisit the context_arguments None pins as parse-miss vs protocol error, and add a real-stdio wire test. Closes #4358 Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 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 |
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. |
Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
EffortlessSteven
left a comment
There was a problem hiding this comment.
review-pr (published-head, author COMMENT)
GitHub cannot REQUEST_CHANGES from the author. This is not approval.
reviewed_head_sha: 2120daaee27cb0f4677ffd004ad9ca4059f8bc06
integration_basis: origin/main 3911480a34c6ce2224932f8494576636c73e1732 (behind-only vs recorded f966e8c8a; no restack)
claim_boundary: collectContext / collectEvidenceContext missing or malformed first argument → JSON-RPC InvalidParams (-32602) naming the accepted object shape, not silent result:null. Closes #4358 only.
changed_surfaces_and_semantic_owners_inspected: lsp/backend.rs context_arguments + context_command_target + execute_command_inner; lsp/tests.rs; lsp_lifecycle.rs wire envelope; RIPR-SPEC-0129 traceability
blocking_findings: none
non_blocking_suggestions: collectEvidenceContext null first-arg is wire-covered, not in the helper pin
refuted_or_stale_findings: Gemini quota (missing review, not clean and not a stop); CodeRabbit skipped (OSS stars); Devin/Codex on 9f493e3 with no findings, head later only owned the command-name borrow for the wire test
proof_and_ci_observed:
- mergeStateStatus CLEAN, mergeable MERGEABLE, zero review threads
- Ripr Rust Small Result success; Ripr Rust Small on GitHub Hosted / Rust gates success
- Rust-only feature lane, source-of-truth, spec-maintenance-digest, cargo-deny, dependency-review success
- skipped-by-policy: rust-tests-junit, vscode, rust-coverage, windows-advisory, msrv, perl/release, future-clippy, droid, docs gate, CX/CPX runners (not claimed as passed)
- local: precommit pass; 3 in-process + 1 CARGO_BIN_EXE_ripr wire test passed
proof_or_review_missing: pr-review waves OFF by instruction; Gemini/CodeRabbit unavailable
affected_currentness_dimensions: none since 2120daaee; unrelated main movement does not invalidate
residual_assumptions_and_non_claims: #1901/#4075/#1628/#2292 not absorbed; unknown-id already typed by #4418; no client.py harness; no mutation claim
disposition: REVIEW_READY
Oracle: wrapping the parse miss as Ok(None) would fail the wire test (error -32602, command + expects one object, no result key).
Summary
workspace/executeCommandforripr.collectContextandripr.collectEvidenceContextwith a missing or non-object first argument must return JSON-RPC InvalidParams (-32602) naming the accepted object shape — never silentresult: null.Handler dispatch already converted that parse miss through
context_command_target(landed in #4418). This PR closes the remaining #4358 acceptance: wire-level JSON-RPC envelope proof, and thecontext_arguments_returns_none_*pins now state that helperNoneis a bad request, not “no evidence”.Closes #4358
Swarm / Source Boundary
This PR targets
EffortlessMetrics/ripr-swarm, the normal development trunk for trusted same-reporiprwork.ripr-swarmSource-of-truth Links
Proposal: n/a (issue-owned LSP executeCommand fail-closed disclosure)
Spec: RIPR-SPEC-0129 (editor integration / stable InvalidParams)
ADR: n/a
Plan item: n/a
Governing issue or accepted claim: #4358
Acceptance delta (one sentence): missing or malformed first arguments for
collectContext/collectEvidenceContextare typed-32602on the JSON-RPC wire, and the helperNonepins no longer look like intended silent-null protocol results.Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication):
cursor/collect-context-invalid-params-bb3cStack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): n/a
#4418 already shipped the dispatch conversion as part of a broader 0.11 agent-walk bundle and did not close #4358. This is not a rival implementation of that handler; it binds the remaining discriminator and pin revisit.
Scope
Typed missing/malformed first-argument rejection for the two collect context commands, plus wire tests and pin revisit.
Scope Classification
This PR is scoped by:
Production delta:
context_argumentsNoneis a parse miss / bad request. Dispatch already returnsLspError::invalid_paramsviacontext_command_target; no unknown-id, disposition, or malformed-artifact change.Evidence/support delta:
context_arguments_returns_none_for_empty_argument_listandcontext_arguments_returns_none_when_first_argument_is_not_an_objectso they also requirecontext_command_target→ InvalidParams for both commands (including anullfirst element).execute_command_context_commands_reject_unreadable_arguments_with_shapesnow includescollectEvidenceContextwith a non-object first argument andcollectContextwithnull.collect_context_commands_reject_missing_or_malformed_first_argument_on_the_wirespeaks JSON-RPC over the realripr lsp --stdiobinary for omitted/[]/string/nullfirst arguments, asserts-32602with noresultkey, and checks the session still answersripr.collectWorkspaceStatus.Single acceptance criterion:
ripr.collectContext/ripr.collectEvidenceContextyields JSON-RPC error-32602naming the problem, notresult: null.Non-goals:
finding_id/seam_id/gap_id(already typed by fix(agent,lsp): close dead ends cold LLM agents hit in 0.11 (seam ids, dirty diffs, unrun tests, MCP, LSP nulls) #4418; not this claim)client.pyprobe harness (not in this checkout; in-repo wire test is the discriminator)collectRepairPacketargument shapesSupport-tier Impact
Claim/proof notes:
Policy Impact
Ledger or exception notes:
Proof
Result, failures, or skipped proof:
cargo check -p ripr --all-targetspass atf966e8c8abd295299d365ac98c0cefc1c6059c27.2120daaee.copyContextalways sends one object; MCP/agent do not call these commands argument-less.Claim Boundary
May claim: these two commands reject missing/malformed first arguments with typed InvalidParams on the JSON-RPC wire, and the helper
Nonepins are explicit about parse-miss vs protocol error.Must not claim: unknown-id semantics as new work; generic off-the-shelf client proof beyond the in-repo stdio harness; runtime mutation outcomes; #1901 disposition.
Rollback
Revert the squash commit. Tests and comments only plus the existing dispatch path; no schema or golden re-bless.
Spec-Test-Code Traceability
gap_record_context_tests::context_arguments_returns_none_*,execute_command_context_commands_reject_unreadable_arguments_with_shapes,lsp_lifecycle::collect_context_commands_reject_missing_or_malformed_first_argument_on_the_wirecrates/ripr/src/lsp/backend.rs(context_arguments,context_command_target,execute_command_inner)Static Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a — ordinary LSP test/comment change; no workflow or lane change.
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests.Gates
Focused local proof on the published head follows; hosted required checks own merge.
Exact candidate SHA at publication:
2120daaee27cb0f4677ffd004ad9ca4059f8bc06Recorded integration base:
f966e8c8abd295299d365ac98c0cefc1c6059c27Disposition before hosted evidence:
REVIEW_INCOMPLETE. Self-review /REVIEW_CURRENTof source and oracle on this head will be posted as a COMMENT review; merge convergence waits for green required CI and published-headREVIEW_READY.