Skip to content

The hooks job leaves the engine's tests and clippy to the engine job - #459

Merged
HackingGate merged 1 commit into
mainfrom
hooks-job-skips-engine-rerun
Oct 29, 2026
Merged

HackingGate merged 1 commit into
mainfrom
hooks-job-skips-engine-rerun

Conversation

@HackingGate

@HackingGate HackingGate commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

The pre-commit leg of the hooks job runs on ubuntu-slim, which cancels any job at 15 minutes. That limit is the runner's own and timeout-minutes cannot raise it. The leg ran every manual-stage hook, including engine-tests (cargo test) and engine-clippy. The engine job already runs both on the same commit.

On a passing main run, scan engine tests alone took 6 minutes of a 13.5-minute leg. Most of that is building and linking the 32 integration-test binaries on one CPU. All three caches (uv, Rust target/, pre-commit) hit with exact keys in both the passing and the cancelled runs. The remaining cost is compiling this crate's changed source, which no cache can skip.

Effect: the leg was cancelled during engine-tests twice on one pull request, and in 2 of the last 7 runs on main. prek runs the same hooks and finished at 13.5 minutes on main.

Change: SKIP: coverage,kani becomes SKIP: coverage,kani,engine-tests,engine-clippy, for the reason the job already gives for coverage and kani. The lefthook leg never ran either hook. Both hook entries still run at every local pre-push. content-policy stays: the guard hooks also go through cargo run, so skipping it would only move the build into the next hook.

Expected: about 6.5 minutes off the pre-commit and prek legs.

Summary by CodeRabbit

  • Tests
    • Automated validation checks are now organized across separate workflow jobs. Engine checks no longer run in the hooks job, avoiding duplicate execution while preserving their coverage in the dedicated engine job. This change affects the project’s continuous integration process and does not introduce any user-facing features or alter application behavior.

On ubuntu-slim, capped at 15 minutes a job, the pre-commit leg rebuilt the
32 test binaries the engine job had already built for the same commit and
was cancelled partway through engine-tests: twice on one pull request, and
2 of the last 7 runs on main. Skipping engine-tests and engine-clippy there,
as coverage and kani already are, removes about six and a half minutes from
the pre-commit and prek legs.
@uphold-review

uphold-review Bot commented Oct 29, 2026

Copy link
Copy Markdown

uphold-review

Walkthrough

This pull request changes one setting in the CI hooks job in .github/workflows/test.yml. The SKIP environment variable goes from coverage,kani to coverage,kani,engine-tests,engine-clippy. With that, the pre-commit and prek legs stop running cargo test and cargo clippy --all-targets a second time. The engine job on the same commit already runs both: cargo test --locked and cargo clippy --locked --all-targets -- -D warnings. The comment block above env gains a paragraph explaining the skip. The ubuntu-slim runner cancels a job at its time cap, and building the test binaries a second time on its one CPU pushed the leg past it. The hook entries still run at every local pre-push.

The lefthook leg is not affected. It runs lefthook run pre-commit --all-files and lefthook run preflight, and neither includes these two commands. The hook definitions in .pre-commit-config.yaml and lefthook.yml are unchanged, so local pre-push behaviour stays the same. Nothing else in the repository reads the SKIP list.

Changes

File Change
.github/workflows/test.yml The hooks job's SKIP list adds engine-tests and engine-clippy, which the engine job already runs on the same commit. A comment explains that the ubuntu-slim time cap is the reason and that the hooks still run at local pre-push.

✅ uphold rules: uphold's rules pass · this repository's policy at 0b555c6

Rule output
$ uphold scan
policy checks passed

$ uphold check
reconciled 19 enforcement claims:
  explicit-unknown <- catalog-tests  enforced by a hook installed here
  single-authoritative-source <- catalog-reference-current  enforced by a hook installed here
  make-illegal-states-unrepresentable <- catalog-validate  enforced by a hook installed here
  single-authoritative-source <- catalog-tests  enforced by a hook installed here
  explicit-unknown <- no-stale-hook-pins  enforced by uphold guard at manual
  single-authoritative-source <- no-stale-hook-pins  enforced by uphold guard at manual
  complete-mediation <- prevent-ai-author  enforced by uphold guard at commit-msg
  fail-safe-defaults <- prevent-public-push  enforced by uphold guard at pre-push
  observability <- removed-function-named  enforced by uphold guard at commit-msg
  least-privilege <- workflow-declares-permissions  enforced by uphold scan
  minimize-attack-surface <- workflow-declares-permissions  enforced by uphold scan
  compromise-recording <- no-local-merge  enforced by uphold guard at pre-merge-commit
  compromise-recording <- no-merge-commit  enforced by uphold guard at pre-commit
  data-minimization <- no-private-repo-names  enforced by uphold guard at commit-msg
  data-minimization <- no-running-os-identity-metadata  enforced by uphold scan
  chestertons-fence <- removed-function-named  enforced by uphold guard at commit-msg
  deprecation-discipline <- no-stale-hook-pins  enforced by uphold guard at manual
  reproducible-derived-state <- catalog-reference-current  enforced by a hook installed here
  reproducible-derived-state <- review-current  enforced by a hook installed here
  behavior  catalog-tests: unmeasured [not_requested] — no behavioral probe requested
  behavior  catalog-reference-current: unmeasured [not_requested] — no behavioral probe requested
  behavior  catalog-validate: unmeasured [not_requested] — no behavioral probe requested
  behavior  catalog-tests: unmeasured [not_requested] — no behavioral probe requested
  behavior  no-stale-hook-pins: unmeasured [not_requested] — no behavioral probe requested
  behavior  no-stale-hook-pins: unmeasured [not_requested] — no behavioral probe requested
  behavior  prevent-ai-author: unmeasured [not_requested] — no behavioral probe requested
  behavior  prevent-public-push: unmeasured [not_requested] — no behavioral probe requested
  behavior  removed-function-named: unmeasured [not_requested] — no behavioral probe requested
  behavior  workflow-declares-permissions: unmeasured [not_requested] — no behavioral probe requested
  behavior  workflow-declares-permissions: unmeasured [not_requested] — no behavioral probe requested
  behavior  no-local-merge: unmeasured [not_requested] — no behavioral probe requested
  behavior  no-merge-commit: unmeasured [not_requested] — no behavioral probe requested
  behavior  no-private-repo-names: unmeasured [not_requested] — no behavioral probe requested
  behavior  no-running-os-identity-metadata: unmeasured [not_requested] — no behavioral probe requested
  behavior  removed-function-named: unmeasured [not_requested] — no behavioral probe requested
  behavior  no-stale-hook-pins: unmeasured [not_requested] — no behavioral probe requested
  behavior  catalog-reference-current: unmeasured [not_requested] — no behavioral probe requested
  behavior  review-current: unmeasured [not_requested] — no behavioral probe requested
  note  lefthook.yml runs the binary
  note  lefthook.yml defines 20 command(s)
  note  .claude/settings.json runs `uphold hook`
adopted 10 record(s) for design rulings ([decide]):
  explicit-unknown
  parameterize-do-not-enumerate
  enforcement-needs-a-trigger
  psychological-acceptability
  single-authoritative-source
  mechanism-policy-separation
  least-power
  complete-mediation
  fail-safe-defaults
  economy-of-mechanism
  order  fail-safe-defaults over psychological-acceptability: A scope the shim cannot evaluate refuses by default, and `unresolved = "run"` is the named way out.
  order  explicit-unknown over psychological-acceptability: A seam that stands down says so on stderr; it never reports what it did not read as a pass.
  order  psychological-acceptability over complete-mediation: A hook that refuses routine work has its matcher deleted, and then it mediates nothing.
  order  least-power over parameterize-do-not-enumerate: `[stop] run` takes argv and no shell; a command that needs a pipeline names a script.

✅ uphold review

The review document asked about 33 of uphold's records; this change violates none of them.


Reviewed with uphold 1.38.0 by uphold-review 0.4.2 · ec8ec73 · claude-opus-5-5 · 35 s · $0.13 list

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8fc6134c-8e01-4f3b-afd6-85ea0774185c
Commits

Reviewing files that changed from the base of the PR and between 0b555c6 and ec8ec73.

Files selected for processing: 1
  • .github/workflows/test.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The hooks job now skips engine-tests and engine-clippy, in addition to coverage and kani. A separate engine job runs the engine checks.

Changes: CI Hook Checks

Layer / File(s) Summary
Update hook skip list
.github/workflows/test.yml
The hooks job adds engine-tests and engine-clippy to its SKIP value.

Priority: Normal

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: Minimal · up to ec8ec

This change removes duplicate engine checks from the hooks job while preserving them in the dedicated engine job and local pre-push hooks. No actionable merge-blocking issue was established.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: the hooks job no longer runs the engine tests and clippy checks because the engine job runs them.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.98%. Comparing base (0b555c6) to head (ec8ec73).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #459   +/-   ##
=======================================
  Coverage   94.98%   94.98%           
=======================================
  Files          56       56           
  Lines       28550    28550           
=======================================
  Hits        27118    27118           
  Misses       1432     1432           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@HackingGate
HackingGate merged commit aa6eca7 into main Oct 29, 2026
14 checks passed
@HackingGate
HackingGate deleted the hooks-job-skips-engine-rerun branch October 29, 2026 02:26
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.

2 participants