Skip to content

Commit c032176

Browse files
chore(release): 0.14.2 (#49)
Patch release fixing the source_hash LLM-laundering bug (PR #48). After successful regen, features stayed permanently "stale" because the polish LLM transcribed the source_hash field with single-character errors. Field-level frontmatter merge restores the canonical deterministic fields after polish while preserving non-deterministic markers like `polish: skipped`. Unblocks attune-gui Phase 2 (living-docs-regen-automation) once attune-gui pins this version. attune-ai's dashboard stale-count also stops mis-flagging just-regenerated features. Also includes the `publish.yml` trigger swap that was queued in Unreleased since 0.14.1. Local: 983/983 unit tests pass. Dist builds clean. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 1b1c7c5 commit c032176

3 files changed

Lines changed: 49 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,53 @@ and this project adheres to
1010

1111
## [Unreleased]
1212

13+
## [0.14.2] - 2026-05-27
14+
15+
### Fixed
16+
17+
- **Source-hash LLM laundering: features stay stale after a
18+
successful regen** ([#48](https://github.com/Smart-AI-Memory/attune-author/pull/48)).
19+
The polish LLM was given the rendered template (with
20+
frontmatter) as input context and asked to improve the body.
21+
Empirically, the LLM also echoed the frontmatter in its
22+
output — sometimes with single-character transcription errors
23+
in deterministic fields like `source_hash`. That broke
24+
staleness detection: the frontmatter `source_hash` written
25+
into the polished file didn't match what `compute_source_hash`
26+
recomputed on the same source, leaving the feature permanently
27+
"stale" after a successful regen.
28+
29+
Concrete evidence from attune-ai's spec-engine feature
30+
(2026-05-27):
31+
32+
```
33+
frontmatter: f8ced22b02899aa25ff409636e659830c6ba856d70de6ddd1a9bf1cbe37a1337
34+
computed: f8ced22b02899aa25ff709636e659830c6ba856d70de6ddd1a9bf1cbe37a1337
35+
^
36+
position 19: LLM wrote f4 instead of f7
37+
```
38+
39+
Fix: field-level frontmatter merge in
40+
`generator.apply_polish_results`. The canonical value for
41+
every DETERMINISTIC field (`type`, `name`, `feature`, `depth`,
42+
`generated_at`, `source_hash`, `status`) is re-injected from
43+
the rendered template after polish, overriding whatever the
44+
LLM emitted. NON-deterministic fields (`polish: skipped`
45+
marker from the lenient-mode fallback path, any future
46+
polish-layer metadata) are preserved unchanged.
47+
48+
Unblocks attune-gui Phase 2 (`living-docs-regen-automation`)
49+
which needed `attune-author status --dry-run` to reach a fixed
50+
point after regen. Once attune-gui pins this release, its CI
51+
`fail-if-stale` gate can be turned on. attune-ai's dashboard
52+
stale count also stops mis-flagging features that have just
53+
been regenerated.
54+
55+
End-to-end verified: regenerating `spec-engine` on attune-ai
56+
with the fix in place produces 11 templates whose frontmatter
57+
`source_hash` all match `compute_source_hash`'s recomputed
58+
value (vs. 0/11 pre-fix).
59+
1360
### Changed
1461

1562
- **`publish.yml` trigger swapped from `release: [published]` to

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "attune-author"
7-
version = "0.14.1"
7+
version = "0.14.2"
88
description = "Documentation authoring and maintenance for the attune ecosystem — generate, maintain, and validate help content with AI assistance."
99
readme = {file = "README.md", content-type = "text/markdown"}
1010
requires-python = ">=3.10"

src/attune_author/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
attune-help (reader) and attune-ai (full dev workflows).
66
"""
77

8-
__version__ = "0.14.1"
8+
__version__ = "0.14.2"
99

1010
from attune_author.manifest import Feature, Manifest, load_manifest
1111
from attune_author.staleness import (

0 commit comments

Comments
 (0)