MEMORY.md and TODO.md carry stale claims that actively misdirect agents #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
MEMORY.mdis the first thing agents are told to read, and three of itsstatements are now false. Each one actively misdirects an agent working this
repo.
TODO.mdcarries a fourth false claim.1.
MEMORY.mddescribes thegameEndpanic unwind, which was removedMEMORY.md"Error handling":> The game already unwinds C's
exit()calls via agameEndpanic recovered> in Run.
Refactor step 8 deleted exactly this. Per
TODO.md:> The
gameEndpanic unwind is gone: one game run is one process, so>
myExitrestores the terminal (newTerminal.Fini) and calls>
os.Exit(0), andRun()no longer returns.An agent reading
MEMORY.mdwill believe it can let the game unwind and berecovered. It cannot — the process exits, which is precisely why the
playtest tests need the
fortify()HP-pinning helper.2.
MEMORY.mdsays lint exceptions live in the config; they do notMEMORY.md"Linting":> he approves specific exceptions, which are recorded in the config's
> "Repo-specific exceptions" block with the approval date.
The
golangci-v2.12.2work moved every exception out of the config intotargeted in-code
//nolintdirectives, specifically so the config staysbyte-identical to canonical (verified: sha256
021cc83f4e6fc7c31b95b34b846723dfcf20b66b7baeea1dc40406e643346bcb). There isno "Repo-specific exceptions" block in
.golangci.ymlany more. An agentfollowing
MEMORY.mdwould edit the canonical config — the one thing the orgstandard forbids outright.
MEMORY.mdalso still listsparalleltestas an approved disable(2026-07-06), but it was actually fixed, not disabled —
t.Parallel()wasadded to all 32 tests.
3.
MEMORY.mdtells agents to rungo testdirectlyMEMORY.md"Debugging":> Write real, committed test files with
t.Logfoutput and run plain>
go test -vThis contradicts the standing rule that only
maketargets /script/entrypoints may be used, because they carry the project-specific flags and
policies that raw invocations silently bypass. This matters more once the
test:target gains-timeout/-race/-cover(#2) — a rawgo test -vwould skip the race detector entirely.
4.
TODO.mdasserts a golangci-lint version that is not what runsTODO.md:>
make lintruns the hostgolangci-lint, currently v2.12.2The host linter on this machine is v2.10.1. The repo pins nothing, so this
line documents an accident of one machine at one moment, and it is already
wrong. (The pin question itself is tracked separately — this issue only asks
that the false claim stop being asserted.)
Definition of done
MEMORY.md"Error handling" describes the currentos.Exit/Terminal.Finimodel, and notes the testing consequence (a death exits the test binary;
see the
fortify()pattern in the playtest tests).MEMORY.md"Linting" states that approved exceptions live in in-code//nolintdirectives carrying the approval date, and that.golangci.ymlis byte-identical to canonical and must not be edited. The
paralleltestentry is corrected from "disabled" to "fixed".MEMORY.md"Debugging" directs agents to the repo'smaketargets ratherthan raw
go test.TODO.mdno longer asserts a specific host linter version.make checkgreen;make fmtrun so the markdown is prettier-clean.(closes #N).Implementation requirements
Makefile,.golangci.yml,or any config — if a change outside
*.mdseems necessary, stop and report.paraphrase this issue. In particular, confirm the current exit path in the
source rather than trusting this description.
make fmtand include the result in the same commit (prettier,4-space tabs,
proseWrap: always).Scope addition, and a bump in priority.
Add a fifth item to the definition of done:
README.mdline 75 documentsrunning the suite as
go test ./game/directly. That is the same defect asitem 3 in this issue (
MEMORY.mdtelling agents to rungo test -v), and itnow has teeth: since PR #9 landed,
make testcarries-timeout 30s -race -cover, so anyone following the README runs the suitewithout the race detector and believes they have verified the change.
Fix it the same way — point at the
maketargets. Found by the reviewer onPR #9 as observation O-2.
Priority bump: this issue is worth doing early. It stopped being
theoretical within the hour. The independent reviewer on PR #9 — who was
otherwise careful enough to prove
-racewas live by injecting a real datarace — stated in their review that the
os.Exitpaths "unwind through thegameEndpanic recovered inRun". That is exactly the staleMEMORY.mdclaim described in item 1 of this issue, and it is false: refactor step 8
removed the unwind.
It did not affect their verdict, because their conclusion rested on empirical
evidence rather than on that belief. But it is a clean demonstration that
these stale docs are actively propagating wrong mental models into the work,
which is precisely the harm this issue was filed to stop.
Definition of done is otherwise unchanged. Still docs-only, still eligible for
the docs-only fast path (no adversarial review, merge on green
make check).Implementation plan
Verified every claim against the tree at
c922a16before planning the rewrite.Findings:
gameEndunwind — confirmed gone.grep -rn gameEnd --include=*.goreturns nothing. The live exit path is
game/rip.go:17—myExit()callsg.scr.Fini()thenos.Exit(0).Run()(game/game.go:205) isfunc (g *RogueGame) Run()with no return values and its own doc commentalready says "It does not return". The testing consequence is real and
already documented in-code at
game/run_test.go:10-22(fortify()) and:24-28(driveTurns).MEMORY.mdis the outlier..golangci.ymlcontainsno "Repo-specific exceptions" block and no mention of
paralleltest,testpackage,exhaustive, ormnd; its sha256 is021cc83f4e6fc7c31b95b34b846723dfcf20b66b7baeea1dc40406e643346bcb, matchingthe canonical hash cited in the issue. The approvals live in-code as
file-level and line-level
//nolintdirectives carrying "(approved2026-07-07)".
paralleltestwas fixed, not disabled: noparalleltesttoken exists anywhere in the Go sources, and the suite has 32 top-level
func Test*against 32t.Parallel()calls.go test— confirmed harmful now.Makefiletest:runsgo test -timeout 30s -race -cover $(GO_PKGS)with the verbose-rerunfailure path. A plain
go test -vskips-race,-cover, and the timeout.golangci-lintis 2.10.1,not v2.12.2, and nothing in the repo pins it.
README.md:75documentsgo test ./game/— same defect as item 3.Work, all on a temporary worktree off
main, docs-only:MEMORY.md"Error handling": replace thegameEnd-unwind sentence with themyExit/Terminal.Fini/os.Exit(0)model and the testing consequence(a death exits the test binary; drive
command()directly and pin the herowith the
fortify()pattern ingame/run_test.go).MEMORY.md"Linting": exceptions live in in-code//nolintdirectivescarrying the approval date;
.golangci.ymlis byte-identical to canonicaland must not be edited. Move
paralleltestfrom the approved-disables listto a note that it was fixed with
t.Parallel().MEMORY.md"Debugging": point atmake test/make checkinstead ofgo test -v, naming what the target carries.README.md: replacego test ./game/with themaketargets.TODO.md: drop the "currently v2.12.2" claim from the 2026-08-07 entry (thepin question itself is out of scope — tracked separately), and add a
Completed Steps entry. Next Step is not rotated — out-of-band issue work
leaves it alone (precedent from PR #9), and "broaden unit test coverage" is
unfinished.
ARCHITECTURE.md(tracked in #16), and nonon-
.mdfile gets modified.Then
make fmtin the same commit,make checkgreen, commit title ending(closes #3), PR againstmain.