v0 plan: move given files to _files/ so go vet ./... ignores them; note the first-attempt finding

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 02:03:00 -07:00
co-authored by Claude Fable 5.1
parent 89e47d83f8
commit c524ff943d
22 changed files with 27 additions and 18 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ implementing it one task at a time.
## Files you must never edit ## Files you must never edit
- `PLAN.md`, `docs/plans/`, `AGENTS.md` - `PLAN.md`, `docs/plans/`, `AGENTS.md`
- Anything a task told you to copy from `docs/plans/**/files/`: tests, testdata, `Makefile`, - Anything a task told you to copy from `docs/plans/**/_files/`: tests, testdata, `Makefile`,
scripts, `example.toml`, `cmd/fakeupstream`. If a copied test fails, your code is wrong. scripts, `example.toml`, `cmd/fakeupstream`. If a copied test fails, your code is wrong.
## Code rules ## Code rules
+5 -5
View File
@@ -103,10 +103,10 @@ Rules the tests check:
```sh ```sh
git switch -c v0 git switch -c v0
mkdir -p scripts internal/config/testdata mkdir -p scripts internal/config/testdata
cp docs/plans/v0/files/Makefile docs/plans/v0/files/go.sum . cp docs/plans/v0/_files/Makefile docs/plans/v0/_files/go.sum .
cp docs/plans/v0/files/scripts/check-lines.sh scripts/ cp docs/plans/v0/_files/scripts/check-lines.sh scripts/
cp docs/plans/v0/files/internal/config/config_test.go internal/config/ cp docs/plans/v0/_files/internal/config/config_test.go internal/config/
cp docs/plans/v0/files/internal/config/testdata/*.toml internal/config/testdata/ cp docs/plans/v0/_files/internal/config/testdata/*.toml internal/config/testdata/
``` ```
Read `Makefile` and `internal/config/config_test.go`. The test names every rule above. Read `Makefile` and `internal/config/config_test.go`. The test names every rule above.
@@ -139,7 +139,7 @@ git commit
## Done when ## Done when
- `go test ./internal/config/` is `ok`; `make gate` prints `gate: ok`. - `go test ./internal/config/` is `ok`; `make gate` prints `gate: ok`.
- `cmp internal/config/config_test.go docs/plans/v0/files/internal/config/config_test.go` prints nothing. - `cmp internal/config/config_test.go docs/plans/v0/_files/internal/config/config_test.go` prints nothing.
## Stop and report if ## Stop and report if
+2 -2
View File
@@ -81,7 +81,7 @@ Rules the tests check:
```sh ```sh
git switch v0 git switch v0
cp docs/plans/v0/files/internal/health/health_test.go internal/health/ cp docs/plans/v0/_files/internal/health/health_test.go internal/health/
``` ```
Read the test. `newFake` is the router stand-in; `TestFailureThenRecoveryNeedsTwoPolls` is rule 3 Read the test. `newFake` is the router stand-in; `TestFailureThenRecoveryNeedsTwoPolls` is rule 3
@@ -102,7 +102,7 @@ git commit
## Done when ## Done when
- `go test -race -count=1 ./internal/health/` is `ok`; `make gate` prints `gate: ok`. - `go test -race -count=1 ./internal/health/` is `ok`; `make gate` prints `gate: ok`.
- `cmp internal/health/health_test.go docs/plans/v0/files/internal/health/health_test.go` prints nothing. - `cmp internal/health/health_test.go docs/plans/v0/_files/internal/health/health_test.go` prints nothing.
## Stop and report if ## Stop and report if
+2 -2
View File
@@ -92,7 +92,7 @@ Rules the tests check, in the order `ServeHTTP` applies them. Every error answer
```sh ```sh
git switch v0 git switch v0
cp docs/plans/v0/files/internal/proxy/proxy_test.go internal/proxy/ cp docs/plans/v0/_files/internal/proxy/proxy_test.go internal/proxy/
``` ```
Read the test. `fakeHealth` stands in for the table; `newUpstream` records what arrived. Read the test. `fakeHealth` stands in for the table; `newUpstream` records what arrived.
@@ -113,7 +113,7 @@ git commit
## Done when ## Done when
- `go test -race -count=1 ./internal/proxy/` is `ok`; `make gate` prints `gate: ok`. - `go test -race -count=1 ./internal/proxy/` is `ok`; `make gate` prints `gate: ok`.
- `cmp internal/proxy/proxy_test.go docs/plans/v0/files/internal/proxy/proxy_test.go` prints nothing. - `cmp internal/proxy/proxy_test.go docs/plans/v0/_files/internal/proxy/proxy_test.go` prints nothing.
## Stop and report if ## Stop and report if
+4 -4
View File
@@ -82,9 +82,9 @@ not change it.
```sh ```sh
git switch v0 git switch v0
mkdir -p cmd/fakeupstream cmd/crossbar internal/admin mkdir -p cmd/fakeupstream cmd/crossbar internal/admin
cp docs/plans/v0/files/cmd/fakeupstream/main.go cmd/fakeupstream/ cp docs/plans/v0/_files/cmd/fakeupstream/main.go cmd/fakeupstream/
cp docs/plans/v0/files/example.toml . cp docs/plans/v0/_files/example.toml .
cp docs/plans/v0/files/internal/admin/admin_test.go internal/admin/ cp docs/plans/v0/_files/internal/admin/admin_test.go internal/admin/
``` ```
- [ ] **2. See the test fail.** `go test ./internal/admin/`. Expected: it does not compile. - [ ] **2. See the test fail.** `go test ./internal/admin/`. Expected: it does not compile.
@@ -119,7 +119,7 @@ git commit
- The admin test passes, the three-second run exits 0 with both log lines, the missing-config - The admin test passes, the three-second run exits 0 with both log lines, the missing-config
run exits 1, `make gate` prints `gate: ok`. run exits 1, `make gate` prints `gate: ok`.
- `cmp cmd/fakeupstream/main.go docs/plans/v0/files/cmd/fakeupstream/main.go` and the same for - `cmp cmd/fakeupstream/main.go docs/plans/v0/_files/cmd/fakeupstream/main.go` and the same for
`example.toml` and `internal/admin/admin_test.go` print nothing. `example.toml` and `internal/admin/admin_test.go` print nothing.
## Stop and report if ## Stop and report if
+2 -2
View File
@@ -32,7 +32,7 @@ spread over at least 600 ms, not in one burst; and crossbar wrote a request log
```sh ```sh
git switch v0 git switch v0
mkdir -p tools deploy mkdir -p tools deploy
cp docs/plans/v0/files/tools/smoke.sh tools/ cp docs/plans/v0/_files/tools/smoke.sh tools/
make smoke make smoke
``` ```
@@ -111,7 +111,7 @@ git commit
## Done when ## Done when
- `make smoke` prints `smoke: ok (…)`; `make gate` prints `gate: ok`; `README.md` has the seven - `make smoke` prints `smoke: ok (…)`; `make gate` prints `gate: ok`; `README.md` has the seven
sections; `cmp tools/smoke.sh docs/plans/v0/files/tools/smoke.sh` prints nothing. sections; `cmp tools/smoke.sh docs/plans/v0/_files/tools/smoke.sh` prints nothing.
## Stop and report if ## Stop and report if
+11 -2
View File
@@ -12,7 +12,7 @@ no `/slots`, no queueing.
**Architecture:** four small packages under `internal/` — `config` (TOML + validation), `health` **Architecture:** four small packages under `internal/` — `config` (TOML + validation), `health`
(poller + table), `proxy` (route → host → `httputil.ReverseProxy`), `admin` (read-only JSON) — (poller + table), `proxy` (route → host → `httputil.ReverseProxy`), `admin` (read-only JSON) —
and two binaries under `cmd/`: `crossbar` and the given `fakeupstream`. Behaviour is pinned by and two binaries under `cmd/`: `crossbar` and the given `fakeupstream`. Behaviour is pinned by
the tests in `files/`, which were run against a private reference implementation at each task's the tests in `_files/`, which were run against a private reference implementation at each task's
end state; the reference is not in this repository and the implementer must not look for it. end state; the reference is not in this repository and the implementer must not look for it.
**Tech stack:** Go 1.26, standard library, `github.com/BurntSushi/toml` v1.6.0. Nothing else. **Tech stack:** Go 1.26, standard library, `github.com/BurntSushi/toml` v1.6.0. Nothing else.
@@ -53,10 +53,19 @@ stops at the first task that does not end with a commit, a clean tree and a `don
1. `git log --oneline master..v0`: five commits with the `Implemented-By` trailer. 1. `git log --oneline master..v0`: five commits with the `Implemented-By` trailer.
2. Copied files are unchanged: 2. Copied files are unchanged:
`for f in $(cd docs/plans/v0/files && find . -type f); do cmp "docs/plans/v0/files/$f" "$f"; done` `for f in $(cd docs/plans/v0/_files && find . -type f); do cmp "docs/plans/v0/_files/$f" "$f"; done`
3. `git diff master..v0 --stat -- PLAN.md AGENTS.md docs/plans` is empty. 3. `git diff master..v0 --stat -- PLAN.md AGENTS.md docs/plans` is empty.
4. `make gate` and `make smoke` on straylight. 4. `make gate` and `make smoke` on straylight.
5. Read every source file against its task. Probe from outside with inputs the tests do not 5. Read every source file against its task. Probe from outside with inputs the tests do not
contain: a route with query strings and encoded characters, a host that hangs after headers, a contain: a route with query strings and encoded characters, a host that hangs after headers, a
3 MB request body, `/_crossbar/hosts` while a poll is in flight, SIGTERM during a stream. 3 MB request body, `/_crossbar/hosts` while a poll is in flight, SIGTERM during a stream.
6. Write findings under "Reviews" in `docs/implementer-log.md`. 6. Write findings under "Reviews" in `docs/implementer-log.md`.
## Changes during the run
- 2026-09-25, task 01, first attempt: the given files lived under `docs/plans/v0/files/`, which
Go's `./...` pattern includes, so `go vet ./...` in the gate tried to build the tests of tasks
02–04 against packages that did not exist yet. Ornith diagnosed this correctly and stopped
investigating instead of editing the Makefile. Fixed by moving the directory to `_files/`
(directories starting with `_` are ignored by the go tool); every task file updated. Task 01
restarted from a clean tree.