Skip to content

fix(storage): keep a generation whose semantic directory survives removal; #114 docs follow-ups - #130

Merged
ViperJuice merged 1 commit into
mainfrom
fix/129-review-nits
Nov 9, 2026
Merged

ViperJuice merged 1 commit into
mainfrom
fix/129-review-nits

Conversation

@ViperJuice

@ViperJuice ViperJuice commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-ups from the independent re-check of #129 (the #114/#111 fix; verdict MERGE-READY, 4 nits). The PR-body nit was fixed on #129 before merge.

Changes

  • Orphaned semantic directory. _remove_generation_files (mcp_server/storage/git_index_manager.py) deleted a pruned generation's database, and so its generation-history.json record, even when the local .semantic directory couldn't be fully removed (rmtree(..., ignore_errors=True)). The leftover directory was then never cleaned up. It now returns None and keeps the database, so the next prune retries.
    • Regression test: tests/test_index_admission_parity.py::test_generation_kept_when_its_semantic_directory_cannot_be_removed. It fails without the fix.
  • docs/configuration/ENVIRONMENT-VARIABLES.md: MCP_WATCHER_SWEEP_MINUTES now says that drift counts as handled only after a reconciling rebuild has published. A failed or refused rebuild is retried on the next sweep, then with backoff that skips 1, 3, 7 and at most 15 sweeps.
  • docs/operations/v13-release.md: "old and failed generations are retained deliberately" is now scoped to that release, and the page notes that only the newest failed generation is kept.

Tests

Run one file at a time on dev0, under nice:

  • test_index_admission_parity.py: 27 passed;
  • tests/docs/test_pubname_public_docs.py: 3 passed;
  • test_release_metadata.py: 27 passed.

black, isort and flake8 are clean on the changed files.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…oval; doc #114 retry and failed-generation retention

Follow-ups from the independent re-check of #129
(MERGE-READY, 4 nits):

- `_remove_generation_files` deleted the database (and with it the history
  record) even when the local `.semantic` directory could not be fully
  removed, leaving that directory orphaned forever. It now returns None and
  keeps the database so the next prune retries. Regression test added.
- ENVIRONMENT-VARIABLES: MCP_WATCHER_SWEEP_MINUTES now says drift is only
  treated as handled after a reconciling rebuild published, and failed or
  refused rebuilds are retried next sweep and then with backoff (at most
  15 skipped sweeps).
- v13-release: scope "retained deliberately" to this release and note that
  only the newest failed generation is kept.

Refs #114

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T06:04:31.076259Z 888b56e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ViperJuice
ViperJuice merged commit f861d9d into main Nov 9, 2026
27 of 31 checks passed
@ViperJuice ViperJuice mentioned this pull request Nov 10, 2026
ViperJuice added a commit that referenced this pull request Nov 10, 2026
Prepare index-it-mcp 1.6.0: the mcp 2.x port (#124 with #128, #131 and #127
in #132, re-check fixes in #135), so index-it-mcp co-installs with PMCP 3.x,
and the watcher sweep, incremental sync and generation-retention fixes (#114
and #111 in #129, follow-ups in #130).

- Bump to 1.6.0 in pyproject, __version__, the project's uv.lock entry, the
  Release Automation default, both Docker installers, the release docs and the
  release-gate tests.
- Turn [Unreleased] into [1.6.0] - 2026-11-09 (Changed / Fixed / Upgrade notes
  / Known follow-ups). Upgrade notes: mcp>=2.2,<2.4 is required, so drop any
  mcp<2 pin; PMCP 3.x co-install; Claude Code negotiates 2026-07-28 without
  Tasks; the cap widens per re-tested mcp minor; retention is automatic but
  never prunes pre-upgrade generations. Follow-ups #133, #134, #121, #117.
- Docs: 1.6.0 is the prepared candidate, 1.5.1 is published with partial
  delivered acceptance, and 1.3.0 through 1.5.0 are yanked on PyPI.
- The raw JSON-RPC initialize probe now requires serverInfo.version to equal
  the installed index-it-mcp version (#128), so release smoke guards it.

Co-authored-by: Claude Opus 5.5 <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