Skip to content

Commit 858492d

Browse files
committed
[guard.repo.rho.D8+] fifteen servers against one repo means you cannot know which build you are looking at
Ivan: from now on port 1360, nobody starts another server, and put it in CLAUDE.md. This is a CORRECTNESS rule, not housekeeping. Measured today: four builds of the app were being served at once (8100, 8101, 1342, 1360) plus eleven staging copies from screenshot runs. A server left listening by an EARLIER SESSION held 1344; the harness started its own, that died with "address already in use" into /dev/null, and Chrome loaded the old staged app instead. Two full rounds of verification screenshots were of a previous build while I read them as evidence about the new one. Separately, a staging dir kept a stale dirac.js and several rounds of diagnosis described code that was not running. Both failures share the shape this repo keeps finding: the fallback renders identically to the primary, so the defect arrives as a plausible screenshot rather than an error. Rule lives in CLAUDE.md with the reasoning; AGENTS.md carries a pointer so the Codex-side agents hit it too. One home for the fact, one line for the index.
1 parent 3e6d509 commit 858492d

2 files changed

Lines changed: 62 additions & 0 deletions

File tree

‎AGENTS.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
55
This file is the **source of truth for any agent** working in this repo. Read it before committing.
66

7+
> ## ⚠ ONE DEV SERVER: PORT 1360. DO NOT START ANOTHER.
8+
> `http://192.168.1.3:1360/` serves `build/dirac` on `0.0.0.0`. Rebuild with
9+
> `npm run build:dirac` and reload — do not spin up a second server on a second
10+
> port, not even for one screenshot. **Rules and the measured reason they exist:
11+
> `CLAUDE.md` in this directory.** (Short version: fifteen servers were running
12+
> against this repo at once, one of them left over from an earlier session, and
13+
> two rounds of verification screenshots turned out to be of a stale build.)
14+
715
## Repository topology
816

917
```

‎CLAUDE.md‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Project: dirac
2+
3+
Repo law lives in `AGENTS.md` (co-equal, loaded by the Codex runtime). This file
4+
holds the rules a Claude session in this repo must follow, and right now it holds
5+
one.
6+
7+
---
8+
9+
## ⚠ ONE DEV SERVER: PORT 1360. DO NOT START ANOTHER.
10+
11+
**Ivan, 2026-08-11, standing until he lifts it.**
12+
13+
```
14+
http://192.168.1.3:1360/ LAN
15+
http://100.78.155.10:1360/ tailnet
16+
http://127.0.0.1:1360/ local
17+
```
18+
19+
Serving `/home/ivan/dirac/build/dirac`, bound to `0.0.0.0` so every device on the
20+
LAN and the tailnet reaches the same build.
21+
22+
**The rules, in force for every agent working in this repo:**
23+
24+
1. **Do not start a new HTTP server.** Not on a different port, not "just for a
25+
screenshot", not "temporarily". If you need to look at the app, rebuild with
26+
`npm run build:dirac` and reload 1360 — it serves `build/dirac`, so a rebuild
27+
is all it takes to see your change.
28+
2. **If 1360 is down**, restart it *on 1360*:
29+
`cd /home/ivan/dirac/build/dirac && python3 -m http.server 1360 --bind 0.0.0.0 &`
30+
3. **Do not kill 1360.** Other agents and Ivan's other devices are on it.
31+
4. **A test harness that needs its own copy** (e.g. `scripts/shoot-fields.sh`,
32+
which appends a driver to a staged copy) must stop its server when it exits.
33+
The harness already does this; anything new must too.
34+
35+
**Why this exists — it is not tidiness, it cost real work.** Fifteen HTTP servers
36+
were running against this repo at once: four different builds of the app on 8100,
37+
8101, 1342 and 1360, plus eleven staging copies from screenshot runs. Two
38+
consequences, both measured on 2026-08-11:
39+
40+
- **A server from an EARLIER SESSION held port 1344.** The harness started a new
41+
one, it died with "address already in use" into `/dev/null`, and Chrome
42+
cheerfully loaded the *old* staged app. Two full rounds of verification
43+
screenshots were of a previous build while being read as evidence about the new
44+
one. A stale server is a fallback that hides the primary's death, and it fails
45+
toward looking correct.
46+
- **Several rounds of diagnosis described code that was not running**, because a
47+
staging directory kept an old `dirac.js`.
48+
49+
So this is a correctness rule, not a housekeeping one: **more than one server
50+
against one repo means you cannot know which build you are looking at**, and the
51+
failure never announces itself — it hands you a plausible screenshot.
52+
53+
**When a rule needs the port to change**, change it here first, then tell the
54+
other agents; do not fork onto a second port and sort it out later.

0 commit comments

Comments
 (0)