Skip to content

fix: flag workflow skills that are stale after a package upgrade (#728) - #742

Merged
hyoshi merged 3 commits into
mainfrom
fix/728-stale-skill-detection
Sep 2, 2026
Merged

fix: flag workflow skills that are stale after a package upgrade (#728)#742
hyoshi merged 3 commits into
mainfrom
fix/728-stale-skill-detection

Conversation

@hyoshi

@hyoshi hyoshi commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Closes #728.

What

The basic-setup "workflow skills" row only asked whether every shipped SKILL.md existed in the host's skills directory. pip install -U mureo never rewrites those copies, so a daily-check skill from 0.10.39 sat on a 0.17 install reading ✓ for months, driving a workflow written against tools that had changed underneath it.

Changes

  • mureo/web/status_collector.py: _detect_workflow_skills now returns a SkillsStatus of missing / stale / current. Every shipped SKILL.md pins the mureo that shipped it in its frontmatter and install_skills copies the file verbatim, so a deployed copy can be dated; the deployed version is compared against the shipped file it was copied from (not mureo.__version__, which is the old value inside the mureo upgrade process itself). Missing still outranks stale; a deployed copy that records no version counts as stale; a shipped file that records no version is not judged.
  • mureo/web/setup_state.py: SetupParts.skills stays the boolean every consumer reads as "is this usable" and is now true only for a current set. Three new payload fields on setup_parts: skills_state, skills_expected_version, skills_installed_version.
  • mureo/_data/web/dashboard_setup.js + i18n (en/ja) + app.css: a stale set draws as ✗ with a sub-note naming both versions and the exact command (mureo setup claude-code --skip-auth, codex for Codex; Claude Desktop shares ~/.claude/skills and gets the claude-code command). Remove / Reinstall buttons stay, since the files are on disk. Text nodes only, no innerHTML.
  • mureo/cli/upgrade_cmd.py: mureo upgrade closes with one line per host skills directory it finds (up to date / stale (<old> installed, <new> shipped) — run: … / incomplete — run: …), including the Codex directory its own post-upgrade refresh does not write to.
  • Docs (docs/cli.md, _mureo-shared skill), CHANGELOG [Unreleased] / Fixed.

Verification

Clean venv, no plugins: 10516 passed, 9 skipped; black --check, ruff check clean; mypy mureo/ unchanged (pre-existing missing-stub errors only); node --test tests/js/*.test.js 705/705.

Captured against a mock home holding 0.10.39 copies of all 26 shipped skills (light + dark, full page) — attached in the review thread.

The basic-setup skills row asked whether every shipped SKILL.md exists in
the host's skills directory, and nothing else. Upgrading the package does
not answer that question: the deployed copies under ~/.claude/skills (or
~/.codex/skills) are only ever written by an install, so `pip install -U
mureo` leaves them exactly where they were. A daily-check skill from
0.10.39 sat on a 0.17 install reading ✓ for months, driving workflows
written against tools that had changed underneath them.

Detection. Every shipped SKILL.md pins the mureo that shipped it in its
frontmatter and install_skills copies the file verbatim, so a deployed
copy can be dated. _detect_workflow_skills now returns a SkillsStatus of
missing / stale / current: absent skills still outrank stale ones (same
re-install fixes both, and a half-installed set reported as ✓ is the worse
error), and a copy that records no version at all counts as stale, having
predated the pin. The comparison is against the shipped files on disk
rather than mureo.__version__, which is the same value everywhere except
inside the `mureo upgrade` process itself — that one holds the old version
in memory while the new package data is already unpacked.

Surfaces. setup_parts.skills stays the boolean every consumer already
reads as "is this usable" and is now true only for a current set; the
three new payload fields (skills_state, skills_expected_version,
skills_installed_version) say which way it fails. The dashboard's skills
row draws a stale set as not-ok with a sub-note naming both versions and
the exact command, and keeps its Remove / Reinstall buttons because the
files are on disk. `mureo upgrade` closes with the same report for every
host skills directory it finds, including the Codex one its own
post-upgrade refresh never writes to.

The fix in both places is the ordinary install without the OAuth it does
not need: `mureo setup claude-code --skip-auth` (`codex` for Codex).
…n the version pin (#728)

Two follow-ups from review of the stale-skill detection.

The upgrade report skipped a host whose check raised, in silence. Its
siblings in the post-upgrade refresh all name the exception class on
stderr, and here the silence was worse than untidy: a missing line is
read as the "up to date" it never said, which is exactly the confusion
the report exists to end. It now echoes "Workflow skills: could not
check <host> (<ExcType>)." and still never fails the upgrade.

The version regex was anchored at the end of the line, so a pin written
`version: 0.17.2  # comment` did not match, the scan fell through to the
closing delimiter, and a current install was reported as STALE — an
invented staleness, the one direction this check must not go. Only the
first token was ever used, so the anchor is dropped. Tests cover the
trailing comment, a BOM-prefixed file and CRLF line endings; the BOM
strip had no coverage of its own.
@hyoshi
hyoshi merged commit 4c62bc9 into main Sep 2, 2026
13 checks passed
@hyoshi
hyoshi deleted the fix/728-stale-skill-detection branch September 2, 2026 10:12
@hyoshi hyoshi mentioned this pull request Sep 2, 2026
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.

Installed workflow skills go silently stale across package upgrades — presence-only check reports ✓ for months-old skills

1 participant