Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/building/by-layer/L1/security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2572,7 +2572,7 @@ schema-valid. The annotations are registered as a 4.0 tightening in the
[4.0 compatibility checks](/docs/reference/migration/v4-compatibility#capabilities-stay-within-their-structural-bounds).

**Worst case.** With the 4.0 bounds applied, the largest schema-valid
capabilities document is 91,261,876 bytes (about 87 MiB), counting only the
capabilities document is 91,262,197 bytes (about 87 MiB), counting only the
members the schema declares. `scripts/capabilities-structural-bounds.cjs` computes it
and `tests/capabilities-structural-bounds.test.cjs` pins it, so the figure moves
only when a limit moves. The calculation assumes every declared member is
Expand All @@ -2582,7 +2582,7 @@ patterned or formatted strings one. The largest blocks are `creative` (27 MiB),
`media_buy` (27 MiB), `adcp` (12 MiB), `governance` (6 MiB), `account` (5 MiB),
and `measurement` (4 MiB). Objects that admit undeclared members, such as `ext`
and context, are open: the schema cannot bound what a producer adds there, and
104 positions in the response are open in this sense.
105 positions in the response are open in this sense.

The multipliers behind that figure are nested object lists inside shared
schemas: a brand reference (`brand-ref`, up to 111 KiB each, most of it
Expand Down
4 changes: 2 additions & 2 deletions tests/capabilities-structural-bounds.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const read = (...p) => fs.readFileSync(path.join(ROOT, ...p), 'utf8');
const security = read('docs/building/by-layer/L1/security.mdx');

// The documented worst case. Update security.mdx with this number.
const DOCUMENTED_WORST_CASE_BYTES = 91_261_876;
const DOCUMENTED_OPEN_POSITIONS = 104;
const DOCUMENTED_WORST_CASE_BYTES = 91_262_197;
const DOCUMENTED_OPEN_POSITIONS = 105;

const rows = bounds.coverage();
const KEYWORD_BY_KIND = { array: 'maxItems', string: 'maxLength', map: 'maxProperties' };
Expand Down
Loading