Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d04abf7
feat: draw the spot-check at a proved landing
REPPL Nov 25, 2026
04fe789
chore: build the beacon check on circl v1.6.3
REPPL Nov 25, 2026
9f8e5bd
chore: name the beacon's public key so no scanner reads it as a secret
REPPL Nov 25, 2026
b96c0a1
test: switch the observation off without a second init
REPPL Nov 25, 2026
15da44a
fix: mirror the spot-check row in the push-gate tripwire
REPPL Nov 25, 2026
269c8af
fix: draw each spot-check window from the round its close fixes
REPPL Nov 26, 2026
550e4c2
fix: recompute each spot-check cycle's window from the default branch
REPPL Nov 26, 2026
3b4c941
fix: hold the spot-check's first window to its commit's place on the …
REPPL Nov 26, 2026
be30677
chore: merge main into the spot-check branch
REPPL Nov 26, 2026
82ce238
fix: keep the spot-check's record populations listed and bounded
REPPL Nov 26, 2026
2a5a3b0
docs: bring the spot-check's trust decision up to its ADR
REPPL Nov 26, 2026
d21e779
feat: observe the spot-check at a drain move
REPPL Nov 26, 2026
f2e23fa
fix: check the spot-check hook's object names without a regex test
REPPL Nov 26, 2026
6dc3f9b
chore: defer bounding the spot-check's read of its local copy
REPPL Nov 26, 2026
d4fbfea
fix: fill a spot-check window from records that read, and size the block
REPPL Nov 26, 2026
8c9f24e
fix: draw a spot-check group from the records it listed within its bound
REPPL Nov 26, 2026
c88c8f1
chore: merge main into the spot-check branch
REPPL Nov 26, 2026
acf47cd
fix: name the listing form of the person's git in the drive's table
REPPL Nov 27, 2026
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
16 changes: 16 additions & 0 deletions .abcd/development/brief/02-constraints/03-invariants.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,22 @@ The following are non-negotiable invariants — any architectural choice that vi
around each such delete, and the reservation sweep's workflow started
through the forge client (`gh workflow run`) with its newest run read
back. It never pushes a reservation deletion itself.
The spot-check's store (itd-2610301750162657, `abcd-spotcheck` on
`origin`) is fetched and pushed only where a landing has just been proved:
`land` once a re-run finds the branch landed, and `implement step` once a
lane's landing is proved, whose meaning includes the spot-check's
observation. While the window has not passed the observation reads the
store as last fetched, from disk, and makes one push of the records this
checkout holds that origin's copy lacks, or nothing when it holds none.
Once the window has passed (or before the first window opens) it makes one
fetch of the store's branch, one fetch of the drand beacon's round that the
window's close fixes, asked by number over HTTPS from `api.drand.sh` (then
`api2.drand.sh`, then `api3.drand.sh` when one before cannot be reached),
within ten seconds in all and only once that round is published, the
landings reader's forge reads for the window, and one push of the cycle,
each tried once more after a fresh fetch when origin refuses it.
Only typed fields leave the machine: a record's free text stays on its local
copy.
Setup (`abcd ahoy install`) downloads abcd only on a yes to the question
that names the download, the release and the file it is written to, which
is that fetch's documented meaning: the release's binary for this computer,
Expand Down
5 changes: 5 additions & 0 deletions .abcd/development/brief/04-surfaces/27-implement.md
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,11 @@ started, whose reservation lapses with its lease),
whether a drain or `abcd build <iss-N>` started it (iss-2610142247197128); an
intent's run keeps its reservation through a hand-back. A run holding no reservation
is neither renewed nor tombstoned, and its own reservation is not fenced.
Once a lane's landing is proved, the step observes it for the spot-check
(itd-2610301750162657), as `abcd land` does at a landed re-run
([`38-land.md`](38-land.md)), and the landing's note carries the
observation's line; a draw that cannot be made writes nothing and never undoes
the landing.

