Skip to content

fix(settings): address audit findings across settings and billing - #1524

Merged
Makisuo merged 14 commits into
mainfrom
fix/settings-audit-bugs
Oct 17, 2026
Merged

Makisuo merged 14 commits into
mainfrom
fix/settings-audit-bugs

fix(settings): never show a stale simulation or mark an unsaved draft…

2646990
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Oct 17, 2026 in 1m 1s

Confidence 8/10 · No issues found

🟢 Confidence 8/10 · likely safe to merge
The revision guard in PolicySimulator is the risky part and reads correctly; the schema plan matches reconcileSchemaSnapshot line for line.
quality 100/100 · no findings · tests partial · risk medium

The four changed settings files add a revision guard to the policy simulator, lock the escalation draft during saves, and gate ClickHouse Apply behind a confirm dialog that lists the plan. Safe to merge.

  • schemaApplyPlan replaces leftAlone with unresolved plus a reason per entry
  • PolicySimulator hides a decision whose revision predates an edit
  • Escalation controls lock while a save is in flight
  • ClickHouse Apply now opens a ConfirmDialog showing the plan

Fixed since the last review

  • ✅ F1 · leftAlone lists tables Apply will ADD COLUMN to

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
apps/web/src/components/settings/api-keys-section.tsx 25k POST /mcp 12k/day, 0.0% err
POST /mcp 12k/day, 0.0% err
GET /mcp 790/day, 0.0% err
What was checked
  • schemaApplyPlan mirrors reconcileSchemaSnapshot (apps/api/src/workflows/ClickHouseSchemaApplyWorkflow.run.ts:468)
  • useAsyncAction reads the latest callback via actionRef, so policyRevision is not stale (use-mutation-action.ts:16)
  • ConfirmDialog renders children (packages/ui/src/components/ui/confirm-dialog.tsx:96) and MultiSegmentedSelect accepts disabled (segmented-select.tsx:112)

2646990 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.