Skip to content

feat(staleness): add check_workspace_staleness helper + bump 0.14.0#39

Merged
silversurfer562 merged 1 commit into
mainfrom
feat/workspace-staleness-helper
May 22, 2026
Merged

feat(staleness): add check_workspace_staleness helper + bump 0.14.0#39
silversurfer562 merged 1 commit into
mainfrom
feat/workspace-staleness-helper

Conversation

@silversurfer562
Copy link
Copy Markdown
Member

Summary

  • Adds a thin public helper check_workspace_staleness(workspace, features=None) -> StalenessReport that locates .help/ under a workspace, loads the manifest, and runs the existing check_staleness. Returns an empty report when no manifest is present (no try/except FileNotFoundError needed by callers).
  • Bumps version 0.13.00.14.0. Also fixes a pre-existing bug: src/attune_author/__init__.py:__version__ was pinned at "0.11.1" through the 0.12/0.13 releases.
  • 3 new tests under TestCheckWorkspaceStaleness: parity with direct API, empty-report-on-missing-manifest, features= filter passthrough.

Motivation

The attune-gui dashboard currently calls templates "stale" when their mtime > 14 days, while attune-author status defines stale as source-hash drift. End result: GUI cries wolf on current templates, users run attune-author regenerate and get "Stale features: 0."

The right model is attune-author's (content drift). The GUI should ask this library, not stat the filesystem. This helper makes it a one-liner.

What changed

File Change
src/attune_author/staleness.py New check_workspace_staleness(). Imports load_manifest.
src/attune_author/__init__.py Exports helper; bumps __version__ to 0.14.0.
pyproject.toml 0.13.00.14.0.
CHANGELOG.md Entry under [Unreleased] → Added.
tests/test_staleness.py New TestCheckWorkspaceStaleness class (3 tests).

check_staleness is unchanged. The helper is pure composition.

Test plan

  • pytest tests/test_staleness.py19 passed (16 existing + 3 new).
  • pytest tests/test_manifest.py tests/test_staleness_relocated.py tests/test_freshness_symbols_relocated.py71 passed. No regressions in adjacent modules.
  • CI green on this PR.
  • Post-merge: run /attune-release-check then tag v0.14.0 and publish to PyPI.

Follow-up (separate PRs)

  1. attune-gui pin bump attune-author[ai]>=0.9.1,<0.10>=0.14.0,<0.15.
  2. attune-gui: replace _FRESH_DAYS/_STALE_DAYS/_staleness() in sidecar/attune_gui/routes/cowork_templates.py with check_workspace_staleness(workspace_path).

🤖 Generated with Claude Code

…ump 0.14.0

Adds a thin public wrapper that locates `.help/` under a workspace,
loads the manifest, and runs check_staleness — returning an empty
StalenessReport when no manifest is present.

Motivates the attune-gui staleness model fix: the GUI currently uses
mtime > 14 days as a stale signal and disagrees with attune-author's
content-drift definition. With this helper, the GUI can call one
function with just a workspace path instead of duplicating the
manifest-load + `.help/` convention.

Also fixes the stale __version__ string in __init__.py (was pinned
at 0.11.1 through the 0.12/0.13 releases).

3 new tests cover: parity with the direct API, empty-report-on-missing
manifest, and features= filter passthrough.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@silversurfer562 silversurfer562 merged commit 829f03f into main May 22, 2026
12 checks passed
silversurfer562 added a commit that referenced this pull request May 22, 2026
… helper (#40)

Promotes the [Unreleased] block (Phase 2 ground-truth context
injection, Phase 3 faithfulness judge, Phase 4 tutorial static
check, and the check_workspace_staleness convenience helper) into
a versioned 0.14.0 heading. Version was already bumped in #39.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant