Skip to content

ci: verify the stack (do not merge) - #44

Closed
PermutationResearch wants to merge 2 commits into
fix/hearth-cifrom
ci/verify-hearth-stack
Closed

PermutationResearch wants to merge 2 commits into
fix/hearth-cifrom
ci/verify-hearth-stack

Conversation

@PermutationResearch

Copy link
Copy Markdown
Owner

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.

`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.
@PermutationResearch
PermutationResearch deleted the ci/verify-hearth-stack branch December 1, 2026 04:33
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