Skip to content

fix: lazy applier paths, out-of-sync UI label, and status tests - #9

Merged
FZ2000 merged 2 commits into
mainfrom
fix/3-status-synced-label-uses-manifest
Mar 6, 2026
Merged

fix: lazy applier paths, out-of-sync UI label, and status tests#9
FZ2000 merged 2 commits into
mainfrom
fix/3-status-synced-label-uses-manifest

Conversation

@FZ2000

@FZ2000 FZ2000 commented Mar 5, 2026

Copy link
Copy Markdown
Owner

Context

The manifest-based status.py consistency check (not synced / synced / out of sync) landed in main via PR #16. This PR contributes the remaining pieces that make it reliable and well-tested.

Changes

Lazy Path.home() in all appliers

ClaudeApplier, GeminiApplier, WindsurfApplier, OpenClawApplier previously evaluated Path.home() at module import time (module-level constants). This caused silent test contamination and real-file writes when HOME was monkeypatched in tests. All paths are now resolved lazily via helper functions called at use time.

SKILL_DIR is a @property with getter/setter so existing test patches still work.

ui.pyout of sync label support

Adds the third status state so the table renders correctly when files go missing.

OpenClawApplier.apply_mcp_servers — missing override param

Calling sync on openclaw was silently failing (exception caught, manifest never saved) because the method signature didn't accept the override kwarg that sync_helpers passes.

Tests

  • test_manifest.py — 17 unit tests for ToolManifest + status logic
  • Parametrized TestStatus covering all 5 tools (cursor, claude-code, gemini-cli, windsurf, openclaw) × 3 states (not synced / synced / out of sync)
  • Tests use isolated cache seeding instead of blanket collect calls to prevent real-home contamination across test runs

Test results

226 passing (full suite) · 106 passing (Docker-equivalent clean-HOME run)

Ace added 2 commits March 6, 2026 12:49
- status now distinguishes 'not synced' / 'synced' / 'out of sync'
- 'out of sync' triggers when manifest-recorded files are missing on disk
- uses applier TOOL_NAME for manifest lookup (e.g. 'claude' not 'claude-code')
- adds test_manifest.py with 17 unit tests for ToolManifest + status logic
- adds parametrized integration tests covering all 5 supported tools
- Lazify Path.home() usage in ClaudeApplier, GeminiApplier, WindsurfApplier,
  OpenClawApplier via helper functions (_claude_dir(), _claude_json(), etc.)
- SKILL_DIR is now a @Property with getter/setter so test patches still work
- Add missing 'override' param to OpenClawApplier.apply_mcp_servers()
- Update test_appliers.py + test_e2e.py patches to target functions not constants
- Parametrized TestStatus tests cover all 5 tools: cursor, claude-code,
  gemini-cli, windsurf, openclaw across not-synced / synced / out-of-sync states
- Use isolated cache seeding (no blanket collect) to prevent real-home contamination
@FZ2000
FZ2000 force-pushed the fix/3-status-synced-label-uses-manifest branch from 8c5e42a to b5be4bd Compare March 6, 2026 20:51
@FZ2000 FZ2000 changed the title fix: status 'synced' now reflects whether tool has been synced to fix: manifest-based status with real disk consistency check Mar 6, 2026
@FZ2000 FZ2000 changed the title fix: manifest-based status with real disk consistency check fix: lazy applier paths, out-of-sync UI label, and status tests Mar 6, 2026
@FZ2000
FZ2000 merged commit 96ac0b3 into main Mar 6, 2026
4 checks passed
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