feat(spec)!: remove the dead AuditConfig cluster from @objectstack/spec/system (#1878) - #3593
Merged
Merged
Conversation
…ec/system (#1878) The entire system/audit.zod.ts module — AuditConfigSchema, AuditStorageConfig, AuditRetentionPolicy, AuditEventFilter, SuspiciousActivityRule, DEFAULT_SUSPICIOUS_ACTIVITY_RULES, and the AuditEvent* shape schemas — had ZERO consumers repo-wide. The live audit path (plugin-audit) imports none of it: capture is unconditional via engine hooks (compliance ledger), the row shape is owned by plugin-audit's sys_audit_log object, retention rides the object lifecycle `audit` category with per-org settings overrides, and the authoring surface is object/field trackHistory. AuditConfigSchema.enabled even advertised turning the compliance ledger OFF — a semantic the platform deliberately rejects. Same ADR-0056 D8 family as the compliance.zod / masking.zod / RLSAuditConfig / PolicySchema removals. - Delete system/audit.zod.ts + audit.test.ts; drop the export from system/index.ts with a removal note (house pattern). - Drop the 11 manifest ratchet keys; regenerate JSON schemas, reference docs (references/system/audit.mdx removed by regen), and the API surface (21 exports, pure removal). - Fix the stale security-context.zod.ts module doc (audit joins the already removed compliance/masking bullets) and drop the PROTOCOL_MAP.md row (protocol-map gate caught the dangling link). - Annotate the 2026-07 security recheck doc: loose-end #1 done (verified scope = whole module, not just AuditRetentionPolicy); #2 done via #3557. - Changeset (minor per launch-window policy) carries the dead-knob → live- surface migration table. Verified: 6679 spec tests green, tsc clean, check:docs/api-surface/skill-refs/ react-blocks in sync, downstream-contract typecheck clean (gate not pinning any Audit export). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 104 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
This was referenced Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes loose-end #1 of the 2026-07 security-props recheck (#3503, umbrella #1878). Scope was verified larger than the recheck recorded: not just
AuditRetentionPolicySchema— the entiresystem/audit.zod.tsmodule is dead.The design question this answers
审计要不要元数据定义?要 —— 而且已经有了,分三层(与 Salesforce/Dynamics/ServiceNow 的两/三级模式同构):
trackHistory(ADR-0052)+ feed/comment 开关sys_audit_log("audit capture itself is always on for compliance")lifecycleaudit类目 +retention_overrides(ADR-0057)AuditConfigSchema是与这三层平行的第四份从未接线的"配置文档",且enabled: false直接抵触 always-on 合规账本契约。同族先例:compliance.zod/masking.zod/RLSAuditConfig/PolicySchema的 ADR-0056 D8 移除("compliance-grade config must never merely look live")。What changed
system/audit.zod.ts(696 lines:AuditConfig/AuditStorageConfig/AuditRetentionPolicy/AuditEventFilter/SuspiciousActivityRule/DEFAULT_SUSPICIOUS_ACTIVITY_RULES+ theAuditEvent*shape schemas) and its test file. Zero consumers repo-wide — plugin-audit imports none of it; thesys_audit_logrow shape is owned by plugin-audit's own object definition.system/index.tswith a removal note (house pattern next to the compliance/masking note); fix the stalesecurity-context.zod.tsmodule doc (3 of its 4 referenced subsystems are now removed).references/system/audit.mdxremoved by regen), API surface (21 exports, pure removal).PROTOCOL_MAP.mdrow — the protocol-map gate caught the dangling link and its error message prescribed exactly this.minorper launch-window breaking-as-minor policy) carries the dead-knob → live-surface migration table, so an upgrading AI greps straight into the correct authoring path (trackHistory+lifecycle).Verification
tsc --noEmitclean.check:docs/check:api-surface/check:skill-refs/check:react-blocksall in sync.defineStacknever accepted anauditkey, so no stack/example changes needed (the sibling deadauditLoggingboolean in the stack features block is deliberately out of scope — flagged for the aspirational-flags family follow-up).Refs #1878, #3503.
🤖 Generated with Claude Code