test(auth): the setup hooks that build the auth schema get 30 seconds, so a slow CI database no longer fails them #445
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.64) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.64 · 314 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.344
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.064
Real PR Conversation Timeline
1 comments
"Review active on #445"
general
weight: 0.35
wmadden
The Linux "Test" job failed once with this, and passed on a rerun:
The decision
The setup hooks that build the auth schema in a test database now have 30 seconds, in place of bun's default of 5.
Why
The setup hook was slow, and nothing else was wrong. The dropped connection is a result of the timeout, not its cause.
dbInit. That normally takes 1 to 2 seconds.dbInitstarting at 11:07:49.1 and still adding a foreign key at 11:07:53.6. In the same seconds Postgres spent 1.6 seconds on one checkpoint that wrote 2,520 buffers, because other packages' suites were creating and dropping databases on the same container.afterAllhook. That hook drops the test database, and to do so it first terminates the database's connections. One of them was thedbInitstill running, which is the "terminating connection due to administrator command" in the log.The timeout is a named constant,
SCHEMA_BOOTSTRAP_TIMEOUT_MS, exported from the two Postgres test harnesses. It applies to the six hooks that callstartLocalAuthServerorensureLocalAuthSchema: five in the auth package and one inexamples/auth. The two tests inpack-conformance.integration.test.tsthat run the same bootstrap in their bodies get it too.How it was checked
beforeAll: a hook that sleeps 6 seconds passes with it and times out without it.examples/authtest locally. CI runs it.Alternatives considered
bun test --timeout). Rejected: it would also let a test that hangs run six times longer before it fails.Refs TML-3894
Agent: selene-35
🤖 Generated with Claude Code