diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-20 16:44:53 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-20 16:44:53 -0400 |
| commit | 3c0f082f3232be03d287200374d72d1311aaeaba (patch) | |
| tree | 96ad3ed11b4cc505a6fb35928b1f639370634c51 | |
| parent | 5627f137510ce1cf12a08abeed8c89abf3a83f5e (diff) | |
| download | dotemacs-3c0f082f3232be03d287200374d72d1311aaeaba.tar.gz dotemacs-3c0f082f3232be03d287200374d72d1311aaeaba.zip | |
chore(todo): mark refactoring program nearly complete, scope the deferred harness rewrite
| -rw-r--r-- | todo.org | 84 |
1 files changed, 32 insertions, 52 deletions
@@ -105,59 +105,39 @@ ai-term toggle-off teardown + working-buffer swap (62fee96b); calendar-sync per-event exception parser (23f405b4); dirvish playlist-target resolution (a1ca2fb0); custom-case per-word title-case decision (4cc9ca0b). -*** Remaining — big single-file (characterization tests first) -- custom-comments.el: the divider/box render-skeleton duplication — simple-divider vs - padded-divider (~40 lines each, differ only in the padding loop) and box vs - heavy-box (~45 each, heavy-box just adds two blank inserts); plus the comment-syntax - prologue repeated 7x and the doubled-semicolon / length-option constants. Extract a - shared emit-prefix helper + a border/text/border emitter parameterized by padding - lambda + extra-blank-lines. Insertion-order-sensitive: characterize each generator's - output before refactoring. The heaviest item. -- dwim-shell-config.el: ~46 =cj/dwim-shell-commands-*= defuns are trapped in the - =use-package dwim-shell-command :config=, so untestable under =make test=. For the - branching ones (=-video-trim= pcase x3, =-text-to-speech= darwin/linux, - =-extract-archive=/zip/tar single-vs-multi), extract each command's command-string - construction into a top-level pure =cj/dwim-shell--<name>-command= (takes prompted - values, returns the template string), leaving a thin interactive wrapper in :config. - Mirrors the existing =cj/dwim-shell--dated-backup-command= pattern. Do the - high-value branching commands; the trivial ones can stay. - -*** Remaining — theme-studio (scripts/theme-studio/) -Suite: =make check= (Python/Node/ERT) + =./run-tests.sh= (browser gates) + -=make check-generated= (byte-identical html) + =make coverage=. After ANY -generate.py-output change, stage theme-studio.html in the SAME commit -(check-generated compares to the working tree, not HEAD). -- app-core.js: =dropdownRowTextColor= is exported + has 4 tests but no runtime caller - (live path computes inline at app.js:82). Decide: wire it into the dropdown popup - row painting, or delete it + its 4 tests. Needs Craig's intent — default to delete. -- generate.py: ~230 lines of module-level build run at import; =face_coverage.py= does - =import generate= just for two constants and pays the whole cost. Wrap the assembly - in =build()= gated behind =__main__=; keep UI_FACES/CATS/COLS cheap module - constants. (The CRITICAL item.) -- capture-default-faces.py: =condition_matches= (166-206) has parallel dict-branch and - list-branch clause checkers encoding the same four rules + constants twice. Normalize - both shapes to one mapping, run one set of checks. NOT in =make check= — verify by - running it. -- face_coverage.py: =bucket_from_source= (118) and =bucket_of_source= (157) duplicate - the elpa/user/builtin path-kind detection. Extract =path_kind(path)= and have both - map its result to their own vocabulary. -- browser-gates.js (HIGHEST RISK — rewrites the harness that verifies everything): - ~39/44 gates copy-paste the =let ok=true;const notes=[];const A=(c,n)=>{...}= setup + - the =document.title=...; result-div= postamble (note format already drifted: 17 use - " | " vs 24 " fails="). Extract one =gate(name, body)= helper. CRITICAL CONSTRAINT: - each gate's =if(...)= MUST keep the literal substring =location.hash==='#NAMEtest'= - because run-tests.sh:76 discovers gates by grepping exactly that — a registry/loop - that hides the hash check breaks discovery (silent false-green). Pair with a - =withSavedState(keys, body)= helper for the ~13 mutating gates' inconsistent +*** DONE — big single-file + theme-studio (2026-06-20 afternoon, no-approvals run) +Both big single-file items shipped: dwim-shell branching command builders +(f93b4615); custom-comments divider/box generator dedup (42f0c88a). Five of the +six theme-studio items shipped: face_coverage path_kind (9a52370b), +capture-default-faces condition_matches unify (28b4d1cf), dropdownRowTextColor +delete (10a56789), test-file inline-integrity dedup — subTest loop + shared +inline-strip.mjs (13969c70), generate.py lazy _build()/__getattr__ (6df4ebdc), +browser-gates assertPreviewFaces for the 3 preview gates (5627f137). + +*** Remaining — browser-gates harness rewrite (HIGHEST RISK, deferred for review) +Two parts of the browser-gates.js item are intentionally NOT done in the +autonomous no-approvals run — they rewrite the harness that verifies everything, +so a subtle helper bug manufactures silent false-greens across all 44 gates: +- =gate(name, body)= helper for the ~39 gates' =let ok;notes;A=...; title; result-div= + boilerplate. LOW value (pure boilerplate; note format drifted 17 " | " vs 24 + " fails="). CRITICAL CONSTRAINT on any attempt: each gate keeps its literal + =location.hash==='#NAMEtest'= (run-tests.sh greps it to discover gates) — wrap only + the body, e.g. =if(location.hash==='#x')gate('X','x',A=>{...})=. Verify: all 44 gates + green AND a deliberately-broken assertion still FAILS (proved feasible — chrome is + available; the assertPreviewFaces commit ran exactly that check). +- =withSavedState(keys, body)= for the ~13 mutating gates' inconsistent PALETTE/MAP/UIMAP/SYNTAX snapshot-restore (7 mutating gates currently restore - nothing). Verify: all gates green AND a deliberately-broken assertion still FAILS - (prove the harness can't manufacture greens). Also =assertPreviewFaces= for the 3 - copy-pasted preview-face validators (mdtest/mupreviewtest/gnustest). -- theme-studio test files: =plan(overrides)= factory for the ~30 planPaletteGenerator - full-option-literal calls (test-app-core.mjs + test-palette-generator-core.mjs); one - shared =stripExports= (reimplemented 3x in app-core/colormath/app-util tests, must - stay aligned with generate.py's strip per test_generate.py:48); and an - =assertInlinedVerbatim(name)= loop for the 5 inline-integrity cases. + NOTHING — a real state-pollution bug, not just dedup). Needs per-gate key analysis. +Both warrant Craig's eye before/after given the harness-rewrite risk. The +=assertPreviewFaces= part of this item is already done (5627f137). + +*** Remaining — item-8 plan() factory (deferred, low value) +The =plan(overrides)= factory for the ~30 planPaletteGenerator calls (test-app-core.mjs ++ test-palette-generator-core.mjs) was deferred. The calls pass heterogeneous options +(scheme/accentCount/sourceMode/vibe/intent vary per call); a factory only dedups the +constant spanCount:0/rng and would hide which options each test actually exercises — +premature abstraction over varying calls. The other two item-8 parts (subTest loop + +shared stripExports) shipped in 13969c70. *** WON'T-DO (do not re-attempt — assessed and rejected) - theme-studio buildTable/buildUITable/buildPkgTable merge: genuine per-tier divergence |
