Skip to content

#940 corpus-fetch: guard that the manifest reaches no estate-gen cohort - #941

Merged
lex00 merged 1 commit into
mainfrom
live/corpus-fetch-cohorts-940
Sep 7, 2026
Merged

#940 corpus-fetch: guard that the manifest reaches no estate-gen cohort#941
lex00 merged 1 commit into
mainfrom
live/corpus-fetch-cohorts-940

Conversation

@lex00

@lex00 lex00 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Closes #940.

What the issue saw, and what actually wrote it

The writer is already gone on main: f8b5ab9 (#699) removed the live/e2e/estates/* glob from live/corpus-manifest.json, and corpus-fetch's module pass only writes .terraform/modules/modules.json into directories Manifest.Resolve returns. No code path names live/e2e/estates any more.

The 31 stray directories were real, but they came from before the merge. Timestamps in the plan-approval-remeasure-903 worktree:

when (2026-09-06) what
20:12:48 worktree created at 70e2722, which is pre-#699 (git merge-base --is-ancestor confirms)
20:14:56 .corpus/ cloned
20:15:59 live/corpus-module-pins.json written and every live/e2e/estates/*/.terraform/modules/modules.json written, same second: the corpus-fetch run, against the manifest as it then was
21:08:57 rebase onto 22d9a3f (the #699 merge): the tracked cohort trees go, the untracked .terraform/ stays

The primary checkout's copies date from 2026-08-16/18, the same leftover from before #699 rather than a new write. A fresh worktree on today's main has none.

What this adds

The guard the issue asked for: TestManifestReachesNoEstateGenCohort in tools/corpus-fetch resolves the real manifest against a temp root where every cohort in internal/live/cohorts holds a main.tf, so a glob that reaches the path cannot hide behind Resolve's empty-directory skip. It fails naming each directory the module pass would write into.

Proven red by re-adding the pre-#699 glob:

--- FAIL: TestManifestReachesNoEstateGenCohort (0.01s)
    estates_test.go:60: live/corpus-manifest.json resolves 32 director(ies) under live/e2e/estates/, so `just corpus-fetch` would write .terraform/modules into each of them (#940, #699):
          live/e2e/estates/ai-location
          live/e2e/estates/any-other-name
          live/e2e/estates/apigateway
          ...

Green with the manifest restored:

ok  	github.com/intentius/choudoufu/tools/corpus-fetch	1.447s

Clearing the leftovers

Any worktree that still shows the 31 entries clears them with git clean -fd -- live/e2e/estates. Nothing tracked lives under a .terraform/ there. Not done to the primary checkout by this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KXQqcqYiLU513jwXziuQnh

The writer #940 describes is already gone: f8b5ab9 (#699) removed the
`live/e2e/estates/*` glob from live/corpus-manifest.json, and the module pass
only writes .terraform/modules into directories the manifest resolves. The
31 stray directories the issue saw were written at 20:15:59 on 2026-09-06 in
a worktree created three minutes earlier on a PRE-#699 main (70e2722), by
a corpus-fetch run against the manifest as it then was; the 21:08 rebase onto
22d9a3f deleted the tracked cohort trees and left the untracked
.terraform/ behind. The primary checkout's copies date from 2026-08-16/18,
so they are the same leftover, not a new write. On main today a fresh
worktree plus `just corpus-fetch` leaves live/e2e/estates untouched.

What this adds is the guard the issue asked for. TestManifestReachesNoEstateGenCohort
resolves the real manifest against a temp root where every cohort in
internal/live/cohorts holds a configuration file, so a glob reaching that
path cannot hide behind Resolve's empty-directory skip, and fails naming
each directory the module pass would write into.

Proven red by re-adding the pre-#699 glob to the manifest:

    --- FAIL: TestManifestReachesNoEstateGenCohort (0.01s)
        estates_test.go:60: live/corpus-manifest.json resolves 32 director(ies) under live/e2e/estates/, so `just corpus-fetch` would write .terraform/modules into each of them (#940, #699):
              live/e2e/estates/ai-location
              live/e2e/estates/any-other-name
              ...

then green with the manifest restored:

    ok  	github.com/intentius/choudoufu/tools/corpus-fetch	1.447s

Existing worktrees clear their leftovers with
`git clean -fd -- live/e2e/estates`; nothing tracked lives under a
.terraform/ there.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KXQqcqYiLU513jwXziuQnh
@lex00
lex00 merged commit 8ea9a23 into main Sep 7, 2026
3 checks passed
@lex00
lex00 deleted the live/corpus-fetch-cohorts-940 branch September 7, 2026 04:44
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.

corpus-fetch still writes .terraform into live/e2e/estates/<cohort>/ after #699 retired the committed cohorts

1 participant