Repository navigation
Add a verify workflow: a lane pushes a verify/ branch and GitHub's runner runs one tests/run.sh selector from the head commit's trailers, with PostgreSQL 16 on request (part of opensoft/openRepoTools#165) - #34
Conversation
…nner runs one tests/run.sh selector from the head commit's trailers, with PostgreSQL 16 on request (part of opensoft/openRepoTools#165) Every lane's local tests/run.sh waits while any `python3 -m pytest` runs on the workstation, and on 2026-11-10 a task's verify waited an hour and timed out without running. Brett Heap chose "CI verifies (Recommended)", whose option read: "Lane 3 briefs every lane to verify on CI by default. Local runs shrink to one short test by node id." (a dialog in lane openRepoTools-3's session, recorded at 2026-11-10T22:58:57Z). .github/workflows/verify.yml is a new file; tests.yml is unchanged, since lane 1 holds a pending patch to it for opensoft/openRepoTools#186 (T010). It is not a gate: the release workflow reads only runs whose path is .github/workflows/tests.yml. How a run is asked for: - A push to a branch under verify/ runs the workflow file of the pushed commit, so it works before this file is on main. The run reads the head commit's trailers with git's own trailer parser: Verify-Selector (one pytest -k expression, required) and Verify-Postgres (1 on; 0 or absent off). - workflow_dispatch, with the inputs selector and postgres, once the file is on main. - A newer push to the same verify branch cancels the older run. The run is `bash tests/run.sh -k "$SELECTOR" -rs --junitxml=...`, never under a flock. The run's output is kept as an artifact for 14 days. The step summary is one line: the selector, PostgreSQL on or off, and the passed, failed and skipped counts. PostgreSQL: the job runs on ubuntu-24.04, as every tests.yml job does. Ubuntu 24.04's own major is 16, so on request the job installs postgresql-16 from Ubuntu's archive, with no PGDG source. The job then checks that initdb, pg_ctl, postgres and psql each say 16. It also starts a socket-only cluster of its own, reads server_version 16, and stops it. No service container or system service is used, because tests/pgcluster.py (lane 2's T229 line) starts its own postmaster. The job exports exactly what that fixture reads: - OPENREPOTOOLS_REQUIRE_PG, 1 or 0, set only in env:; - PG_BIN, /usr/lib/postgresql/16/bin when on. When off, PG_BIN names an empty directory, as lane 2's no_engine() does. The image's own PostgreSQL 16 would otherwise be found unasked. Injection: no run: holds an expression. Event values reach the shell only through env:, double-quoted. A selector must match pytest's -k alphabet and begin with a letter, digit, _ or (, at most 500 bytes. It can then hold no quote, $, backtick or newline, start no workflow command, and not be read as a pytest option. The workflow has permissions: {}. The job has contents: read, the checkout keeps no credential, and the job uses no secret. Actions are pinned by commit, as tests.yml pins them, and pip installs with --only-binary=:all:. This commit's own trailers below ask for the first proof run: repo_hygiene without PostgreSQL. Verify-Selector: repo_hygiene Verify-Postgres: 0 Lane: openRepoTools-3 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 3 days and 21 hours by commenting |
Reviewer's GuideConfigurationAdd the standalone verify workflow, including its triggers, permissions, concurrency, runner setup, and pinned actions, so lane branches and manual dispatches can request targeted CI runs.
Read and validate the selector and PostgreSQL choice, optionally install and verify PostgreSQL 16, run the selected tests, and publish the summary and retained artifact.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…wn selectors need, and its comments say where PostgreSQL comes from and how the summary counts (review of #34; part of opensoft/openRepoTools#165) The independent review of 04be130 read READY AFTER FIXES: one SHOULD and three NITs, no MUST. This commit makes the workflow's three fixes; the fourth NIT is in the PR body. - SHOULD: the selector cap goes from 500 to 4096 bytes, in the check, in its refusal and in the header comment. spec#17's tasks.md at 8523aa0 holds 229 single-quoted -k selectors. The five tasks T107, T502, T507, T510 and T512 carry eight of them over 500 bytes, the longest 1,438. The plan step now accepts 226 of the 229, those eight included. The other three are template placeholders, not selectors. At the cap, 4096 bytes is accepted and 4097 refused. Nothing else about the check changes. - NIT: where PostgreSQL comes from. In proof run 2, apt found postgresql-16 already newest at 16.15-1.pgdg24.04+2, so today the runner image's own PGDG build runs. Ubuntu 24.04's archive is the fallback if the image drops it. The comments on the job and on the install step now say so; the step itself is unchanged. - NIT: the summary counts one outcome per test case, by ci_shards.py's rule. An xfail counts as skipped and an xpass as passed. A test that passes and then errors in teardown counts only as an error. A comment at the loop now says so; the suite has no xfail today. This commit's own trailers below ask for repo_hygiene without PostgreSQL, so its push runs green. Verify-Selector: repo_hygiene Verify-Postgres: 0 Lane: openRepoTools-3 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
|
Coordination for Brett's approved narrow CI-only stacking/batching pilot:
This pilot will reference #34 as targeted feedback, not full or composed acceptance. The feature's governance record is prepared separately in the spec leg. This is coordination, not a claim on #34 or its lane's work. |
|
The complementary pilot is now #37, with governance/feature 008 in opensoft/openRepoTools-spec#24. It touches neither verify.yml nor tests.yml/release.yml. Hosted shadow/contract jobs passed; full acceptance stays in the existing tests workflow. The shared Claude/Codex instructions reference #34 as the owner of targeted feedback and require checking its actual merge state before use. No live canary/queue has been run and no change or interruption is requested of lanes 1–5. |
…ff-refuses-closed-lane Lane 3 asked for this merge and a fresh CI run before landing (opensoft/openRepoTools#165, 6783977065). Lane: openRepoTools-5 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…sals-keep-their-words Lane 3 asked for this merge and a fresh CI run before landing (opensoft/openRepoTools#165, 6783977065). Lane: openRepoTools-5 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…udge-race Part of opensoft/openRepoTools#165 (lane 4's batch 6 Q18); the branch is #36. main moved from 749e969 by #34, which adds only .github/workflows/verify.yml, so the merge changes nothing in tests/test_lane_helpers.sh. Lane: openRepoTools-3 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>



Lane: openRepoTools-3
Claim: none (Brett Heap's "CI verifies (Recommended)", 2026-11-10)
Why
A lane's local
tests/run.shwaits while anypython3 -m pytestruns anywhere on the workstation. On 2026-11-10, T303's verify waited an hour on Eagle and timed out without running. Brett Heap chose "CI verifies (Recommended)" in a dialog in lane openRepoTools-3's session (recorded at 2026-11-10T22:58:57Z). The option read: "Lane 3 briefs every lane to verify on CI by default. Local runs shrink to one short test by node id."This PR adds
.github/workflows/verify.yml, one new file. Nothing else changes.tests.ymlis untouched, because lane 1 holds a pending patch to it for Triad migration (feature 004-migrate-to-triad): execution tracking under Brett Heap's word of 2026-10-07 openRepoTools#186 (T010)..github/workflows/tests.yml.Design
A push to a
verify/branch, with the selector in the head commit's trailers. GitHub dispatches only a workflow that is already on the default branch, so a dispatch-only file could not be tried before it lands. Apushruns the workflow file of the commit pushed, so this design works from this PR's own branch and from any lane branch that carries the file. The trailers sit in the commit, so the commit records what was asked for. The run reads them with git's own parser,%(trailers:key=…,valueonly,unfold). AVerify-Selector:in the message body, outside the last paragraph, is not read.Verify-Selector: …is required, given once, and is one pytest-kexpression. There is no default, because the whole suite istests.yml's job.Verify-Postgres: 1turns PostgreSQL on.0, or no trailer at all, leaves it off.workflow_dispatchtakes the inputsselectorandpostgres(0or1). It works once this file is onmain, and it then ignores the trailers.The run is
bash tests/run.sh -k "$SELECTOR" -rs --junitxml=…, never under a flock.-rsprints why each test skipped, and the JUnit report is what the summary counts.The run's output (
plan.txt,run.log,junit.xml, the exit code, and the engine logs when PostgreSQL is on) is kept for 14 days as the artifactverify-RUNID-aATTEMPT.The step summary is one line: the selector, PostgreSQL on or off, and the passed, failed and skipped counts. The line also gives errors when there are any, and the exit code; exit 5 means the selector selected no test.
The counts follow
.github/ci/ci_shards.py's rule, one outcome per test case:The suite has no xfail today.
PostgreSQL
ubuntu-24.04, as everytests.ymljob does, and for that file's reason:ubuntu-latesthas been 26.04 since 2026-10-21.postgresql-16already at the newest version (16.15-1.pgdg24.04+2) and installed nothing. The install step stays, so the job does not depend on the image: Ubuntu 24.04's default major is 16, so if the image drops it,postgresql-16comes from Ubuntu's archive. The job adds no PGDG source.initdb,pg_ctl,postgresandpsqleach report major 16. It then starts a socket-only cluster of its own, readsserver_version16, and stops the cluster.tests/pgcluster.py(lane 2's T229 line) reads exactly two variables, and the suite step sets both in itsenv::OPENREPOTOOLS_REQUIRE_PGis1when on and0when off. With1, pytest refuses a run that finds no engine, exit 4, before any test runs.PG_BINis/usr/lib/postgresql/16/binwhen on.PG_BINnames an empty directory, as lane 2's ownno_engine()does. Otherwise the image's own PostgreSQL 16 would be found without being asked for. The real-engine tests then skip, and the skip reason namesPG_BINandpostgresql-16./tmp. T229's TLS cluster listens on 127.0.0.1.Security
No
run:contains a${{ }}expression. Values from the event reach the shell only throughenv:, and are used double-quoted.The selector is refused unless it:
_, space,.,(,),[,],:,+,/and-;_or(;So it cannot carry a quote,
$, a backtick or a newline. It cannot be read as a pytest option, start a workflow command, or break out of the summary's code span.A refused value is printed
%q-quoted.permissions: {}for the workflow, andcontents: readfor the job.The checkout keeps no credential (
persist-credentials: false), and the workflow uses no secret.Actions are pinned by commit, to the same three commits
tests.ymlpins.pytest 8.3.4 is installed with
--only-binary=:all:.For lanes: verifying a task on CI
git fetch originfirst, so thatorigin/mainis current.verify/LANE/TASKfrom the commit you want verified. The commit you push must carry.github/workflows/verify.yml. If your tip predates the file, check it out fromorigin/mainonce this lands.For example, lane 2 verifying T229b, from its task branch's tip:
The run is picked by the head commit's sha, not by
--limit 1. Straight after a push,--limit 1can list nothing yet, or an older run on a reused branch name.Points to know:
-kmatches test names, not node ids.tests/x.py::ypasses the check, selects nothing, and exits 5. Use words from the module and test names instead, such astest_lanes_index.py or repo_hygiene.unfoldjoins them with single spaces. A selector is at most 4096 bytes.[skip ci]in the head commit's message stops the run: GitHub starts none. So do[ci skip],[no ci],[skip actions]and[actions skip].bash tests/run.sh -rs, with no-k. It goes totests.yml, through the PR's own CI or a dispatch on the branch (gh workflow run tests.yml --ref BRANCH).Verify-*trailers out of the squash message, this PR's included.Reading the result:
gh run viewshows the job's result and any refusal.the summary line.real-engine: real PostgreSQL 16 at /usr/lib/postgresql/16/bin (PG_BIN).Proof runs
Pushing this branch at
04be130. The head commit carriedVerify-Selector: repo_hygieneandVerify-Postgres: 0. The run succeeded: 240 passed, 0 failed, 18 skipped, exit 0. The 18 skips are the root-document skips a standalone leg always has. Run: https://github.com/opensoft/openRepoTools-code/actions/runs/42928765631The branch
verify/l3/ci-verify-pg-proof, at975c959. It is an empty commit on04be130, with the same tree, carryingVerify-Selector: guard_launch_mode or repo_hygieneandVerify-Postgres: 1. The run succeeded: 253 passed, 0 failed, 18 skipped, exit 0. The two-word selector reached pytest as one argument.postgresql-16already newest and installed nothing.server_version16.15, and stopped.mainneeds PostgreSQL yet, so this run proves the engine only.Run: https://github.com/opensoft/openRepoTools-code/actions/runs/42928771028
This PR's fix commit carries
Verify-Selector: repo_hygieneandVerify-Postgres: 0too, so its own push runs green.The fixture itself is not yet proven on CI. A lane's branch proves it by pushing a verify branch whose tree has
tests/pgcluster.pyand its real-engine tests, withVerify-Postgres: 1. Its JUnit counts then show those tests passed and none skipped for want of PostgreSQL 16, and the log's foot names the engine.Checked locally (no suite was run)
actionlint1.7.12 exits 0.yaml.safe_loadparses the file.bash -nandshellcheckpass on each of the sixrun:bodies, and none of them contains${{.The plan step, on 18 throwaway commits, accepts:
It refuses:
$(…),;, a backtick, a quote, a leading-and a leading::;Verify-Postgres.No injected command ran. At the cap, 4096 bytes is accepted and 4097 refused.
Real selectors. spec#17's tasks.md at
8523aa0holds 229 single-quoted-kselectors. Run through the plan step:The engine step passes against PostgreSQL 16.15 binaries.
The summary step gives the right line for:
The repository's own host-path rule finds nothing in the new file.
🤖 Generated with Claude Code