clean-up: Deploy and supply chain: CI workflows (timeouts, checkout credentials, duplicated setup and release gate)
tsk-0rt8f9ez1k7n Open
From the clean-up audit, area 15 (Deploy and supply chain), tsk-hgnbapyw7hnh. Read at main 80647565; all lines refer to that SHA, so check each one against current main before changing it. Sent to the lead as seq 125414.
Workflow-only changes under .github/workflows/. Low risk. One PR is enough, or two if item 4 grows.
Order: do item 3 before item 4. A composite action from item 4 can then host the tools environment from item 3.
1. CI jobs without a timeout, against the "every CI job has a timeout" entry (A15-1)
- Kind: docs drift / debt
- Files: context/process.md:1446 (title "Every CI job has a timeout"; lines 1461-1463 cover only the jobs ci-ok waits for). Jobs with no
timeout-minutes: .github/workflows/ci.yml:547 (ci-ok), :571 (mariadb); hub-mariadb.yml:61 (decide), :154 (report); audit.yml:34 (pip-audit); ktw-lint.yml:12; pages.yml:22 (build), :69 (deploy); publish-image.yml:58 (image), :162 (sign); release-cli.yml:53 (build), :94 (publish). release-hub.yml does set one on all three of its jobs (:49, :72, :115). - What is wrong: these 12 jobs fall back to GitHub's 6-hour limit. The entry's title promises a timeout on every job.
- Proposal: add
timeout-minutesto each one: 5 for ci-ok, mariadb and report, 10 for decide, 30 for the rest, as release-hub.yml already does. - Open question: add the limits, or narrow the entry's title to the jobs ci-ok waits for? This proposal assumes the limits.
- Effort: S. Risk: low. A limit that is too tight could cancel a publish part-way, so the image and pypi jobs need the headroom release-hub.yml gives them.
2. persist-credentials: false set on most checkouts but not all (A15-2)
- Kind: design (one rule applied unevenly)
- Files: checkouts with no
persist-credentials: false: .github/workflows/ci.yml:152 (web), :308 (hub-wheel), :344 (hub-lock), :360 (hub-image), :379 (helm), :533 (join-windows); audit.yml:37; ktw-lint.yml:20. The other 24 of 32 checkouts set it, e.g. ci.yml:114, release-hub.yml:76. - What is wrong: these jobs run pull-request code with the job token left in .git/config. The token is contents: read only.
- Proposal: add
with: persist-credentials: falseto the 8 checkouts. Optionally, a test or grep in tools/ that holds every checkout to it. - Effort: S. Risk: very low. None of these jobs pushes or fetches with credentials after the checkout.
3. The hashed tools lock is installed five ways, two of them against the documented rule (A15-3)
- Kind: duplication / design
- Files:
- in a venv of its own: ci.yml:129-132 (changelog, uv), ci.yml:194-198 (web-e2e, uv), audit.yml:45-47 (pip-audit)
- into the job's shared environment: ci.yml:348 (hub-lock), ci.yml:493-496 (cli, on top of cli/requirements/dev.txt)
- the rule: audit.yml:43-44 ("tools.txt is compiled without the hub's pins, so it must not share an environment with them") and hub/README.md:431 ("each in an environment of its own")
- What is wrong: one bootstrap is written five times with three different flag sets. The two shared-environment installs break the stated rule. In the cli job, pip-audit's dependencies go over the CLI's dev lock. Today the shared pins match (packaging 26.3, platformdirs 4.13.5, pygments 2.21.0), but nothing checks that they stay equal.
- Proposal: one small composite action, or one
make -C hub tools-envtarget, that creates$RUNNER_TEMP/toolswith--require-hashes --no-deps --only-binary :all:and returns its bin/ path. hub-lock and cli then callmake lock-check UV=$RUNNER_TEMP/tools/bin/uv, as changelog and web-e2e already do. - Effort: S. Risk: low.
4. CI setup blocks repeated across jobs (A15-4)
- Kind: duplication
- Files:
- CLI in its own venv with only
maityon PATH, verbatim twice: ci.yml:210-216 (web-e2e) and :407-413 (join-smoke) - hub from runtime.txt and build.txt, then editable without isolation: ci.yml:202-205 (web-e2e), :401-402 (join-smoke), :538-542 (join-windows, PowerShell)
- self-hosted runner expression: ci.yml:254 (sqlite), :419 (pg), hub-mariadb.yml:121 (maria). The maria copy has no
github.event_name == 'push'term. That is on purpose, but nothing next to the expression says so. - runner echo step: ci.yml:258, :454, hub-mariadb.yml:140
- What is wrong: a change to how tests install the CLI or the hub (e.g. context/process.md:1966, entry 9a0ed6f7) has to be made in two or three places by hand.
- Proposal: a local composite action under .github/actions/ for the first two blocks (
install-cli-isolated, andinstall-hub-lockedfor Linux). GitHub allows no reuse in the runs-on expressions, so keep them, but add a comment at hub-mariadb.yml:121 that says why the push term is missing. - Effort: M. Risk: low to medium. Step names in the logs change. The checkout log lines that tools/coverage.sh reads stay the same.
5. The release gate job is duplicated, and release_gate.py names the wrong set of callers (A15-5)
- Kind: duplication / docs drift
- Files: release-hub.yml:45-68 (
check) and publish-image.yml:35-56 (gate) are the same job: checkout fetch-depth 0, setup-python 3.12,release_gate.py --sha "$GITHUB_SHA" --mariadb --wait-minutes 230, timeout 240. release-cli.yml:33-51 is the same without --mariadb. tools/release_gate.py:4 says "The release workflows (release-hub.yml, release-cli.yml) run this" and leaves out publish-image.yml. - What is wrong: one v* tag runs the same 4-hour polling gate twice in parallel, and its arguments live in three places that must agree.
- Proposal: one reusable workflow (
release-gate.yml,on: workflow_call, inputsmariadbandwait) that all three call, plus the docstring fix. - Effort: S. Risk: low. Each caller must pass its permissions (
actions: read) down.
Effort sum: S+S+S+M+S = 7 points.
Notes
Lotse · Nov 18, 2026, 20:16 UTC
Item A15-2 (persist-credentials: false on the checkouts) moves to tsk-vg3v6am802q5 item 2, the same change from the security round. Leave it out here (lotse, req-gqt5b2812nej).
Maity Coder Claude 003 · Nov 20, 2026, 11:55 UTC
Audit round 3 (tsk-hgnbapyw7hnh), read at 588f911b: one more duplicated setup.
.github/workflows/hub-mariadb.yml:155-188(hub-mariadb-11-8) copies the 11.4 job (:118-150): the longruns-onexpression, service block, env, checkout, setup-python and install steps; only image, port, timeout andPYTEST_ARGSdiffer. Merging the two results then needs a nested expression three levels deep (report job,:193and:214). Proposal: a matrix over{image, port, timeout, args}with a combined result step, or a YAML anchor for service and steps. Caution:tools/release_gate.pylooks jobs up by name (MARIADB_EXTRA_JOBS,workflow_job_ids), so a matrix that renames the jobs has to move the gate with it. Effort M, risk medium.