The land fence also reads the release hold (itd-2609151838312703 C7,
spc-2610150728396006 step 4). Every run's fence, one holding a reservation or
Expand Down
27 changes: 27 additions & 0 deletions .abcd/development/brief/04-surfaces/38-land.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,33 @@ with no approval, so abcd enforces this itself. Every forge read the gate
makes is a GET, its fields pinned in `internal/ghcontract` after a live
read-only call, and a forge answer that cannot be read counts for nothing.

## The spot-check at a landing

A re-run that finds the branch landed observes the landing for the spot-check
(itd-2610301750162657, `internal/core/spotcheck`), and the `landed` step's note
carries the observation's line. In `auto` mode the gate's decision abcd takes
alone, and a re-arm the release hold makes, are each kept on the checkout's
local copy of the store (`refs/abcd/spotcheck`), with the mode's layer and
whether a review receipt named the head. While the window has not passed, the
observation reads the store as last fetched and pushes only records origin's
branch `abcd-spotcheck` lacks. Once it has passed it fetches the branch, takes
the verified round of the drand quicknet beacon that the window's close fixes
on the chain's pinned clock (asked by number once published, its signature
checked against the pinned key, ten seconds in all), draws by HMAC over the
round's randomness, and pushes the cycle over the tracking tip, tried once more
after a refusal. Every cycle read back is verified the same way and set aside
when it fails, and a branch that no longer holds this machine's high-water
mark is refused once a fetch confirms it (a copy only behind the mark, which
another clone on the machine moved, is fetched first). A draw reads only the
records no earlier cycle listed, and lists every record population whole, at
most 1,000 keys a window, the rest waiting for the next, so a later draw knows
each record already drawn from
([dcn-2611260013430233](../../../work/decisions/dcn-2611260013430233-the-technical-facilitator-under.md)).
Only typed fields reach origin, and an observation that cannot draw writes
nothing and leaves the landing proved. The branch takes no preflight receipt:
the pre-push hook admits it by a row of its own
([adr-2611251806496719](../../decisions/adrs/2611251806496719-the-spot-check-s-store-branch-is-pushed.md)).

## Trust boundaries

- The remote is `origin` alone, and its every fetch and push URL must be the
Expand Down
36 changes: 36 additions & 0 deletions .abcd/development/brief/05-internals/03-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,42 @@ may run to in this repository: a whole number from 16 to 200, 40 by default
- **What it does not bound.** An idea's slug in `ideate`, whose verdict record is not
one of these families, keeps its own limit of 64, and a checklist item's id its own.

### The spot-check keys

The `spotcheck` block sets the spot-check's window and its sample
(`internal/core/spotcheck/config.go`, itd-2610301750162657). A window is
governed by the repository layer alone, as the default branch stores it at the
commit the window starts at: a value only in the working tree, a change landed
inside the window, or a machine's own layer sizes no draw, so every reader of a
cycle checks it by the same values.

```jsonc
{
"spotcheck": {
"window_days": 7, // 1 to 90; bundled default 7
"window_changes": 0, // 10 to 100000; 0 or absent is unset
"per_group": 10 // 1 to 100; bundled default 10
}
}
```

- **The first bound to pass closes the window.** A window spans everything since
the last cycle and closes as the default branch's first-parent line gives it:
`window_days` whole days after it began, once a commit was committed after
that moment, or, when set, at the `window_changes`-th commit, whichever comes
first on the line. The draw is made at the first landing observed after the
round that close fixes is published.
- **`per_group` is the most a group draws.** The size halves, rounded up, after
three closed cycles in a row found nothing, and is whole again after a finding.
- **A block that does not read counts its window by the defaults.** A value out
of bounds or not a whole number, a misspelt key under `spotcheck`, or a
`.abcd/config.json` that does not parse, at the commit a window starts at,
counts that window by the bundled defaults: every observation's note says so,
naming the file and the key, the window is still drawn, and its cycle records
`"defaults": true`, so every reader verifies it by the same values. A
corrected block takes effect from the next window, which starts at a later
commit.

