Skip to content

C7 — Remove fork-only index archives (PLN-2027 PR 7, FR15) - #22

Merged
wongk merged 2 commits into
mainfrom
campaign-prd-739-20260915-c7
Sep 17, 2026
Merged

wongk merged 2 commits into
mainfrom
campaign-prd-739-20260915-c7

Conversation

@wongk

@wongk wongk commented Sep 16, 2026

Copy link
Copy Markdown

C7 — Remove fork-only index archives (FR15)

Lands PLN-2027 PR 7. Base origin/main; not stacked. A deletion: 10 files, +17 / −1126 across two commits.

What it removes

lc code export and lc code import, the module behind them, that module’s tests, the optional-dependency extra that carried its compression dependency, and every reference to the surface. These were added by the fork; upstream never shipped them, and nothing consumed them.

Worth stating plainly: nothing in this build establishes that the archives were non-portable. The plan originally gated the removal on an export/re-import probe. That probe was waived by dated operator approval recorded in the plan, and it was not run. The commands are gone because the fork added them and nothing used them — not because portability was tested and failed.

Acceptance ledger

10 criteria: 6 met, 4 met differently, 0 unmet.

The four met differently are all about how the criterion was evidenced, and one of them was exceeded rather than reduced:

  • The doc-reference criterion named one file; five were cleaned. Two of the extras matter: a live comment in the surviving clones command and a live docstring in its test, both still pointing at the deleted commands. The plan’s stated exit condition — that the help output lists neither command — passes with all of those still in place, which is exactly why the sweep was made repo-wide and proved with a grep that must return nothing.
  • PR 7 is the only unit in the plan with no Tests section, so there was no list to run; a mechanically derived set was run instead.
  • make typecheck clean is not achievable and never was, so type-checking was scoped to the changed file and diffed against main.
  • The full-suite-in-a-scratch-worktree row was left to CI, which runs that lane sharded.

Review

Deep review: APPROVED — 1 verified finding, 0 blocking, 0 high, 0 coverage gaps. The re-review gate computed SKIP: two production files changed and neither overlaps a blocking finding.

The impact analyzer spawned specifically on the symbol-deletion signal and found nothing. For a pure deletion that is the meaningful result rather than an empty one.

Both items it raised are fixed in 7d4ccc55:

  1. A fossil name. The helper that had to survive the deletion was still named after the module that no longer exists, with exactly one caller. The failure mode is concrete: the next person finishing this cleanup by matching on the old name deletes it and breaks lc code clones. The build deliberately left it, on the grounds that renaming was outside the approved deletion set — three reviewers independently disagreed, and they are right. This same commit already rewrote a comment and a docstring to strip references to the deleted commands; the identifier was the one reference prose edits cannot reach, so leaving it made the commit inconsistent about its own cleanup. Renamed, with the reversal stated in the commit body so the history does not contradict itself.
  2. A recovery pointer that did not resolve. The new planning-document text told a future reader to recover the removed delivery notes with git show 8235fdaf. That commit never touched the document. The correct reference was established from the file’s own history — git log --diff-filter=A for the file, then git log -S on four distinctive strings from the removed prose, each returning exactly the commit that added it and the commit that removed it — and the corrected path was then executed to confirm all four markers come back. Both referenced commits are ancestors of main, so neither depends on this branch surviving the merge.

Verification

Completeness grep returns nothing (68 matches across 7 files before) · lemoncrow code --help lists only clones, host, index, prune, train · derived test set 247 passed · tests/infra/code_intel 375 passed · test_clones.py 63 passed after the rename · test_docs.py 7 passed · test_mypyc_compile_safety.py 3 passed · uv lock --check exits 0, so the lock and the project file agree · ruff check --no-cache src benchmarks tests scripts integrations clean · black --check src tests clean.

mypy --strict on the changed CLI file reports three no-any-return errors. All three reproduce identically on origin/main in a throwaway worktree, one line lower — the shift explained by this branch deleting an import above them. None was added here.

Beyond the suite, three things were probed directly rather than taken from a report: the repo-wide sweep returns no matches; git show --stat confirms the old provenance commit never touched the document while the new reference does carry the removed prose; and the renamed helper has exactly one definition and one call site.

Deviations

  • PRD-739 was left entirely untouched, and it now disagrees with what shipped — see below.
  • The plan named one documentation file to clean; five were cleaned.
  • Nothing needed re-homing when the module-scope import was deleted: the constant it supplied had exactly one consumer, the deleted command’s own option.
  • The plan’s §0 claims a 9-finding lint baseline. It is 0, on this branch and on the tree it came from.
  • The full-suite verification row was not run locally.

What is still owed

  • PRD-739 still contradicts what shipped. Its open question about whether to retire these commands or make archives portable is still open, and FR15 is still phrased conditionally, gated on the probe that will now never run. The plan’s dated decision is what was built. Editorial follow-up for whoever owns the PRD.
  • The plan’s §0 lint baseline is wrong and should be corrected to 0, or a later chunk will treat a real finding as pre-existing.
  • A surviving helper still resolves a repository root in a way two other modules also implement privately; consolidating them was out of scope here.

Artifacts

  • Plan: PLN-2027 (v4), unit PR 7
  • PRD: PRD-739 — FR15

…R 7)

FR15. The fork added `lc code export` / `lc code import` in 8235fda,
upstream never shipped them, and nothing consumes them. PLN-2027 section 11
decision 5 approved removing them without the export/re-import probe.

Removed: both commands from gateway/cli/commands/code.py, the module-scope
TIERS import they were the only consumer of, infra/code_intel/portable.py,
tests/infra/code_intel/test_portable.py, and the `portable` optional-
dependency extra (uv.lock regenerated with `uv lock`, never hand-edited).

`_portable_repo_root` stays: `lc code clones` calls it, and it touches
nothing in the deleted module.

Beyond the plan's removal list, which named only open-code-intel-plan.md:
phase-b-review-handoff.md, the clones command's own comment and the clones
test's docstring all referenced the commands too. The plan's stated Exit
(`lc code --help` lists neither command) passes with those surviving, so
completeness is proven by grep instead.
Review of PR 7 (cr C7, 1 verified finding, approved).

`_portable_repo_root` -> `_resolve_repo_root`. 575aee7 argued the name
could stay because `lc code clones` calls it, but the name is the one
reference a prose edit cannot reach: it still asserts a portable-index
concept the same commit deleted, and the hazard is a later grep-driven
sweep of "portable" leftovers taking the helper with it and breaking
`lc code clones`. Module-private, one call site at code.py:878, no test
names it.

F7's provenance clause pointed at a commit that never touched the file.
8235fda carries the code, untrusted-input handling included; the delivery
notes and both deviations were added by 8d77d59 and removed here, so the
recovery path is `git show 8d77d59:docs/planning/open-code-intel-plan.md`.
@wongk
wongk merged commit ea31ea9 into main Sep 17, 2026
9 checks passed
@wongk
wongk deleted the campaign-prd-739-20260915-c7 branch September 17, 2026 16:58
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