refactor(spec): remove dead compliance subsystems (ADR-0056 D8) + mark agent visibility EXPERIMENTAL (#1901)#2693
Merged
Conversation
…k agent visibility EXPERIMENTAL (#1901) ADR-0056 D8 said "design + enforce, or remove" for the declared-but-never- enforced surface. Dispositions: REMOVED (no runtime path ever read them; compliance-grade config must never merely look live): - system/compliance.zod.ts (GDPR/HIPAA/PCI ComplianceConfig) + tests - system/masking.zod.ts (MaskingRule/MaskingConfig) + tests — FLS is the enforced field-visibility path; a masking/deny layer arrives with ADR-0066 ⑦/⑧ if needed - security/rls.zod.ts: RLSConfigSchema / RLSAuditEventSchema / RLSAuditConfigSchema — the enforced RLS path (computeRlsFilter) never read the global config; per-policy RowLevelSecurityPolicySchema is unchanged KEPT [EXPERIMENTAL]: system/encryption.zod.ts — real enterprise roadmap item with a stable shape; carrying it marked costs less than remove-and-re-add (ADR-0087). MARKED [EXPERIMENTAL — NOT ENFORCED] (#1901): AgentSchema.visibility — the chat-access evaluator deliberately excludes it and the list route does not filter by it, so `private` does not hide an agent. Schema description + the authoring form now say so; access/permissions (enforced since #1884) are the real gates. Ledger: authz-conformance matrix rows flipped (3× removed with disposition notes, field-encryption note records the keep decision, new agent-visibility experimental row). Generated reference docs regenerated (compliance/masking pages deleted); hand-written security/types/authorization docs synced. Tests: spec 6659 passed (246 files) after removal; api-surface regenerated; liveness ✓; conformance-matrix companion test ✓; full turbo build green. Refs #2561, ADR-0056 D8, #1901 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0187GeNqezxV6g5jiLiggfbt
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 94 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
18 tasks
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What & why
Settles the two remaining honesty-debt items from the authorization gap map (umbrella #2561), per ADR-0049 ("never advertise a capability the runtime doesn't deliver") and ADR-0056 D8's standing instruction for the experimental surface: design + enforce, or remove.
Dispositions
Removed — declared-but-never-enforced, no runtime consumer
system/compliance.zod.ts(+ tests)gdpr:block is a liability in an audit. A real compliance subsystem will be designed top-down (data-subject-rights engine, retention enforcer) when scheduled.system/masking.zod.ts(+ tests)maskingRuleprop was already pruned in 2026-06.RLSConfigSchema/RLSAuditEventSchema/RLSAuditConfigSchemainsecurity/rls.zod.tscomputeRlsFilter) never read them. Per-policyRowLevelSecurityPolicySchema— the live surface — is unchanged.Kept
[EXPERIMENTAL]— deliberateEncryptionConfigSchema(at-rest field encryption): real enterprise roadmap item with a stable shape; carrying it marked costs less than remove-and-re-add (ADR-0087). The keep decision is now recorded in the conformance-matrix note.Marked
[EXPERIMENTAL — NOT ENFORCED]— #1901AgentSchema.visibility: the chat-access evaluator deliberately excludes it and the agent list route doesn't filter by it, soprivatedoes not hide an agent. The schema description and the authoring form's helpText now say so explicitly, pointing authors ataccess/permissions(both enforced at the chat route since [P0][security] Agent access control is a no-op (permissions/visibility/access) #1884 — verified against the liveness ledger, which corrected an earlier stale audit). Enforcement lands with owner/org listing semantics, tracked in [P1][security] Enforce agentvisibility(organization/private) — needs tenant/owner in request context #1901.Ledger & docs
compliance-configs/data-masking/rls-config-globalflipped toremovedwith disposition notes;field-encryptionnote records the keep decision; newagent-visibilityexperimental row.references/system/compliance.mdx,masking.mdxdeleted; index/meta updated).protocol/objectql/security.mdx(Data Masking section → removal note; RLS deny-default rewritten to cite the enforced fail-closed path instead of the removed global config; RLS-audit bullet),protocol/objectql/types.mdx,permissions/authorization.mdxlifecycle table.Tests / verification
spec: 6659 passed (246 files) post-removal; API surface + factory signatures regenerated and re-checked ✓; property-liveness check ✓.turbo buildgreen — confirms nothing in the monorepo imported the removed exports.Refs #2561 · ADR-0056 D8 · ADR-0049 · #1901
🤖 Generated with Claude Code
https://claude.ai/code/session_0187GeNqezxV6g5jiLiggfbt
Generated by Claude Code