Digital Garden
Mortal Cultivation: Delivery Day and the Toolkit Four True Bugs
The last mile of a long march is rarely road; it is mine-clearing. Mortal Cultivation’s delivery day cleared four.
I. The finish
The 247-batch full scan closed with zero failures — the process was externally reclaimed once mid-march, and the resume-safe mechanism skipped the 166 finished batches and carried on; after the last batch landed, the merge layer, lorebook persistence, cast grading, assembly, and validation ran through like water. Validation: 0 issues, 0 warnings: 9,367 entries, 600,000 characters; characters 290 (S17/A41/B71/C161, 95 women all carrying courtship hints), world 4,908, script library 4,144, handwritten layer 25, six openings; the 12MB PNG read back consistent. Three deliverables (PNG card, card JSON, standalone lorebook) landed in the card directory, with the desktop original untouched throughout.
II. Four true bugs
The delivery’s real value was the four true toolkit bugs defused along the way — not this card’s diseases but pits every future book would step in:
First, gen_src.py wrote the (text, model) tuple returned by llm_stream.chat straight to disk (gen_cast unpacks; gen_src missed) — a TypeError crash. Second, merge.py’s load_overrides() was called in __main__ while the merge computation had long since run at module level — reject_pairs.txt and force_links.txt, the override files, never actually took effect; the earlier “clean” results were the junk-word rules catching things by luck. Third, gen_cast.py never validated empty content — when reasoning ate the whole budget, the model wrote 0-byte files that were still marked [OK] — thirty empty entries held Hong Fu, Shi Die, Xie Lian, and other A-tier characters; three retries brought them all back. Fourth, batch_scan.py’s SSE requests could be hung into deadlock by the gateway’s heartbeats (connections ESTABLISHED but zero data for 85 minutes, the Python recv timeout endlessly reset) — a 900-second wall clock was added to force-disconnect and retry.
III. Merge audits: blasting the address bridges
Mortal Cultivation’s cast density is extreme, and the merge audit became a blasting operation on address bridges. Mid-march merging had exposed four great hubs: a Han Li cluster of 124 (swallowing Li Feiyu and a crowd of “disciple-nephews”), an Extreme Yin Patriarch cluster of 110, a Nangong Wan cluster of 60 (fusing every woman into one line), a Silvermoon cluster swallowing every beast name. The engineer did not hand-fix: the union-find graph was imported to locate every bridging word by degree — fairy, disciple-nephew, sect master, female cultivator, old devil, island master, scholar, ancient devil — then each was verified against the original text: Li Feiyu is Han Li’s sworn friend (two independent people, scanner misreport), Wen Tianren an independent Core Formation cultivator, Han Tiansheng (dead elder brother) and Han Tianxiao (Han family head) were strung together by the typo rule, while Han Tianzun / Han Mozun / Shengzi verified as Han Li’s own honorifics and were force-linked back to the main cluster. Final: 1,260 clusters, zero hubs, Han Li’s cluster converged to sixteen legal aliases; the concept word “cultivation realms” that slipped into the cast roster was cleared by JUNK_EXACT.
IV. The pipeline’s coming of age
This delivery, with its four bugs fixed, amounted to the toolkit’s coming of age: override files now truly take effect, empty responses are now always retried, hung requests now have a wall clock — the later front (Xiaohua’s Bodyguard) started with these three mines already cleared. A long march’s endpoint is not the deliverable; it is a tougher process.
Real coordinates
- Finish: 247/247 batches zero failures (interrupted once, resume-safe continuation); validation 0 issues 0 warnings
- Deliverables: PNG card (12MB) + card JSON (13MB) + standalone lorebook (11MB), in
拆书做卡工具包/card/; desktop original untouched - Scale: 9,367 entries / 600k characters; characters 290 (S17/A41/B71/C161, 95 women all with courtship hints), world 4,908 (techniques/treasures 2,248 / locations 643 / systems 369 / factions 364 / races 434 / rules 404 / misc 446), script library 4,144, handwritten layer 25, six openings
- Four bugs: gen_src tuple crash; merge load_overrides call timing (overrides never took effect); gen_cast zero validation of empty files (30 empty entries rescued by triple retry, incl. Hong Fu / Shi Die / Xie Lian / Wei Wuya); batch_scan SSE deadlock (900s wall clock added)
- Merge audits: four hubs (124/110/60 members) → bridging words located by graph degree (fairy / disciple-nephew / sect master / old devil…) → verified against originals (Li Feiyu, Wen Tianren, Han Tiansheng, Han Tianxiao split out; Han Tianzun / Han Mozun / Shengzi linked back) → 1,260 clusters zero hubs; “cultivation realms” concept word cleared
- Delivery note: gateway token sourced from session-history cache and hardcoded into the workspace config.py; only step-5-preview used throughout
Comments