From 2b3e5a5a7327a6ffdb6fbca92c9691a05c7221c1 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 22 May 2026 15:07:32 -0500 Subject: chore(todo): close language-ruleset audit items --- todo.org | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/todo.org b/todo.org index 08bc519..4eee848 100644 --- a/todo.org +++ b/todo.org @@ -821,10 +821,10 @@ Each item below is a one-line summary of a sub-TODO further down. Tick the box w - [ ] [#B] =subagents.md=: capability/availability + cost checks **** Languages -- [ ] [#A] =python-testing.md=: revisit in-memory SQLite guidance -- [ ] [#B] =python-testing.md=: separate "never mock ORM" from unit-test boundaries -- [ ] [#B] =elisp.md=: drop tool-specific advice -- [ ] [#B] =elisp-testing.md=: batch-mode + native-comp caveats +- [X] [#A] =python-testing.md=: revisit in-memory SQLite guidance +- [X] [#B] =python-testing.md=: separate "never mock ORM" from unit-test boundaries +- [X] [#B] =elisp.md=: drop tool-specific advice +- [X] [#B] =elisp-testing.md=: batch-mode + native-comp caveats **** Hooks - [ ] [#A] =hooks/README.md=: include =destructive-bash-confirm.py= in install/settings snippets @@ -1047,33 +1047,21 @@ The rule assumes subagents exist and should handle failures. Add "if the environment lacks subagents, continue locally and preserve the same scope boundaries" plus a cost check for tasks where context handoff exceeds the work. -*** TODO [#A] =languages/python/claude/rules/python-testing.md=: revisit in-memory SQLite guidance +*** 2026-05-22 Fri @ 15:06:04 -0500 Revised python-testing SQLite guidance toward production-like DBs -"Prefer in-memory SQLite for speed in unit tests" is risky for Django or -SQLAlchemy projects whose production database is PostgreSQL/MySQL; query -semantics, constraints, transactions, JSON, time zones, and indexes differ. -Recommend production-like DBs for ORM/query behavior and reserve SQLite for -pure unit tests that do not depend on database semantics. +Replaced "prefer in-memory SQLite for speed" with: run ORM/query tests against a production-like DB (same engine as prod, often containerized), since SQLite diverges from Postgres/MySQL on query semantics, constraints, transactions, JSON, time zones, and indexes (a test can pass on SQLite and fail in prod). SQLite stays only for pure unit tests with no DB-semantics dependency. -*** TODO [#A] =languages/python/claude/rules/python-testing.md=: separate "never mock ORM" from true unit-test boundaries +*** 2026-05-22 Fri @ 15:06:04 -0500 Clarified python-testing ORM-mocking boundary -For domain services, real model methods and validation are usually right. For -thin orchestration units, a repository/interface fake may be cleaner than -hitting a real database. Clarify the boundary: do not mock ORM internals, but -do inject fakes at deliberate data-access ports. +Changed the "never mock" bullet from "ORM queries" to "ORM internals (querysets, sessions, model internals)" and added a paragraph: domain services use real model methods/validation, but a thin orchestration unit can inject a fake at a deliberate data-access port (a repository/interface the code owns). That's still mocking at a boundary, not at ORM internals. -*** TODO [#A] =languages/elisp/claude/rules/elisp.md=: update editing workflow to avoid tool-specific advice +*** 2026-05-22 Fri @ 15:06:04 -0500 Made elisp.md editing advice tool-agnostic -The rule says prefer Write over repeated Edits. That advice is Claude-tooling -specific and can conflict with environments that require patch-based edits. -Rephrase around the intent: for nontrivial Elisp, make cohesive edits and run -paren/byte-compile checks immediately. +Rephrased the "prefer Write over repeated Edits" bullet around intent: land nontrivial Elisp as one cohesive change rather than dribbling it in over tiny partial edits (which accumulate paren mismatches), and run paren-balance + byte-compile checks immediately after, whatever editing mechanism the environment uses. -*** TODO [#A] =languages/elisp/claude/rules/elisp-testing.md=: add batch-mode and native-comp caveats +*** 2026-05-22 Fri @ 15:06:04 -0500 Added batch-mode + native-comp caveats to elisp-testing.md -ERT guidance is solid, but add rules for =emacs --batch= reproducibility, -isolating =user-emacs-directory= / package state, and optionally catching -native-comp or byte-compile warnings depending on the project's Emacs version. +Added three sections: Batch-Mode Reproducibility (=emacs --batch= as source of truth, no interactive-session state, no blocking prompts, deterministic), Isolating Emacs State (temp =user-emacs-directory=, explicit load-path, declared deps only, with an unwind-protect sandbox example), and Byte-Compile/Native-Comp Warnings (=byte-compile-error-on-warn=, native-comp gated on =native-comp-available-p= and kept opt-in/version-aware). *** TODO [#A] =hooks/README.md=: include =destructive-bash-confirm.py= in install/settings snippets -- cgit v1.2.3