### Staged config keys

No shipped code reads any of the keys below. None appears in any repository's
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
id: adr-2611251806496719
slug: the-spot-check-s-store-branch-is-pushed
status: accepted
date: 2026-11-25
supersedes: null
superseded_by: null
related_intents: [itd-2610301750162657]
related_rfcs: []
related_adrs: [adr-2610031352212697, adr-2610150729333337]
---

# ADR-2611251806496719: The spot-check's store branch is pushed without a preflight receipt

## Context

[itd-2610301750162657](../../intents/planned/itd-2610301750162657-a-person-spot-checks-what-abcd-s-agents.md) keeps the spot-check's record on one branch of the shared remote, `abcd-spotcheck`: an orphan whose tree holds small JSON files under `handbacks/`, `decisions/`, `cycles/`, `items/` and `judgements/`, beside one `window-open.json`, each written once and never edited. The draw runs inside a landing (`abcd land`, a lane's landing in `abcd implement step`, a drain move), and the review verb pushes a judgement per item.

Three constraints were already locked:

- **The push hook needs a receipt.** `.githooks/pre-push` refuses any push whose new commit carries no preflight receipt, and the store's push runs with the repository's hooks, never with `--no-verify`.
- **A store commit has nothing a preflight vouches for.** Its tree is the store's records alone, never the product's code, and it never merges into the default branch. A landing cannot mint a receipt for it: the commit is made after the landing, by abcd, in no working tree.
- **dcn-2611130729517836 and dcn-2611131053182459** require the hook to have a row of its own for the branch, with its own ruling and shape check, before any verb pushes to it.

The hook already admits two families of receipt-less pushes, reservations ([adr-2610031352212697](2610031352212697-claims-are-branches-on-the-shared-remote.md)) and status branches ([adr-2610150729333337](2610150729333337-a-status-branch-moves-without-a.md)), each by one row of its receipt-less table and a shape check that admits only commits that change no file. Store commits do change files, so neither check fits.

## Decision

The push hook's receipt-less table gains a third row: the branch `abcd-spotcheck` itself, checked by its own `spotcheck_shape` check. A row whose prefix does not end in a slash names one branch exactly, never a prefix of others. The check admits a push only when:

- it is a fast-forward of the branch, or its creation;
- every commit it moves (`<remote>..<local>` on an update, everything reachable from `<local>` on a creation) has a tree holding nothing but regular, non-executable files, each at `window-open.json` or at a path of `.json` names under `handbacks/`, `decisions/`, `cycles/`, `items/` or `judgements/`, made of letters, digits, `.`, `_` and `-`;
- every file is within the store reader's own bound, 16 KiB, or 256 KiB for a cycle under `cycles/`, and the push adds or changes no more than 1,000 files, the most the store's writer puts in one push;
- the walk read every commit in full, as the reservation check requires of a shallow clone.

A deletion of the branch is refused outright: the store is kept for ever. Any other push to the branch is gated as any branch is. The forge ruleset that blocks deletion and non-fast-forward pushes of `refs/heads/abcd-spotcheck` is the person's act, applied from its mirror, `.abcd/work/rulesets/spotcheck-protection.json`, as every ruleset is, before the first draw on any machine.

