Skip to content

Split generator/templates.rs by responsibility - #5239

Merged
joelteply merged 3 commits into
canaryfrom
fable/split-generator-templates
Oct 21, 2026
Merged

joelteply merged 3 commits into
canaryfrom
fable/split-generator-templates

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

templates.rs (479, four file templates) + templates/render.rs (317, private render helpers, pub(super), glob-imported by parent) + templates/tests.rs (318, single test mod). Uncompiled locally; CI compiles. source-hygiene passes locally (43 passed) after lowering BASELINE_LINES_OVER to 53,942 and BASELINE_EXCESS_TEST_MODS to 14.

🤖 Generated with Claude Code

@joelteply

Copy link
Copy Markdown
Contributor Author

PASS #5239 at 6f90ed5, Cormac. Claim checked: a pure move. Method: the removed and added lines of git diff fable/split-every-oversized-file...6f90ed58e as whitespace-stripped multisets. Unmatched lines are only mod render; use render::*; mod tests;, the 17 helpers widened to pub(super), the module doc, and the two baselines. One section divider comment (// ── helpers ──) was dropped, which is fine.

Base automatically changed from fable/split-every-oversized-file to canary October 21, 2026 07:13
- templates.rs (479): the four file templates (mod.rs, types.rs, DESIGN.md, README.md)
- templates/render.rs (317): private render helpers + command-name conversions (pub(super))
- templates/tests.rs (318): the single test module, moved from inline
- source-hygiene: lowered BASELINE_LINES_OVER 54,053 -> 53,942 and
  BASELINE_EXCESS_TEST_MODS 15 -> 14 (measured)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
(cherry picked from commit 6f90ed5)
@joelteply
joelteply force-pushed the fable/split-generator-templates branch from 6f90ed5 to 815bdba Compare October 21, 2026 07:14
joelteply and others added 2 commits October 21, 2026 03:08
…or-templates

# Conflicts:
#	core/source-hygiene/src/file_size.rs
…e merge commit left a 0 placeholder)

Fresh per-worktree build, cargo test -p source-hygiene 43/43 at this value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 8e26442 into canary Oct 21, 2026
9 checks passed
@joelteply
joelteply deleted the fable/split-generator-templates branch October 21, 2026 08:43
joelteply added a commit that referenced this pull request Oct 21, 2026
…iblings (#5246)

Card d4909786. the_lived_copy_is_shed_by_the_substrate_not_by_her_identity was
the only data-writing test in training_producer without HomeGuard. Her store
resolves through the process home (`@persona:kimi` -> $HOME/.continuum/
personas/kimi/data/longterm.db). A parallel test that pinned and restored
HOME could move it between this test's ensure-schema and its batch, so the two
calls hit different databases: "Delete failed: no such table: staged_credit".
Seen on #5239 at 815bdba and on #5244 at 3676ae9, while canary passed. It
also wrote into the real ~/.continuum/personas/kimi on every machine that ran
it.

The fix: a tempdir home under HomeGuard::set, held for the whole test. This
is the same pattern its siblings in part_2..part_6 already use. A scan of
every tokio::test in training_producer/tests that touches data found no other
test without the guard.


Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant