Skip to content
Back to skills

Pre Push Review

BSecurity

Use when about to push nexus work and deciding what to run first, reading a green or red test result before a push, fixing a lint or ruff finding, rebasing before a push, or briefing an implementer, concurrent runs and reviewers that share a tree.

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentspythongojavashellsqlgitapi

Works with

  • cli
  • api
  • mcp

Security analysis

B75/100
  • criticalSends environment variables or credentials to an external URL

Pro shows the line behind each finding and how to fix it

Scanned December 3, 2026

npx -y skills add Hellblazer/nexus --skill pre-push-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pre Push Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pre Push Review
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/hellblazer-pre-push-review/badge)](https://www.skillsdirectory.com/skills/hellblazer-pre-push-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pre-push-review
description: Use when about to push nexus work and deciding what to run first, reading a green or red test result before a push, fixing a lint or ruff finding, rebasing before a push, or briefing an implementer, concurrent runs and reviewers that share a tree.
effort: low
---

# Pre-push review (nexus)

The fixed checks for a diff come from preflight: `nx run preflight --args-file -` fed `{"base": "origin/develop"}`, or `mcp__plugin_conexus_nexus__procedure_run(name="preflight", args={"base": "origin/develop"})`. It reads the diff and returns the commands to run, in order, each marked heavy or not; it runs none of them. This skill holds what a path list cannot decide: how to read a result, what to do about a finding, and what removed lines and symbols reach.

Before a push, or before handing a branch to the stack, run the tests the diff can affect, not a hand-picked handful: `lab-remote -c lab-m -- uv run pytest -n auto $(uv run python scripts/select_affected_tests.py --base origin/develop)` (a background command with its output redirected to a file, `--host` left on auto) and, beside it, `uv run python scripts/meta_tests.py run --base origin/develop` locally. On the Mac laptop a bare `-n auto` run with the engine substrate on and no lab grant exits 75 (`tests/conftest.py` `_refuse_heavy_laptop_run`); `NX_LOCAL_HEAVY=1` opts out only for a run that truly needs the laptop's `claude`, `bd` or credentials, and is counted. It selects the import closure of every changed module, the tests that read a changed file, the docs readers; a closure over 30% of the suite is cut to the direct tier (changed tests, direct importers, file, docs and route readers) with a stderr note, `--full-closure` for the whole thing, and develop CI runs the rest; a `service/` main change also selects every file that boots the engine (`--no-service-substrate` turns that off) and `--explain` to see why a file was picked. Replayed over 124 red develop pushes the cutoff selection has a median of 8% of the suite (16% at the upper quartile, 50% at most) and carries 16 of the 40 reds the diff caused; develop CI catches the rest. The full suite stays the post-push backstop (develop CI).

The push script also runs the cheap checks itself, against the tip's tree (`docs/contributing.md`, "The push runs the checks its diff reaches"): the size ratchet and the changelog fragments always, the missing-fragment listing always (`changelog-coverage`: it reports a commit with no fragment and never refuses for one), and the context-size budgets always (a tree already over a ceiling is caught on any push), then ruff over the changed `src/` Python files, or all of `src/` when the push changes `pyproject.toml` or `ci.yml` (CI's pinned ruff, from the tip's `ci.yml`; any finding or crash refuses), the wire ledger, the cloud-leg routes, the plugin ledger and the live pg-cluster check (`tests/test_integration_pg_cluster.py`, for a change to the throwaway-cluster setup) when the diff reaches them. Two heavy legs need a proof you produce first and pass as `--proof <file>`: the docs-readers selection for a `docs/` diff, and the write-seam gate for a diff that reaches ci.yml's `write-seam-gate` filter. Run each through `scripts/watched_pytest.py --status <file>` on a clean checkout of the exact commit you push; the refusal prints the command. A rebase changes the tree, so a proof from before it is refused.

Source: T2 `nexus/qo7ie.36-census-feedback_test_runs_before_push`. Where it and the repo's own docs disagree, the docs win: `docs/agents/test-running.md` § Hand runs and develop CI, and `AGENTS.md` rules 5 and 13.

## Commit messages

Before a push, run `git fetch origin develop` and read `git log --oneline origin/develop..HEAD`. Each subject is 72 characters or fewer and says what changed, as `type(scope): what changed (bead-id)`, with the bead id left out only when no bead exists (a release bump such as `chore(release): conexus X.Y.Z`); the why, the evidence and the numbers go in the body after one blank line (`docs/contributing.md` § Git Workflow). To reword an unpushed subject, work in your own worktree, never the primary checkout. For the last commit, use `git commit --amend`. For an earlier one, rebuild the stack and keep its split: note the shas, `git reset --hard <base>`, then `git cherry-pick` each sha in order, running `git commit --amend` right after the one to reword. Then name the new shas to the push script.

## Lint remedies

- **BLE001 (blind `except Exception`).** Narrow the catch to the error class the neighbouring code catches. A `# noqa: BLE001` makes a defect that arrives through the same path look like the refusal you meant to handle.
- **PLC0415 (function-level import).** Keep it only as `# noqa: PLC0415 -- <reason>`. Ruff enforces the noqa, not the reason.
- **A line-pin or ceiling ratchet fails.** Regenerate the pins from the detector; do not widen a ceiling to pass.
- **A rise in tenant-minting tests is reported, not refused; the alarm line is Sam's.** pytest-gate's storage-touch fan-in fails only above `alarm_line_tests` in `tests/storage_touch_ceiling.toml` (5544, RDR-258 Phase 1); a rise from the baseline `provisioned_tests` up to that line is a warning with the trend in the job summary. Consolidate first: prefer a tenant-free test, and keep only the case that fails on the defect. Moving the alarm line is Sam's decision (his ruling of 2026-11-27: the first 2-week review rechecks the margin); the 2026-10-25 ruling (RDR-232 Phase 1) covered about five irreducible tenant tests under the old ceiling. `uv run python scripts/tenant_delta.py` says by how much a branch moves the count.
- **New Java test code** uses `TestHttp.client()` and `TestHttp.request()`, not the bare JDK builders. A lint enforces it.
- **Run the whole lint bucket, not a subset** (the class-A checks in it, marked `class_a`, report and do not refuse). The lint markers are deselected from default addopts, so naming one lint file in a plain `pytest` run collects nothing and prints a green-looking "deselected". A directory, a touched-file list or a `-k` is a subset too, and each cost a develop red (first miss, then four recurrences).
- **Run the meta-tests the diff reaches first, on every push.** `uv run python scripts/meta_tests.py run --base origin/develop` (preflight's `meta` row) runs the census and lint tests whose traced surface the diff touches, in seconds and locally, and names each one it runs and why; it is a first pass, never a substitute for the whole bucket below.
- **When preflight lists the lint bucket.** It lists it for every code push, which is the standing rule for a push through preflight. To decide by hand, `tests/AGENTS.md:51` says run it when touching `conexus/`, RDR frontmatter or a storage-boundary or hook-registration invariant, and `docs/agents/test-running.md` adds a new test file.
- **Stage new files before the bucket runs.** The repo-wide shell lints enumerate tracked files, so an untracked new file is never scanned. Preflight checks this first.

## Reading a green

A green is evidence only about what its selection could fail on, and about the tree it ran against.

- **Name what the run excluded, then say whether the change touches it.** Ask "what can this run fail on, and is what I changed inside that set", not "what did I change, what should I run".
- **Treat a large passed count from a narrow selection as a reason for suspicion.**
- **Read the summary line, never the exit code.** A run piped into `tail` or `head` reports the pipe's exit. Write the run to a file with `-rf` and match pytest's own summary line with a pattern that fails on any failure (`^[0-9]+ passed` and nothing worse on the line). `grep -q passed` matches "1 failed, 964 passed", and empty filter output is a failed run. Preflight's pytest commands already do this.
- **Run a test and a push as separate tool calls, never one command.** Read the result between them; a red must stop the push because you read it, not because of how the command was chained.
- **Read the push script's whole output, and search it for `PUSH_TENANT_HINT` before you read `PUSH_OK`.** The hint goes to stderr and never refuses the push; a `| tail` has already cut it once.
- **Under `NX_TEST_T2_SUBSTRATE=none`, substrate tests fail or error.** Build the gate jar and run with the substrate, or pick substrate-free tests.
- **Use substrate `none` for the lint bucket only.** It hides the storage-touch guard, so run tests that drive a CLI command end to end once without it, and read `touched_unprovisioned=` in the summary.
- **Put that run in every developer brief** whose change drives a CLI command end to end.
- **Check a hand-listed test set before you send it.** Build it from `git diff --name-only` plus the files `grep -rl` finds, never from memory. In the same command, before `lab-remote`, run `for f in ...; do test -e "$f" || echo "missing $f"; done` and stop on a miss. Name explicit paths: a zsh glob that matches nothing leaves pytest running the whole suite.
- **Register a long job you start by hand.** A wait or a poll loop with no hook behind it is invisible to the restart's ready check until you say it exists: `nx identity work register --kind wait --ref <what>` when it starts, `nx identity work done --kind wait --ref <what>` when it ends (a row nothing has written for 12 hours, or that predates your session, reads stale). `nx ci wait` registers itself and `nx identity work run` registers what it wraps (rule 7 of the test-running guide); a label never blocks the job.
- **Keep a remote run's log in the copy and fetch it** (`lab-remote --fetch <path>`), instead of piping the run through `tail`.
- **After you change or remove a printed string, run `grep -rn "<old string>" tests/` and run the files it names.** A printed string has the blast radius of an API change; the covering set is not the tests that share the subject.
- **After you edit a doc line, grep the tests for the old wording** before you push.
- **After you change a method that tests replace with a fake** (`HttpVectorClient.upsert_chunks_with_embeddings`, or any other method a test stubs), run `grep -rn '"<method>"' tests` and the local-service gate. The unit suite cannot reach those fakes.
- **After you stop writing, rename or retire a metadata key**, run `grep -rln '"<key>"' tests/` and the files it names. A required-set pin names the key far from the writer. Read each hit: `session_id` is also the T1 session id.
- **After a behaviour change**, grep the tests for the words that describe the old behaviour (for a retired-name write that is now refused: `retired`, `superseded`). Run the hits with `-m ""` so integration-marked ones run, and run `-m lint` over any new test file.
- **After any `service/` change**, grep `tests/` for the routes it changed and run the hits with `-m ""` on chas after the gate jar. Preflight's integration selector picks nothing for a `service/` change, and its engine rows are Java only. Named classes are for the red-first loop, not the proof: for the RDR-236 Phase 3 engine batch, develop CI selected a journey (8o06q) that no named Python set had run, and it found a regression.
- **After you change user-facing remedy text**, run `tests/upgrade/test_verb_demotion.py`.
- **Run Linux-only and skip-guarded tests on Linux before landing**: on chas through `lab-remote`, or in `python:3.12-slim` as a non-root user named `runner` (CI's shape). A laptop or hellmini run skips them and reads green.
- **Name the tree a green ran against, and whether anything moved under it since.** A rebase, a peer's landed commits and your own fixes all change the tree. Rerun; the argument that the interaction cannot matter failed three times in one day.
- **When two narrow selections have already cleared something that turned out red**, stop choosing selections for that change. Run what its change class requires (preflight names it) and announce it as `docs/agents/test-running.md` § Hand runs says: the change class, the tree sha, and "no green full run of this tree exists". If a green full run of this exact tree already exists, read it instead; no tree gets two. "Pre-push" alone is not a reason for a hand full suite.
- **When two sessions stack commits**, the last to push owns one full run on the combined tree.

## After a rebase

A rebase rewrites the shas that docs cite (642e8f42f became 83f6b9197) and can pull a peer's commits under a newly added lint that scans the directories they changed.

- **Recheck the shas** that `docs/wire-contract-pending.md` and any other doc you edited cite.
- **Rerun the checks against the rebased tree.** A green from before the rebase belongs to another tree.

## Concurrent runs and reviewers

- **Ask whether the jobs share a mutable resource**: a tree, a build artifact, ports, a config dir, an install. A running suite is a write-lock on the tree.
- **Treat a Java agent and a Python agent as producer and consumer** through the gate jar, never as peers.
- **Run sandbox-isolated E2E gates in parallel with each other, but keep the unit suite serial to any gate whose teardown stops services or sweeps clusters.**
- **Give a critic briefed to mutate and restore its own worktree.** It is a writer, not a reviewer.
- **Read a block-shaped mass failure under overlap as contention**, and rerun the reds alone in quiet. That rerun is mandatory evidence, whichever way it comes out.
- **Run one full Python suite per box.** A second run queues (`AGENTS.md` rule 5, `docs/agents/test-running.md`); afterwards reap dead clusters with `scripts/sweep-test-substrates.sh`.

## Briefs

A brief carries what the agent's own run cannot tell it. These omissions each cost a develop red.

- **A brief for a `service/src` edit says to run the full engine suite, once per tree.** A `-Dtest` filter is the inner loop: it never selects the repo-wide `*GateTest`, `*WiringTest` and `*ConformanceTest` scanners. The run goes through `scripts/mvnw-leased.sh --lab-run <class>`, is announced with its change class, the sha and "no green full run of this tree exists" (`AGENTS.md` rule 13), and is handed on by sha and status file. A fix round that touches only a test or a doc file does not trigger another, with two exceptions. A change to a shared test changelog (`db/changelog-test/`, above all `db.changelog-test-objects.xml`) runs the whole suite plus the integration group, because every class that installs test objects reads it and no name filter finds them. An edit that adds SQL-looking literals or fixtures to a Java test runs `-Dtest='*GateTest,*WiringTest,*ConformanceTest,*ScanTest,<touched>'` or the whole suite.
- **A brief for a schema, seed-helper or SQL-function-signature change, or an edit to a `db/changelog-test/*.xml`, names the integration group as CI runs it.** A default engine run excludes it. Preflight's engine class lists the command (`-Dnexus.ddl.suite=integration -Dtest.excluded.groups= -Dgroups=integration` through `scripts/mvnw-leased.sh --lab-run`); put it in the brief and in any run script.
- **A brief whose scope includes a file under `conexus/` (hooks, skills, agents, scripts) names the `conexus/PENDING_RELEASE.md` line as a deliverable.** That holds for a doc-only `SKILL.md` edit too. The line follows the ledger's header (one path per bullet, on the bullet's first line; the bead is attributed by its commit message). The brief also says that `tests/test_plugin_release_drift_ledger.py` runs after the commit, because it diffs committed trees against the pinned tag. A brief without the line reds the drift ledger on develop (2026-10-31, a hook script edit).
- **A brief that adds substrate tests names `uv run python scripts/tenant_delta.py --base <develop sha>`**, run in the integration worktree before the push. Read the `PUSH_TENANT_HINT` line the push script prints for the count that range adds. Say in the brief that a rise past the alarm line (`alarm_line_tests`) waits for Sam, after the tests are consolidated.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.