Repository navigation
Open
Labels
P1High priority — should be in this milestoneenhancementNew feature or requestoperatorGo operator (controller) worksecuritySecurity hardening and vulnerabilities
Description
Scope (rescoped 2026-10-22)
Keep approval outcomes and their receipt evidence for the loan-review governance PoC.
This issue no longer covers an RL training loop or a separate feedback database.
Context
Main already contains related work from #206 and #207.
pkg/approval handles approve, reject, and edit decisions stamped by the admission webhook.
pkg/receipts records human-layer decisions with a pseudonymous approver digest.
This rescope does not mark that work complete for the PoC.
Acceptance
- Approve, reject, and edit outcomes from the loan-review console each produce a signed human-layer receipt.
- Each receipt binds the outcome to the pending action and the approver digest.
- Offline verification passes for an untouched chain and fails after tampering.
- A recorded approval decision is not lost if the operator restarts before its receipt is written. Carried over from RL feedback persistence — store feedback history in etcd/PVC for crash recovery #88.
- Tests cover each outcome and the restart case.
Non-goals
- RL training, calibration, or threshold tuning.
- A Postgres
feedback_historytable or a Kafka topic.
Original scope before the 2026-10-22 rescope
RL feedback controller — capture approve/reject signals from OPA gates
Build the RL feedback controller that listens to OPA approval/rejection events and persists them as training signal.
**Acceptance:**
- [ ] OPA approval webhook fires ApprovalEvent → Postgres feedback_history
- [ ] Event includes: agent_id, action_class, proposed_confidence, human_decision, decision_latency_ms
- [ ] Audit trail for compliance
Metadata
Metadata
Assignees
Labels
P1High priority — should be in this milestoneenhancementNew feature or requestoperatorGo operator (controller) worksecuritySecurity hardening and vulnerabilities
Activity
shreyanshjain7174 commentedon Apr 26, 2026
Deep research synthesis (2026-04-26)
Full research note (~2.5k words, 12 primary sources):
Obsidian/NineVigil/01-Research/RL Feedback Loop - Deep Research. Posting the load-bearing conclusions here so the design lives on the issue.TL;DR design choice for v0.2.0
Ship as per-bucket online recalibration + threshold optimisation with ADWIN drift detection and shrinkage-based cold-start, marketed as the "RL feedback loop". Not full RL, not a neural policy network, not contextual bandits — the data regime (~10²/week feedback) does not support those, and the literature shows they fail badly at this scale.
Why not full RL (PPO / RLHF style)
Why not contextual bandits (yet)
(persona, action_type)cell. With ~50 cells and ~10²/week, per-cell convergence takes ~12+ months.Why calibration + threshold tuning IS the right frame
--reject.Drift detection: ADWIN per bucket
river.drift.ADWINon the per-bucket reward stream (1=approved, 0=rejected). When drift fires:Status.Conditions[type=CalibrationDrift]=TrueonAgentPersona.This catches model-upgrade drift, persona-behaviour drift, and tool-set changes. Without it we silently auto-approve dangerous actions for weeks.
Cold-start (first 50 decisions per bucket)
Empirical-Bayes shrinkage to a higher-than-steady-state global prior. Fall back through (bucket → persona-marginal → action-type-marginal → global). Better to over-ask the human in week 1 than to under-ask.
Concrete data model (informs #88)
Persisted in Postgres (same DB as LangGraph checkpoints), not etcd.
Open design questions (need decisions before #82 implementation lands)
agent does wrong thingvsextra human ask. Default proposal: α=100, β=1, configurable perAgentPersona.feedbackContributesToGlobalPrior: bool?Status.CurrentThresholdper persona in CRD status — yes/no. (My recommendation: yes; hiding it makes ops blind.)Cascade impact on sibling issues
--rejected-ruleflag, not just boolFeedbackEventaboveUpgrade path (no rewrites required)
Each swaps one component without touching the controller.
Sources (full bibliography in research note)
12 primary sources: arxiv 2207.05221, 2212.08073, 2203.02155, 2209.14375, 2309.00267, 2401.10020, 2305.14975, 2306.13063, 2107.07511, river docs, Langfuse user-feedback docs, LangSmith.
cc #83 #84 #85 #86 #87 #88 — this synthesis is the input for those design discussions.
feat(cli): add agentctl reject command with --rule and --reason flags (…
feat(cli): add agentctl reject command with --rule and --reason flags (…
[-]RL feedback controller — capture approve/reject signals from OPA gates[/-][+]Approval outcomes as signed receipt evidence[/+]shreyanshjain7174 commentedon Oct 22, 2026
Rescoped to approval outcomes and receipt evidence for the loan-review governance PoC.
The RL training loop and the separate feedback database are outside this phase.
The restart durability requirement from #88 is preserved here.
#88 closes as not planned.
Related code exists on main, but this issue is not marked completed.
Labels now reflect the current scope, and the old RL milestone was removed.
The original scope is kept in the body.