feat(shipping-process-gates): 落地全门禁中断恢复并消除双真相
纳入 Execution/Gate/Attempt 模型与迁移、Worker/API/前端恢复卡片与 Admin 诊断, Gate 阻断时清零旧 action_buttons,异常摘要统一脱敏,并为运维筛选与 Attempt Diff 补齐入口。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b352c281d5
commit
323928626b
92 files changed
+11930
-458
No files matched your search
@@ -3,7 +3,8 @@ backend/app/models/shipping_audit_event.py
|
||||
|
||||
用途:定义货代领域统一、仅追加的审计事件。
|
||||
依赖:SQLAlchemy Base;Workflow / Run / Task / Intake 等稳定业务编号(软引用)。
|
||||
逻辑:各业务服务通过 audit_service 追加事件;事件不依赖可级联删除的业务外键,保留跨生命周期追溯事实。
|
||||
逻辑:各业务服务通过 audit_service 追加事件;actor_type 含 worker(门禁 Job);
|
||||
事件不依赖可级联删除的业务外键,保留跨生命周期追溯事实。
|
||||
进度审计阶段扩展 operation_id、对象关联、白名单前后快照、证据引用、结果与保留到期时间;
|
||||
Workflow 阶段以 workflow_id / workflow_item_id / workflow_item_version_id 软引用批次与 PDF 项,
|
||||
并写入 previous_event_hash / event_hash 哈希链与 diff_json;另含 owner_user_id 与脱敏
|
||||
@@ -33,7 +34,7 @@ class ShippingAuditEvent(Base):
|
||||
__tablename__ = 'shipping_audit_events'
|
||||
__table_args__ = (
|
||||
CheckConstraint(
|
||||
"actor_type IN ('user', 'system', 'rpa', 'chatflow', 'admin')",
|
||||
"actor_type IN ('user', 'system', 'rpa', 'chatflow', 'admin', 'worker')",
|
||||
name='ck_shipping_audit_events_actor_type',
|
||||
),
|
||||
CheckConstraint(
|
||||
|
||||
Reference in new issue
Block a user