Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
CHANGELOG entry for the enumeration and census tests check; name the job among the Dynamic CI gated jobs
garrytan8ad75a9e3b76
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 757188ab8f..2e76f33c0c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,17 @@ credits are retained; no result has been reassigned to another provider. Originaidentifiers and attribution are available in the pre-removal Git revision`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).+## [Unreleased]++**Pull requests now run the tests that check gbrain's lists, in about 4 minutes, instead of finding those failures in the 30-minute full run.** Some tests fail whenever a change adds an operation, command, `--flag`, error code, doctor check or repair kind without updating the list that tracks it, or changes output a golden file pins. Before this release, pull requests skipped those tests and their first failure came in the full-ci run. A new check, `enumeration and census tests`, runs them on every pull request that changes more than docs. It is advisory: no merge rule reads it. `bash scripts/ci-census-tests.sh --run` runs the same tests on your own machine without Postgres.++### Itemized changes++- `scripts/ci-census-tests.sh` (new) prints the one file list: tests marked `test-reads-source-ok[structural]`, every test that imports `test/helpers/golden`, the tests whose names match its enumeration pattern, and the consumer idle-pass bounds (`test/persistence-consumer-*` files that mention idle). It leaves out `test/e2e/`, serial and slow files, and `test/setup.test.ts`. On master that is 128 files. `--run` runs them all and `--run <k> <n>` runs one weight-balanced shard (`scripts/sharding.ts`).+- `.github/workflows/test.yml`: the `enumeration-census-tests` job runs the list in two shards on 2-vCPU runners, only on pull requests. Trunk Dynamic CI gates it like the other cheap-tier lanes. The `changes` job adds a `census` output that skips a doc-only diff (`scripts/select-e2e.ts --classify-only`), and an unreadable diff still runs the job. `cheap-tier`, `test-status`, `full-suite`, the remote pregate and master-push reuse don't read the job, and `contributor-gate` stays the only required check. On this change's own run the shards took 3 min 40 s and 2 min 47 s, about 6.5 runner-minutes per push.+- `docs/ci-event-parity.md`: new section "Enumeration and census tests" and a classification row.+- Tests: `test/scripts/ci-census-tests.test.ts` (new) pins the list's shape and coverage. `full-ci-workflow` and `native-only-workflow` cover the new job's events and its doc-only skip. The PGLite snapshot cache-key census counts the job's key (16 keys).+## [0.60.654.0] - 2026-11-10**A managed sync no longer fetches Git objects in a partial clone (`git clone --filter`).** Every Git read a managed sync makes now runs with Git's transports and lazy fetching switched off. A file whose blob the clone never fetched is imported from your checkout when the checkout holds exactly that blob, and otherwise held alone as `git_object_missing`, with a message that names the partial clone and the `git cat-file -p <blob>` that fetches it. A blobless clone with a normal checkout syncs every file as before; an older object it never fetched (an earlier version of a renamed file or of the folder rules) is read only once you fetch it. A treeless clone (`--filter=tree:0`) that lacks a tree of the commit being synced stops the run with `git_object_missing`, naming the partial clone and the `git ls-tree -r -d <commit>` that fetches the trees; nothing is synced or deleted until then. The folder rules in `.gbrain/access.yml` are read the same way. A rule file or rule history the clone has not fetched makes the source read as nobody to remote members, as a shallow checkout already does, with a message that names the exact `git` command that fetches it. Run that command in the checkout and the next sync applies the rules and clears the mark.diff --git a/docs/ci-event-parity.md b/docs/ci-event-parity.mdindex 0bf1db561a..6b83f322a7 100644--- a/docs/ci-event-parity.md+++ b/docs/ci-event-parity.md@@ -83,10 +83,10 @@ Pushes to master, the merge queue and schedules always run the full profile.## Enumeration and census tests-Some unit tests fail whenever a change adds something to a list without-updating the list's reviewed copy: a new operation, command, `--flag`, error-code, doctor check or repair kind, a new caller or route that a source census-counts, or output that a golden file pins. The cheap tier used to skip them, so+Some unit tests fail whenever a change adds a new operation, command, `--flag`,+error code, doctor check or repair kind without updating the list that tracks+it, adds a caller or route that a source census counts, or changes output that+a golden file pins. The cheap tier used to skip them, sothe first full-ci run on a pull request was often where they failed, and eachmiss cost another push and another full run.@@ -381,8 +381,8 @@ Measured by hand on 2026-10-26 against master at `b06ac32b` (0.60.465.0) on a 2-Trunk Dynamic CI (private beta; [docs](https://docs.trunk.io/ci/dynamic-ci)) decides per pull-request push which jobs still need to run, from this repository's own CI history. A `dynamic-ci` job in `test.yml` and in `scale-tier.yml` runs `trunk-io/dynamic-ci` (pinned to v1) with the `TRUNK_API_TOKEN` repository secret and writes one output per gated job. The step has `continue-on-error: true` and a 3-minute step timeout inside the job's 5, so a failed or hung Trunk call leaves the outputs empty and the check green instead of red on the head (a lost runner still fails the job).-- **Gated jobs.** `test.yml`: `security-regressions` (including the Windows and macOS cells), `native-locks`, `persistence-validation` and `stress-changed-tests`. `scale-tier.yml`: `scale`. They were chosen from the seven days before 2026-11-04 as the pull-request jobs that take minutes and nearly always pass. `changes`, `gitleaks`, `dependency-audit`, `verify`, `typecheck`, `semgrep`, the scale `plan` and the aggregates are not gated.+- **Gated jobs.** `test.yml`: `security-regressions` (including the Windows and macOS cells), `native-locks`, `persistence-validation`, `stress-changed-tests` and the pull-request-only `enumeration-census-tests` ([above](#enumeration-and-census-tests)). `scale-tier.yml`: `scale`. The first five were chosen from the seven days before 2026-11-04 as the pull-request jobs that take minutes and nearly always pass. `changes`, `gitleaks`, `dependency-audit`, `verify`, `typecheck`, `semgrep`, the scale `plan` and the aggregates are not gated.- **Form.** A gated job lists `dynamic-ci` in `needs` and its `if` starts `!cancelled() && needs.dynamic-ci.outputs.<job key> != 'false' &&`, followed by `needs.<other>.result == 'success'` for every other job it needs and then its original condition. `!cancelled()` keeps a skipped or failed filter from skipping the job, `!= 'false'` makes an empty output (no token, a Trunk outage, no verdict yet) run it, and the `result == 'success'` checks keep what the implicit `success()` did before.-- **Events.** The filter's `if` is `github.event_name == 'pull_request'`. On a push, merge-queue entry, schedule or dispatch (the full-ci run) it is skipped, every output is empty, and every gated job runs exactly as before, so `full-suite`, `e2e-full-suite` and the ci-reuse evidence are unchanged. `e2e.yml` has no pull-request trigger and no filter.+- **Events.** The filter's `if` is `github.event_name == 'pull_request'`. On a push, merge-queue entry, schedule or dispatch (the full-ci run) it is skipped, every output is empty, and every gated job runs exactly as before (`enumeration-census-tests` runs only on pull requests anyway), so `full-suite`, `e2e-full-suite` and the ci-reuse evidence are unchanged. `e2e.yml` has no pull-request trigger and no filter.- **Modes.** A repository starts in Learning mode: Trunk records a verdict for every gated job and skips nothing. Enforcement is the Mode dropdown in the repository's row on the Dynamic CI settings page in the Trunk web app (app.trunk.io), not this file; Learning mode can also enforce only for listed engineers or labels (the Allow list column). Under enforcement `cheap-tier` accepts a gated lane that skipped only when its verdict was exactly `'false'` and `changes` succeeded (`scripts/ci-cheap-tier.sh`). Before enforcing, weigh three gaps. `stress-changed-tests` repeats changed tests only on pull requests (no full run repeats them), so a skip there removes that check for the push. A `'false'` verdict also skips `scale` on a pull request that carries the `scale-tier` label, since Trunk does not read labels. And Trunk learns false skips from its own merge queue; gbrain's backstop is the full-ci dispatch, which skips the filter, so a gated lane that a pull request skipped and full-ci then failed never reaches Trunk as a false skip. Pin a job to run on the Configuration tab when a gap matters.- **Guard.** `scripts/check-dynamic-ci.ts` (in `bun run verify`) fails when a filter job can run on another event, sits in a workflow without a pull-request trigger, is not SHA-pinned, lacks `continue-on-error: true` or a step timeout below the job's, or exports outputs that differ from its `job-keys`; when a gated job's `if` lacks the form above or has a top-level `||` after it; and when a merge or release aggregate is gated.