Skip to content

Sync the review-reviewers matrix to consumers.json, and test the pair - #1093

Merged
max-sixty merged 4 commits into
mainfrom
fix/review-reviewers-matrix-sync
Aug 31, 2026
Merged

max-sixty merged 4 commits into
mainfrom
fix/review-reviewers-matrix-sync

Conversation

@tend-agent

@tend-agent tend-agent commented Aug 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

review-reviewers.yaml is intended to cover every repository in
data/consumers.json, but three consumers were absent from its matrix. This
adds those repositories and a cross-file contract test so future omissions
fail loudly.

The contract is containment rather than equality: stale extra matrix entries
are harmless and fail visibly if the target no longer has Tend, while deleting
an entry because a best-effort consumer search missed it would silently reduce
fleet coverage.

The deterministic test owns this invariant; the weekly refresh skill does not
repeat it as a second, prompt-only rule.

Verification

  • uv run pytest generator/tests/test_cross_file_contracts.py (11 passed)
  • pre-commit run --all-files

This was written by Codex on behalf of @max-sixty

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sync itself checks out — diffplug/dormouse, jakobtfaber/Faber2026 and max-sixty/leaf are all public, unarchived, and carry tend-* workflows, so all three are genuinely analyzable.

One concern about the contract's direction. data/consumers.json isn't a maintained list — the weekly sweep rebuilds it wholesale from gh search code, and that search is best-effort. Running the recipe from running-tend's "Weekly: refresh data/consumers.json" right now returns 6 repos, not 8, twice in a row: max-sixty/cargo-affected and jakobtfaber/Faber2026 don't come back, though both are public and carry 8 tend-*.yaml workflows pinned to max-sixty/tend/[email protected].

So the next refresh that reproduces that result drops two entries from consumers.json, and assert sorted(matrix) == sorted(consumers) then requires deleting those two matrix legs for CI to go green. The test greenlights the shrink rather than catching it — the same failure the new workflow comment describes ("a repo missing here is simply never analyzed, and the run still reports success"), reached from the other side.

Containment keeps the property without that: every consumer needs a leg, while a matrix entry a search happened to miss survives. A leg for a repo that really did uninstall tend then fails loudly instead — review-reviewers errors when it can't resolve bot_name from the target's .config/tend.yaml — so the asymmetry runs the safe way. Inline suggestion on the assert; if you take it, the test name and the workflow comment want "covers" rather than "mirrors", while the running-tend sentence stays correct either way since an added repo is what needs the matrix entry.

Separately and out of scope here: that 6-of-8 result means consumers.json on main can shrink on a search blip, and it also feeds the site's data Worker. The refresh recipe looks worth a look on its own.

What I ran
$ gh search code 'max-sixty/tend' --extension yaml --limit 100 --json repository,path \
    | jq -c '[.[] | select(.path | startswith(".github/workflows/tend-")) | .repository.nameWithOwner] | unique'
["PRQL/prql","diffplug/dormouse","max-sixty/leaf","max-sixty/tend","max-sixty/worktrunk","numbagg/numbagg"]
# identical on a second call; 52 results returned, so not the 100-result cap

max-sixty/cargo-affected and jakobtfaber/Faber2026 both return visibility: public, archived: false, and 8 tend-*.yaml workflow files each.

The suggested assert passes uv run pytest generator/tests/test_cross_file_contracts.py (10 passed) and ruff check / ruff format --check at the pinned v0.14.11.

