Skip to content

Commit 4885112

Browse files
committed
docs(spec): ADR-0056 D8 — mark unenforced compliance/encryption/masking/RLS-config EXPERIMENTAL
Honesty pass per ADR-0049/ADR-0056 D8: the security-adjacent schemas with no runtime consumer get an explicit `⚠️ EXPERIMENTAL — NOT ENFORCED` header (GDPR/HIPAA/PCI, encryption, masking, security-context governance, global RLSConfig + RLSAuditEvent). The ENFORCED RowLevelSecurityPolicySchema is deliberately left unmarked. Comment-only; spec builds; liveness gate green (these aren't governed types — the markers are documentation honesty, not a gate change). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XVdnfUAx85amkerym26vdx
1 parent 37e9acb commit 4885112

6 files changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
docs(spec): mark unenforced compliance/encryption/masking/RLS-config surface EXPERIMENTAL (ADR-0056 D8)
6+
7+
Per ADR-0049's enforce-or-remove gate (and ADR-0056 D8), the security-adjacent
8+
schemas that are parsed but have **no runtime consumer** now carry an explicit
9+
`⚠️ EXPERIMENTAL — NOT ENFORCED` header so the no-op is visible to authors and the
10+
reference docs: GDPR/HIPAA/PCI compliance configs, field-level encryption, data
11+
masking, the unified security-context governance, and the global `RLSConfig` /
12+
`RLSAuditEvent` (distinct from the ENFORCED `RowLevelSecurityPolicySchema`, which is
13+
left untouched). No behaviour change — these were already inert; the marker makes
14+
the inertness honest rather than silent.

packages/spec/src/security/rls.zod.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@ export const RowLevelSecurityPolicySchema = lazySchema(() => z.object({
422422
*
423423
* Records a single RLS policy evaluation event for compliance and debugging.
424424
*/
425+
// ⚠️ EXPERIMENTAL — NOT ENFORCED (ADR-0056). RLS audit events are not emitted by the
426+
// runtime RLS path — no consumer writes these. Authoring does NOT change behaviour (per ADR-0049).
425427
export const RLSAuditEventSchema = lazySchema(() => z.object({
426428
/** ISO 8601 timestamp of the evaluation */
427429
timestamp: z.string()
@@ -518,6 +520,8 @@ export type RLSAuditConfig = z.infer<typeof RLSAuditConfigSchema>;
518520
* Global configuration for the Row-Level Security system.
519521
* Defines how RLS is enforced across the entire platform.
520522
*/
523+
// ⚠️ EXPERIMENTAL — NOT ENFORCED (ADR-0056). Global RLSConfig (defaultPolicy / bypassRoles /
524+
// caching / audit) is not read by the SecurityPlugin RLS path. Authoring does NOT change behaviour (per ADR-0049).
521525
export const RLSConfigSchema = lazySchema(() => z.object({
522526
/**
523527
* Global RLS enable/disable flag.

packages/spec/src/system/compliance.zod.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
22

33
import { z } from 'zod';
4+
5+
// ⚠️ EXPERIMENTAL — NOT ENFORCED (ADR-0056). The GDPR/HIPAA/PCI-DSS schemas below
6+
// are parsed but have NO runtime consumer — no data-subject-rights engine,
7+
// retention enforcer, BAA gate, or tokenizer reads them. Authoring them does NOT
8+
// change behaviour; recorded as roadmap intent (M2+). Do not rely on them for
9+
// compliance until a consumer lands (per ADR-0049 enforce-or-remove).
410
import { ComplianceFrameworkSchema } from './security-context.zod';
511

612
/**

packages/spec/src/system/encryption.zod.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
import { z } from 'zod';
44

5+
// ⚠️ EXPERIMENTAL — NOT ENFORCED (ADR-0056). Field-level encryption is declared but
6+
// no runtime crypto provider reads this config to encrypt/decrypt at rest.
7+
// Authoring it does NOT change behaviour (roadmap M2+; per ADR-0049).
8+
59
/**
610
* Field-level encryption protocol
711
* GDPR/HIPAA/PCI-DSS compliant

packages/spec/src/system/masking.zod.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
import { z } from 'zod';
44

5+
// ⚠️ EXPERIMENTAL — NOT ENFORCED (ADR-0056). Data-masking rules are declared but no
6+
// redaction layer applies them — Field-Level Security (PermissionSet.fields) is the
7+
// enforced field-visibility mechanism today. Authoring masking does NOT change
8+
// behaviour (roadmap M2+; per ADR-0049).
9+
510
/**
611
* Data masking protocol for PII protection
712
*/

packages/spec/src/system/security-context.zod.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
import { z } from 'zod';
44

5+
// ⚠️ EXPERIMENTAL — NOT ENFORCED (ADR-0056). The unified security-context governance
6+
// (audit/encryption/masking/compliance correlation) is declared but has no runtime
7+
// consumer. Authoring it does NOT change behaviour (roadmap M2+; per ADR-0049).
8+
59
/**
610
* Unified Security Context Protocol
711
*

0 commit comments

Comments
 (0)