feat: Plan 10 PR C — de-emphasis signal + counterfactual removal report - #34
Conversation
- deEmphasisService: compute bootstrap vs organic weighted contribution over
trailing 30 days; count independent organic issuers by distinct
(owner_tenant_id, entity_kind) provenance; check 30-day window continuity
- counterfactual removal report: load graph, override root weight to requested
target (0 or 0.5), re-run VeriRank via gRPC (no write), compare per-principal
scores against serving tenant active policy threshold; bind report to
{targetWeight, graphVersion}; validateReportFreshness rejects stale/mismatched
- readiness gate: >=3 independent organic issuers, >=80% organic contribution,
continuous 30-day window, no principal drops below threshold; all conditions
must hold for ready=true
- GET /v1/admin/bootstrap/de-emphasis (staff): returns contribution split +
per-candidate readiness + counterfactual report
- integration tests (6, skipped without trust engine): 2 vs 3 independent
issuers, 79% vs 80% organic, window continuity, threshold drop, partial vs
full removal, stale graph version rejection
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
@coderabbitai review |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 5 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
Comment |
|
Plan 10 PR C — De-emphasis signal + counterfactual removal report
Depends on: PR A (#32) + PR B (#33, merged)
Changes
deEmphasisService.ts — Three core capabilities:
Contribution split — bootstrap vs organic weighted contribution over trailing 30 days. Bootstrap-origin attestations excluded from organic count (decision 6). Independent organic issuers counted by distinct
(owner_tenant_id, entity_kind)provenance. 30-day window continuity check.Counterfactual removal report —
computeCounterfactualRemovalReport(rootId, targetWeight): loads current graph, overrides root weight to requested target (0, 0.5, etc.), re-runs VeriRank via gRPC (no write), compares per-principal scores against serving tenant's active policy threshold. Report bound to{targetWeight, graphVersion};validateReportFreshnessrejects stale/mismatched reports.Readiness gate — all conditions must hold: ≥3 independent organic issuers, ≥80% organic contribution, continuous 30-day window, no principal drops below serving tenant threshold.
Route —
GET /v1/admin/bootstrap/de-emphasis(staff): returns contribution split + per-candidate readiness + counterfactual report.Tests (6, skip without trust engine)
Plan decisions covered
Acceptance criteria met
GET /v1/admin/bootstrap/de-emphasisreturns contribution split + per-candidate counterfactualde_emphasis_reason+approved_by(PR A)