Skip to content

Drop the listing helpers the GitHub and Hub rewrite orphaned - #1640

Merged
zechengz merged 1 commit into
mainfrom
refactor/deadcode-cache
Oct 17, 2026
Merged

zechengz merged 1 commit into
mainfrom
refactor/deadcode-cache

Conversation

@sonhmai

@sonhmai sonhmai commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

b3560b8 (GitHub and the Hub answer their listings as stats) removed the last callers of these helpers on both hosts; only their own tests still reached them.

  • Delete cache/index/diff (departed) in Python and TypeScript, with its tests.
  • Delete listing_refreshed / listingRefreshed from cache/context, with its tests.
  • Drop listing_trusted / listingTrusted from the CacheInvalidator protocol and its test fakes. Nothing calls it through the protocol any more; the mount and reconcile call it on the concrete CacheManager, which keeps it.

Where this sits

CacheInvalidator is an internal construct, not something exposed to clients. It is the type cache/context gives the per-command cache manager: the mount binds it, backend core/x functions read it. Neither it nor CacheManager is exported from the package barrels; clients configure caching through Workspace(cache=..., index=...) and the cache stores. None of the removed symbols shipped in a release (latest: 0.0.7-alpha.2, 2026-09-08).

flowchart TD
    Client["Clients: app · agents · mirage CLI · YAML"] --> API
    subgraph Public["Public API: package barrels"]
        API["Workspace · Mount · build_vfs · VFS · Policy · Runtime · CLI · IndexCacheStore"]
    end
    API --> Shell
    subgraph Internal["Internal: importable by path, not a contract"]
        Shell["Shell · executor · command handlers"] --> Disp["Op dispatcher"]
        Disp --> MountRT["Mount runtime · CacheManager<br/>listing_trusted stays"]
        Disp --> Core["VFS · ops · core/x"]
        Core --> Acc["accessor/x"]
        MountRT -- "binds per command" --> Ctx["cache/context · CacheInvalidator<br/>removed: listing_refreshed,<br/>CacheInvalidator.listing_trusted"]
        Core -- reads --> Ctx
        Core -. "callers gone in b3560b894" .-> Diff["cache/index/diff<br/>removed: departed"]
    end
    classDef public fill:#E1F5EE,stroke:#0F6E56,color:#085041
    classDef changed fill:#FAEEDA,stroke:#854F0B,color:#633806
    classDef removed fill:#FAECE7,stroke:#993C1D,color:#712B13
    class API public
    class Ctx changed
    class Diff removed
Loading

Test plan

  • uv run pytest: 32237 passed, 601 skipped
  • pnpm typecheck (all packages), vitest run in core: 22782 passed
  • uv run mypy: no issues in 2223 files
  • check_layout_parity.py --strict, check_symbol_parity.py --strict, check_import_direction.py, check_barrel_surface.py: baselines unchanged
  • pre-commit on changed files

b3560b8 removed the last callers of departed and listing_refreshed on
both hosts; only their own tests still reached them. With
listing_refreshed gone, nothing reads listing_trusted through the
CacheInvalidator protocol, so the protocol and its test fakes drop it
too. CacheManager.listing_trusted stays: the mount and reconcile call it
on the concrete manager.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonhmai
sonhmai requested a review from zechengz as a code owner October 17, 2026 08:35
@sonhmai
sonhmai marked this pull request as draft October 17, 2026 08:37
@greptile-apps

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Medium impact] This cleanup appears safe to merge; no actionable issues were found.

Summary

Removes unused listing helpers from Python and TypeScript.

  • The cache index no longer has the departed path-difference helper.
  • Cache contexts no longer offer a separate listing freshness check.

No actionable issues found. Tests were not run during this review.

Reviews (2) · Last reviewed commit: "Drop the listing helpers the GitHub and ..." · Reviewed by Greptile

@sonhmai
sonhmai marked this pull request as ready for review October 17, 2026 08:51
@zechengz
zechengz merged commit 15a9b92 into main Oct 17, 2026
66 checks passed
@zechengz
zechengz deleted the refactor/deadcode-cache branch October 17, 2026 14:26
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