feat(pipeline): retention for archived wiki page versions

Analysed against 133800ac5 files changedby RaghavChamadiya
Open PR on GitHub

Change-risk score

9.1out of 10Typical
Repository health
7.4to7.4base against this head

This change sits in the middle third of this repository's own risk distribution, so it is about as risky as the work around it. It is riskier than 61% of this repository's own commits.

The largest health movement is in full_index.py, down 0.3. 1 contract changed, called by 9 symbols in files this PR does not touch.

Files changed
5
in this diff
Contracts changed
1
removed or signature
Outside callers
9
not in this diff
Findings added
11
4 resolved

Blast radius on the repo map

Every file in the repository, grouped into its own directories and sized by lines. The ones this PR changes are lit, and everything that imports them is marked.

packagestestsapi-clientclicoreserveruivscodewebunitsrcsrc/repowi…src/repowise/coresrc/repowise/server__tests__srcsrcwebviewsrccligenerationhealthingestionpersist…servertest_pro…workspace__fixtu…commandsanalysisgenerationingestionpersist…providersworkspacemcp_serverroutersc4healthsharedworkspacecomponentsmcp
changed, health fellchanged, health rosechanged, health heldimports a changed fileuntouchedchanged by this PR

Drawing 2,834 of 3,149 files at a readable size, grouped by directory and sized by lines of code. 5 changed here reach 8 more by import. 315 are too small to see at this width, which is what the frame below is for.

Inside packages/core/src/repowise/core/pipeline

phasesresume__init__.pycheckpoint…fix_rollup…full_index…incremental.pymodes.pyorchestrator.pypage_tree_sync.pypersist.pyphase_timing.…progress.pyreparse.pyscoped_genera…upgrade.pyanalysis.pygeneration.pygit.pyingestion.pycontroller.pyledger.pyphases.pyrehydrate…

25 files, 3 changed by this PR and 0 that import one. Click any directory above to frame it instead.

Changed

Contracts this PR changes

Only symbols that were removed or had their signature changed. An added symbol has no prior callers, and a body-only change leaves the caller's contract intact, so neither is a finding.

mark_tombstone_pagessignature changedpackages/core/src/repowise/core/pipeline/persist.py:54

9 callers outside this PR, 1 inside it.

packages/cli/src/repowise/cli/commands/update_cmd/persistence.py::_persist_full_update_asynctests/unit/pipeline/test_tombstone_fts_removal.py::test_a_renamed_file_is_dropped_under_its_old_pathtests/unit/pipeline/test_tombstone_fts_removal.py::test_a_tombstoned_page_is_deleted_from_the_full_text_indextests/unit/pipeline/test_tombstone_fts_removal.py::test_marking_nothing_returns_an_empty_listtests/unit/pipeline/test_tombstone_fts_removal.py::test_marking_returns_the_page_ids_it_markedtests/unit/server/mcp/test_tombstones.py::test_answer_hydration_drops_tombstoned_pagestests/unit/server/mcp/test_tombstones.py::test_get_context_returns_tombstone_redirecttests/unit/server/mcp/test_tombstones.py::test_mark_tombstone_pages_sets_status_and_successorstests/unit/server/mcp/test_tombstones.py::test_search_drops_tombstoned_pages

What this PR added, and what it took away

Introduced findings are the ones inside the lines this PR added, not the file's existing ones. The resolved column is the only place in the product that lists them.

Introduced (11)
  • criticalnested complexity
    packages/core/src/repowise/core/pipeline/retention.py:85

    plan_version_retention nests 7 levels deep

  • criticalcomplex method
    packages/core/src/repowise/core/pipeline/retention.py:85

    plan_version_retention has cyclomatic complexity 30

  • mediumcomplex method
    packages/core/src/repowise/core/pipeline/persist.py:54

    mark_tombstone_pages has cyclomatic complexity 10

  • mediumio in loop
    packages/core/src/repowise/core/pipeline/retention_store.py:47

    a database call runs once per loop iteration (N+1 / IO-in-loop)

  • mediumio in loop
    packages/core/src/repowise/core/pipeline/retention_store.py:60

    a database call runs once per loop iteration (N+1 / IO-in-loop)

  • mediumio in loop
    packages/core/src/repowise/core/pipeline/retention_store.py:76

    a database call runs once per loop iteration (N+1 / IO-in-loop)

  • lowerror handling
    packages/core/src/repowise/core/pipeline/full_index.py:72

    caught exception is swallowed without any handling

  • lowerror handling
    packages/core/src/repowise/core/pipeline/full_index.py:72

    broad `except Exception` catches unrelated errors and can hide bugs

  • lowerror handling
    packages/core/src/repowise/core/pipeline/persist.py:123

    broad `except Exception` catches unrelated errors and can hide bugs

  • lowserial await in loop
    packages/core/src/repowise/core/pipeline/retention_store.py:47

    a database call is awaited serially in a loop; if the iterations are independent, fan out with gather / Promise.all

  • lowserial await in loop
    packages/core/src/repowise/core/pipeline/retention_store.py:76

    a database call is awaited serially in a loop; if the iterations are independent, fan out with gather / Promise.all

Resolved (4)
  • dry violation
    packages/core/src/repowise/core/pipeline/full_index.py
  • function hotspot
    packages/core/src/repowise/core/pipeline/incremental.py
  • dry violation
    packages/core/src/repowise/core/pipeline/incremental.py
  • function hotspot
    packages/core/src/repowise/core/pipeline/persist.py

Who else knows this code

The primary author of each changed file by share of its recent commits, mined from git history. Advisory: it says who has context, not who must review.

  • packages/core/src/repowise/core/pipeline/persist.pyRaghav Chamadiya 66% of 38 commits
  • packages/core/src/repowise/core/pipeline/incremental.pyRaghav Chamadiya 95% of 26 commits

Tests that cover this change

Test files that import a file this PR changes. Not a coverage measurement: it is the import graph, so it says which tests are worth running, not which lines they reach.

  • tests/integration/test_wiki_idempotence.py
  • tests/unit/analysis/test_security_scan.py
  • tests/unit/generation/test_structural_key.py
  • tests/unit/cli/test_docs_pointer.py
  • tests/unit/cli/test_update_e2e.py
  • tests/unit/cli/test_update_pending_cleanup.py
  • tests/unit/persistence/test_commit_experience_reconcile.py
  • tests/unit/persistence/test_incremental_external_systems.py
  • tests/unit/persistence/test_page_tree_wiring.py

2 changed files have no test importing them.

AI-authored against human-authored

Each changed file attributed to whichever author class contributed more of its added lines, then scored. File-level, because a line-level blame index is not persisted.

Files changed
AI 2Human 3
Findings introduced
AI 4Human 3
Share of the regression
AI 0.00Human 0.30

Mean health of the AI-authored files is 8.0 against 3.8 for the human-authored ones.

Get this on your own pull requests

This page came from an index of repowise-dev/repowise. No model calls, no configuration, and it refreshes on every push. Install the bot and every pull request gets one of these.