The fold gate's map-coverage check is inseparable from its names checks, so the rows cannot be deferred alone

Open Beginner friendly
#2,806 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
testing-qa

Research direction

Start in tools/internal/testmap/testmap_test.go, at TestTheRepositoryMapCoversEveryTrackedFileAndNamesRealTests (line 307), and run go -C tools test -count=1 -run 'TestTheRepositoryMapCoversEveryTrackedFileAndNamesRealTests' ./internal/testmap to see the single uncovered-file error. Split it into a coverage function (the m.Uncovered(list) loop at 325-327) and a names function (checks at 383-409), both reading the git ls-files output through one shared helper. Done means both run under -run, and each fails on its own mutant: an emptied coverage loop passes, a mapped-but-untracked file fails the names test.

Written by the indexing model from the issue text.

Description

backlog

Evidence at 1645b639c

  • tools/internal/testmap/testmap_test.go:307 is one test, TestTheRepositoryMapCoversEveryTrackedFileAndNamesRealTests. Its coverage check is the loop over m.Uncovered(list) at lines 325 to 327. Its names checks run in the same function: the add_executable check at line 383, the just-recipe check at 387, the Go-package check at 391, the pytest check at 395, and the check that every target is used at 406 to 409.
  • tools/internal/testmap/testmap_test.go is the same at 3f767d639 (no commit in 1645b639c..3f767d639 changes tools/).
  • At 3f767d639: go -C tools test -count=1 -skip 'TestTheRepositoryMapCoversEveryTrackedFileAndNamesRealTests' ./internal/testmap exits 0. The -skip removes the coverage check and the names checks together.
  • At 3f767d639: go -C tools test -count=1 -run 'TestTheRepositoryMapCoversEveryTrackedFileAndNamesRealTests' ./internal/testmap exits 1 with one error line, tracked file .claude/skills/merge-fold/SKILL.md is in neither files nor none of its directory's component. That file is tracked and has no row in tools/test_map/.

Found while folding a piece that adds a tracked file to the release line. The fold gate cannot defer that file's row alone, because the one function that checks rows also checks names.

Not shown

  • How many folds on the release line were blocked by the coverage check. Not measured. The red batch records I read (031, 033, 062 and 065) were row drift, not this gate.
  • Whether the names checks fail on a tree that deletes a gtest target, a just recipe, a Go package or a pytest file that the map names. Not run.
  • Whether the build host can regenerate tools/test_map/ on a schedule. Not checked.

Falsifier

go -C tools test -list '.*' ./internal/testmap at 1645b639c lists a second test function that runs only the coverage check. Then the coverage check can already be skipped alone, and this issue's claim is wrong.

Work

  1. Test-only, in tools/internal/testmap/testmap_test.go: split the function into TestTheRepositoryMapCoversEveryTrackedFile (the coverage check alone) and TestTheRepositoryMapNamesRealTests (the rest), sharing one helper that reads git ls-files. Each function gets a mutant proof: the coverage function fails on a tracked file with no row and passes when its loop is emptied; the names function fails on a mapped file that is not tracked, and on a dropped directory set or tracked set.
  2. The fold gate (.claude/skills/merge-fold/SKILL.md, section 4) skips the coverage function by name, and runs the names checks.
  3. When the build host has regenerated tools/test_map/, remove the skip.

Related: #2804 (a test-map tree recipe runs Wine tests).

Dominant language
C++
Stars
3
Forks
5
Avg merge
4h 7m
Merged PRs (30d)
634

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EchoTools/nevr-runtime

All issues in EchoTools/nevr-runtime

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.