Skip to content

feat: add reversible config-entry ownership and mapify uninstall (#314)#331

Merged
azalio merged 2 commits into
mainfrom
claude/compassionate-cerf-5tugql
Jul 5, 2026
Merged

feat: add reversible config-entry ownership and mapify uninstall (#314)#331
azalio merged 2 commits into
mainfrom
claude/compassionate-cerf-5tugql

Conversation

@azalio

@azalio azalio commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Implements #314 — reversible ownership tracking for provider config merges (MCP servers, statusline) and a new mapify uninstall command that removes MAP-owned entries without touching user-customised values.

Changes

src/mapify_cli/install_manifest.py

  • Add ConfigEntry dataclass: tracks file (relative POSIX path), key_path (dot-notation, e.g. mcpServers.sequential-thinking), installed_at, mapify_version
  • Add ReconcileResult dataclass: removed / skipped / missing lists
  • InstallManifest gains a config_entries: list[ConfigEntry] field (defaults to [] for backward compat)
  • _scan_mcp_config_entries: at manifest build time, records MCP servers whose current value exactly matches the canonical MAP config — user-modified entries are excluded
  • _scan_statusline_config_entry: records statusLine only when the command string contains "map-statusline.py" (MAP ownership marker); no absolute paths stored
  • reconcile_config(project_path): reads config_entries from manifest, removes MAP-owned entries, skips user-modified ones, marks already-absent entries as missing
  • build_manifest updated to scan and populate config_entries for the claude provider (codex gets empty list)
  • read_manifest backward-compatible: old manifests without config_entries key default to []

src/mapify_cli/__init__.py

  • New mapify uninstall command with --yes / -y flag (skips confirmation), exit codes 0/1/2

tests/test_install_manifest.py

  • 26 new tests covering VC10–VC17: MCP entry detection, statusline detection, user-modified exclusion, reconcile remove/skip/missing, backward compat

Test results

3309 passed, 4 skipped, 0 failures (full suite)
ruff: All checks passed
pyright: 0 errors, 0 warnings, 0 informations

Design notes

  • Satisfies the Codex hooks.json generator writes unsupported _map_managed top-level key #270 guardrail: no metadata added to strict provider schemas; ownership stored in the manifest's own config_entries list
  • Scan-based detection (value-equality against canonical config) avoids any schema mutation at install time
  • No absolute paths in manifest; "map-statusline.py" substring serves as the ownership marker

Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@azalio, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5cf2ae94-f7db-46b3-9f04-62e9adb33e07

📥 Commits

Reviewing files that changed from the base of the PR and between 7ceb597 and 43840f3.

📒 Files selected for processing (4)
  • docs/ARCHITECTURE.md
  • src/mapify_cli/__init__.py
  • src/mapify_cli/install_manifest.py
  • tests/test_install_manifest.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/compassionate-cerf-5tugql

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

claude added 2 commits July 5, 2026 06:46
Documents the new mapify check-installed command, .map/mapify.lock.json
artifact, and install_manifest.py module in the Runtime Flows, Code Layout,
On-disk Artifacts, and Source of Truth sections. Updates version to 3.21.0
and refreshes the Freshness section with the 2026-07-05 delta.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HZ3wHDow49xBGUwWFPH2mD
…y uninstall (#314)

Track MAP-owned provider config merges (MCP servers, statusline) in
.map/mapify.lock.json under a new config_entries list, enabling safe
removal via `mapify uninstall`.

- Add ConfigEntry dataclass: file (relative), key_path (dot-notation),
  installed_at, mapify_version
- Add ReconcileResult dataclass: removed/skipped/missing lists
- Add _scan_mcp_config_entries: records MCP servers whose current value
  exactly matches the canonical MAP config (user-modified entries excluded)
- Add _scan_statusline_config_entry: records statusLine only when command
  contains the "map-statusline.py" ownership marker
- Add reconcile_config: reads config_entries from manifest, removes MAP-
  owned entries (skips user-modified, marks missing absent ones)
- Extend build_manifest for claude provider to scan and record config
  entries; codex provider gets empty list
- Backward compat: manifests without config_entries field default to []
- Add `mapify uninstall` CLI command with --yes flag for non-interactive use
- Add 26 new tests covering VC10-VC17 (all pass, full suite 3309/0)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HZ3wHDow49xBGUwWFPH2mD
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.

2 participants