fix(cli): prevent stale embedded skills manifest drift#115
Conversation
Prefer runtime manifest fetch during init/update with embedded fallback warnings, and add doctor freshness drift detection for embedded vs repo manifest. Includes unit tests for fetch/fallback/freshness states.\n\nRefs #112
|
I did not find any blocking correctness or reliability regressions in the diff against origin/main. The new runtime-manifest fetch path includes explicit fallback behavior and tests for the primary failure modes. Raw outputs: codex-review.md, codex-review.jsonl |
| "gh", | ||
| "api", | ||
| "-H", | ||
| "Accept: application/vnd.github.raw", | ||
| "/repos/pentaxis93/groundwork/contents/skills/skills.toml?ref=main", | ||
| ]) | ||
| .context("failed to fetch current skills manifest from GitHub") | ||
| } |
There was a problem hiding this comment.
[P2] Preserve fetched manifest bytes for freshness hashing
fetch_remote_manifest_text uses run_command_capture, which trims stdout before returning it. That strips trailing newlines from skills.toml, so check_embedded_manifest_freshness_with hashes different bytes than SHIPPED_SKILLS_TOML even when the remote file is identical (the current manifest ends with a newline). In that case groundwork doctor will incorrectly report the embedded manifest as stale.
Use raw command capture for remote manifest fetch so trailing newlines are preserved, preventing false stale warnings in doctor. Add regression test for raw capture newline preservation.\n\nRefs #112
|
Addressed the freshness-hash false-positive concern in Changes:
Verification run:
|
Summary
groundwork init/groundwork updateattempt a runtime fetch ofskills/skills.tomlfrom GitHubgroundwork doctormanifest freshness reporting for embedded-vs-repo driftChanges
Issue(s)
Closes #112
Test plan
cargo fmt --allcargo test -p groundwork-cli