main · last commit
18 hours ago ·
8tmadfpi
spec-5t8 Make specs' CI fail rather than skip DB tests when SPEC_TEST_PG is empty
Lined Up
bd update spec-5t8 --claim
bd close spec-5t8
| Created by | Eugene Blikh |
| Owner | bigbes@gmail.com |
| Created | 2026-08-17T20:40:08Z |
| Updated | 2026-08-17T20:40:08Z |
What is wrong: specs' `.build.yml` skips the DB-backed tests cleanly when `SPEC_TEST_PG` (or the equivalent env var) is empty, instead of failing. Why it matters: this is correct behaviour for a developer laptop and wrong for CI — a green CI run says nothing about specs' persistence layer if the DSN was never set on the runner. bench's own README documents the measured effect of this class of gap: 4.5% vs 77.2% statement coverage in `db/` depending on whether the DB tests actually ran. `TestSchemaAndMigrationsAgree` — the test that keeps the fresh-install and upgrade paths from diverging — is one of the tests silently skipped when the variable is unset. Sibling that does it correctly: `sourcehut-bench/.build.yml`, which brings up a Postgres inside the build VM, exports the DSN, and makes its `test` task refuse to run with the variable empty rather than skipping quietly. Fix: change specs' `.build.yml` `test` task to fail (not skip) when `SPEC_TEST_PG` is empty, and bring up Postgres in the CI manifest the way bench does. Note: confidence reported (measurement quoted from bench's own README, not independently re-run against specs). Audit: D19 (cross-repo audit, 2026-08-17)
No outgoing dependencies.
Nothing depends on this issue.
| id | spec-5t8 |
| content_hash | dcf60bc51caa0322319656f15c80ad462a544d9b92001728ee26adad2fa34f67 |
| title | Make specs' CI fail rather than skip DB tests when SPEC_TEST_PG is empty |
| description | What is wrong: specs' `.build.yml` skips the DB-backed tests cleanly when `SPEC_TEST_PG` (or the equivalent env var) is empty, instead of failing. Why it matters: this is correct behaviour for a developer laptop and wrong for CI — a green CI run says nothing about specs' persistence layer if the DSN was never set on the runner. bench's own README documents the measured effect of this class of gap: 4.5% vs 77.2% statement coverage in `db/` depending on whether the DB tests actually ran. `TestSchemaAndMigrationsAgree` — the test that keeps the fresh-install and upgrade paths from diverging — is one of the tests silently skipped when the variable is unset. Sibling that does it correctly: `sourcehut-bench/.build.yml`, which brings up a Postgres inside the build VM, exports the DSN, and makes its `test` task refuse to run with the variable empty rather than skipping quietly. Fix: change specs' `.build.yml` `test` task to fail (not skip) when `SPEC_TEST_PG` is empty, and bring up Postgres in the CI manifest the way bench does. Note: confidence reported (measurement quoted from bench's own README, not independently re-run against specs). Audit: D19 (cross-repo audit, 2026-08-17) |
| design | |
| acceptance_criteria | |
| notes | |
| status | open |
| priority | 2 |
| issue_type | task |
| assignee | NULL |
| estimated_minutes | NULL |
| created_at | 2026-08-17T20:40:08Z |
| created_by | Eugene Blikh |
| owner | bigbes@gmail.com |
| updated_at | 2026-08-17T20:40:08Z |
| closed_at | NULL |
| closed_by_session | |
| external_ref | NULL |
| spec_id | |
| compaction_level | 0 |
| compacted_at | NULL |
| compacted_at_commit | NULL |
| original_size | NULL |
| sender | |
| ephemeral | 0 |
| wisp_type | |
| pinned | 0 |
| is_template | 0 |
| mol_type | |
| work_type | |
| source_system | |
| metadata | �{} |
| source_repo | |
| close_reason | |
| event_kind | |
| actor | |
| target | |
| payload | |
| await_type | |
| await_id | |
| timeout_ns | 0 |
| waiters | |
| hook_bead | |
| role_bead | |
| agent_state | |
| last_activity | NULL |
| role_type | |
| rig | |
| due_at | NULL |
| defer_until | NULL |
| no_history | 0 |
| started_at | NULL |
| is_blocked | 0 |
| id | 01a01173-fa36-76c2-b791-7345caf32584 |
| issue_id | spec-5t8 |
| event_type | created |
| actor | Eugene Blikh |
| old_value | |
| new_value | |
| comment | NULL |
| created_at | 2026-08-17T23:40:08Z |
No comments.