Because the row admits content, abcd's reader never trusts what it reads there ([dcn-2611260013430233](../../../work/decisions/dcn-2611260013430233-the-technical-facilitator-under.md)). Every cycle is verified wherever it is read: its id is its close's, it starts where its window began, and its window is recomputed rather than read from it: the spotcheck block as the default branch stores it at the window's start must be the cycle's own window and per-group values, and the close the default branch's first-parent line gives must be the cycle's bound, end commit and moment, so its end is on that line. Its close is no later than the reader's clock allows, its round is the one that close fixes on the chain's pinned clock, its signature verifies under the pinned key, every landing it lists is a commit of its window, and its drawn lists are the ones that round gives over its populations, keyed by the window's start and close alone, never by the cycle's id. A cycle that fails is set aside, named, and its window drawn afresh, so a cycle that does not verify can neither end a window nor stop a later draw. A window's close, and so its round and its draw, is read from the default branch's history and the window's start alone, the same for every drawer at any moment. From the second window on, the start is a verified cycle's close; the first window's start is the opening's own word, within bounds every reader checks: no later than the reader's clock allows, no earlier than its commit was committed, and no later than that commit's first-parent child on the default branch was. An opening outside them is set aside, named, and opened afresh by the next observer, and the mark keeps an opening only once that child has confirmed it. Each machine keeps a high-water mark of the last copy it verified, in the person's home store, and refuses a branch that no longer holds it, deleted or rewritten, opening no first window over it. Records join a population by their arrival on the branch, and a judgement counts only when it reads as the judgement of the item and role its path names.

## Alternatives Considered

- **A receipt for every store push.** Rejected: no preflight can run over a commit made after a landing in no working tree, so the store could never reach `origin`.
- **The reservation shape check.** Rejected: it admits only commits that change no file, and the store's commits add files.
- **A hidden ref namespace (`refs/abcd/spotcheck`) on the remote.** Rejected for the reasons [adr-2610150729333337](2610150729333337-a-status-branch-moves-without-a.md) gives for status branches: the forge's rulesets cannot protect it, and a hosted session's proxy refuses it.
- **The chosen option: a row of its own with a path-and-mode shape check.** It admits only files the store writes, under the store's folders, on a branch no gate reads code from.

## Consequences

- **Easier:** a landing's draw and its records reach `origin` from any machine whose hooks run, so the queue is one queue for every machine.
- **Harder:** the shape check judges paths, modes, sizes and the count, never content: a push under the row can carry any JSON at a store path, within the bounds. abcd's reader is the guard on content: it reads every file strictly, verifies every cycle, and names one it cannot read or verify; nothing on the branch is ever built, run or merged.
- **The residual:** whoever holds the person's push rights can still write a cycle that verifies but lists or leaves out records of its choosing (the hand-backs and decisions, and which of the window's landings it classes into a group), hold a record back until a window's draw is known, or write judgements that halve the next sample. Verification removes the free choice of close, round and drawn list and makes the rest of every cycle recomputable, from the first window's start on; that start a writer may still place at an older commit of the line, at any moment before its child was committed, and a first window that spans history from before the store existed shows it to whoever reads that cycle; it cannot tell an agent from the person when both push with one credential. Who may judge is the review lane's to settle.
- **The hook is a local-only check.** A push made where no hook runs is held only by the forge's ruleset, as for the other two rows.
- **A new obligation:** a change to the store's folders changes this row's check in the same change.
1 change: 1 addition & 0 deletions .abcd/development/decisions/adrs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,5 +254,6 @@ The intent lint (a Go implementation) extends to verify these reciprocally.
| [adr-2611241456294452](2611241456294452-an-independent-checker-is-optional-its.md) | An independent checker is optional: its verdict is reported, never required and never waited for | accepted | 2026-11-24 |
| [adr-2611251746361324](2611251746361324-one-drive-may-run-many-drains-bounded-by.md) | One drive may run many drains, bounded by its end time and an optional cap, and never extends its own bound | proposed | 2026-11-25 |
| [adr-2611251746369732](2611251746369732-a-machine-is-published-on-the-shared.md) | A machine is published on the shared remote only as a chosen label, a state word, times and counts | proposed | 2026-11-25 |
| [adr-2611251806496719](2611251806496719-the-spot-check-s-store-branch-is-pushed.md) | The spot-check's store branch is pushed without a preflight receipt | accepted | 2026-11-25 |
| [adr-2611251808065076](2611251808065076-abcd-asks-for-its-newest-release-on-a.md) | abcd asks for its newest release on a standing yes | accepted | 2026-11-25 |
<!-- /index -->
Loading
Loading