Rotate TODO to step 8; note complexity linters clean (step 7 done)
Refactor step 7 is complete: the whole golangci-lint run is 0 issues. MEMORY.md updated to reflect the complexity linters are enabled and clean.
This commit is contained in:
13
MEMORY.md
13
MEMORY.md
@@ -21,12 +21,13 @@ sneak's explicit permission. To disable a linter, ask, explaining what
|
||||
the linter does; he approves specific exceptions, which are recorded
|
||||
in the config's "Repo-specific exceptions" block with the approval
|
||||
date. Approved so far: paralleltest (2026-07-06); testpackage,
|
||||
exhaustive, and mnd (2026-07-07). Complexity linters (cyclop, gocognit,
|
||||
nestif) stay enabled and red until refactor step 7 fixes the findings,
|
||||
per sneak 2026-07-07. Line-level //nolint
|
||||
with a reason is used sparingly for C-faithfulness (e.g. the authentic
|
||||
"missle" message spellings) and provably-safe gosec conversions; each
|
||||
needs a justifying comment.
|
||||
exhaustive, and mnd (2026-07-07). The complexity linters (cyclop,
|
||||
gocognit, nestif) are enabled and clean as of refactor step 7
|
||||
(2026-07-07): the whole golangci-lint run is 0 issues, so keep it that
|
||||
way — decompose new hot spots rather than reaching for a nolint.
|
||||
Line-level //nolint with a reason is used sparingly for C-faithfulness
|
||||
(e.g. the authentic "missle" message spellings) and provably-safe gosec
|
||||
conversions; each needs a justifying comment.
|
||||
|
||||
## Faithfulness
|
||||
|
||||
|
||||
40
TODO.md
40
TODO.md
@@ -29,13 +29,27 @@ Refactor ground rules:
|
||||
|
||||
# Next Step
|
||||
|
||||
Refactor step 7: effects dispatch — the giant quaff/readScroll/doZap
|
||||
switches become per-kind handler tables of small named methods,
|
||||
keeping effect order and RNG call sequence identical. This step also
|
||||
clears the outstanding cyclop/gocognit/nestif lint findings.
|
||||
Refactor step 8: constructor and style pass per the house styleguide —
|
||||
game.New(game.Params{...}) replacing NewGame(Config); replace the
|
||||
gameEnd panic unwind with error-based turn results where feasible;
|
||||
77-column wrap sweep.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-07-07 Refactor step 7 (refactor/effects-dispatch): effects
|
||||
dispatch tables plus a full decomposition sweep — the quaff /
|
||||
readScroll / doZap switches, the attack monster-power switch, the
|
||||
be_trapped switch, the daemon d_func switch, and the command-key
|
||||
switch all became handler tables on gameData (quaffHandlers,
|
||||
readHandlers, zapHandlers, hitHandlers, trapHandlers, daemonHandlers,
|
||||
commandHandlers), one small named method per case. Every remaining
|
||||
cyclop/gocognit/nestif hot spot was split into named helpers across
|
||||
fight, misc (look), command, chase, move, passages, options, pack,
|
||||
things, save, daemons, rooms, score, monsters, rings, rip, io,
|
||||
object, weapons, wizard, and term/tcell, plus three test functions.
|
||||
Effect order and RNG call sequence preserved throughout; the whole
|
||||
golangci-lint run is now 0 issues.
|
||||
|
||||
- 2026-07-07 Refactor step 6 (refactor/god-object-extraction):
|
||||
MessageLine (was MsgLine) owns the msg/addmsg/endmsg machinery,
|
||||
wired to its screen/look/input needs via attach(); RogueGame keeps
|
||||
@@ -128,27 +142,23 @@ clears the outstanding cyclop/gocognit/nestif lint findings.
|
||||
|
||||
# Future Steps
|
||||
|
||||
1. Refactor step 8: constructor and style pass per the house
|
||||
styleguide — game.New(game.Params{...}) replacing NewGame(Config);
|
||||
replace the gameEnd panic unwind with error-based turn results where
|
||||
feasible; 77-column wrap sweep.
|
||||
2. Docs refresh: update ARCHITECTURE.md Part 2 and README.md for the
|
||||
1. Docs refresh: update ARCHITECTURE.md Part 2 and README.md for the
|
||||
post-refactor names; add the C name → Go name rename table.
|
||||
3. Playtest hardening pass: play several full games with the tcell
|
||||
2. Playtest hardening pass: play several full games with the tcell
|
||||
binary and extend run_test.go to script a deeper multi-level
|
||||
playthrough (descend past level 5, use potions, scrolls, zapping,
|
||||
save/restore). Fix any panics, message mismatches, or divergences
|
||||
from the C behavior that this uncovers, with regression tests.
|
||||
4. Verify the seed-compatibility claim against the C reference on
|
||||
3. Verify the seed-compatibility claim against the C reference on
|
||||
c-master: same seed, same dungeon, same item tables, for several
|
||||
seeds.
|
||||
5. Broaden unit test coverage where playtesting finds thin spots
|
||||
4. Broaden unit test coverage where playtesting finds thin spots
|
||||
(rings, sticks, wizard commands).
|
||||
6. Tag a release once a full game (Amulet retrieval and score entry)
|
||||
5. Tag a release once a full game (Amulet retrieval and score entry)
|
||||
completes without defects.
|
||||
7. Full-terminal-size support (deferred by explicit decision
|
||||
6. Full-terminal-size support (deferred by explicit decision
|
||||
2026-07-06): per-game dungeon dimensions instead of the 80x24
|
||||
constants; open design questions are resize policy, gameplay
|
||||
tuning at larger sizes, and a --classic 80x24 mode.
|
||||
8. Note: this repo is exempt from the standard policy scaffold. Do not
|
||||
7. Note: this repo is exempt from the standard policy scaffold. Do not
|
||||
add Makefile, Dockerfile, or REPO_POLICIES.md.
|
||||
|
||||
Reference in New Issue
Block a user