固化七月迭代审计治理进展以隔离线上热修

Constraint: 切换 main 前必须保存当前七月分支全部项目进展,套餐生效提案仅属于 Iteration/7-11。

Rejected: 将七月套餐修复直接移植到 main | 两个分支的可靠投递架构不同。

Confidence: medium

Scope-risk: broad

Directive: 不得将本提交整体 cherry-pick 到 main;main 套餐热修必须基于其纯 Asynq 代码独立实施。

Tested: git diff --check;openspec validate fix-package-activation-starvation --strict。

Not-tested: 按用户要求未运行自动化测试;go build ./... 因当前审计改造中的 Enterprise 模型字面量和 role.recordFailure 参数类型错误未通过。
This commit is contained in:
2026-08-03 09:47:22 +08:00
parent cf2ff0ac1c
commit b3499adfca
114 changed files with 16961 additions and 2782 deletions

View File

@@ -0,0 +1,25 @@
-- 回滚外部集成调查组合索引,并恢复原有技术序列与业务链路索引定义。
DROP INDEX idx_integration_log_result_created;
DROP INDEX idx_integration_log_provider_created;
DROP INDEX idx_integration_log_external_created;
DROP INDEX idx_integration_log_audit_event_created;
DROP INDEX idx_integration_log_trigger;
CREATE INDEX idx_integration_log_trigger
ON tb_integration_log (trigger_series, attempt);
DROP INDEX idx_integration_log_correlation;
CREATE INDEX idx_integration_log_correlation
ON tb_integration_log (correlation_id, created_at ASC)
WHERE correlation_id IS NOT NULL;
COMMENT ON TABLE tb_integration_log IS '外部集成调用、回调及未发送尝试记录';
COMMENT ON COLUMN tb_integration_log.id IS '外部集成记录主键ID';
COMMENT ON COLUMN tb_integration_log.result IS '尝试结果pending仅为内部执行态其余为公开终态';
COMMENT ON COLUMN tb_integration_log.provider IS '外部服务提供方稳定编码';
COMMENT ON COLUMN tb_integration_log.external_id IS '外部系统返回的业务或请求标识';
COMMENT ON COLUMN tb_integration_log.audit_event_id IS '关联审计事件ID仅代码显式维护且不建立外键';
COMMENT ON COLUMN tb_integration_log.trigger_series IS '同一次外部操作显式技术尝试序列的稳定标识';
COMMENT ON COLUMN tb_integration_log.attempt IS '同一技术尝试序列内的单调尝试序号';
COMMENT ON COLUMN tb_integration_log.correlation_id IS '跨请求、异步任务与业务后续步骤的关联ID最长100字符';
COMMENT ON COLUMN tb_integration_log.created_at IS '外部集成记录创建时间';