Github Local Mirror
Swamp-backed local GitHub mirror: keeps a local git object cache plus queryable Swamp metadata for PRs, issues, comments, reviews, checks, patch revisions, and local development or review worktrees.
2026.07.29.1
Fixed: The PR context report now prefers the canonical current mirror-state artifact, preventing stale synchronization dates from historical data names.
Upgrade note: No migration is required. Historical mirror-state artifacts remain supported when the canonical artifact is absent.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| owner | string | |
| repo | string | |
| githubToken? | string | |
| gitObjectPath | string | Path to the managed bare git object repository used by the mirror |
| workspaceRoot | string | Directory where prepare_worktree creates editable worktrees |
| artifactRoot | string | Directory where sync stores durable mirror artifacts and cursors |
| gitRemote | string | |
| gitRemoteUrl? | string | |
| sshRemoteBase | string | |
| syncOverlapMinutes | number | |
| firstSyncSince? | string | |
| knownRemotes | record | |
| timelineCodeGranularity | enum | |
| needsClarificationLabels | array | |
| reviewerHandles | array | |
| reviewFocusStaleDays | number | |
| maxApiPages | number |
| Argument | Type | Description |
|---|---|---|
| budgetSeconds? | number | |
| requireComplete? | boolean |
| Argument | Type | Description |
|---|---|---|
| prNumber | number | |
| identity? | string |
| Argument | Type | Description |
|---|---|---|
| prNumber? | number | |
| branch? | string | |
| baseRef? | string | |
| identity? | string |
| Argument | Type | Description |
|---|---|---|
| worktreeId | string | |
| prNumber | number |
| Argument | Type | Description |
|---|---|---|
| worktreeId | string |
| Argument | Type | Description |
|---|---|---|
| worktreeId | string | |
| force | boolean | |
| deleteBranch | boolean |
| Argument | Type | Description |
|---|---|---|
| subjectType | enum | |
| number | number |
| Argument | Type | Description |
|---|---|---|
| prNumber | number | |
| headSha | string | |
| generator | string | |
| codePathWalkthrough | string | |
| reviewAttentionMap | string | |
| evidenceRefs | array |
| Argument | Type | Description |
|---|---|---|
| identity? | string | |
| autoAttach | boolean | |
| materialize | boolean | |
| dryRun | boolean |
Resources
Summarize sync freshness, local mirror paths, and registered worktree state for a GitHub local mirror model.
Render a complete local-mirror PR or issue context cluster, readiness, timeline, worktree state, and analysis evidence.
Build a deterministic repository-wide reviewer action queue from stored local-mirror data.
2026.07.24.1
Added: create_worktree can register development worktrees from a local base
ref before a pull request exists. attach_worktree, detach_worktree, and
remove_worktree provide explicit lifecycle operations without conflating PR
association with filesystem state.
Added: refresh_pr_worktrees uniquely attaches matching development
worktrees, retains superseded PR revisions, materializes missing current
revisions for tracked identity lineages, and safely removes merged-PR worktrees.
Changed: Worktree analysis and status now include creation provenance, optional PR association, current branch and HEAD, upstream configuration, revision state, and unambiguous PR attachment candidates.
Changed: sync accepts requireComplete=true so workflows can stop before
worktree reconciliation when synchronization returns partial results.
Changed: Development worktrees now default to the mirrored repository's
symbolic HEAD, and sync preserves their registered local branches instead of
reconciling those branches as mirror-owned refs. Creation rejects branch names
already owned by the configured mirror.
Fixed: Concurrent worktree lifecycle methods no longer lose registry updates, interrupted PR-head materialization remains registered for retry, and missing checkouts cannot delete ahead branches without explicit force.
Fixed: Identity-specific review worktrees use collision-resistant names and resource IDs, while existing unhashed identity worktrees remain idempotent.
Fixed: Retrying review preparation preserves local descendant commits, and sync keeps exact-name upstream branches local-owned while still rejecting Git namespace prefix conflicts.
Changed: Detached, identity-verified worktrees remain eligible for refresh, and analysis treats local descendants of the latest PR head as current.
Changed: The review branch name is reserved for managed PR worktrees. Sync
fails safely when a registered development worktree was renamed outside the
model instead of pruning its current branch.
Changed: Worktree cleanup verifies a persistent checkout identity before removal, and malformed PR artifacts are isolated instead of aborting all analysis and reconciliation.
Upgrade note: Existing worktree registry records are decoded as review
worktrees and remain compatible. prepare_worktree and
close_merged_worktrees remain available for existing callers; new automation
should use sync -> refresh_pr_worktrees -> analyze_worktrees. The
worktreeSnapshot.prNumber field is now optional for pre-PR development
worktrees. Consumers must read a PR association as
prLink?.prNumber ?? prNumber so both new and legacy review snapshots remain
supported; both values are absent for unattached development worktrees.
worktreeAnalysis.isPrHeadStale is now nullable while a development worktree is
unattached; consumers must test for true or false before using PR freshness.
Legacy worktrees without a checkout identity are retained by automatic cleanup;
re-run prepare_worktree or the matching create_worktree, or explicitly run
attach_worktree, to validate the checkout and backfill its identity.
Modified 1 models
2026.07.23.2
Added: The @evrardjp/github-repo-review-focus report classifies every
mirrored open pull request into a deterministic reviewer action queue and
includes reviewer load, label concentration, large changes, path overlap, and
stale backlog summaries in Markdown and JSON.
Changed: Model definitions can configure reviewerHandles and
reviewFocusStaleDays. Report rendering uses stored mirror data only and marks
missing current-HEAD or collection data as incomplete instead of ready.
Upgrade note: Existing models remain valid with no configured reviewer
handles and a 14-day stale threshold. Configure reviewerHandles to enable the
personal Re-review and Requested From You queues.
Added 1 reports
2026.07.23.1
Fixed: Sync now updates canonical branches such as refs/heads/main in the
managed bare repository instead of leaving them stale while fetching only into
hard-coded refs/remotes/origin/* references.
Changed: The configured gitRemote now determines the remote-tracking
namespace. Upstream branches are also available through canonical branch names,
while local worktree branches remain independent.
Upgrade note: After pulling this version, run sync once to refresh stale
canonical branch references in existing bare mirrors. If a custom gitRemote
was previously used and origin is not a separate remote you need to retain,
remove its legacy stale refs with
git --git-dir <path> for-each-ref --format='delete %(refname)' refs/remotes/origin | git --git-dir <path> update-ref --stdin.
2026.07.22.2
Added: The close_merged_worktrees method removes non-dirty worktrees after
their pull requests are merged while retaining their review branches and local
commits.
Changed: The local mirror status report now shows merged cleanup candidates, successful removals, and cleanup failures. One dirty worktree no longer prevents other eligible worktrees from being processed.
Upgrade note: Add close_merged_worktrees between sync and
analyze_worktrees in scheduled mirror workflows to enable automatic cleanup.
Modified 1 models
2026.07.22.1
Fixed: Bounded syncs now emit each repository-level collection status once
when budgetSeconds expires, avoiding duplicate data instance names while still
recording incomplete PR and issue collection state.
2026.07.21.1
Fixed: Context reports can be retrieved after prepare_review_context
without resupplying method arguments, because the selected PR or issue is now
retained in Swamp.
Fixed: Comment-only reviews no longer clear an active changes-requested
state, dismissed reviews now clear it, and missing check-run data now leaves CI
readiness Unknown instead of reporting that no fixes are needed.
Fixed: Commit timelines exclude commits dropped by a force-push, initial PR revisions use the Git merge base, and incremental PR listing stops once records are older than the sync window.
Fixed: Local repository references are matched case-insensitively and generated analysis commands safely quote model names.
Upgrade note: Run sync after upgrading so PR commits are recorded against
their current head. Until an older PR is resynced, its legacy commit records
remain visible; once current-head records exist, stale and legacy records are
excluded from its timeline.
2026.07.21.1
Fixed: Context reports can be retrieved after prepare_review_context
without resupplying method arguments, because the selected PR or issue is now
retained in Swamp.
Fixed: Comment-only reviews no longer clear an active changes-requested
state, dismissed reviews now clear it, and missing check-run data now leaves CI
readiness Unknown instead of reporting that no fixes are needed.
Fixed: Commit timelines exclude commits dropped by a force-push, initial PR revisions use the Git merge base, and incremental PR listing stops once records are older than the sync window.
Fixed: Local repository references are matched case-insensitively and generated analysis commands safely quote model names.
Upgrade note: Run sync after upgrading so PR commits are recorded against
their current head. Until an older PR is resynced, its legacy commit records
remain visible; once current-head records exist, stale and legacy records are
excluded from its timeline.
Modified 1 models
2026.07.20.1
Added: @evrardjp/github-pr-context provides a deterministic issue-centered PR/issue timeline with complete comments and event data, per-push or per-commit changed-file tables, local Git inspection commands, worktree state, and tri-state review readiness facts.
Added: PR and issue bodies, subject references, PR commits, richer review events, and collection-completeness records are retained in Swamp. External references remain unresolved and expose their URL when known.
Added: prepare_review_context selects a mirrored PR or issue, while record_pr_analysis stores code-path walkthrough and review-attention evidence tied to an exact PR head. The bundled github-pr-review skill asks before generating missing LLM evidence.
Changed: GitHub pagination is bounded and incomplete timeline, check, commit, or snapshot collection is recorded explicitly. Incomplete syncs no longer advance the successful cursor.
Fixed: Incomplete PR file pagination is retried for the same head until the complete changed-file set has been stored.
Upgrade note: Run sync after upgrading to populate the new context, relationship, commit, and collection-status resources. Existing snapshots remain compatible, but readiness remains Unknown until completeness records exist.
Modified 1 models. Added 1 reports. updated labels
2026.07.17.1
Added: Initial @evrardjp/github-local-mirror extension with a repo mirror model, full-fidelity sync, prepare_worktree, analyze_worktrees, and status methods.
Added: Local patch revision artifacts, contributor fork remote discovery, Swamp-indexed PR/issue activity, check run snapshots, worktree snapshots, and worktree stale/dirty/ahead analysis.
Added: @evrardjp/github-local-mirror-status report for mirror freshness and local worktree state.
Upgrade note: This is a new extension and stores data separately from @evrardjp/github-project-activity.
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned