Skip to content

feat(feedback): record local result-bound usefulness receipts - #4684

Merged
EffortlessSteven merged 5 commits into
mainfrom
cursor/local-usefulness-feedback-receipts-77d5
Sep 29, 2026
Merged

EffortlessSteven merged 5 commits into
mainfrom
cursor/local-usefulness-feedback-receipts-77d5

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Add an explicit local CLI that records result-bound usefulness feedback receipts (useful / incorrect / unclear / expensive / intentional_no_action) and a read-only join onto existing route-quality rows.

Recording is explicit: analyze, hover, and packet paths never record feedback. Identity is snapshot plus optional canonical item; file/line is rejected. The same idempotency key and payload produce one record; a different payload is a conflict. Policy artifacts, diagnostics, classification, gates, and gap closure are unchanged.

Closes #4585.

Swarm / Source Boundary

This PR targets EffortlessMetrics/ripr-swarm, the normal development trunk for trusted same-repo ripr work. Confirm the change belongs here:

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge, dependency, or repo-ops development for ripr-swarm
  • repair or follow-up for a same-repo swarm PR
  • swarm-only CI, runner, routing, source-of-truth, or agent-operating surface
  • other swarm-scoped work:

If this PR moves crates.io publishing, VS Marketplace publishing, Open VSX publishing, GitHub Release assets, signing, release environments, or release secrets, close or retarget it. Those surfaces belong in EffortlessMetrics/ripr unless a dedicated release-boundary change has already been approved.

Source-of-truth Links

Proposal: none (leaf of #1619)
Spec: RIPR-SPEC-0179
ADR: none
Plan item: none
Governing issue or accepted claim: #4585
Acceptance delta (one sentence): An explicit local CLI records a versioned usefulness receipt bound to an immutable snapshot and can join those receipts onto existing route-quality rows without mutating analyzer or policy state.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): cursor/local-usefulness-feedback-receipts-77d5
Stack 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): n/a
Accepted winner and losing candidate disposition (when decided): n/a

Open #4673 occupies RIPR-SPEC-0178 for rust-repair-trust route yield (#4570). This leaf uses RIPR-SPEC-0179 and does not absorb that claim. Open #4636 is #4572 attempt retention and is also out of scope.

Scope

One local feedback receipt/CLI/join unit. Editor, LSP, and MCP write surfaces stay later #1619 work.

Scope Classification

This PR is scoped by:

  • One production behavior
  • One public contract
  • One architectural seam
  • Docs/spec/test-only evidence package
  • Other:

Production delta:

  • ripr feedback record writes target/ripr/feedback/<key>.json with schema 0.1 / kind usefulness_feedback_receipt.
  • ripr feedback export joins stored receipts onto existing route-quality rows (kind usefulness_feedback_join) without a second attempt ledger.
  • Recording compares policy artifacts as unchanged and never opens a network, process, editor, LSP, or MCP write surface.
  • A matching --judgment collapses onto the derived reason class so reload and repeat recording stay idempotent.

Evidence/support delta:

  • Discriminating domain/app/CLI tests for idempotency, matching-judgment reuse, conflict, file/line rejection, no-item useful limitation, historical later-attempt binding, mismatch, agent vs human review, no fake success rates, join, path escape, secret-pattern notes, leftover temp files, and malformed receipts.
  • RIPR-SPEC-0179, slice, traceability, command hierarchy, and OUTPUT_SCHEMA documentation.

Single acceptance criterion:

  • Repeating the same key and payload yields one record; recording changes no suppression, baseline, diagnostic, classification, gate, or closure state.

Non-goals:

Support-tier Impact

  • none
  • updates docs/status/SUPPORT_TIERS.md
  • changes a README, release, docs, CLI, JSON, editor, CI, or package claim

Claim/proof notes:

  • Public CLI/JSON is documented. Rolling work only; no support-tier promotion.

Policy Impact

  • none
  • doc artifacts
  • CI lane
  • package boundary
  • lint / Clippy
  • no-panic
  • file policy
  • generated artifact
  • dependency
  • process/network

Ledger or exception notes:

  • Registered RIPR-SPEC-0179 in policy/doc-artifacts.toml and .ripr/traceability.toml. Isolation-test needles are split so the recorder stays at zero Command::new sites. No new process/network exceptions.

