test: improve coverage signal policy (#4219)
_codex-gpt-5.5-medium on behalf of maphew_
This commit is contained in:
parent
57b0cab432
commit
8aefc326a6
3 changed files with 35 additions and 0 deletions
|
|
@ -18,12 +18,14 @@ coverage:
|
|||
default:
|
||||
target: auto
|
||||
threshold: 5%
|
||||
informational: true
|
||||
|
||||
# Patch coverage (for new code in PRs)
|
||||
patch:
|
||||
default:
|
||||
target: 60%
|
||||
threshold: 10%
|
||||
informational: true
|
||||
|
||||
# Component management for domain-based coverage views
|
||||
# Components are purely configuration-driven — no upload-time setup needed
|
||||
|
|
|
|||
|
|
@ -194,6 +194,18 @@ the command documented in the failing workflow or in the CI cleanup plan.
|
|||
Use `scripts/test.sh` for local default validation and targeted development
|
||||
runs.
|
||||
|
||||
### Coverage Signal Policy
|
||||
|
||||
PR confidence is based on behavior checks, not raw coverage percentage.
|
||||
|
||||
- Treat Codecov percentages as informational trend data.
|
||||
- Prefer focused tests for risky paths (storage, sync/git, migrations, state
|
||||
transitions, and corruption/integrity handling) over broad line-coverage
|
||||
churn.
|
||||
- Add or extend at least one targeted regression test when fixing risky logic.
|
||||
- Do not block a change solely on overall coverage movement when behavioral
|
||||
checks are strong.
|
||||
|
||||
For the current CI/test-surface inventory and cleanup roadmap, see
|
||||
[CI_TEST_SURFACE_AUDIT.md](CI_TEST_SURFACE_AUDIT.md). That audit documents
|
||||
where local commands and GitHub Actions currently diverge before the CI cleanup
|
||||
|
|
|
|||
|
|
@ -271,6 +271,27 @@ func TestPR4107DeleteRecomputesWispWaitersWhenSpawnerChildIsDeleted(t *testing.T
|
|||
assertIsBlocked(t, ctx, store, "wisps", "pr4107-delete-wisp-waiter", false)
|
||||
}
|
||||
|
||||
func TestPR4107DeleteRecomputesWispWaitersWhenSpawnerIsDeleted(t *testing.T) {
|
||||
store, cleanup := setupTestStore(t)
|
||||
defer cleanup()
|
||||
|
||||
ctx, cancel := testContext(t)
|
||||
defer cancel()
|
||||
|
||||
createNoHistoryWisp(t, ctx, store, "pr4107-delete-wisp-spawner-waiter")
|
||||
createPerm(t, ctx, store, "pr4107-delete-wisp-spawner-target")
|
||||
createNoHistoryWisp(t, ctx, store, "pr4107-delete-wisp-spawner-child")
|
||||
addDependency(t, ctx, store, "pr4107-delete-wisp-spawner-child", "pr4107-delete-wisp-spawner-target", types.DepParentChild)
|
||||
addDependency(t, ctx, store, "pr4107-delete-wisp-spawner-waiter", "pr4107-delete-wisp-spawner-target", types.DepWaitsFor)
|
||||
|
||||
assertIsBlocked(t, ctx, store, "wisps", "pr4107-delete-wisp-spawner-waiter", true)
|
||||
|
||||
if err := store.DeleteIssue(ctx, "pr4107-delete-wisp-spawner-target"); err != nil {
|
||||
t.Fatalf("DeleteIssue wisp spawner target: %v", err)
|
||||
}
|
||||
assertIsBlocked(t, ctx, store, "wisps", "pr4107-delete-wisp-spawner-waiter", false)
|
||||
}
|
||||
|
||||
func TestPR4107JSONCountReadPathsTolerateMissingWispTables(t *testing.T) {
|
||||
t.Run("query_counts", func(t *testing.T) {
|
||||
store, cleanup := setupTestStore(t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue