Repository navigation
test(agent-stub): pin nearest-gap note order and refused substitution - #8448
Conversation
The #8364 use-case test only covers return_value through resolve_test_stub. Pin the CLI adapter: insert(0) puts the note ahead of grip-class warnings for a predicate --at, and an off-line --at that then refuses still names that nearest seam. Advances #8444 (item 3 only). 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! |
The new integration test runs the worktree-built ripr binary once against an isolated scratch crate. Record that spawn in the process allowlist. Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
EffortlessSteven
left a comment
There was a problem hiding this comment.
Author self-review on published head fb07ee3013f7e7f72c6f0f17210a29fe88b38b1f. GitHub cannot request-changes from the author; COMMENT is not approval.
reviewed_head_sha: fb07ee3013f7e7f72c6f0f17210a29fe88b38b1f
integration_basis: origin/main 71859f93d (branch base); GitHub base has since moved to 2958fdc (behind-only, no content conflict)
claim_boundary: #8444 item 3 tests only — pin CLI warning order for the #8364 nearest-gap note, a non-return_value family, and refused substitution. No production change. Items 1–2 out of scope.
changed_surfaces_and_semantic_owners_inspected:
- cli/commands/agent_stub.rs mod tests (CLI adapter owner)
- crates/ripr/tests/agent_stub_at_disclosure.rs (rendered CLI)
- policy/process_allowlist.txt (one test spawn)
- changelog.d/8444-agent-stub-at-note-tests.md
- production insert(0) path in run_agent_stub (unchanged)
- existing #8364 test in app/test_stub.rs (not duplicated)
blocking_findings: none
non_blocking_suggestions:
- Human refusal still omits disclosure.warnings (stdout empty; Decision names owner_async only). JSON envelope does carry the note first. Recorded on #8444; not a production fix in this tests-only lane.
refuted_or_stale_findings:
- Gemini quota and CodeRabbit rate-limit comments are missing-review, not clean review.
- Devin Review status is "Full review skipped: trial expired" — missing, not a pass.
proof_and_ci_observed:
- cargo test -p ripr --lib off_line_: 2 passed
- cargo test -p ripr --test agent_stub_at_disclosure: 2 passed
- cargo xtask precommit: pass (after process-allowlist for Command::new)
- cargo xtask check-fast: pass, base=origin/main, 3 committed files then +allowlist
- Hosted checks on this head: in progress (paste matrix, rust-only, windows-advisory-subset, wheel inspect); several lanes skipped-by-policy
proof_or_review_missing:
- Required hosted merge-gate terminal result for this exact head
- External reviewers (Gemini/CodeRabbit/Devin) unavailable or quota-skipped
affected_currentness_dimensions: test stimulus, test oracle, candidate head identity
residual_assumptions_and_non_claims:
- Does not prove check recommends a command that stubs L (item 1)
- Does not stub return_value directly (item 2)
- Does not claim human refusal stderr prints the substitution note
disposition: REVIEW_INCOMPLETE until required hosted checks are terminal on this head; source/oracle inspection found no blocker. Merge convergence waits on REVIEW_READY after that CI dimension.
Oracle challenge: dropping insert(0) or changing it to push fails off_line_predicate_note_precedes_the_grip_class_warning (warnings[0] would not be the note while warnings[1] is the strongly_gripped omission). A selector miss instead of substituted refusal fails both the unit Decision pin and the JSON envelope (seam_id null / empty warnings). The #8364 return_value/resolve_test_stub test is not duplicated; this lane uses predicate through run_agent_stub and the binary.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Both new test files use std::env::temp_dir() for scratch crate roots; not parallel-safe by default but each file uses unique PID + stamp/atomic-counter suffixes, and each path is cleaned up via Drop (integration) or explicit remove_dir_all (unit). Cleanup is best-effort on panic but no observed shared-path collision.
Verification questions
- Confirm unit tests use label+PID for scratch dir; integration tests use label+PID+AtomicU64 counter. Parallel CI runs are safe either way, but the asymmetry is an inconsistency, not a flaw.
- Confirm scratch_crate uses std::env::temp_dir() directly; comment says .cargo/config.toml redirects TMPDIR but code does not honor TMPDIR explicitly. Comment is informational but the unit tests will fail on a fresh worktree if TMPDIR is set to target/. The integration tests share the same risk since CARGO_BIN_EXE_ripr child inherits env.
Refuted
- Human refusal path also prints disclosure.warnings on stdout; refuted because: PR body explicitly states human refusal stdout stays empty and Decision names owner_async only; the unit test off_line_at_that_ends_in_a_refusal_names_the_nearest_seam matches only
Err(CommandError::Decision(message))and checks the message body. Item not in this PR's claim boundary. - Unit off_line_at_that_ends_in_a_refusal_names_the_nearest_seam does not red/green the JSON insert(0) behavior it is advertised to pin.; refuted because: The unit intentionally covers the post-resolution Decision path; the JSON-order pin lives in agent_stub_at_disclosure.rs::off_line_at_that_refuses_keeps_the_note_first_in_json_warnings. Claim boundary (#8444 item 3, both families) is honored.
- failing_objection2_hypothesis: The async-predicate refused-substitution test could pass even if insert(0) is removed because the refusal envelope might not include warnings at all, and first() on an empty array returns None which would fail. So the test is order-sensitive only if warnings is non-empty.; refuted because: For a substituted refusal the run_agent_stub path still constructs a Disclosure with the note inserted at index 0 before matching the outcome Decision. The envelope is required to carry warnings; first().and_then(as_str) must yield the substitution note. The test's seam_id non-null assertion plus warnings.first() non-None gate ensures the note is present and first.
Parked follow-ups
- Integration test off_line_at_that_refuses_keeps_the_note_first_in_json_warnings uses a unique atomic SEQUENCE; SEQUENCE.fetch_add only seeds one fixture while Scratch::create is called once. Parallel-safe but unused-since-once.
- scratch_crate in mod tests and Scratch in integration file duplicate ~20 lines of crate-from-fixture setup with cosmetic differences (AtomicU64 sequence vs SystemTime nanos).
- Integration test parses refusal envelope by finding literal 'ripr: agent stub: ' inside stderr; brittle if error prefix changes but no diff evidence it's brittle today. Parked.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
Classification of ub-review 5557702807 on
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
Published-head review-pr on exact SHA fb07ee3013f7e7f72c6f0f17210a29fe88b38b1f. GitHub cannot request-changes from the author; COMMENT is not approval.
reviewed_head_sha: fb07ee3013f7e7f72c6f0f17210a29fe88b38b1f
integration_basis: GitHub base 2958fdc (behind-only vs candidate; mergeable_state=clean, no content conflict)
claim_boundary: #8444 item 3 tests only — pin CLI warning order for the #8364 nearest-gap note, a non-return_value family, and refused substitution. No production change. Items 1–2 out of scope.
changed_surfaces_and_semantic_owners_inspected:
- cli/commands/agent_stub.rs mod tests (CLI adapter owner)
- crates/ripr/tests/agent_stub_at_disclosure.rs (rendered CLI)
- policy/process_allowlist.txt (one test spawn)
- changelog.d/8444-agent-stub-at-note-tests.md
- production insert(0) path in run_agent_stub (unchanged)
- existing #8364 test in app/test_stub.rs (not duplicated)
blocking_findings: none
non_blocking_suggestions:
- Human refusal still omits disclosure.warnings (stdout empty; Decision names owner_async only). JSON envelope does carry the note first. Recorded on #8444; not a production fix in this tests-only lane.
refuted_or_stale_findings:
- ub-review 5557702807 temp_dir scratch finding: not a defect (PID+stamp/seq uniquify; std::env::temp_dir honors Cargo TMPDIR redirect). Classified in PR comment 6233722898. Zero inline threads.
- CodeRabbit: no actionable comments; docstring-coverage warning on test helpers is not a required check.
- Gemini quota and Devin trial-expired: missing-review, not a pass.
proof_and_ci_observed:
- cargo test -p ripr --lib off_line_: 2 passed
- cargo test -p ripr --test agent_stub_at_disclosure: 2 passed
- cargo xtask precommit: pass
- cargo xtask check-fast: pass
- Hosted exact-head: Ripr Rust Small Result SUCCESS; Ripr Rust Small on GitHub Hosted / Rust gates SUCCESS; Rust-only feature lane SUCCESS; ub-review SUCCESS; paste matrix SUCCESS; windows-advisory-subset SUCCESS; wheel inspect SUCCESS. Remaining lanes skipped-by-policy. No failures.
proof_or_review_missing: none load-bearing for this tests-only claim. Gemini/Devin remain unavailable.
affected_currentness_dimensions: test stimulus, test oracle, candidate head identity, exact-head CI receipts
residual_assumptions_and_non_claims:
- Does not prove check recommends a command that stubs L (item 1)
- Does not stub return_value directly (item 2)
- Does not claim human refusal stderr prints the substitution note
disposition: REVIEW_READY
Oracle challenge unchanged: dropping insert(0) or changing it to push fails off_line_predicate_note_precedes_the_grip_class_warning. A selector miss instead of substituted refusal fails the unit Decision pin and the JSON envelope (seam_id null / empty warnings).
Advances #8444 (item 3 only).
Summary
Tests-only pin of the #8364 nearest-gap disclosure on
ripr agent stub --at.The existing #8364 test
at_a_line_without_a_gap_names_the_nearest_gap_it_stubbedlives inapp/test_stub.rs, callsresolve_test_stubwithreturn_valueonly, and never seesdisclosure.warnings.insert(0, note). This PR does not duplicate it.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Governing issue: #8444 item 3 (tests that pin the disclosure).
Spec: RIPR-SPEC-0122 (
ripr agent stub --at).Merged parent: #8364.
Candidate Relationships
Candidate branch:
cursor/agent-stub-at-note-tests-3abcNo stack parent. No replacement of another PR.
Scope
Production delta
None.
Evidence/support delta
agent_stub.rs: off-linepredicate --atstays ready; off-line--atthat then refuses is a post-resolutionowner_asyncDecision, notseam_not_found.crates/ripr/tests/agent_stub_at_disclosure.rs: JSONwarnings[0]is the substitution note andwarnings[1]is the strongly-gripped omission (so droppinginsert(0)fails); the same note leads human stdout; a substituted-then-refused--jsonenvelope keeps the note first.policy/process_allowlist.txt: oneCommand::newfor that binary harness.Single acceptance criterion
Dropping
disclosure.warnings.insert(0, note.clone()), or changing it topush, fails a test.Non-goals
--at Lwithout confirming the stub targets L; return_value lines get another gap's stub #8444 (checkrecommending--at L; stubbingreturn_valuedirectly).app/test_stub.rs,domain/probe.rs,output/human/triage.rs,tests/agent_stub_compiles.rs,cli/commands/check.rs, goldens, or fixtures.Scope Classification
Support-tier Impact
Policy Impact
Ledger: one test-only spawn allowlist row for
crates/ripr/tests/agent_stub_at_disclosure.rs.Proof
What this proves: the CLI adapter puts the nearest-gap note first among disclosure warnings for a
predicateoff-line--at, and a substituted--atthat then refuses still names that nearest seam in the JSON envelope.What this does not prove: hosted merge-gate completeness until required checks are terminal;
checkrecommendation correctness (item 1); directreturn_valuestubbing (item 2).Claim Boundary
May claim: the CLI adapter's nearest-gap note is first among disclosure warnings for a
predicateoff-line--at, and a substituted--atthat then refuses still names that nearest seam in the JSON envelope.Must not claim:
checkrecommends a command that stubs the named line;return_valueis stubbed directly; human refusal stderr prints the substitution note (that arm does not printdisclosure.warnings; stdout stays empty on refusal). Items 1 and 2 remain open.Rollback
Revert the commits. Tests-only; no production rollback.
Spec-Test-Code Traceability
agent_stub.rsoff_line_*;crates/ripr/tests/agent_stub_at_disclosure.rsagent_stub.rsinsert(0)Exact candidate SHA:
fb07ee3013f7e7f72c6f0f17210a29fe88b38b1f