Proof

cargo test -p ripr --lib -- feedback
cargo test -p ripr --test cli_help_hierarchy docs_keep_the_canonical_role_vocabulary
cargo fmt --check
cargo xtask precommit

Result, failures, or skipped proof:

  • Head converts remaining test expect/expect_err to Result, splits process-policy needles, and normalizes matching --judgment. Focused tests and cargo xtask precommit run against this published head. Hosted PR CI owns the required merge-gate matrix.

Claim Boundary

What may be claimed after this PR? Operators can record local usefulness judgments against an immutable snapshot and join them onto existing route-quality rows. Those receipts are opinion, not analyzer correctness, runtime mutation results, or gate authority.

What must not be claimed yet? Editor/LSP/MCP write integration, attempt retention, reporting ownership, success percentages from unreviewed/stale/missing feedback, or support-tier promotion.

Rollback

Revert the PR. Local receipts under target/ripr/feedback/ remain unsupported historical data.

Spec-Test-Code Traceability

  • Spec: RIPR-SPEC-0179
  • Tests: crates/ripr/src/{domain,app,output,cli/commands}/feedback.rs discriminators
  • Code: crates/ripr/src/{domain,app,output,cli/commands}/feedback.rs
  • Golden outputs: none
  • Metrics: advisory receipt/unmatched counts; not success rates
  • ADR/learning: none

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.
  • Unknowns include stop reasons where applicable.

