|
1 | 1 | ## [Unreleased] |
2 | 2 |
|
3 | | -## 0.1.9 - 2026-01-23 |
| 3 | +## 0.1.9 - 2026-02-08 |
| 4 | + |
| 5 | +### 🏗️ Architecture Decomposition ✅ |
| 6 | +- **core**: split `PageLike` and `SiteLike` into role-based protocols (`SiteConfig`, `SiteContent`, `Summarizable`) |
| 7 | + - Migrate Page → PageLike and Site → SiteLike across 40+ consumer files |
| 8 | + - Narrow protocols to minimal interfaces per consumer (read-only where possible) |
| 9 | + - Remove `SiteLike` from `Site` inheritance chain entirely |
| 10 | +- **core**: extract mixins to free functions and composed services |
| 11 | + - `PageComputedMixin` → free functions with tests |
| 12 | + - `PageBundleMixin` → free functions |
| 13 | + - `PageNavigationMixin` → free functions + property wrappers |
| 14 | + - `SiteVersioningMixin` → composed `VersionService` |
| 15 | + - `SitePropertiesMixin` → inline properties on `Site` |
| 16 | + - Remove 8+ dead mixin files from `Site` inheritance chain (12 → 4 mixins) |
| 17 | +- **config**: create `ConfigService` frozen dataclass, wire into `Site` with bridge properties (31 tests) |
| 18 | +- **cache**: extract `TaxonomyIndex` and `AutodocTracker` to composed classes |
| 19 | +- **cache**: remove `DependencyTracker`, fully replace with `EffectTracer` (persistence, file fingerprinting, threading tests) |
| 20 | +- **core**: split `snapshots/builder.py` (1,762 lines) into 5 focused modules |
| 21 | +- **core**: replace `Any` escape hatches with correct types across rendering and Page files |
| 22 | +- **core**: rename `parsed_ast` to `html_content` in core and all consumers |
| 23 | +- **core**: remove 55 stale `type: ignore` comments |
| 24 | +- **core**: fix protocol Self-type annotations in renderers and mixins |
| 25 | +- **config**: remove deprecated `config/loader.py`, update test imports |
4 | 26 |
|
5 | 27 | ### ⚡ Build Performance Optimizations ✅ |
6 | 28 | - **rendering(output)**: wire `fast_mode` to skip HTML formatting (Phase 1.1) |
7 | 29 | - `build.fast_mode=True` now returns raw HTML without pretty-printing or minification |
8 | 30 | - Provides ~10-15% speedup for builds with formatting enabled |
9 | | - - RFC: rfc-build-performance-optimizations |
10 | 31 | - **rendering(assets)**: implement render-time asset tracking (Phase 2) |
11 | 32 | - Track assets during template rendering via ContextVar-based AssetTracker |
12 | | - - Eliminates post-render HTML parsing for asset dependency tracking |
13 | | - - Provides ~20-25% speedup for sites with many assets |
14 | | - - Falls back to HTML parsing for assets not using filters |
15 | | - - RFC: rfc-build-performance-optimizations |
| 33 | + - Eliminates post-render HTML parsing for asset dependency tracking (~20-25% speedup) |
16 | 34 | - **cache(autodoc)**: add AST caching for autodoc extraction (Phase 3) |
17 | | - - Cache parsed Python module data to skip AST parsing on subsequent builds |
18 | | - - Provides ~30-40% speedup for sites with many autodoc pages |
| 35 | + - Cache parsed Python module data to skip AST parsing on subsequent builds (~30-40% speedup) |
19 | 36 | - Full DocElement reconstruction from cache on cache hit |
20 | 37 | - Automatic cache invalidation on source file changes |
21 | | - - RFC: rfc-build-performance-optimizations |
22 | | -- **core(pool)**: re-enable ParserPool with patitas 0.1.1 `_reinit()` support |
23 | | - - ~78% faster instantiation for high-volume parsing via instance pooling |
| 38 | +- **core(pool)**: re-enable ParserPool with patitas 0.1.1 `_reinit()` support (~78% faster instantiation) |
| 39 | +- **rendering**: pre-compute renderer caches and context wrappers at snapshot time |
| 40 | +- **core**: pre-compute NavTrees at snapshot time for lock-free lookups |
| 41 | + |
| 42 | +### 🐍 Python 3.14 Modernization ✅ |
| 43 | +- **core**: convert to PEP 695 type parameter syntax (`class Foo[T]:` instead of `Generic[T]`) |
| 44 | +- **core**: add `slots=True` to all frozen dataclasses |
| 45 | +- **core**: add exception chaining to raise-in-except blocks |
| 46 | +- **core**: annotate mutable class defaults with `ClassVar` |
| 47 | +- **perf**: convert manual list building to comprehensions (PERF401) |
| 48 | +- **rendering**: narrow `except Exception` blocks in kida.py and authors.py |
| 49 | +- **style**: auto-fix source and test lint violations across codebase |
24 | 50 |
|
25 | 51 | ### 🔒 Thread Safety (Python 3.14t) ✅ |
26 | | -- **core(assets)**: ContextVar pattern for thread-safe asset manifest access (RFC: rfc-global-build-state-dependencies, Phase 2) |
| 52 | +- **core(assets)**: ContextVar pattern for thread-safe asset manifest access |
27 | 53 | - Fixes TOCTOU race condition in `Site._asset_manifest_cache` for free-threading |
28 | | - - Manifest loaded once before rendering, accessed via thread-local ContextVar |
29 | 54 | - ~8M ops/sec throughput, zero lock contention |
| 55 | +- **core**: add lock protection to shared mutable state in rendering hot path |
| 56 | +- **core**: add lock ordering convention and concurrency documentation |
| 57 | +- **core**: add immutable snapshot evaluation to concurrency docs |
| 58 | +- **rendering**: separate BuildCache from DependencyTracker in pipeline |
| 59 | +- **tests**: add threading integration tests for EffectTracer and BuildTaxonomyIndex |
| 60 | + |
| 61 | +### 🔧 Cache & Incremental Build Improvements ✅ |
| 62 | +- **cache**: implement unified CacheCoordinator for coordinated cache invalidation across subsystems |
| 63 | + - Centralized path registry, rebuild manifest, and invalidation coordination |
| 64 | +- **core(cache)**: implement Output Cache Architecture RFC |
| 65 | + - Content-hash embedding in rendered output for O(1) change detection |
| 66 | + - Output type classification (authored, generated, static) |
| 67 | + - GeneratedPageCache for taxonomy/archive page deduplication |
| 68 | +- **orchestration(incremental)**: add IncrementalFilterEngine for rebuild decision hardening |
| 69 | +- **cache**: detect template changes and trigger incremental rebuilds |
| 70 | +- **orchestration**: fix incremental tag term page generation |
| 71 | +- **orchestration**: promote PageProxy to full Page in `phase_update_site_pages` |
| 72 | +- **orchestration**: wire EffectTracer into incremental build pipeline with persistence and file fingerprinting |
| 73 | +- **orchestration**: move `configure_for_site` before parallel rendering, fix stale tracker tests |
| 74 | +- **incremental**: skip cascade rebuild on body-only changes to `_index.md` sections |
| 75 | +- **server**: enable content-hash change detection; integrate into build_trigger and dev_server |
30 | 76 |
|
31 | 77 | ### 🚀 Developer Experience ✅ |
32 | 78 | - **cli(upgrade)**: add `bengal upgrade` self-update command with PyPI version checking and installer detection (uv/pip) |
33 | | -- **cli(build)**: add incremental build observability flags (`--explain`, `--dry-run`, `--explain-json`) for debugging rebuild decisions |
| 79 | +- **cli(build)**: add incremental build observability flags (`--explain`, `--dry-run`, `--explain-json`) |
34 | 80 | - **cli**: add Python 3.14+ version warning on startup for compatibility awareness |
35 | 81 | - **server(dev)**: implement serve-first startup for instant first paint when cache exists (~2-3s faster cold start) |
36 | 82 | - **theme(link-previews)**: add dead link indicator styling for broken internal links |
|
49 | 95 | - **core(changelog)**: make releases filter domain-aware; respect content type strategy |
50 | 96 | - **templates(changelog)**: trust ChangelogStrategy sorting, fix `sort_by` None handling |
51 | 97 |
|
52 | | -### 🔧 Cache & Incremental Build Improvements ✅ |
53 | | -- **cache**: implement unified CacheCoordinator for coordinated cache invalidation across subsystems |
54 | | - - Centralized path registry, rebuild manifest, and invalidation coordination |
55 | | - - Documented in architecture docs with PathRegistry and RebuildManifest patterns |
56 | | -- **core(cache)**: implement Output Cache Architecture RFC |
57 | | - - Content-hash embedding in rendered output for O(1) change detection |
58 | | - - Output type classification (authored, generated, static) |
59 | | - - GeneratedPageCache for taxonomy/archive page deduplication |
60 | | - - ContentHashRegistry for centralized hash storage |
61 | | -- **orchestration(incremental)**: add IncrementalFilterEngine for rebuild decision hardening |
62 | | - - Unified filter pipeline for config, content, and dependency checks |
63 | | - - Fix FilterResult/ConfigCheckResult `__iter__` for proper unpacking |
64 | | -- **incremental**: skip cascade rebuild on body-only changes to `_index.md` sections |
65 | | -- **incremental**: fix section-level optimization to detect subsection changes; autodoc uses fingerprints as fallback |
66 | | -- **server**: enable content-hash change detection; integrate into build_trigger and dev_server |
67 | | -- **core(initialization)**: detect missing autodoc output on warm CI builds |
68 | | -- **core(build)**: detect missing special pages (graph, search) on warm CI builds |
69 | | - |
70 | 98 | ### 🔴 Error System Improvements ✅ |
71 | 99 | - **errors**: consolidate error handling per RFC with 5 new exception classes |
72 | 100 | - `BengalParsingError`, `BengalAutodocError`, `BengalValidatorError`, `BengalBuildError`, `BengalTemplateFunctionError` |
73 | 101 | - Convert 10 generic exceptions to structured Bengal errors with codes and suggestions |
74 | 102 | - Add O/V/B error code categories for orchestration, validation, and build errors |
75 | 103 | - 43 unit+integration tests for error handling |
76 | 104 |
|
77 | | -### 🏗️ Architecture ✅ |
| 105 | +### 🏗️ Protocol Layer ✅ |
78 | 106 | - **protocols**: add `bengal.protocols` module as central protocol layer |
79 | 107 | - Migrate `Cacheable`, `ProgressReporter`, `HighlightService` to shared protocols |
80 | 108 | - Documented in architecture docs with protocol layer diagrams |
81 | 109 | - **refactor**: migrate to external `patitas` package; delete embedded parser (~15k lines removed) |
82 | | - - Parser now maintained as separate PyPI package |
83 | 110 | - ContextVar configuration pattern for Parser and HtmlRenderer |
84 | 111 | - ParserPool, RendererPool, RenderMetadata, RequestContext for framework integration |
85 | 112 |
|
86 | 113 | ### 🔨 Refactoring & Code Health ✅ |
87 | 114 | - **refactor(rendering)**: decompose HtmlRenderer into block/inline/directive modules (Phase 3) |
88 | | - - Cleaner separation of concerns for markdown rendering subsystem |
89 | 115 | - **refactor(utils)**: split into domain-aligned sub-packages; extract shared protocols |
90 | 116 | - **core**: implement RFC code health improvements (Phase 1-2) |
91 | | - - Reduced coupling, improved testability, clearer module boundaries |
| 117 | +- **directives**: add Patitas-native glossary directive |
| 118 | + |
| 119 | +### 📚 Documentation Audit ✅ |
| 120 | +- **docs**: comprehensive staleness audit across all doc sections |
| 121 | + - Fix stale claims in about, building, content, extending, get-started, reference, and theming sections |
| 122 | + - Align page URL properties to match codebase (`page.href`, `page._path`) |
| 123 | + - Replace Jinja2-style block endings with `{% end %}` in Kida examples |
| 124 | + - Add external cross-links for Kida, Patitas, Rosettes in about section |
| 125 | +- **autodoc**: fix section-index pages blocked by stale URL claims from cache |
| 126 | + |
| 127 | +### 🔧 CI & Packaging ✅ |
| 128 | +- **ci**: add `python-publish.yml` GitHub Actions workflow for trusted PyPI publishing |
| 129 | +- **ci**: add `--clean-output` to pages build to fix 404s on `/api/` and `/cli/` |
| 130 | +- **tests**: restore imports stripped by ruff auto-fix in deprecation tests |
| 131 | +- **tests**: prefix unused variables with underscore |
| 132 | +- **tests**: guard bs4 import in integration tests |
92 | 133 |
|
93 | 134 | ### 🐛 Bug Fixes |
94 | | -- **core(taxonomy)**: fix duplicate tag page generation in incremental builds; track already-generated tags to prevent double append |
95 | | -- **rendering(link_transformer)**: fix `.md` link normalization to preserve anchor fragments (e.g., `page.md#section` → `/page/#section`) |
| 135 | +- **core(taxonomy)**: fix duplicate tag page generation in incremental builds |
| 136 | +- **rendering(link_transformer)**: fix `.md` link normalization to preserve anchor fragments |
96 | 137 | - **server(dev)**: fix serve-first not activating when baseurl is `/` |
97 | | -- **cache**: fix Python 3.14 import scoping issue in cache loading; move BengalCacheError import to function scope |
| 138 | +- **cache**: fix Python 3.14 import scoping issue in cache loading |
| 139 | +- **core**: fix undefined name references in site and sitemap |
| 140 | +- **orchestration**: fix incremental tag term page generation |
| 141 | +- **tests**: fix CI failures from missing module, wrong kwarg, and unimplemented gaps |
98 | 142 |
|
99 | 143 | ### 📦 Dependencies |
100 | 144 | - Bump `patitas` to >=0.1.1 (adds `_reinit()` for parser pooling) |
|
0 commit comments