feat(authoring): absorb staleness modules; repoint help_data in-process (T2a)#1205
Merged
Conversation
…ss (T2a) T2a of the attune-author consolidation. Absorbs the staleness trio into attune.authoring and severs help_data's subprocess dependency on the attune-author CLI. - Absorb `symbols.py`, `manifest.py`, `staleness.py` into attune.authoring (verbatim from upstream attune-author; imports repointed, provenance headers). Byte-compatible hashing preserved. - Bring the upstream tests into tests/unit/authoring/ (83 tests; manifest 96% / staleness 85% / symbols 88% coverage). - Repoint `help_data._stale_features` (was `_attune_author_stale_features`) to the in-process `attune.authoring.staleness.check_staleness`, on top of #1203. Removes the `attune-author status` subprocess, `shutil` / `subprocess` imports, and the `_parse_status_output` markdown parser — eliminating the masked-crash bug class at the root (D9a). - Manual→N/A filter (D9b): features with no `files:` globs are reported untracked, not stale. Guards the all-manual single-sourced repo from a wall of 27 false positives that a faithful hash check produces. - decisions.md: port D8 forward + append D9 (both blockers resolved) and D10 (LLM polish moves upstream onto the master; executed by T3). Resolver fold-in (spec T2 / #1191) split out to keep this focused — it touches disjoint files with its own regression test; tracked in Open. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| ) -> None: | ||
| """A second call within the TTL returns the cached set without | ||
| re-running ``check_staleness``.""" | ||
| import attune.authoring.staleness as staleness_mod |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Raises patch coverage on the absorbed modules from ~79-85% to 90-100% (Codecov flagged 72 missing lines / partials on #1205). The brought upstream suites cover mainline paths; this adds the branch edges they miss: - symbols.py 83% -> 98%: posonly / *args / bare-* kwonly / **kwargs / async signature variants + class public-attr and method extraction. - staleness.py 85% -> 93%: mixed-content byte hash, SyntaxError->byte fallback, frontmatter parse edges, unsafe-name / missing-template guards, check_workspace_staleness (with + without manifest), _infer_kind. - manifest.py 95% -> 100%: load-validation raises (non-mapping, bad features, unsafe name, non-mapping spec), version-mismatch warn, save_manifest full-field round-trip. - help_data.py: _stale_features import-unavailable and check_staleness- raises fallback branches (both -> None -> age fallback). Remaining staleness gaps are the project-doc footer paths that help_data does not use (help templates only). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
Author
|
Addressed the Codecov coverage feedback in
Added Note: the red Run Security Scanner check is the known cosmetic dependabot-guard skip (1s, zero steps) — it is not in |
| ) -> None: | ||
| """A raising ``check_staleness`` falls back to age-based (advisory, | ||
| never 500-ing the dashboard).""" | ||
| import attune.authoring.staleness as staleness_mod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
T2a — absorb staleness modules; repoint
help_datain-processExecutes T2a of the attune-author consolidation
(
docs/specs/attune-author-consolidation/). Absorbs the staleness triointo
attune.authoringand severshelp_data's subprocess dependency onthe
attune-authorCLI.What changed
symbols.py+manifest.py+staleness.pyintoattune.authoring(verbatim from upstream attune-author — importsrepointed, provenance headers). The semantic-hash algorithm is preserved
byte-for-byte so existing
.help/stored hashes stay valid.tests/unit/authoring/(83 tests). Coverage — manifest 96% · staleness 85% · symbols 88%.
help_data._stale_features(renamed from_attune_author_stale_features) to the in-processattune.authoring.staleness.check_staleness, on top of fix(ops): treat attune-author status non-zero exit as "unknown", not "clean" #1203. Removes theattune-author statussubprocess, theshutil/subprocessimports, andthe
_parse_status_outputmarkdown parser.files:globs are reporteduntracked (N/A), not stale. Dogfooded against the real
.help/— all 27single-sourced features are glob-less, so a faithful check flags all 27
(noise); the filter yields 0. A regression test guards this.
Why
The old subprocess path had a latent masked-crash bug (a broken CLI shim
read as "nothing stale"); #1203 guarded it, and this PR removes the class
at the root by severing the CLI. See decisions D8 (the reframing),
D9 (both blockers resolved), D10 (LLM polish moves upstream —
executed later by T3), all landed here.
Scope note
The spec's T2 resolver fold-in (#1191 — extract
audit_doc_imports'ssrc-on-sys.pathresolver intofact_check/imports.py) is split outof this PR: it touches disjoint files (
fact_check/,scripts/) and needsits own line-115 regression test. Tracked in decisions.md → Open.
Verification
tests/unit/authoring/+tests/unit/ops/test_help_data.py— 330 passed_stale_featuresagainst the live repo.help/→frozenset()(correct: all-manual repo, zero drift)
🤖 Generated with Claude Code