Skip to content

chore(github): maintainer housekeeping: rulesets as code, support and maintainer docs, grouped Dependabot, shorter artifact retention - #529

Merged
DrunkOnJava merged 1 commit into
mainfrom
chore/github-maintainer-housekeeping
Sep 30, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
chore/github-maintainer-housekeeping

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Brings the repository's GitHub side up to the standard an open-source project should meet, and writes it down: rulesets kept as code, a support page and a maintainer guide, grouped Dependabot updates, forms that apply the project's own labels, and shorter retention for CI's throwaway artifacts. Repository configuration and documentation only; nothing in the crate, the CLIs or the viewer changes.

Motivation

An audit of the repository on 2026-09-30 (settings, rulesets, labels, milestones, issues, branches, Actions, security features) found these gaps, each fixed on GitHub first and recorded here:

  • main-protection had no pull-request rule; ADR-005 decided one and was still "Proposed" because the automation token had been refused. There was no protection for release tags.
  • Code scanning was not configured, and actions were pinned by SHA by convention but not by rule.
  • No SUPPORT.md, and nothing that says how issues are triaged, what the labels mean or how the repository is kept in order.
  • The bug and feature forms applied bug and enhancement, a second taxonomy beside the project's type:* labels; nine open issues had no labels at all.
  • The Actions cache was over its 10 GB limit (2.9 GB of it belonged to closed pull requests and deleted branches), and every pull request's CI run kept its smoke wheels and evidence bundle for 90 days.
  • The 0.4.0 milestone was still open after v0.4.0 shipped, with 12 open issues.

Changes

  • .github/rulesets/main-protection.json (was main-protection.proposed.json) and release-tags.json: the live rulesets. main-protection gains the pull-request rule (0 approvals, threads resolved, squash only; the maintainer bypass is unchanged), and release-tags stops v* tags being created, moved or deleted by anyone but a maintainer. ADR-005 is marked accepted and applied.
  • .github/SUPPORT.md and docs/maintaining.md: where to ask what, and how issues are triaged and labelled, what a pull request has to pass, how releases and the security settings work, and the housekeeping checklist. CONTRIBUTING.md links the guide.
  • .github/dependabot.yml: minor and patch updates grouped per ecosystem; majors stay separate.
  • .github/ISSUE_TEMPLATE/bug_report.yml and feature_request.yml: type:bug and type:feature.
  • .github/workflows/ci.yml: smoke wheels kept 7 days; the evidence bundle 90 days on main and 14 on a pull request's run.
  • ROADMAP.md, docs/contribution-map.md: the geometry slices are the 0.4.x milestone; the contribution map's remainders are regenerated from the tracker (25 open issues).
  • CHANGELOG.md.

Done through the GitHub API in the same pass, with no file to change: CodeQL default setup for the workflows, JavaScript and TypeScript, and Python (Rust is not accepted by default setup); full-SHA pinning required for actions; the 0.4.0 milestone closed and its 12 open issues moved to a new 0.4.x milestone; the 12 issues that lacked labels labelled; the labels community, needs-split, rust, github-actions and viewer created; 1,195 caches of closed pull requests and deleted branches deleted, and two superseded remote branches (their commits stay reachable from PR #275) removed.

Testing

N/A: no code path changes. What was checked instead:

Audit-honesty checklist

  • Docs and configuration state what is in force today; nothing claims a setting that is not on
  • The one setting that could not be enabled is stated: secret scanning's non-provider patterns and validity checks stay off (the API accepts the request and leaves them disabled)
  • No emojis, private paths or PII

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk content
  • No fixtures

Breaking changes

None. Direct pushes to main by anyone but a maintainer, and creating, moving or deleting v* tags by anyone but a maintainer, are now refused; none happened before.

Related issues

None.


Note

Low Risk
Documentation and GitHub policy only; merge and tag rules are stricter for non-maintainers but do not alter product code paths.

Overview
Repository and GitHub operations are codified and tightened with no changes to the Rust crate, CLIs, or viewer.

Branch ruleset main-protection is now the live source of truth (replacing the proposed file): merges require a pull request, resolved review threads, and squash-only; ADR-005 is marked accepted and applied. A new release-tags ruleset restricts create/update/delete on v* tags to maintainers.

Contributor-facing docs add .github/SUPPORT.md (where to get help, file bugs, security) and docs/maintaining.md (triage labels, PR gates, releases, housekeeping). CONTRIBUTING.md, ROADMAP.md, and CHANGELOG.md link or describe this model; open IFC geometry work is reframed from milestone 0.4.0 to 0.4.x in the roadmap and contribution map (including tracker sync such as #528 under unscheduled).

Automation hygiene: Dependabot groups minor/patch updates for Cargo, Actions, and viewer npm; bug/feature issue forms apply type:bug / type:feature; CI shortens artifact retention (witness bundle 14 days on PRs vs 90 on main, smoke wheels 7 days).

Reviewed by Cursor Bugbot for commit 0427213. Configure here.

… maintainer docs, grouped Dependabot, shorter artifact retention
@cursor

cursor Bot commented Sep 30, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_cd702091-c941-4c7d-8d61-cb3344caf8c4)

@DrunkOnJava
DrunkOnJava merged commit 732d0c0 into main Sep 30, 2026
23 checks passed
@DrunkOnJava
DrunkOnJava deleted the chore/github-maintainer-housekeeping branch September 30, 2026 15:49
DrunkOnJava added a commit that referenced this pull request Sep 30, 2026
…iner guide, and release-only PyPI environments (#534)

## Summary

Adds `tools/maintainer/audit.py`, a read-only check of the repository's GitHub side against `docs/maintaining.md`, so the monthly housekeeping is a command and drift shows up as a failing line instead of being found by hand. Nothing in the crate, the CLIs or the viewer changes.

## Motivation

`docs/maintaining.md` (#529) lists what a well-kept repository looks like: labelled issues, milestones that match the releases, no stray branches, an Actions cache under its limit, a green `main`, no open security alerts, rulesets that match their files, the settings in force. Each of those drifted before #529 found it (nine unlabelled issues, an open 0.4.0 milestone after its release, an Actions cache over its limit, a ruleset that was never applied), and none would have been noticed by anything but an audit.

## Changes

- `tools/maintainer/audit.py`: eleven checks over the GitHub API through `gh`, each `ok`, `FAIL` with what to fix, or `skipped` when the token cannot read what it needs; exit status 1 if any fails. The rulesets check compares the live rulesets with `.github/rulesets/*.json`, tolerating the defaults and ordering the API adds.
- `docs/maintaining.md`: names the script in the housekeeping section, and says the `pypi` environment accepts only `v*` tags and `testpypi` only `v*` tags and `main` (set on the repository in the same pass; both publish through OIDC, so no token is involved).
- `CHANGELOG.md`.

## Testing

No product code changes. The tool run against the live repository is the evidence:

```
ok      every open issue has one type, an area and a priority, and no needs-triage
ok      milestones match the releases: closed ones are empty, open ones are not
ok      no remote branch but main and open pull requests' heads
ok      the Actions cache is under 90% of its 10 GB limit
ok      the latest run of every workflow on main is not a failure
ok      no open Dependabot, code scanning or secret scanning alerts
ok      the live rulesets say what .github/rulesets/*.json say
ok      repository settings: squash only, branches deleted on merge, SHA pins, private reporting, CodeQL, read-only token
ok      every label the issue forms and Dependabot apply exists
ok      open pull requests from others have a maintainer's reply within the window
ok      discussions have a reply within the window

11 of 11 checks ok
```

Its first run failed the rulesets check on the live `main-protection`, which the API had given two default fields and a different rule order; the check now compares what the file says and ignores order. That failure is the check working on real drift-shaped input, and the only one it has met.

- [x] Required checks pass on GitHub's runners
- [x] Run end to end against the live repository, output above

## Audit-honesty checklist

- [x] The script is read-only and says `skipped`, not `ok`, when it cannot read something
- [x] What it does not check is not implied: it does not judge whether a priority is right or a reply is good, only that one exists
- [x] No emojis, private paths or PII

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk content
- [x] No fixtures

## Breaking changes

None.

## Related issues

None.
DrunkOnJava added a commit that referenced this pull request Sep 30, 2026
… through GraphQL and checks Dependabot's coverage (#545)

## Summary

Adds `tools/maintainer/clean_caches.py`, which deletes the GitHub
Actions caches nobody can use again, and gives the audit (#534, #536)
three corrections and additions: its cache check adds up the list of
caches, its check of `main`'s health reads check suites through GraphQL,
and a new check that Dependabot watches every lockfile, Dockerfile and
composite action. Nothing in the crate, the CLIs or the viewer changes.

## Motivation

Three findings from running the audit on 2026-09-30.

**The cache was at 9.1 GB of the 10 GB limit, and most of it was dead.**
GitHub evicts the least recently used cache past the limit, so a cache
that sits near it leaves no room to see a real problem. The chore was a
scratch script the first time (1,195 caches of closed pull requests, in
#529); this keeps it, and finds what that script never looked for:
`main`'s own superseded generations. rust-cache saves a cache per
toolchain and lockfile hash, so every lockfile change (every Dependabot
merge) leaves the previous generation behind, never read again, at about
200 MB each for the larger families.

| | caches | size |
|---|---|---|
| before | 1,180 | 9.1 GB |
| closed pull requests and deleted branches | 220 | 0.45 GB |
| superseded rust-cache generations on `main` (up to eight per family) |
36 | 4.49 GB |
| after | 926 | 4.2 GB |

The audit read `actions/cache/usage`, which still said 9.1 GB for
minutes after the deletions, so it now adds up the list of caches.

**The REST runs list lied twice in an hour, and #536's fix did not
hold.** #536 had the check ask each workflow for its latest run with two
differently shaped queries, on the reasoning that a stale answer only
hides newer runs. Later the same `Fuzz: failure` from 2026-09-06 (run
34030881111) came back: both queries of the pair were stale at once, and
a minute afterwards every shape of the query was fresh again. A filtered
runs list cannot be trusted in any shape. Check suites read through
GraphQL (`repository.ref.target.history.nodes.checkSuites.workflowRun`)
come from the primary store; a run is attached to the commit that was
`main`'s head when it ran, and the suite carries its event, status and
conclusion.

**Dependabot skipped two things the repository pins.** #544 adds the
`docker` ecosystem for `docker/Dockerfile` and the composite action's
directory; it was found by listing the repository's manifests by hand.
The audit now does that listing.

## Changes

- `tools/maintainer/clean_caches.py`: lists the caches, the open pull
requests and the live branches, and deletes a cache if its ref is a pull
request that is not open, a branch that no longer exists, or a
rust-cache generation on `main` older than the newest two of its family
(`--keep N`). The caches of `main`'s newest generations, of live
branches, of open pull requests and of tags are kept. A dry run unless
given `--delete`, which paces the deletions and backs off on 429 and
403.
- `tools/maintainer/audit.py`: the cache check sums `actions/caches`;
`main_green` reads the check suites of `main`'s last 100 commits through
GraphQL (only push and scheduled runs, a cancelled or skipped suite says
nothing, and a workflow whose last run is older than 100 commits is not
judged); the new `dependabot_coverage` check lists every `Cargo.lock`,
npm lockfile, `Dockerfile` and composite action in the repository tree
and fails for each that is under no entry of `.github/dependabot.yml`,
except the witness crate's lockfile, which is pinned on purpose.
- `docs/maintaining.md`: the housekeeping items name the tool and the
coverage.
- `CHANGELOG.md`.

## Testing

No product code changes. The tools run against the live repository are
the evidence.

- [x] `clean_caches.py`, dry run: `1180 caches, 9.1 GB; 256 unusable
(4.9 GB), 4.2 GB kept`; with `--delete`: `deleted 256, already gone 0,
failed 0`; dry run after: `926 caches, 4.2 GB; 0 unusable (0.0 GB), 4.2
GB kept`
- [x] `main_green` against seven crafted GraphQL answers (scratch probe,
output below): a failed scheduled run fails; a failure fixed by a later
success is ok; a cancelled run after a failed one leaves the failure
standing; a manual failure is ignored; an unfinished newest run leaves
the failure before it standing; no runs is ok; a GraphQL error is
`skipped`
- [x] `dependabot_coverage` on `main` before #544: `FAIL
docker/Dockerfile (docker) is not in .github/dependabot.yml;
.github/actions/fetch-corpus/action.yml (github-actions) is not in
.github/dependabot.yml`, exactly the two gaps #544 closes
- [x] `python3 tools/maintainer/audit.py` on this branch brought up to
date with `main` (which has #544): `12 of 12 checks ok`, including the
GraphQL check of `main` and `ok Dependabot watches every lockfile,
Dockerfile and composite action, or the audit says why not`
- [x] Required checks pass on GitHub's runners (the merge waits for
them: auto-merge is armed on them)

```
newest scheduled run failed                                    -> FAIL    Fuzz: failure
failed then fixed: the newest is a success                     -> ok
a cancelled run after a failed one: the failure still counts   -> FAIL    CI: failure
a manual run failed: not main                                  -> ok
the newest run is still in progress: the failure before it counts -> FAIL    CI: failure
no runs at all                                                 -> ok
GraphQL answers with errors                                    -> skipped boom
```

## Audit-honesty checklist

- [x] What this does not establish: that GraphQL is never stale. It was
fresh in every call made today, and `gh pr checks` reads check suites
the same way, but nothing here proves it; if it ever lies, the check
will say something false in the same way
- [x] What this does not establish: that the two newest generations of a
cache family are always enough for a build to restore from. rust-cache
restores the newest cache that matches its key prefix, and the
generations kept are the most recently accessed, but a cold family can
lose its only cache to the next run; it rebuilds, which costs minutes,
not correctness
- [x] The cleaner is destructive only with `--delete`, and only for
caches GitHub would evict first anyway
- [x] No emojis, private paths or PII

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk content
- [x] No fixtures

## Breaking changes

None.

## Related issues

Follows #534, #536 and #544.
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.

1 participant