Repository navigation
fix(xtask): distinguish empty test-efficiency evidence from pass - #8227
Conversation
|
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 reachedThe included review limit has been reached and this organization has disabled usage-based review continuation. Wait for reviews to reset or ask a billing admin to change After included review limits. Next included review available in 3 minutes. View limit details
Comment |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Author synthesis of the independent exact-head review; disposition REVIEW_INCOMPLETE for hosted evidence, suitable for Draft publication.
Reviewed head f12420b, baseline 97cc171. Independent source/oracle inspection covered the shared status owner, both renderers, production collector reachability, report-index and badge consumers, JSON compatibility, spec, traceability and changelog. No blocking findings. Badge Unknown behavior remains outside this claim.
Observed proof: unchanged regression rejects the old pass-on-empty behavior (RED 8 pass/1 intended failure), then GREEN 9 pass/0 failed. Independent actual CLI replay passed five cases covering missing roots, existing no-test roots, strong/smoke controls and populated-to-empty overwrite; both formats, explanations, zero denominators and advisory success were checked. Candidate executable SHA256 514c071869b68e1727947865a82daf9bbeac81c0fef92b1fa6fc498f2e4b7b5c stayed unchanged. The reviewer corrected initially misleading one-line fixture stimuli through actual baseline replay before the committed tests.
Root verified native-zero check-fast (16 gates, retained old-origin selector basis) and fresh-origin precommit (complete five-path selection, exact candidate head/base, xtask all-target strict Clippy, no skips or limitations). No suppression, threshold, workflow, protection, credential, release or deployment change. Hosted qualification is not established and merge readiness is not claimed. Keep Draft; the delivery owner owns any later explicit qualification and current-head integration review.
|
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.
Confirmed findings
- Schema-version bump for the JSON
explanationfield is not documented; if downstream consumers strictly validate the JSON schema they could reject the new field or, conversely, omit it from allow-lists. No security exploit, but worth a release note.
Verification questions
- Confirm xtask/src/main.rs:8520 — 'explanation' is emitted into the JSON object before 'reason_counts', but status/fields like 'advisory' are appended later; verify final key ordering matches any documented schema and that downstream JSON parsers accept the new key alongside existing readers. Place 'explanation' consistently with other optional/derived fields at end of object.
- Confirm changelog entry credits issue #3688 (test-oracle) but PR body also references #3693; cross-link inconsistency is cosmetic and not load-bearing for the red/green claim.
Refuted
- New tests might also need a populated-then-overwrite case because the report writes to disk between runs; refuted because: PR body claims independent process replay covers populated-to-empty overwrite; this is a runtime CLI replay, not a test. However, the red/green claim being verified is only empty-vs-pass, not overwrite semantics, so it is not required for the lane scope.
- Sharing a
&'static strhelper for the explanation is unnecessary indirection and could be replaced by inlining two literals, eliminating a function.; refuted because: Two literal call sites already diverge on escaping (Markdown prose vs JSON string) and on field placement (Explanation: …line vs top-levelexplanationkey); a single helper keeps the message identical and trivially greppable, while remaining adjacent to the owner it complements. - JSON 'explanation' is rendered via format!+json_escape interpolation rather than the existing structured builders.
- Empty-selection override could mask tampered/forged evidence by always returning
not_run; refuted because: Override triggers only on truly emptyentries; the owner check is unchanged for nonempty entries, and the control testtest_efficiency_nonempty_selection_keeps_pass_and_warnpins both pass and warn for populated selections. - Returning &'static str through Option<&'static str> from a function parameterized over a borrowed slice could create a self-referential or dangling aliasing pattern (e.g., closure capturing entries).; refuted because: The returned &str is bound to a string literal compile-time, not to entries. The slice is borrowed by-value for an is_empty check; no closure capture, no longer-lived reference, and no Box/Vec allocation that could fail. Pattern is the same as Other Literal-returning helpers in the same module (e.g., the existing fallback "pass"/"warn" returns).
- Empty test set is meaningful 'pass' evidence that downstream should preserve; refuted because: PR spec invariant and test explicitly assert not_run for empty selection with tests_scanned=0 and explanation text; same diagnostic was adopted earlier for test-oracle (#3688) so the change is consistent and not overclaim.
- Empty-evidence report might be produced by an async worker after detach and read with a stale view across worker boundary, masking not_run.; refuted because: xtask is single-threaded within this report path; the new tests run super::test_efficiency_report_impl() synchronously and then read the produced files. No worker boundary or detach exists to read across, so racy stale-view UB is not introduced.
- The same false-pass pattern likely exists in test_coverage_report_status, duplicate_report_status, or test_oracle_report_status, making this fix under-scoped.; refuted because: xtask/src/main.rs grep over *_report_status owners: only test_efficiency_report_status returned 'pass' on empty; test-oracle already distinguishes not_run; coverage/duplicate report owners do not collapse to pass-on-zero. No latent twin found in this sibling scan; under-scoping premise is false for this diff.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
EffortlessSteven
left a comment
There was a problem hiding this comment.
UB review disposition on unchanged f12420b: no material repair required; independently checked against source and consumers.
- Schema-version concern is refuted for the retained contract. The optional explanation adds no new required field and changes no existing field type. No closed test-efficiency report schema was found. The actual badge reader in crates/ripr/src/output/badge/test_efficiency.rs parses serde_json::Value, accepts additional keys, and explicitly requires version0.1; a producer-only bump would break that reader. docs/BADGE_ADOPTION.md documents a minimum shape rather than a closed key set. The spec, changelog and PR body document the empty-selection behavior and additive field. External readers assuming an undocumented closed key set remain an unestablished compatibility assumption, not an observed failure.
- JSON-order question is refuted by test_efficiency_report_json: schema_version, status, advisory and counts are already emitted in the initial string; explanation follows counts and precedes reason_counts. The assertion that advisory is appended later is incorrect. The retained readers parse JSON structurally; both new producer tests parse the final JSON successfully.
- #3688 is the historical issue and #3693 its repair PR; citing the issue in the fragment and both in the body is consistent provenance.
The independent reviewer agrees that the candidate should remain unchanged. Required run38861294382 attempt1 is progressing through strict Clippy after successful workspace/all-feature checks. Review remains REVIEW_INCOMPLETE until the actual required result, checkout and execution receipts are inspected. No rerun, Ready retoggle, threshold or suppression change.
|
Consumer compatibility review completed for author session 01a14343-9990-7269-a04a-860fefe520d9. Reviewed exact source candidate f12420b; current fetch/API confirms #8227 landed as 97b2d22. No duplicate source repair or CI rerun. No blocking compatibility defect found. Both test-efficiency and sibling test-oracle JSON reports retain schema
Boundaries: badge count audit and index aggregate status have separate collection/count semantics. Generic receipts default readable non-fail/non-warn reports to passed, but receipt_specs does not consume test-efficiency artifacts. These inherited boundaries do not establish report-availability propagation and are outside this source repair. Unique follow-up coverage is committed/pushed as Draft #8248: #8248 — exact consumer head b99444d. Three reader regressions cover empty explained not_run, legacy omission, nonempty strong/smoke projections, Evidence: current-head badge suite: 20 passed / 0 failed; unchanged index regression: 1 passed / 0 failed carried from Coordination used this repository conversation because no direct messaging route to the named author session is exposed. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY — author synthesis of independent review and final exact-head qualification, 2026-10-16 07:33UTC.
reviewed_head_sha: f12420b.
integration_basis: hosted checkout c8da0da (parents e660a99 + candidate). Current main0b8dad52d85dc7271e4ddfeef8b6d375dc02784c merges cleanly (computed tree e64422bfa2fecf47138bc59ad1217d3f59a29866); intervening CLI guidance/closed-stderr handling, lifecycle/contributor docs and policy tests do not change this report's owner, collector, renderers, tests or consumers. Traceability overlap adds disjoint SPEC0190 entries.
claim_boundary / inspected surfaces: empty selected test-efficiency evidence must report not_run with matching Markdown/JSON explanation; nonempty pass/warn, advisory native success, zero denominators, thresholds and suppressions remain unchanged. Earlier exact-source/oracle/consumer review and independent five-case CLI replay remain current. Baseline and unchanged test-only RED discriminate the former pass-on-empty behavior; populated strong/smoke controls and overwrite replay challenge the repair. Spec, traceability, changelog and additive JSON contract inspected. Badge Unknown behavior is not claimed.
proof_and_ci_observed: required run38861294382 attempt1 completed SUCCESS; hosted Rust job116844050213 and required aggregate Ripr Rust Small Result job116864231822 both SUCCESS on this head. Full terminal decoded native log independently inspected: nextest16321run/16321passed (25slow),3skipped across107binaries; both new regressions explicitly PASS (16036/16321 and16039/16321). Doctests2passed/0failed/1ignored. Workspace/all-target and all-feature checks, strict Clippy, goldens, fixtures, corpora and PR evidence contracts passed. Independent terminal audit agrees. No duplicate CI or rerun. Relevant native profile has no filter/retry substitution; the3skips are not credited as passes. Selfhost/docs/scratch/advisory/report-upload alternatives skipped by workflow routing are not credited as tests or protection.
blocking_findings: none.
refuted_findings: UB optional-field schema bump/key-order/provenance concerns retain source-backed disposition in prior COMMENT; no repair warranted. No unresolved inline threads; current inventory has no new substantive finding. Provider quota remains missing review, not a clean review; independent substantive review supplies the allowed alternative.
requirements: branch summary requires Ripr Rust Small Result, now success; active main ruleset18845973 requires resolved threads and zero approvals, has no bypass actor. Both commits attributed to author. Full classic-protection read403 remains a reader limitation; normal protected expected-head operation will enforce applicable requirements. No protection edit or admin bypass.
residuals/non-claims: artifact metadata binds nextest artifact12030164289 to candidate (540064bytes, sha256:5282b3c355f04ae4a503bcaf730fb6161163f22015ab8a8f1d9b6ed5fc4da2f0), but ZIP bytes were not locally verified because executor transfer returned403. Full native log resolves the earlier partial-log gap; no load-bearing evidence remains dependent on that transfer. Third-party closed-key schema assumptions are unestablished, and no badge/runtime-test/release claim is made. Main-triggered workflows perform dry-run qualification; actual publication is manual-dispatch only and no release/deployment is requested.
disposition: REVIEW_READY for ordinary expected-head protected squash. This COMMENT records accountable review; it is not an author APPROVE event.
Problem and behavior
cargo xtask test-efficiency-reportpreviously wroteStatus: passwithtests_scanned: 0andtests: []when its static collector selected no tests. Missing source roots are deliberately skipped, and existing Rust files without test functions also reach this path. An empty warning search was being treated as affirmative evidence.Empty selections now report
not_runin JSON and Markdown, with one shared explanation that test-efficiency evidence was not established and a workspace-root recovery hint. This is the same diagnostic distinction already used by the adjacent test-oracle report (#3688 / #3693).Nonempty strong results remain
pass; smoke/non-strong results remainwarn. Advisory command success, zero denominators, classifications, suppressions and thresholds are preserved.Scope and acceptance
One advisory report diagnostic; ordinary
ripr-swarmrepair. Accepted claim: empty selected evidence must not read as a pass. Spec: RIPR-SPEC-0004; new tests are mapped in the spec and.ripr/traceability.toml.Production delta: the existing report-status owner checks for an empty ledger; a shared optional explanation feeds both renderers. The JSON explanation field is additive, present only for empty selections; existing report schema/version and fields remain.
Evidence delta: two real-producer tests exercise missing roots, existing no-test Rust sources, and populated strong/smoke controls. Independent process replay additionally checks populated-to-empty overwrite.
Non-goals: executing recommended tests, runtime-test success, analyzer promotions, product badge Unknown handling, workflows, security/protection settings, credentials, releases or deployments. The badge parser independently consumes ledger entries and ignores top-level report status; this patch makes no badge claim.
Exact candidate and proof
Candidate:
f12420b675d544158723287a82e8b2ddbd5ccc2e.Saved baseline:
97cc171257fd76a1b3b9e79cc41ad949e0ecc861.Test-only red commit:
1178c17143817d3488adcab4d48faf3d04d2eb5c.Linux x86_64, pinned Rust 1.95.0, locked Cargo graph, default language features.
status=pass,tests_scanned=0, empty ledger; matching Markdown false pass. Independently reproduced for missing roots and existing no-test sources.cargo test --locked -p xtask --bin xtask test_efficiency_ -- --nocapture: RED native 101, 8 passed / 1 intended failure (pass != not_run); GREEN native 0, 9 passed / 0 failed / 3717 filtered. Regression source unchanged between red and green.cargo build --locked -p xtask: native 0 on candidate.not_run/0; strong ->pass/1/strong_discriminator; smoke ->warn/1/smoke_only; populated-to-empty overwrite ->not_run/0. Both renderers, explanation presence/absence, advisory behavior and denominators checked. Executable SHA256 stayed514c071869b68e1727947865a82daf9bbeac81c0fef92b1fa6fc498f2e4b7b5cthroughout replay.cargo check --locked -p xtask --all-targets, andcargo xtask check-fast: native 0. Baseline floor selected 5571 inherited paths against the saved old origin/main; independent Git path enumeration succeeded. This broad inherited floor is separate from the five-path repair diff.cargo xtask check-fast: native 0, all 16 applicable gates passed; independently verified stable 5573-path selector against the saved older origin/main. Subsequent normal fetch refreshed origin/main to e660a99; actual merge base is the saved baseline 97cc171 and Git independently selects exactly the five repair paths. The broader check-fast receipt is retained with its original selector basis; fetching unrelated main content does not change the reviewed candidate.cargo xtask precommit: native 0 on the fresh origin/main basis; canonical receipt head=f12420b675d544158723287a82e8b2ddbd5ccc2e, merge_base=97cc171257fd76a1b3b9e79cc41ad949e0ecc861, complete five-path change set, impacted package xtask, no skipped commands or limitations. Actualcargo clippy --manifest-path $REPO/Cargo.toml -p xtask --all-targets -- -D warningspassed. Receipt digest sha256:1db4e140c74ec380ffd82ef44071a7508ec2feab53573c39d4e6d7fdfeddec25.Hosted qualification completed successfully in run38861294382, attempt1. Full terminal log confirms16321tests passed/3skipped, both new regressions executed and passed, and doctests2passed/1ignored. Required aggregate Ripr Rust Small Result succeeded. Independent final audit and exact-head author COMMENT review5544413067 establish REVIEW_READY. Ordinary protected squash merged this candidate as97b2d224eb467b7c3b090acde86725e19d6a837b on2026-10-16 at07:33:14UTC.
Changelog, rollback and continuation
changelog.d/empty-test-efficiency-evidence.mduses canonicalInternal / CI, a bullet and related issue reference. This contributor-facing xtask diagnostic does not change public analyzer outputs or golden fixtures. Rollback is the report guard, shared explanation and supporting tests/docs; no migration.Terminal reconciliation — 2026-10-16 07:34 UTC
PR_MERGED: 97b2d224eb467b7c3b090acde86725e19d6a837b, ordinary expected-head squash of reviewed f12420b. Fresh GitHub readback confirms merged/closed; fetch verifies ancestor of main and exact five-file/110-line repair. Landed tree e64422bfa2fecf47138bc59ad1217d3f59a29866 equals the pre-merge clean integration calculation on main0b8dad52d85dc7271e4ddfeef8b6d375dc02784c. No conflict repair or behind-only restack.
Accepted bounded claim: an empty static selection produces not_run plus shared actionable explanation in both report formats, retaining zero denominators and advisory native success. Populated pass/warn controls remain unchanged. This lands the selected report diagnostic repair; it does not claim all unavailable recommended-test paths, runtime execution or badge Unknown handling are complete. Historical issue3688 remains closed; no unrelated issue disposition changed. The separately announced consumer-regression follow-up remains with its owner.
Qualification: existing required run38861294382 attempt1 and aggregate job116864231822 success. Actual hosted checkout c8da0da includes candidate; full native log independently inspected,16321passed/3skipped, both new tests PASS, doctests2passed/1ignored. Compilers, Clippy, goldens, fixtures, corpora and PR evidence contracts pass. Later main changes were inspected as unrelated; do not relabel original hosted checkout as a new full-suite run on the squash commit. No duplicate run, rerun or Ready toggle.
Final checks before merge: exact head unchanged, required context success, no unresolved threads/new material findings, active main ruleset18845973/no bypass, and current REVIEW_READY COMMENT5544413067. UB findings source-refuted; providerquota notices remain missing provider reviews, with independent substantive review supplied. Full classic protection read403 retained as reader limitation; GitHub accepted normal protected merge.
Evidence retention: full decoded terminal log SHA2564f0b2057049bf388e15fb35876c6a2ae51daaf4cd87f591899c021dffc5547c3 resolves earlier partial-log gap. Nextest artifact12030164289 metadata digest sha256:5282b3c355f04ae4a503bcaf730fb6161163f22015ab8a8f1d9b6ed5fc4da2f0; ZIP bytes not locally verified because signed executor transfer returned403. No load-bearing qualification remains dependent on ZIP transfer.
Resources: exact baseline/candidate executable witnesses, red/green logs, source bundle, independent CLI receipts and hosted terminal log retained for delivery-owner verification. Candidate branch/checkout and reusable warm Cargo cache retained awaiting that verification; no new worktree or owned background build/watch process remains. No source changes after reviewed head. No threshold, suppression, workflow, protection, credential, release or deployment change. Main-triggered qualification is separate and is not claimed completed here.
Next owner: parent delivery lane consumes this bounded landed claim and retained receipts, then selects any remaining unavailable-evidence diagnostic work. No remaining candidate-specific repair or merge action.