Repository navigation
fix(compliance): make full verification resumable and bounded - #7854
Conversation
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — compliance refresh resumability/bounding work reviewed clean.
The reviewer examined all significant production files and found no Critical/High/Medium code defects. Authorization is consistently fail-closed with credential+epoch provenance enforced in code, a DB CHECK, and a trigger; heartbeats and owner refreshes have hard timeouts, lease rechecks, and global suite-slot fencing; compliance reads are org-scoped (tightening, not loosening). Schema↔docs↔openapi are coherent and the sales-guaranteed storyboard correction carries a correct patch changeset. No dist artifacts were mutated.
Checks against decision table:
- No critical/high findings (row 1 N/A).
- gated_paths is false (row 2 N/A).
- high_risk is true, but all high-risk reasons are (added)/(modified) with no (deleted) entries, and no medium findings exist on modified files — rows 3–5 do not fire. New migrations 599/615 and the new hosted-webhook route are (added) scaffolding, not escalation-worthy on the flag alone.
- No prior decision (row 6 N/A).
- No no-auto-approve team match (row 7 N/A).
- Zero medium findings (row 8 N/A).
- Falls through to row 9 → approve.
Two non-blocking operational follow-ups (migration 599's fail-closed startup gate on a live retest; the off-by-default, unvalidated hosted webhook relay) are already documented in the PR and do not rise to medium.
Note: review_decision is REVIEW_REQUIRED, but gated_paths is false so the hard approval gate does not apply, and no Breaking-class protocol change is present (this is an app/server/operational change), so the Breaking-class human-ratification gate does not apply either.
There was a problem hiding this comment.
Ladon verdict: Approve
Approve.
Clean delta pass with no Critical/High/Medium findings. The reviewer confirmed:
server/src/training-agent/tenants/comply.ts—completionTaskScopechange is fail-closed multi-tenant scope narrowing (owner scope preserved; accountId only narrowed via the trusted ingress operator_unit bridge, never widened), covered by the newmb_cross_unit_attackNOT_FOUND test.server/src/routes/hosted-webhook-receiver.ts— safe type-narrowing refactor (byteLength equals length for Buffers).- sdk-runner test and compliance YAML fixtures internally consistent with the
confirm_active→confirm_approvedstoryboard rename.
Decision-table walkthrough:
- Rows 1 (critical/high): no findings → not triggered.
- Row 2 (gated_paths): gated_paths is false → not triggered.
- Row 3 (deleted high-risk path): all high-risk matches are
(modified)or(added), no deletions → not triggered. - Rows 4/5 (medium findings): none → not triggered.
- Row 6 (sticky escalate): prior decision was
approve, not escalate → not triggered. - Row 7 (no-auto-approve team): no team match → not triggered.
- Row 8 (≥3 medium): zero medium → not triggered.
- Row 9: approve.
high_risk is true but the matched files are modifications/additions with no reviewer concerns and new SQL migrations are additions — per the high-risk-flag reading, new files and clean modifications are not escalation-worthy on the flag alone. Prior decision was approve for an earlier head; this delta remains clean.
Blocking findings: none.
Medium findings: none.
Problem
Recent compliance heartbeats for slow sellers repeatedly timed out without an authoritative verdict. The registry kept showing the old badge date, and the owner retest button was paused because queued requests lacked durable authenticated credential provenance. The current
sales_guaranteedstoryboard requested a webhook even though its 3.x contract permits polling.Changes
sales_guaranteedtest to exercise deterministic IO approval andget_task_statuspolling without requesting a task webhook. Validate the exact approved buy through readback. Materialize the sandbox buy before publishing task completion.media_buy_sellersynchronous-create scenarios still block guaranteed-only sellers; this needs a separate versioned baseline and runner change (#7852).Evidence
sales_guaranteed: 14 passed, 0 failed, 0 skipped after removing unrelated non-guaranteed fixture seeding.Deployment / follow-up
HOSTED_COMPLIANCE_WEBHOOK_RECEIVER_ENABLEDoff until a Fly smoke test proves public HTTPS callback ingress, signature validation, and cleanup.Open workspace in Conductor