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
13 changes: 13 additions & 0 deletions .changeset/20361-liveness-counts-sharded.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@objectstack/spec": patch
---

`liveness/state-counts.md` is replaced by `liveness/state-counts/<type>.md`: the generated liveness counts are one shard per governed type, and no total is committed anywhere.

Clause-②: no — no schema key moves, no accept set widens or narrows, no export changes. What changes is the layout of a generated table that ships in the tarball, and no count in it moves.

The ledgers ship inside this package (`files[]` includes `liveness`), so the changed tarball bytes are: `liveness/state-counts.md` removed, forty `liveness/state-counts/<type>.md` shards added (each carries exactly the row that file published for its type), and the prose in `liveness/README.md`, `liveness/book.json` and `liveness/translation.json` that named the removed file.

- **Where a count now lives.** A type's row is `liveness/state-counts/<type>.md`, byte-for-byte the row the single file carried. The table's total is not in any file: `pnpm --filter @objectstack/spec check:liveness` sums the shards when it reads them, prints the sum on its success line, and carries it in `--json` as `countsTotal`. At this release the sum is the total the removed file published: 940 live · 5 experimental · 1 live-elsewhere · 148 dead · 9 planned = 1103 classified.
- **Why.** Every change that moved a liveness verdict rewrote the single file's total row, and GitHub's server-side merge runs no custom merge driver, so any two such changes in flight conflicted on that one line. With one file per type, changes that move different types touch different files.
- **Anything that read `liveness/state-counts.md` from the published package** reads the shard for the type it wants, or sums the shards for the total. `gen:liveness-counts` rewrites only the shards whose counts moved and deletes the removed file if a merge brings it back; `check:liveness` fails while it is present.
18 changes: 14 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,25 @@
# cleanly because they do not overlap, and the subtotal merges clean and WRONG
# (seven cases in one day). Note it is the counts file, not the ledger — the
# ledger's prose is hand-written and must never be resolved by regenerating.
# #20361 sharded it into `….counts/`, one file per source directory, and stopped
# committing its cross-directory totals — the same measured conflict as the
# liveness counts below, in the same driver-less server-side merge.
#
# The liveness state table's counts joined at #7377 for the same reason, one file
# over — 9 of its 30 rows had drifted from the gate before anyone re-ran the
# documented snippet. Same split and the same caveat: `liveness/state-counts.md`
# is the numbers and is driver-managed; `liveness/README.md` is the Notes prose —
# documented snippet. Same split and the same caveat: `liveness/state-counts/` is
# the numbers and is driver-managed; `liveness/README.md` is the Notes prose —
# hand-written measurement of how each type got where it is — and is NOT.
# Regenerating a Note would fabricate a verdict, which that README calls worse
# than a missing row.
#
# #20361 then SHARDED those counts, one file per governed type, and stopped
# committing a total: the single file's shared total row was rewritten by every
# liveness PR, so in the driver-less server-side merge any two of them conflicted
# and each landing left every other one `dirty`, with no CI run until a
# merge-and-regenerate round. The cure is the one the header above records for
# the three hottest artifacts; each gate sums its shards when it reads them.
#
# The elevation census page joined at #13646 — a generated `file:line` anchor
# table whose correct merged values are on NEITHER side of a conflict (measured on
# #13625: five conflicted anchors resolved to 4408/5771/6019/6382/6575 against
Expand Down Expand Up @@ -138,7 +148,7 @@
# neither side.

packages/spec/spec-changes.json merge=os-regen
packages/spec/liveness/state-counts.md merge=os-regen
packages/spec/liveness/state-counts/** merge=os-regen
packages/spec/authorable-surface/** merge=os-regen
packages/spec/authorable-surface.base.json merge=os-regen
packages/spec/authorable-defaults/** merge=os-regen
Expand All @@ -149,7 +159,7 @@ packages/spec/export-origins/** merge=os-regen
packages/spec/declaration-map/** merge=os-regen
packages/spec/api-surface-signatures.json merge=os-regen
docs/protocol-upgrade-guide.md merge=os-regen
docs/audits/2026-07-unknown-key-strictness-ledger.counts.md merge=os-regen
docs/audits/2026-07-unknown-key-strictness-ledger.counts/** merge=os-regen
content/docs/references/** merge=os-regen
content/docs/permissions/system-context.mdx merge=os-regen
skills/*/references/_index.md merge=os-regen
Expand Down
267 changes: 0 additions & 267 deletions docs/audits/2026-07-unknown-key-strictness-ledger.counts.md

This file was deleted.

22 changes: 22 additions & 0 deletions docs/audits/2026-07-unknown-key-strictness-ledger.counts/ai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- GENERATED — DO NOT EDIT BY HAND. -->
<!-- Regenerate: pnpm --filter @objectstack/spec gen:strictness-ledger -->

# `ai/` — unknown-key strictness counts (generated)

The object-site total of `packages/spec/src/ai/`, computed from the AST
(`packages/spec/scripts/lib/strictness-ledger.ts`). The directory is untriaged:
the ledger classifies it coarsely, per directory rather than per file, so this
total is the one number measured here.

The verdicts, the evidence and the exemption rationales live in
[the ledger itself](../2026-07-unknown-key-strictness-ledger.md) and are
hand-written; **this file has no prose to preserve** and is regenerated whole.
One file per directory, and no total across directories is committed anywhere:
`check:strictness-ledger` sums the shards when it reads them. **Never
hand-patch a number here** — fix the code or the verdict and regenerate.

## Site total (untriaged)

| Dir | Sites |
|---|---|
| `ai/` | 78 |
22 changes: 22 additions & 0 deletions docs/audits/2026-07-unknown-key-strictness-ledger.counts/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- GENERATED — DO NOT EDIT BY HAND. -->
<!-- Regenerate: pnpm --filter @objectstack/spec gen:strictness-ledger -->

# `api/` — unknown-key strictness counts (generated)

The object-site total of `packages/spec/src/api/`, computed from the AST
(`packages/spec/scripts/lib/strictness-ledger.ts`). The directory is untriaged:
the ledger classifies it coarsely, per directory rather than per file, so this
total is the one number measured here.

The verdicts, the evidence and the exemption rationales live in
[the ledger itself](../2026-07-unknown-key-strictness-ledger.md) and are
hand-written; **this file has no prose to preserve** and is regenerated whole.
One file per directory, and no total across directories is committed anywhere:
`check:strictness-ledger` sums the shards when it reads them. **Never
hand-patch a number here** — fix the code or the verdict and regenerate.

## Site total (untriaged)

| Dir | Sites |
|---|---|
| `api/` | 431 |
Loading
Loading