Repository navigation
fix(lychee): derive the private-repo exclude inventory from repository visibility - #497
Conversation
…y visibility The two melodic-software/ alternations in lychee.toml were hand-kept against a queryable fact and drifted twice (#212, then claude-code-proxy created ten days after that fix and never added). private-repo-inventory.sh now generates them from `gh repo list --visibility private` and `check` fails on any disagreement: the lychee-fixtures CI lane covers the credential-free direction (an excluded repo that went public; sorted, identical alternations) and a daily lychee-private-inventory workflow reads the standards-sync App installation's repository set to catch a new private sync target, filing a rolling tracking issue instead of a permanently red cron. Also excludes two bot-blocked cursor.com pages and one lib.rs crate page that answer 403 to the checker and 200 to a browser (dotfiles#551, claude-code-plugins#3340), and records in ADR-0007 that the managed-file seam stays binary with no additive layer, with the managed-files-guard rollout tracked in #496 as the downstream hand-edit signal. Closes #483 Co-Authored-By: Claude Fable 5 <[email protected]>
|
Claude finished @kyle-sexton's task in 4m 41s —— View job Code review
This repo has no 🔴 Important — posted inline on Everything else reviewed cleanly:
|
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
…list lychee.test.sh carried its own copy of the private-repo alternation and the Exclusions fixture another; both would have lagged the generated inventory exactly the way lychee.toml lagged visibility. The test now compares the two file entries against what private-repo-inventory.sh renders for the set read back from the file, and requires the fixture to cite every inventoried repo. read_list accepts a process substitution so the test needs no scratch file. Co-Authored-By: Claude Fable 5 <[email protected]>
…e runner's -e The default run shell already carries -e, so a bare call followed by rc=$? aborted the step on drift before the findings were logged or the tracking issue filed. The call now sits in an `if`, where a non-zero status is not fatal, and the outcome routes to the file/close steps as intended. Co-Authored-By: Claude Fable 5 <[email protected]>
Closes #779 ## Summary Justify verdict (`/overengineering:justify`, attended, inline) on the App-token half of `maintenance-audit-link-check-excludes`: **RETIRE**. With that half gone, the scheduled job only repeats the PR lane's public-visibility check, so the whole workflow is consolidated onto that lane. - **Reason when built:** the private-repo inventory drifted twice by hand ([#212](#212), [#483](#483)). [#497](#497) (2026-08-28) made the inventory generated, added a PR-lane `check` for "an excluded repo went public", and added this scheduled App-token read for "a new private sync target is missing". - **Catches since then:** none. `gh run list --workflow maintenance-audit-link-check-excludes.yml` shows 27 runs from 2026-10-05 to 2026-10-30, all `success`, and no failed run under any path of this workflow. - **The one real gap it was built for was outside its reach.** [#767](#767) (2026-10-11) added agent-automations, architecture and azure-iac. Its own body says this workflow "could not catch it: it reads only the standards-sync App installation, and none of the three is a sync target". A manual online run found the gap as a 404, which is the control that actually catches this drift. [standards#779](#779) cites a 16-clone sweep that found one link into an uninventoried private repository. - **Carry cost:** a daily job that loads the standards-sync App private key (an App that holds contents, pull_requests, issues and workflows write elsewhere) to read repository names, plus a third input mode in `private-repo-inventory.sh` with its tests. A miss costs one false 404 in a non-blocking online run that names the repository, fixed by `private-repo-inventory.sh generate --write`. Options considered: keep (no catch on record, and blind to non-sync repos); simplify to the public half on a schedule (duplicates the PR-lane `check`, which runs on every standards pull request and push to main); retire (this PR). ## Fix - Delete `.github/workflows/maintenance-audit-link-check-excludes.yml`. - `components/lychee/private-repo-inventory.sh`: drop `--installation-list` and the code that only it fed. Drop its two test cases from `private-repo-inventory.test.sh`. - `components/lychee/README.md`, `lychee.toml` (the generated-inventory comment, outside the lines #915 touched), `pr-require-checks.yml`, root `README.md`, `components/code-review-rules/README.md`, and the cron comments of three maintenance workflows now say what covers each direction, or stop naming the workflow. - `vocabulary.json`: the `check-links` purpose no longer names the workflow. The `audit-link-check-excludes` slot stays, because `rename-map.json` still lists it as a rename target and `naming-lint.test.mjs` requires every rename target to pass the vocabulary. - ADR 0007, which mentions the workflow under its old name, is left as written. ## Verification - `bash harness/shell/run-tests.sh components/lychee/private-repo-inventory.test.sh`: passed. `components/lychee/lychee.test.sh`: passed. - `bash components/lychee/private-repo-inventory.sh check --config lychee.toml`: OK. - `npm run lint:github-actions-conventions`: 0 findings. `node --test components/github-actions-conventions/naming-lint.test.mjs`: 14 pass. `lint:concurrency-policy` and `lint:runner-policy`: passed. - `actionlint` on every workflow: clean. `shellcheck` on both scripts: clean. markdownlint on the three READMEs: clean. ## Related - The `STANDARDS_SYNC_APP_*` secrets in the `standards-sync` environment are still used by the sync workflow. Nothing to remove there. - Separate from [#923](#923) (#778 and #780), which edits a different paragraph of `components/lychee/README.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VcupojYKhHyDni9LuAXBuX Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Makes
lychee.toml's private-repo exclude inventory a derived artifact with a check that fails on drift, instead of a hand-kept list that has now drifted twice, and records the managed-file seam decision the issue asked for.Problem
claude-code-proxy(created 2026-07-30, private) was missing from bothmelodic-software/alternations — the same class as #212, which closed ten days earlier and deferred exactly this class fix. A downstream repair in.githubPR 46 was then silently reverted by sync PR 47. The list copied a queryable fact (repository visibility) by hand, and nothing compared the two.Fix
components/lychee/private-repo-inventory.sh:generate --writerewrites both alternations fromgh repo list --visibility private(sorted, regex-escaped, both entries identical);checkfails on any disagreement with the visibility facts it is given and prints the regenerated entries.lychee.tomlregenerated by it —claude-code-proxyadded,medley/medley-archivenow in sorted order.ci.ymllychee-fixtureslane: runs the new offline contract test (34 cases) and the credential-free half ofcheck(an excluded repo that went public; structural invariants) withgithub.token..github/workflows/lychee-private-inventory.yml(daily + dispatch): mints a metadata-read-only standards-sync App token over the installation (github-iac holds that set equal to the sync roster), so a new private sync target missing from the list is detected the next day. Drift files/refreshes one marker-keyed tracking issue and the first clean run closes it (no permanently red cron, per fix(ci): standards-sync-stuck alert fails hourly — App token minting 404s on /standards/installation #274). Private repos outside the roster are reported as unverified — the residual, documented in the README.components/lychee/README.md: the "keep it in sync by hand" instruction replaced with the generated/checked contract.locally-ownedflip in the manifest is policy-level; none holds one line); facts a managed file copies are derived at the source; the downstream hand-edit signal ismanaged-files-guard, whose fleet rollout is filed as Roll managed-files-guard out to every sync target so a downstream hand-edit of a managed file fails its PR #496.cursor.compages and onelib.rscrate page (403 to the checker, 200 to a browser, verified 2026-08-27) that produced the open link-check reports dotfiles#551 and claude-code-plugins#3340.Verification
bash harness/shell/run-tests.sh components/lychee/private-repo-inventory.test.sh— 34/34 PASS.private-repo-inventory.sh checkagainst the live org lists (public via API, private viagh repo list) —OK, exit 0 after regeneration; exit 1 namingclaude-code-proxybefore it.github-appfinding explicitly ignored with rationale: whole-installation scope is the fact being read, metadata:read only), markdownlint, typos, editorconfig-checker — all clean locally; lefthook pre-commit green.Related