Skip to content

Commit e8d402b

Browse files
committed
test(spec): record the override declaration in the form and flow-slot ledgers
The full spec suite named three pins the new key reaches: - the metadata form reconciliation: `overrides` is accepted by eight schemas whose hand-written forms do not offer it. Each gets a root ledger row: the declaration is `planned` and Studio writes it on a customization, so a hand-filled control is not how it is authored. - the flows translation face: `flow.overrides` is a base package id and a version, never drawn for a person running the flow. - the description renderer's count of level-1 module openers: the new module's header now opens at level 2, so the count stands. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2fi9zfJhUTubyJYb6V
1 parent 395b5e1 commit e8d402b

3 files changed

Lines changed: 69 additions & 3 deletions

File tree

‎packages/spec/src/kernel/override-declaration.zod.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { z } from 'zod';
44
import { strictObject } from '../shared/strict-object';
55

66
/**
7-
* # The override declaration (ADR-0146 D2)
7+
* ## The override declaration (ADR-0146 D2)
88
*
99
* A customization of an installed base package (HotCRM) is an item of the
1010
* base's paired writable package `<base>.custom` (ADR-0146 D3). An item of that
@@ -22,7 +22,7 @@ import { strictObject } from '../shared/strict-object';
2222
* ruling recorded on #28390, ruling A); the pairing helpers in
2323
* `customization-package.ts` are what a door asks.
2424
*
25-
* ## Why a leaf module
25+
* ### Why a leaf module
2626
*
2727
* It imports nothing but zod and `strictObject`, on purpose. Every overridable
2828
* type's schema spreads {@link OverrideDeclarationFields}, and some of those
@@ -32,7 +32,7 @@ import { strictObject } from '../shared/strict-object';
3232
* The helpers that need the manifest grammar live in `customization-package.ts`,
3333
* which no schema imports.
3434
*
35-
* ## What this module does NOT do
35+
* ### What this module does NOT do
3636
*
3737
* It declares the shape. Admitting a declared override, refusing an undeclared
3838
* same-named item, refusing a declaration from a package that is not the pair,

‎packages/spec/src/system/flows-translation-face.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ const RUNNER_SLOTS: Readonly<Record<string, Disposition>> = {
116116
'flow._packageId': noReader(FRAMEWORK_FIELD),
117117
'flow._packageVersion': noReader(FRAMEWORK_FIELD),
118118
'flow._lockDocsUrl': noReader(FRAMEWORK_FIELD),
119+
'flow.overrides': noReader(
120+
'the override declaration (ADR-0146 D2): a base package id and the base version the override was taken from, '
121+
+ 'read by the customization doors and never drawn for a person running the flow',
122+
),
119123

120124
// FlowNodeSchema (its `config` is judged per type below)
121125
'node.id': noReader('the node id — the address of `screens.<node_id>`, `refusals.<node_id>` and `approvals.<node_id>`'),

‎packages/spec/src/system/metadata-form-zod-reconciliation.test.ts‎

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,68 @@ const LEDGER: ReadonlyArray<OmitEntry | SubsetEntry> = [
657657
// the first arm form rather than for this ledger. `scope` has no live writer
658658
// of `shared` or `personal`, so there is no platform-written state to give as
659659
// the reason; `owner` and `hidden` are no longer writable at all.
660+
661+
// ADR-0146 D2 — the override declaration lands spec-first: `planned` in the
662+
// liveness ledger, admitted by no write gate and served by no read until the
663+
// ADR-0146 doors land. Studio writes it when an administrator customizes a
664+
// base item into its `<base>.custom` package; a form control an author fills
665+
// by hand would declare an override nothing yet honours.
666+
{
667+
kind: 'omit',
668+
type: 'report',
669+
path: ROOT_PATH,
670+
key: 'overrides',
671+
why: 'declared, not enforced yet — liveness verdict `planned`: the override declaration (ADR-0146 D2) parses, is stored and travels through export, but no door admits or serves it until the write gate and the effective read land. Studio writes it when it saves a customization into `<base>.custom`; a hand-filled control is not how it is authored',
672+
},
673+
{
674+
kind: 'omit',
675+
type: 'dataset',
676+
path: ROOT_PATH,
677+
key: 'overrides',
678+
why: 'declared, not enforced yet — liveness verdict `planned`: the override declaration (ADR-0146 D2) parses, is stored and travels through export, but no door admits or serves it until the write gate and the effective read land. Studio writes it when it saves a customization into `<base>.custom`; a hand-filled control is not how it is authored',
679+
},
680+
{
681+
kind: 'omit',
682+
type: 'app',
683+
path: ROOT_PATH,
684+
key: 'overrides',
685+
why: 'declared, not enforced yet — liveness verdict `planned`: the override declaration (ADR-0146 D2) parses, is stored and travels through export, but no door admits or serves it until the write gate and the effective read land. Studio writes it when it saves a customization into `<base>.custom`; a hand-filled control is not how it is authored',
686+
},
687+
{
688+
kind: 'omit',
689+
type: 'dashboard',
690+
path: ROOT_PATH,
691+
key: 'overrides',
692+
why: 'declared, not enforced yet — liveness verdict `planned`: the override declaration (ADR-0146 D2) parses, is stored and travels through export, but no door admits or serves it until the write gate and the effective read land. Studio writes it when it saves a customization into `<base>.custom`; a hand-filled control is not how it is authored',
693+
},
694+
{
695+
kind: 'omit',
696+
type: 'action',
697+
path: ROOT_PATH,
698+
key: 'overrides',
699+
why: 'declared, not enforced yet — liveness verdict `planned`: the override declaration (ADR-0146 D2) parses, is stored and travels through export, but no door admits or serves it until the write gate and the effective read land. Studio writes it when it saves a customization into `<base>.custom`; a hand-filled control is not how it is authored',
700+
},
701+
{
702+
kind: 'omit',
703+
type: 'page',
704+
path: ROOT_PATH,
705+
key: 'overrides',
706+
why: 'declared, not enforced yet — liveness verdict `planned`: the override declaration (ADR-0146 D2) parses, is stored and travels through export, but no door admits or serves it until the write gate and the effective read land. Studio writes it when it saves a customization into `<base>.custom`; a hand-filled control is not how it is authored',
707+
},
708+
{
709+
kind: 'omit',
710+
type: 'flow',
711+
path: ROOT_PATH,
712+
key: 'overrides',
713+
why: 'declared, not enforced yet — liveness verdict `planned`: the override declaration (ADR-0146 D2) parses, is stored and travels through export, but no door admits or serves it until the write gate and the effective read land. Studio writes it when it saves a customization into `<base>.custom`; a hand-filled control is not how it is authored',
714+
},
715+
{
716+
kind: 'omit',
717+
type: 'email_template',
718+
path: ROOT_PATH,
719+
key: 'overrides',
720+
why: 'declared, not enforced yet — liveness verdict `planned`: the override declaration (ADR-0146 D2) parses, is stored and travels through export, but no door admits or serves it until the write gate and the effective read land. Studio writes it when it saves a customization into `<base>.custom`; a hand-filled control is not how it is authored',
721+
},
660722
];
661723

662724
// ────────────────────────────────────────────────────────────────────────────

0 commit comments

Comments
 (0)