You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 40b40bd
Browse filesBrowse the repository at this point in the historyBrowse files
tooling(pm): dispatch-gates git maxBuffer for the merged tree; register matchers proven on the nested ui/ rows (4b PR 1, inert) (#25732)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoVVzFG2pTBdWK9NbS3kt8yY)_
Part of #25712 — PR 1 of 2 (the inert half). The card stays open for PR
2.
Part of objectstack#25677
Clause-②: no
Metadata-protocol: none
Also closes the PR A2 item dispatch-gates maxBuffer (the PR A2 bill
lives on the CI-wiring card of this epic, which stays open for its other
items).
## What this changes
Two inert changes in `scripts/pm/**`. Nothing changes for today's tree:
no register row, no instruction file, no CODEOWNERS line and no workflow
is touched.
1. **`dispatch-gates.mjs`: git children get a 64 MiB stdout ceiling**
(`GIT_MAX_BUFFER_BYTES`), in `runGit` and in `ignoreVerdicts`' `git
check-ignore`. `spawnSync`'s default is 1 MiB, and past it the child
dies with `ENOBUFS`. Measured: `git ls-files -z` on this tree at 43edf90
is 724,439 bytes (11,967 paths). objectui's tree under a `ui/` prefix
adds 631,073 bytes (9,197 paths), so the merged listing is about 1.36
MB, past the default. That is the Lint · PM dispatch-gates red on the
verification run of the import. A tree that already fit gets the same
answer as before.
2. **The register's matchers take a register handed in.**
`governedSurfacesFor(repo, register)`, `governedPathsIn(paths, repo,
register)`, `governedTierFor(paths, repo, register)` and the queue
guard's `codeownersMirrorVerdict({ …, register })` default to
`GOVERNED_SURFACES`. No production caller passes one. It is the seam the
self-tests use to drive the six nested `ui/` rows through the real
matchers before those rows land on the register. The prose gate's
`verdict(region, globs)` already took its register as an argument, so it
only gains pins.
## Inventory: `scripts/pm/**` and objectui, what PR 1 does with each
| File | What it holds about objectui | PR 1 | Why that is inert |
|---|---|---|---|
| `check-governed-merges.mjs` | `GOVERNED_REPOS` row `objectui`;
`workflows` row scoped to objectstack, objectui, cloud | matchers take
an optional `register`; new self-test battery on the six `ui/` rows |
default argument is the live register; no row added |
| `check-governed-queue-guard.mjs` | imports the register; sibling-copy
repo resolution (`guardRepository`) | `codeownersMirrorVerdict` takes an
optional `register`; four pins | default argument; CODEOWNERS on disk
still mirrors the live register (pinned) |
| `check-governed-prose.mjs` | reads the register's globs for
objectstack | three `verdict` pins on the `ui/` globs | no prose region
or register change |
| `dispatch-gates.mjs` | `--repo` sister-repo slugs; one comment on
`objectui-changeset-digest` | git `maxBuffer` raised | same output on
any listing under 1 MiB |
| `dispatch-gates.self-test.mjs` | fixtures | one slow section: a
16,000-path temporary index | slow tier only (push/schedule in CI) |
| `check-half-states.mjs` | sibling board (`OWN_BOARD === 'objectui'`),
repo-qualified refs | none | objectui repo stays open until archive;
removal is sub-issue 6 |
| `fleet-roster.mjs` · `fleet-write/{validate,execute,dispatch}.mjs` ·
`post-stamped.mjs` · `issue-transfer.mjs` · `ensure-pm-labels.sh` ·
`check-prior-rulings.mjs` | per-repo rows and fixtures keyed
`objectstack-ai/objectui` | none | the relay must keep writing to the
objectui repo until it is archived (sub-issue 5); rows are removed in
sub-issue 6 |
| `check-expected-skips.mjs` | `ui_tree` skip reasons from PR A | none |
already inert while `ui/` is absent |
| `ci-failure.mjs` · `sweep-*.mjs` · `rerun-failed.mjs` ·
`record-recognisers.mjs` · `os-regen-merge.sh` ·
`check-skill-line-ratchet.mjs` · `changeset-deadline-census.mjs` ·
`board-snapshot.mjs` | comments and fixtures | none | text only |
## Deferred to PR 2: the six `ui/` register rows
Decided by the epic PM: the rows land in PR 2, not here. Adding a
register row is not a `scripts/pm`-only change. Measured on 43edf90:
- `check:pm-governed-prose` requires every register glob as a code span
in `AGENTS.md` Prime Directive #14 and in the pm-dispatch `SKILL.md`
ACCEPT region.
- The queue guard's CODEOWNERS mirror pin requires a root-anchored line
for every Tier H row.
- `check:pm-skill-ratchet` has `AGENTS.md` at 1117/1117 lines and
`.claude/skills/pm-dispatch/SKILL.md` at 319/319, both with headroom 0
and a 120-byte line cap.
The six globs come to about 115 bytes, which is one more line in each
file. PR 2's `AGENTS.md` rewrite (the 41 `objectui#` mentions and the
sibling-repo sections) frees those lines without a ceiling raise.
The rows, as PR 2 lands them (all Tier H, `repos: ['objectstack']`).
They mirror objectui's own six-row register under `ui/`:
| id | match | glob |
|---|---|---|
| `ui-adr` | prefix `ui/docs/adr/` | `ui/docs/adr/**` |
| `ui-claude-tree` | prefix `ui/.claude/` | `ui/.claude/**` |
| `ui-skills-catalog` | prefix `ui/skills/` | `ui/skills/**` |
| `ui-agents-md` | exact `ui/AGENTS.md` | `ui/AGENTS.md` |
| `ui-claude-md` | exact `ui/CLAUDE.md` | `ui/CLAUDE.md` |
| `ui-workflows` | prefix `ui/.github/workflows/` |
`ui/.github/workflows/**` |
- `ui/.claude/**` is Tier H, not S. That content lands Tier H in
objectui today, and Tier S would loosen its landing, which is a
maintainer ruling (one field, `tier`).
- `ui/.changeset/config.json` is left out. No register in either
repository governs `.changeset/config.json`.
- PR 2 also adds the six CODEOWNERS lines (`/ui/docs/adr/`,
`/ui/.claude/`, `/ui/skills/`, `/ui/AGENTS.md`, `/ui/CLAUDE.md`,
`/ui/.github/workflows/`) and flips this PR's pin
`today-the-register-does-not-know-ui-the-pr-adding-the-rows-flips-this`.
- **The window:** between the subtree import and PR 2, nothing in this
repository governs those `ui/` paths. The cutover freeze sequences it as
subtree PR, then PR B of the CI-wiring card, then this card's PR 2, then
4a. So `ui/**` is governed before anything else merges on top of it.
## Verification
Tree: `faaeaeb` on `main` 43edf90 (merge base = `origin/main`).
- `node scripts/pm/check-governed-merges.mjs --self-test`: exit 0, 527
assertions (512 before). New battery: 15 cases. Each `ui/` row's
specimen is governed by its own row alone and lands Tier H, including
`ui/.claude/hooks/…` with a root `.claude/**` path beside it.
`ui/packages/…/src`, `ui/package.json` and `ui/.changeset/config.json`
are not governed. Nested copies (`ui/examples/AGENTS.md`,
`ui/packages/x/.github/workflows/w.yml`) and near misses stay out. Root
rows and `ui/` rows do not reach each other. The rows govern objectstack
alone. Today's register knows no `ui/` path. Roster floor 34 → 35.
- `node scripts/pm/check-governed-queue-guard.mjs --self-test`: exit 0,
339 cases (335 before). With the `ui/` rows handed in, the CODEOWNERS
file on disk is short by exactly one line per `ui/` row, and each
problem names the row and its `/ui/…` pattern. A fixture carrying those
lines passes. The sibling repository's verdict needs no `/ui/` line.
- `node scripts/pm/check-governed-prose.mjs --self-test` and the gate:
exit 0, 31 cases. With the `ui/` globs named in the prose, both halves
pass. With the globs on the register but not in the prose, all six are
missing. With them in the prose ahead of the register, the four `**`
globs are over-claims.
- `node scripts/pm/dispatch-gates.mjs --self-test` (both tiers): exit 0,
2178 cases pass (fast 1913 in 261 s, slow 265 in 744 s). The new slow
section stages a 16,000-path index (1.5 MiB listing). CONTROL: the same
`git ls-files -z` spawned with the default buffer dies with `ENOBUFS`.
`trackedFiles` returns all 16,000 paths, first and last byte-identical.
- `node scripts/pm/check-governed-merges.mjs --branch HEAD`: exit 0, not
governed, +136 / −11 over 5 files.
- Derived gates (`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`, 39 commands): every one exit 0. Record:
```
node scripts/check-ci-filter-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs --self-test :: exit 0
node scripts/check-position-name-fold-loaders.mjs :: exit 0
node scripts/check-position-name-fold-loaders.mjs --self-test :: exit 0
node scripts/check-scripts-symbol-anchors.mjs :: exit 0
node scripts/check-scripts-symbol-anchors.mjs --self-test :: exit 0
node scripts/check-self-test-wired.mjs :: exit 0
node scripts/check-self-test-wired.mjs --self-test :: exit 0
node scripts/check-self-test-workflow-commands.mjs :: exit 0
node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0
node scripts/check-skills-token-ratchet.mjs :: exit 0
node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0
node scripts/check-whole-set-label-write.mjs :: exit 0
node scripts/check-whole-set-label-write.mjs --self-test :: exit 0
node scripts/pm/bare-root-worklist.mjs --self-test :: exit 0
node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:bash32-floor :: exit 0
pnpm check:cli-command-ids :: exit 0
pnpm check:closing-target-claim :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:declared-population-live :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:entry-guard :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:parse-guard :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-governed-prose :: exit 0
pnpm check:pnpm-filter-targets :: exit 0
pnpm check:pnpm-flag-spellings :: exit 0
pnpm check:ratchet-remedy-authority :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:pm-dispatch-gates :: exit 0
```
Reconciliation (`--ran`): `39 derived famil(ies) accounted for — 39 run,
0 NOT-MEASURED (a DERIVED zero — all 39 recorded an exit code and none
of them is 3)`, exit 0.
## Acceptance notes
- `check:pm-dispatch-gates` runs the fast tier locally and on PR/queue
CI. The new maxBuffer section is slow-tier, so CI runs it on `push` to
`main` and on `schedule`. The local both-tier run above is the PR-time
evidence.
- `.github/CODEOWNERS` routes `scripts/pm/check-governed-merges.mjs` and
`check-governed-queue-guard.mjs` to the approvers (enforcement-chain
rows), so a code-owner review is requested when this leaves draft.
Neither file is a register surface, and this PR is not Tier H
(`--branch` above).
- No changeset: `scripts/pm/**` publishes nothing (`skip-changeset`).
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JjL3Jp6KnsA4vDma1b4KDa)_
Co-authored-by: Claude <noreply@anthropic.com>
assert('the-verdict-head-names-the-repository-and-counts-its-rows',renderTestVerdict(testVerdict([wf],{repo: 'cloud'})).split('\n')[0]==='governed-surface predicate: 1 of 1 path(s) hit the register (7 surfaces govern cloud).'&&renderTestVerdict(testVerdict([wf],{repo: 'objectos'})).split('\n')[0]==='governed-surface predicate: 0 of 1 path(s) hit the register (6 surfaces govern objectos).',renderTestVerdict(testVerdict([wf],{repo: 'objectos'})).split('\n')[0]);
4460
4467
4468
+
// ── the nested `ui/` workspace rows (#25712) ─────────────────────────────
4469
+
//
4470
+
// The objectui tree arrives as the `ui/` workspace of this repository, and
4471
+
// its own register's six rows have to govern it here under that prefix. The
4472
+
// rows land on the register in the PR that also names them in the two
4473
+
// instruction surfaces `check-governed-prose.mjs` pins (both at their line
4474
+
// ceiling); until then they are THIS fixture, read through the matchers'
4475
+
// `register` seam, so the matchers are proven on them first. Both directions
4476
+
// are pinned: each row's specimen is governed Tier H in objectstack, and a
4477
+
// `ui/` source path, a nested copy of an instruction file and every other
4478
+
// repository answer NOT governed. The last case pins today's register: it
4479
+
// does not know `ui/` yet — the PR that adds the rows flips that case.
4480
+
battery('the nested `ui/` workspace rows, through a register handed in (#25712)');
t('CONTROL: the same listing spawned with the default buffer dies with ENOBUFS', atDefault.error?.code === 'ENOBUFS', String(atDefault.error?.code ?? atDefault.status));
10937
+
let listed = null;
10938
+
let thrown = null;
10939
+
try {
10940
+
listed = trackedFiles({ cwd: bufTmp });
10941
+
} catch (e) {
10942
+
thrown = e.message;
10943
+
}
10944
+
t('trackedFiles reads the whole listing instead of refusing on ENOBUFS', thrown === null && listed?.length === paths.length, thrown);
10945
+
t('the listing comes back byte-for-byte, first and last path included', listed?.[0] === paths[0] && listed?.at(-1) === paths.at(-1));
10946
+
t('the ceiling stays finite and above this fixture', Number.isFinite(GIT_MAX_BUFFER_BYTES) && GIT_MAX_BUFFER_BYTES > listingBytes);
0 commit comments