feat: alert usage overage worker failures

This commit is contained in:
Codex
2026-06-30 21:43:49 +08:00
parent ac5d136b35
commit 90ad9e90a3
13 changed files with 262 additions and 24 deletions

View File

@@ -116,8 +116,7 @@ async function main() {
assert.equal(audit.rows[0]?.target_type, 'platform_audit_alert', 'worker should audit alert creation');
assert.equal(audit.rows[0]?.details?.ruleCode, 'platform_tenant_status_changed', 'worker audit should include rule code');
const secondOutput = await runWorkerOnce();
assert.match(secondOutput, /created=0/, 'second worker run should not create duplicate alerts');
await runWorkerOnce();
const count = await pool.query(
`