feat(initiatives): add M2M beneficiaries endpoint for Reimbursement Service #507
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 309 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.343
Real PR Conversation Timeline
1 comments
"Review active on #507"
general
weight: 0.35
greptile-apps[bot]
Summary
GET /crowdfunding/initiatives/{id}/beneficiaries, guarded byaccess:manage(same asowner-info). Returns{"data":[{"email":"..."}]}: the distinct, lower-cased, trimmed emails of the initiative's current beneficiaries. Blank and NULL emails are dropped.{"data":[]}. An unknown id returns 404, and so does a non-UUID id, which never reaches the DB. No status filter is applied, matchingowner-info.Cache-Control: private, no-storeandVary: Authorization, since the response is PII.servicesrule inruleset.yaml, so it gets the same services-teamopenfga_checkandaccess:manageJWT asowner-info/published-list. Without it the route would fall through todefault_rule(deny_allin staging/prod).docs/architecture.md,docs/authentication-architecture.md(new §3.1 entry) andbackend/docs/rewrite/04-target-architecture.md, plus the route lists in the chart comments.Why
The Reimbursement Service holds back an expense report, and asks Finance to review it manually, when the submitter isn't a beneficiary of a tagged initiative. It currently decides that from its own Elasticsearch cache, which drifts from the real beneficiary list. One example is report R00EzjNPrgjB, which was flagged for a Jenkins beneficiary. This endpoint lets RS ask Crowdfunding directly. The RS side is linuxfoundation/reimbursement-service (PR linked from there).
initiative_beneficiariesrows are the current set: create, update and mentorship sync replace them wholesale, and there is no pending/removed status, so no extra filtering is needed.Testing
ErrInitiativeNotFound.go test -race -count=1 -p 1 ./...passes against a migrated Postgres.make license-checkpasses.make lintreports only the 6 existing findings onmain, none in changed files.helm templatewithheimdall.enabled=truerenders/crowdfunding/initiatives/:id/beneficiariesunderrule:lfx:lfx-crowdfunding-backend:services.