La Famille / Field notes
Architecture Hardening and Pipeline Optimization
Successfully refactored the build generator to handle concurrent map assignments and collision safety.
Key optimizations and changes
- Output-path collision preflight: Implemented
validateOutputPathsearly ingenerator.goPass 2 to gracefully identify explicit slug-overwrites instead of relying on filesystem OS locks. - Error sorting determinism: Changed the random map slice sorting from
err.Error()matching to lexical index based on target page iteration to guarantee identical error output formats across multiple builds. - Watch-mode allocation optimization: Extracted LiveReload string building from
bytes.Bufferarrays andstrings.Replaceinto anio.Writerchunk functionwriteWithLiveReloadinsiderender.go, slashing massive whole-page string duplications across watch environments. - Asset ignore pruning: Enforced early
filepath.SkipDirlogic on directories flagged in native ignored checks to skip completely redundant iteration patterns ininternal/asset/copy.go. - URL Boundaries: Realigned the
GetOutputURLparser logic to honorindex.mdcontract priority strictly before parsing slugs, which correctly restored routing mechanics for index subpages.
Testing additions
- Added integration coverage to trap deterministic output errors.
- Handled parallel layout extraction via
TestRendererConcurrentLayouts. - Improved Link AST extraction cases across query strings, HTML entities, and URL-scheme skips.