Skip to content

ci: a changed directory in a nested module is not a package of the root module - #1332

Merged
AbirAbbas merged 1 commit into
devfrom
fix/touched-packages-skip-nested-modules
Sep 21, 2026
Merged

AbirAbbas merged 1 commit into
devfrom
fix/touched-packages-skip-nested-modules

Conversation

@AbirAbbas

Copy link
Copy Markdown
Collaborator

What was true

The touched packages job, the required half of the check gate into dev, derived its test set as every directory holding a changed .go file and handed that list to go test without asking which module the directory belongs to. The Makefile's test-touched target carried a second copy of the same walk.

What is true now

A directory under its own go.mod is another module, not a package of this one. Both derivations now walk up from each changed directory to the first go.mod and keep the directory only when that go.mod is the root's. ci.yml and test-touched print the same list again, so make pr-ready predicts the gate.

Why now

#1108 adds bench fixtures under bench/bashloop/fixtures/, each a small program with a go.mod of its own so a worker can build and test it in place. At its head the job fed the seven fixture directories to go test, which answered main module (github.com/Agent-Field/codeaf) does not contain package … and failed the job as a setup error (Actions run 35557647066) while every real package passed, internal/session and internal/tui3 included. The Makefile half of this fix is byte-identical to the one already on that branch; the workflow half is what was missing.

Verified

  • The patched ci.yml block, extracted verbatim and run against the santos/dev: crew family, Pareto crewing and the Model Pool, custom connections #1108 diff with BASE=9258f7052: 43 directories to 36, the seven dropped are exactly bench/bashloop/fixtures/*, and the Makefile derivation prints the same 36.
  • make test-quick rc 0 on this branch; go test ./internal/ci/ ok; the YAML parses.
  • ci-full.yml does not need it: it shards go list ./..., which lists root-module packages only.

🤖 Generated with Claude Code

…ot module

The `touched packages` job — the required half of the `check` gate into `dev` —
derived its test set as every directory holding a changed `.go` file and handed
that list straight to `go test`. It never asked which module a directory belongs
to.

The bench fixtures under `bench/bashloop/fixtures/` are small programs the task
door edits during a bench run, and each carries a `go.mod` of its own so a worker
can build and test it in place. That makes each one a MODULE, not a package of
this one, and `go test ./bench/bashloop/fixtures/c1-small-fix` from the root has
always answered `main module (github.com/Agent-Field/codeaf) does not contain
package …`. Go reports that as `[setup failed]`, which is a red job, not a red
test — so a change that touches a fixture and a Go file in the same commit fails
`check` while every real package passes.

Both derivations now walk up from each directory to the first `go.mod` and keep
the directory only when nothing above it claims the tree first. `ci.yml` and the
Makefile's `test-touched` carried two independent copies of this walk and only
the Makefile was ever fixed; they are the same text now, because `make pr-ready`
is only worth running while it derives the set the gate will.

Verified against the 621-file diff that surfaced this: the derivation went from
43 directories to 36, the seven dropped are exactly the fixture directories, and
the two halves now print the same list.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@AbirAbbas
AbirAbbas merged commit 86a4019 into dev Sep 21, 2026
3 checks passed
@AbirAbbas
AbirAbbas deleted the fix/touched-packages-skip-nested-modules branch September 21, 2026 14:24
AbirAbbas pushed a commit that referenced this pull request Sep 21, 2026
… task page and rail, goroutine ownership at close (#1108)

Integration branch santos/dev, held as a closed slice at d39a4e3 plus the empty-prompt guard for generate_image (3a1f80f). Everything through #1192 had already reached dev as #1194; this carries #1193 and #1203 through #1331.

The worker harness: one loop under /task and codeaf do with a plan store per run, a plan seat, a work seat, a check seat and a review round after each piece of work, off unless CODEAF_TASK_BELT=bash is set, so the default road does not move. Stopping and limits: a person's stop reaches a run, a time or dollar limit ends a run and names itself, a run is handed what is left of the conversation's limits, a worker that stops making progress is told once and then ended. The task page and the rail: the plan as a tree, a run's row with its parts under it, step rows cut from the commands as they ran, a press on a run's row opens its page in under 0.2 seconds. The engine host and sign-in, the profile's composed writes across two processes, unread config keys said once. Nothing keeps writing after the process closes: the place sweep, the standing ticker, the usage writers, the pool judge sweep and the catalog warm are each owned, stopped and joined, and a law lists every goroutine a conversation process starts. The heavy-suite lock is a kernel file lock that follows the suite. The lazy lexer registry, one fuzzy matcher for every picker, the drafted-with footer on the CodeAF repository.

Reviewed 2026-09-21: gates green locally and in CI once #1332 taught the touched-packages walk about nested modules; the default road verified live on both roads against a dev baseline; the one regression the slice introduced (generate_image had lost its empty-prompt guard) fixed on the slice with a contract test.

Co-authored-by: Santosh kumar <29346072+santoshkumarradha@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.

1 participant