consumers.json is rebuilt wholesale from a best-effort `gh search code`; that search currently returns 6 of the 8 listed repos, so equality would make the next refresh demand deleting two matrix legs to go green. Containment keeps the property that matters — every consumer gets a leg — and leaves a leg the search dropped in the fan-out, where it fails loudly if tend really is gone.
max-sixty pushed a commit that referenced this pull request Aug 30, 2026
…earch missed (#1096)

The weekly `consumers.json` refresh rebuilds the file wholesale from `gh
search code`, so the file inherits the search's recall. Today's search
returned 6 of the 8 listed consumers, and running the recipe as written
would have deleted `jakobtfaber/Faber2026` and
`max-sixty/cargo-affected` — both live, both still carrying eight
`tend-*.yaml` files — from the data the public site renders. This makes
the search a discovery step only: candidates are the union of the search
hits and the repos already listed, and a per-repo API check decides who
stays.

<details><summary>Evidence and verification</summary>

**The miss is in the index, not the query or the cap.** The search
returns 52 hits against a 100 cap, so nothing is crowded out; both repos
simply return zero hits for `max-sixty/tend` while their workflow files
demonstrably contain the ref:

```
$ gh search code 'max-sixty/tend' --repo max-sixty/cargo-affected
(no results)
$ gh api repos/max-sixty/cargo-affected/contents/.github/workflows/tend-review.yaml | ... | grep uses:
      - uses: max-sixty/tend/[email protected]
```

`max-sixty/cargo-affected` returns nothing for a bare `tend` query
either — the repo is absent from the code index, not stale in it. #1093
observed the same 6-of-8 result independently and named this as out of
scope for that PR.

**Not a retry.** #345 was closed on the principle that a retry wrapper
around a transient search blip isn't worth keeping. This adds no retry
and re-queries nothing: it stops treating search absence as evidence of
removal, and moves the keep/drop decision onto an authoritative per-repo
API check that an uninstall actually fails.

**Verified.** The recipe was extracted verbatim from the file and run
under `set -euo pipefail` against real GitHub: 6 discovered, 8
candidates, 8 retained, output byte-identical to the committed
`data/consumers.json`. The drop path was exercised separately against a
repo with no matching workflows (`octocat/Hello-World` → `count=0`,
dropped). `uv run pytest` passes (763), as does `pre-commit` on the
changed file.

**Out of scope, worth its own look:** `max-sixty/tend-integration`
satisfies both filters — 3 `tend-*.yaml` files and `bot_name:
tend-agent` — and is absent from the list only because code search does
not index it either. If it is ever indexed, the weekly refresh adds the
test fixture to the public site's adopter list.

</details>

---------

Co-authored-by: tend-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Aug 30, 2026
…earch missed (#1096)

The weekly `consumers.json` refresh rebuilds the file wholesale from `gh
search code`, so the file inherits the search's recall. Today's search
returned 6 of the 8 listed consumers, and running the recipe as written
would have deleted `jakobtfaber/Faber2026` and
`max-sixty/cargo-affected` — both live, both still carrying eight
`tend-*.yaml` files — from the data the public site renders. This makes
the search a discovery step only: candidates are the union of the search
hits and the repos already listed, and a per-repo API check decides who
stays.

<details><summary>Evidence and verification</summary>

**The miss is in the index, not the query or the cap.** The search
returns 52 hits against a 100 cap, so nothing is crowded out; both repos
simply return zero hits for `max-sixty/tend` while their workflow files
demonstrably contain the ref:

```
$ gh search code 'max-sixty/tend' --repo max-sixty/cargo-affected
(no results)
$ gh api repos/max-sixty/cargo-affected/contents/.github/workflows/tend-review.yaml | ... | grep uses:
      - uses: max-sixty/tend/[email protected]
```

`max-sixty/cargo-affected` returns nothing for a bare `tend` query
either — the repo is absent from the code index, not stale in it. #1093
observed the same 6-of-8 result independently and named this as out of
scope for that PR.

**Not a retry.** #345 was closed on the principle that a retry wrapper
around a transient search blip isn't worth keeping. This adds no retry
and re-queries nothing: it stops treating search absence as evidence of
removal, and moves the keep/drop decision onto an authoritative per-repo
API check that an uninstall actually fails.

**Verified.** The recipe was extracted verbatim from the file and run
under `set -euo pipefail` against real GitHub: 6 discovered, 8
candidates, 8 retained, output byte-identical to the committed
`data/consumers.json`. The drop path was exercised separately against a
repo with no matching workflows (`octocat/Hello-World` → `count=0`,
dropped). `uv run pytest` passes (763), as does `pre-commit` on the
changed file.

**Out of scope, worth its own look:** `max-sixty/tend-integration`
satisfies both filters — 3 `tend-*.yaml` files and `bot_name:
tend-agent` — and is absent from the list only because code search does
not index it either. If it is ever indexed, the weekly refresh adds the
test fixture to the public site's adopter list.

</details>

---------

Co-authored-by: tend-agent <[email protected]>

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The containment switch settles my earlier concern: the assert now reads the direction that matters and names the repos to add, and the matrix covers all 8 entries in data/consumers.json. Locally uv run pytest is 813 passed and ruff check / ruff format --check are clean at the pinned v0.16.5. (#1096 landing on main — the refresh now unions with the existing list rather than rebuilding wholesale — doesn't argue back toward equality: containment is also what keeps a matrix leg alive for a consumer any future search or API blip drops.)

One thing to confirm was intended. The base merge 3b3eca3 dropped the paragraph this PR added to .claude/skills/running-tend/SKILL.md — at the head commit that file matches main, with the "Weekly: refresh data/consumers.json" section ending at "one call covers the whole list" and no pointer to the matrix, so gh pr diff no longer shows the file at all. That merge also hand-trimmed the workflow comment and the test docstring, so this may be the same deliberate pass; I'm flagging it because SKILL.md didn't conflict there, so unlike the test file it wouldn't have surfaced during the resolution.

It isn't load-bearing either way — the assert message carries the instruction, and the weekly sweep polls its own PR's CI, so it sees the red and acts on it. Restoring it is a re-add of what 181f231 had:

A repo new to the list needs a `review-reviewers.yaml` matrix entry too; put
both in the one PR, or `test_review_reviewers_matrix_covers_consumers` fails
it. A repo the search dropped needs no matrix deletion — the test only requires
the matrix to cover the JSON.
What I checked
  • git show 181f2310:.claude/skills/running-tend/SKILL.md has the paragraph; git show 3b3eca30:... and git show c32c58f8:... do not, and neither does git show bef86fa:... (main). Read from git objects rather than the worktree, since a PR run restores .claude/** from the base branch.
  • The workflow comment's "its leg fails loudly if tend really is gone" holds: review-reviewers' Step 1 exits 1 when bot_name can't be resolved from the target's .config/tend.yaml.
  • No stale references to the old test_review_reviewers_matrix_mirrors_consumers name remain anywhere in the repo.
  • The other open PRs touching test_cross_file_contracts.py (#1083, #1088, #1107) are unrelated contracts — merge conflicts, not duplicates.

@max-sixty

Copy link
Copy Markdown
Owner

The removal was intentional. The cross-file containment test is deterministic,
runs in CI, and names every consumer missing from the matrix. Repeating the
same invariant in the weekly refresh skill would create a second rule to keep
in sync without making omissions harder to ship.

This was written by Codex on behalf of @max-sixty

@max-sixty
max-sixty merged commit 39c034c into main Aug 31, 2026
10 checks passed
@max-sixty
max-sixty deleted the fix/review-reviewers-matrix-sync branch August 31, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants