Repository navigation
ci: verify the stack (do not merge) - #44
Closed
PermutationResearch wants to merge 2 commits into
Closed
PermutationResearch wants to merge 2 commits into
PermutationResearch wants to merge 2 commits into
Conversation
`cargo clippy --workspace --all-targets -- -D warnings` failed before the test step ran, on code that predates the workflow. - chatgpt_plan_store.rs: import db::GenericClient, so the four advisory-lock `query_one` calls dispatch to the trait method that prepares once and keeps the statement. clippy.toml disallows tokio-postgres' inherent method. - threads/comparison.rs: fold the nested `if` into a let-chain. - chatgpt_plan.rs: move `mod tests` below the items it tests. - hearth-cli/tests/common/mod.rs: one `#![allow(dead_code)]` for fixtures the binaries share but do not all use, and drop the two now-duplicate outer allows. That is how hearth-control/tests/common already does it.
Every TestDb created an empty database and replayed all 99 migrations, so one test binary of 16 tests spent 113 s of its 8 s of actual work on migrations. The suite is 1,554 tests; this is most of why a full run takes over 40 minutes. Each migration cut is now migrated once into `hearth_tpl_<version>_<digest>` and every test copies it with CREATE DATABASE ... TEMPLATE. The name comes from the cut, so an unchanged schema reuses an earlier run's template, and a changed one builds beside it. Creation is serialised by an advisory lock, the template connection is closed before use (Postgres refuses a template with live connections), and a copy that races another gets 20 bounded retries on "being accessed by other users". Same 16-test binary, same machine, with the four macOS-only `setpriv` tests skipped: 113.31 s -> 15.83 s.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verification only: workflow + lint fixes + template databases, so CI measures the full suite with the template change. Do not merge; the same commits arrive through #40, #42 and #43.