Repository navigation
Conversation
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. |
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
|
Code review on PR #20555 (head 4e71238): changes needed. Read only; nothing was run. The read scoping is right: admins see all, others get the same 404 as a missing gate, matching the inbox rule. The sweep's conditional claim handles a racing decision and deletes nothing.
|
|
Code review on PR #20555 (head 276a150): approve. Read only; nothing was run. All 7 write routes apply the same owner-or-admin 404 before any service call, tested per route, agreeing with the existing inbox rule. A sourced gate whose owner is gone depends on an admin, and no delegated reviewer exists; that's a separate product question, not new here. The Postgres resume-once test remains unrun, as stated. |
Auto-sync: merging
|
| side | commit | subject | issue refs |
|---|---|---|---|
| main | 2c5b5b73f |
fix(train): reach floors return to mid-window on the merged tree (#20452) | #20452 |
| this branch | 4e712384c |
fix(frontend): re-pin the reach floors this branch moved (#18413) | #18413 |
|
Landed on main via train merge 9dccf70 (train PR #20841); the PR head tree equals origin/main (git diff origin/main...232628d and git diff origin/main 232628d are both empty). The four commits are 'Merge main into' auto-sync merges with no content, and git cherry lists nothing because it skips merges. Closing. |
|
Branch deleted after verification: every commit is in main and the branch shows 0 changed files against main. Restore it from this PR if needed. |
Thinking Path
GET /approval-gatesandGET /approval-gates/{id}returned an approval's context to any caller, while the pending list already filtered by owner. Andexpire_staleexisted with only a test calling it, so stale rows were never swept.What Changed
approval_gate_service.py: one rule,visibility(viewer, is_admin), shared by the list, the single read andlist_pending, andget_visible. Someone else's approval is a 404 identical to a missing one. A sourced row with no owner is admin-only.ApprovalExpiryScheduler, started bystart_background_workersand drained at shutdown, interval fromAUTOBOT_APPROVAL_EXPIRY_SWEEP_INTERVAL_S. It only changes status and deletes nothing./api/llc/approvals, unaffected: these routes already exclude company rows.Verification
approval_gates_ownership_18413_test.py: owner reads, another user gets the same 404, admin reads all.approval_expiry_scheduler_18412_test.py: 6 passed, including a failing sweep that does not stop the loop. Neighbouring worker and shutdown tests pass.test_approval_inbox_query_13421.py). Other SLM or service callers of these GET routes were not searched.approval_gates.py.Model Used
Claude Sonnet for the implementation, Claude Opus for coordination.
Single-issue rationale
Closes nothing outright. Refs #18412, whose scheduled sweep this delivers, and #18413, whose third criterion names S2a and S2e sub-issues of #13421 that do not exist. The approve and reject ownership gap is tracked on #17161.