CI Economics

  • LEM impact: n/a; ordinary CLI/docs PR
  • Workflows touched: none
  • Branch protection impact: none
  • Failure mode caught: implicit recording, file/line identity, policy mutation, fake usefulness rates, matching-judgment false conflict, process-policy needle spelling
  • Cheaper signal considered: focused feedback tests plus public CLI controls
  • Required lanes affected: none beyond normal changed-code checks
  • Advisory lanes affected: none
  • On-demand/release lanes affected: none
  • Labels that alter behavior: none
  • Artifact families affected: target/ripr/feedback/*.json, optional join JSON
  • Rollback path: revert this PR

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented in production code.
  • No new panic, unwrap, expect, todo, or unimplemented in tests.
  • New non-Rust programming files are allowlisted with owner, surface, and reason.
  • New generated, dependency, process-spawn, or network surfaces are allowlisted with owner and reason.
  • Errors are reported with actionable context.
  • Public JSON/schema changes are documented.

Gates

Hosted PR CI owns the required merge-gate matrix. Local focused tests and precommit run against this published head.

Open in Web Open in Cursor 

Add an explicit `ripr feedback record|export` CLI that writes ignored
JSON receipts for useful/incorrect/unclear/expensive/intentional-no-action
judgments bound to an immutable snapshot, then joins them onto existing
route-quality rows. Recording changes no diagnostic, classification,
baseline, suppression, gate, or gap-closure state.

Closes #4585.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@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!

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 16 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: 59442a21-149a-4289-a75a-79c418e741bc

📥 Commits

Reviewing files that changed from the base of the PR and between eb3a2e9 and 256a44f.

📒 Files selected for processing (20)
  • .allow/spec-system/slices/local-usefulness-feedback-receipts.v1.toml
  • .ripr/traceability.toml
  • crates/ripr/src/app.rs
  • crates/ripr/src/app/feedback.rs
  • crates/ripr/src/cli/command.rs
  • crates/ripr/src/cli/commands.rs
  • crates/ripr/src/cli/commands/feedback.rs
  • crates/ripr/src/cli/execute.rs
  • crates/ripr/src/cli/help.rs
  • crates/ripr/src/cli/help/overview.rs
  • crates/ripr/src/domain/feedback.rs
  • crates/ripr/src/domain/mod.rs
  • crates/ripr/src/output/feedback.rs
  • crates/ripr/src/output/mod.rs
  • crates/ripr/tests/cli_help_hierarchy.rs
  • docs/COMMAND_HIERARCHY.md
  • docs/OUTPUT_SCHEMA.md
  • docs/specs/README.md
  • docs/specs/RIPR-SPEC-0179-local-usefulness-feedback-receipts.md
  • policy/doc-artifacts.toml

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.

cursoragent and others added 4 commits September 29, 2026 02:29
Repair-kind coincidence is not a result identity, so a receipt for one
gap no longer attaches to every similarly named route-quality row.
Drop the unused parent help re-export.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
Keep reason and review types in the test module so lib builds stay warning-free.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
check-no-panic-family rejects new expect/expect_err even in tests.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
Isolation-test needles no longer spell Command::new. A matching --judgment
collapses onto the derived class so repeat recording stays idempotent.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>

@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.

review-pr (author COMMENT; GitHub cannot request changes from the author)

reviewed_head_sha: 256a44fa77abd1eb71660d7968884aa8acbed327
integration_basis: origin/main ade6998adbdd8c719a4108f43c9dfec93cb245a1
claim_boundary: #4585 / RIPR-SPEC-0179 local result-bound usefulness receipts + join onto existing route-quality rows. No editor/LSP/MCP write, no #4572 attempt retention, no #4570 reporting ownership beyond the join, no 0.11/support promotion.
changed_surfaces_and_semantic_owners_inspected:
  domain::feedback identity/taxonomy/classify_reference
  app::feedback record/load/join (atomic_file, path confinement, secret-pattern fail-closed)
  output::feedback JSON receipt/join + policy_effects unchanged
  cli::commands::feedback record/export + help/flag parity
  cli command/execute/help wiring, COMMAND_HIERARCHY, OUTPUT_SCHEMA, spec 0179, slice, traceability
blocking_findings: none in source/oracle for this head
non_blocking_suggestions:
  - export --out is a caller-chosen local path; ParentDir is not rejected there (record --root/--idempotency-key are confined).
  - FeedbackReason::Other.judgment() still returns a dummy Unclear; validate/record require --judgment, so export uses the override.
  - A receipt whose item/attempt appears in multiple route-quality samples can attach to more than one row; join does not invent a second ledger.
refuted_or_stale_findings:
  - gemini-code-assist quota comment is missing review, not a finding.
  - coderabbit skip-review (repo <10 stars) is missing provider review, not a clean pass.
proof_and_ci_observed:
  cargo test -p ripr --lib -- feedback: 32 passed
  cargo test -p ripr --test cli_help_hierarchy docs_keep_the_canonical_role_vocabulary: pass
  cargo xtask precommit: pass (incl. check-no-panic-family, check-process-policy, check-network-policy, check-public-api, check-output-contracts)
  hosted: Rust gates + rust-only feature lane + ub-review still in_progress on this SHA; several optional lanes skipped-by-policy
proof_or_review_missing:
  exact-head required hosted merge-gate jobs not yet terminal
  no independent external reviewer (quota/skip)
affected_currentness_dimensions: production implementation, test stimulus/oracle, public claim, candidate head identity
residual_assumptions_and_non_claims:
  receipts are opinion, not analyzer correctness or runtime mutation results
  secret-pattern notes are best-effort
  recording does not mutate diagnostics/classification/baseline/suppressions/gates/gap closure
disposition: REVIEW_INCOMPLETE

Inspected the full 20-file diff against origin/main. Production layers stay split (domain JSON-free types, app record/join, output render, CLI adapter). File/line is rejected as identity. Idempotency is key+normalized payload; matching --judgment collapses onto the derived class. Join matches canonical item or attempt id only, not repair-kind coincidence. Isolation test needles no longer spell Command::new.

This COMMENT is not approval. Merge convergence waits for terminal required checks on 256a44fa77abd1eb71660d7968884aa8acbed327.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review September 29, 2026 03:11

@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.

review-pr published-head (author COMMENT)

reviewed_head_sha: 256a44fa77abd1eb71660d7968884aa8acbed327
integration_basis: origin/main eb3a2e9ce5affe144c99767ebe5b25ab6bac9d6b (behind-only; no restack)
claim_boundary: #4585 / RIPR-SPEC-0179 local usefulness receipts + route-quality join. No editor/LSP/MCP write, no #4572/#4570 absorption, no 0.11/support promotion.
changed_surfaces_and_semantic_owners_inspected: unchanged from the 256a44fa7 source pass (domain/app/output/cli feedback + spec/docs/help wiring)
blocking_findings: none
non_blocking_suggestions: unchanged (export --out caller path; Other.judgment dummy Unclear; multi-row join on shared sample ids)
refuted_or_stale_findings:
  - gemini quota: missing provider review, not a finding
  - CodeRabbit skip: missing provider review, not a pass
  - ub-review cancelled: missing advisory provider, not a required-check failure
proof_and_ci_observed:
  Ripr Rust Small Result: success on this SHA
  Ripr Rust Small on GitHub Hosted / Rust gates: success (no failed steps; Required Rust tests completed)
  Rust-only feature lane, source-of-truth, spec-maintenance-digest, cargo-deny, dependency-review, pr-plan, GitGuardian: success
  skipped-by-policy: docs gate, extra rust-small runners, vscode, msrv, coverage, windows, future-clippy, droid
  local: cargo test -p ripr --lib -- feedback (32); cli_help_hierarchy pin; cargo xtask precommit
proof_or_review_missing: independent bot reviewers unavailable (quota/skip/cancelled); author review-pr is the current semantic pass
affected_currentness_dimensions: exact-head CI/receipts (refreshed); production/oracle/public claim unchanged
residual_assumptions_and_non_claims: receipts are opinion, not analyzer correctness or runtime mutation results
disposition: REVIEW_READY

Head did not move. Source/oracle inspection from the prior COMMENT still binds this SHA. Hosted required merge-gate Ripr Rust Small Result is now terminal success. Zero review threads. This COMMENT is not GitHub approval; it is the published-head merge-review disposition for ordinary squash.

@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-29T03:15:16.289945Z 256a44f 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.

@EffortlessSteven
EffortlessSteven merged commit a948b67 into main Sep 29, 2026
25 of 28 checks passed
@EffortlessSteven
EffortlessSteven deleted the cursor/local-usefulness-feedback-receipts-77d5 branch September 29, 2026 03:12

@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 8 potential issues.

Devin Review

Comment on lines +466 to +474
fn receipt_matches_row(receipt: &FeedbackReceipt, row: &RouteQualityRow) -> bool {
if let Some(item) = &receipt.identity.canonical_item
&& row
.sample_canonical_gap_ids
.iter()
.any(|candidate| candidate == item)
{
return true;
}

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.

🔴 Old feedback joins unrelated repair routes

When a gap reappears under another route or snapshot, receipt_matches_row attaches its old receipt by gap ID alone. The join counts that judgment against an unrelated route's objective results.

Learn more

The route-quality producer groups attempts by repair kind and, optionally, language in ripr_swarm_attempt_ledger_repair_route_quality_grouped. The join tests only whether a canonical gap ID or attempt ID appears in a row's samples. Canonical gaps can have multiple attempts and route kinds, while the receipt also records a snapshot and optional route/attempt binding. A gap-only match does not establish that the receipt belongs to the sampled route or the analysis it describes.

Example: A receipt for gap:alpha records the add_assertion route in snapshot snap-A. A later add_missing_test attempt for the same gap appears in another route-quality row. Both rows count the old receipt as their feedback when they sample gap:alpha.

Recommended fix: Join through producer-owned attempt/result identities with route and snapshot provenance where available. Do not treat a shared gap sample as sufficient proof of route-level identity; leave ambiguous bindings unmatched.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +475 to +486
if let Some(attempt) = &receipt.identity.attempt_id
&& row
.sample_attempt_ids
.iter()
.any(|candidate| candidate == attempt)
{
return true;
}
// Repair-kind / route-digest coincidence is not identity: many rows share
// a kind. Unmatched receipts stay unmatched rather than attaching to every
// similarly named route.
false

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.

🟡 Feedback beyond three samples stays unmatched

For a route with more than three attempts, receipt_matches_row cannot find identities omitted from its samples. The route-quality producer caps sample IDs at three, so valid feedback is reported unmatched.

Learn more

Route-quality rows expose representative IDs, not a full list of member attempts. ripr_swarm_push_limited_unique stops collecting both sample gap and sample attempt IDs once each list has three entries. The new join uses those samples as its only membership index, so it systematically loses the association for receipts on omitted attempts.

Example: A route has four attempts on four different gaps. A receipt names the fourth attempt and gap, but the row carries only the first three sample IDs. Export places the receipt in unmatched_receipts instead of counting it in the route.

Recommended fix: Join against complete producer-owned attempt membership, or represent the inability to identify unsampled members explicitly rather than calling them unmatched.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +159 to +162
let route_quality_path = options
.route_quality
.clone()
.unwrap_or_else(|| root.join(DEFAULT_ROUTE_QUALITY));

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.

🟡 Relative route-quality path ignores root

With --root set outside the working directory, --route-quality resolves relative to the working directory. export_feedback_join then omits the selected repository's rows or joins against another file.

Learn more

The default path is built under the canonical repository root. A user-supplied relative path is passed directly to the JSON loader, which interprets it relative to the process working directory. The receipt directory still uses --root, so export can combine receipts from one repository with route-quality rows from another.

Example: Run from /tmp with --root /work/project --route-quality target/ripr/reports/route-quality.json. Receipts come from /work/project, but the route-quality input resolves under /tmp and is treated as absent there.

Recommended fix: Resolve relative route-quality paths against the canonical root, while retaining absolute paths as explicit inputs.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +71 to +77
let reason = FeedbackReason::parse(required_str(value, "reason")?)?;
let judgment = FeedbackJudgment::parse(required_str(value, "judgment")?)?;
let judgment_override = if reason == FeedbackReason::Other {
Some(judgment)
} else {
None
};

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.

🟡 Malformed receipts count as valid feedback

When a stored receipt has a mismatched reason and judgment, rendered_receipt_from_value accepts it without validating their relationship. Export counts the derived reason judgment, hiding the malformed input instead of failing closed.

Learn more

The loader parses the stored judgment but discards it for every reason except other. It also omits the domain FeedbackPayload::validate, so a receipt that fails recording's semantic checks can still enter exports. The loader's typed conversion is the read boundary for all stored receipts.

Example: A JSON receipt says reason: "useful_limitation" and judgment: "incorrect". Recording rejects that combination, but export accepts the JSON and counts it as useful.

Recommended fix: Validate the reconstructed payload and require the stored judgment to equal its derived judgment for closed reasons; validate all loaded receipt invariants before the record or join uses it.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +383 to +384
"historical_total": receipts.iter().filter(|receipt| classify_reference(&receipt.identity, live_identity) == ReferenceState::Historical).count(),
"mismatched_total": receipts.iter().filter(|receipt| classify_reference(&receipt.identity, live_identity) == ReferenceState::Mismatched).count(),

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.

🟡 Historical feedback disappears from staleness counts

The public feedback export always passes no live identity, so classify_reference returns current for every receipt. Even receipts stored as historical or mismatched produce zero historical and mismatched counts.

Learn more

The CLI parse_export_options always supplies live_identity: None. classify_reference treats absence of a comparison identity as current, while the export ignores receipt.reference_state. Thus the exported historical and mismatched counters can never represent stored reference states, even when the receipt was recorded with a live comparison by an internal caller.

Example: A receipt stored with reference_state: "historical" is loaded during ripr feedback export; historical_total reports 0 because the CLI has no live comparison identity.

Recommended fix: Either use the stored state when no live identity is provided and label it as recorded-time state, or supply an authoritative current comparison identity and compute export-time currentness. Never claim zero historical records solely from an absent comparison.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +350 to +355
let reviewed_human_useful = receipts
.iter()
.filter(|receipt| {
is_reviewed_human(receipt) && receipt.judgment() == FeedbackJudgment::Useful
})
.count();

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.

🟡 Rejected reviews count as useful approvals

When a human rejects useful feedback, reviewed_human_useful_rate still counts it as useful. is_reviewed_human accepts both reviewed statuses, so rejected judgments inflate the reported rate.

Learn more

The review vocabulary includes reviewed_accepted and reviewed_rejected. is_reviewed_human uses is_reviewed(), which includes both states. The numerator for the reviewed-human useful rate therefore treats a rejected useful submission as a useful reviewed verdict.

Example: The only receipt has reason: "useful_actionable", review_status: "reviewed_rejected", and review_actor_kind: "human". Export reports a reviewed_human_useful_rate of 1.0, even though the human rejected that feedback.

Recommended fix: Decide whether the measure is accepted usefulness or raw submissions reviewed by a human. For the former, restrict the numerator to ReviewedAccepted and expose rejected feedback separately; keep the denominator and rate name consistent with that definition.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +180 to +186
## Implementation Mapping

- `crates/ripr/src/domain/feedback.rs` — typed identity, reason taxonomy, and
reference-state classification
- `crates/ripr/src/app/feedback.rs` — record, load, privacy, join
- `crates/ripr/src/output/feedback.rs` — JSON receipt and join rendering
- `crates/ripr/src/cli/commands/feedback.rs` — `ripr feedback record|export`

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.

🔍 Documentation checklist needs follow-up

The new public command lacks updates to the testing guide, spec-test-code guide, and changelog requested by CONTRIBUTING.md. Reviewers can check whether those omissions are intentional.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +59 to +60
if let Some(path) = out {
crate::atomic_file::write(&path, rendered.as_bytes(), "usefulness-feedback join")?;

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.

🟥 Export writes can overwrite policy artifacts

When feedback export --out names a policy or gate artifact, the command overwrites it with a join document. The unrestricted output path breaks the advertised read-only policy boundary.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@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: 256a44fa77

ℹ️ 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".

ExportFeedbackOptions {
root,
route_quality,
live_identity: None,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Provide a live identity before reporting reference state

When the public feedback export command is used, parse_export_options always sets live_identity to None (and the record parser does the same), so classify_reference always returns Current; consequently historical_total and mismatched_total are permanently reported as zero even after a later attempt or different snapshot. Supply a real comparison identity, or represent these counters as unavailable rather than manufacturing zero-valued evidence.

AGENTS.md reference: AGENTS.md:L237-L239

Useful? React with 👍 / 👎.

let reviewed_human_useful = receipts
.iter()
.filter(|receipt| {
is_reviewed_human(receipt) && receipt.judgment() == FeedbackJudgment::Useful

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Exclude human-rejected receipts from the useful numerator

When an agent records useful_actionable and a human marks it reviewed_rejected, is_reviewed_human is still true and this predicate counts the rejected judgment as useful, producing a reviewed_human_useful_rate of 1.0 for a single rejected receipt. Require ReviewedAccepted for the numerator, or report accepted and rejected review outcomes separately so the rate does not claim human endorsement that the receipt explicitly lacks.

AGENTS.md reference: AGENTS.md:L249-L252

Useful? React with 👍 / 👎.

Comment on lines +73 to +76
let judgment_override = if reason == FeedbackReason::Other {
Some(judgment)
} else {
None

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject contradictory stored receipt judgments

If a stored receipt is edited or emitted by another compatible writer with a closed reason such as wrong_target but judgment: "useful", this parser validates both strings and then silently discards the stored judgment, causing export and idempotency checks to reinterpret the malformed receipt as incorrect. It similarly bypasses the domain relationships enforced by FeedbackPayload::validate; reconstruct and validate the semantic payload, including checking that a closed reason's stored judgment matches its class, so malformed receipts fail closed.

AGENTS.md reference: AGENTS.md:L210-L217

Useful? React with 👍 / 👎.

let key = resolve_idempotency_key(&payload, options.idempotency_key.as_deref())?;
let directory = feedback_directory(&root)?;
let path = receipt_path(&directory, &key)?;
if let Some(existing) = load_receipt_file(&path)? {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make the idempotency conflict check atomic

When two processes concurrently record different payloads under the same previously unused key, both can observe no receipt here and proceed to atomic_file::write; on platforms where rename replaces the destination, both return Created and the last writer silently wins instead of reporting the promised conflict. Use create-if-absent or a per-key lock, then re-read and compare after losing the creation race, and add a concurrent different-payload regression test.

Useful? React with 👍 / 👎.

cursor Bot pushed a commit that referenced this pull request Sep 29, 2026
Resolve index/ledger append conflicts vs origin/main 7fb7353 by keeping
both RIPR-SPEC-0178 (this #4570 route-yield ladder) and landed RIPR-SPEC-0179
from #4684. No extra #3074 collection or #4585 implementation.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
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.

feat(feedback): add local result-bound usefulness receipts before editor or protocol integration

2 participants