Skip to content

fix(server): recognize remotes in partial clones - #138

Merged
lukemaj merged 1 commit into
mainfrom
fix/partial-clone-identity
Oct 2, 2026
Merged

lukemaj merged 1 commit into
mainfrom
fix/partial-clone-identity

Conversation

@lukemaj

@lukemaj lukemaj commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What: Partial Git clones keep repository identity and resolve their existing remotes correctly.
Why: Three server parsers rejected the [blob:none] suffix that Git adds after (fetch) in git remote -v.
So what: One server-only PR closes #135; the user reviews and merges it. Independent exact-head review passed; the PR remains unmerged.

The same one-line regex change accepts an optional trailing bracketed filter after (fetch) or (push) in RepositoryIdentityResolver, GitVcsDriverCore and GitVcsDriver. Regression tests use temporary repositories configured with Git's real promisor/filter settings; ordinary remote coverage remains. All six edited upstream source/test files are listed in scripts/fork-upstream-edits.txt and assigned to the feature in docs/fork-features.md. The implementation can go upstream unchanged.

Closes #135. Parent: #113.

Elon record

Requirements and who asked: User, 2026-10-02: smallest server-only fix across all three confirmed parsers, focused red/green proof, upstream-edit records, one independently reviewed PR against main, no merge.
Deleted: No shared parser refactor, UI, migrations, deployment, installation, broad checks, sibling-work cleanup or versioning.
Bottleneck: End-anchored remote-line regex excludes the optional partial-clone filter suffix.
Checked myself: Inspected all three source regexes, canonical remote output with [blob:none], complete eight-file final diff, red baseline record and green proof logs.

Proof

Base: 86d3269c6eac9dde4697a0fce105efc2abb907e9. Candidate: e90c0147a5c3ad693de2f371b27c648a42804889.

  • Red before green: tests added while all three production parsers were unchanged. Focused partial-clone cases failed in all three suites: missing canonical identity, omitted remote and duplicate remote creation. Exit 1, 3 failures, 164 skipped.
  • Green: all three affected suites passed, 167/167 tests, exit 0.
  • Corrected lint against the six source/test files passed, exit 0. One existing warning at GitVcsDriverCore.test.ts:1612 on an untouched line. Initial lint invocation found no files; corrected invocation actually linted the targets.
  • Server-scoped typecheck passed, exit 0; pre-existing Effect suggestions only.
  • Targeted formatting and fork feature records validation passed. git diff --check passed.
    Executed commands (worktree root unless stated):
pnpm exec vp test run apps/server/src/project/RepositoryIdentityResolver.test.ts apps/server/src/vcs/GitVcsDriver.test.ts apps/server/src/vcs/GitVcsDriverCore.test.ts -t "partial.clone"
pnpm exec vp test run apps/server/src/project/RepositoryIdentityResolver.test.ts apps/server/src/vcs/GitVcsDriver.test.ts apps/server/src/vcs/GitVcsDriverCore.test.ts
pnpm exec vp lint --report-unused-disable-directives apps/server/src/project/RepositoryIdentityResolver.test.ts apps/server/src/project/RepositoryIdentityResolver.ts apps/server/src/vcs/GitVcsDriver.test.ts apps/server/src/vcs/GitVcsDriver.ts apps/server/src/vcs/GitVcsDriverCore.test.ts apps/server/src/vcs/GitVcsDriverCore.ts
(cd apps/server && pnpm exec tsc --noEmit)
pnpm exec vp fmt --check apps/server/src/project/RepositoryIdentityResolver.test.ts apps/server/src/project/RepositoryIdentityResolver.ts apps/server/src/vcs/GitVcsDriver.test.ts apps/server/src/vcs/GitVcsDriver.ts apps/server/src/vcs/GitVcsDriverCore.test.ts apps/server/src/vcs/GitVcsDriverCore.ts docs/fork-features.md scripts/fork-upstream-edits.txt
node scripts/fork-features.mjs check
bash scripts/fork-check.sh --base de251fc2971a884cb5b1305ba4daf309dc8cccb0
git diff origin/main...HEAD --check

The first command is RED, the second is GREEN; all subsequent commands exit 0. Fork feature map: 24 features OK; upstream-base fork stack check OK. Initial lint path argument was incorrect due to zsh word splitting; corrected with separate array elements. Initial fork check used a fork base instead of the upstream merge-base; corrected to the explicit upstream merge-base above. No repository configuration was changed to make proof pass.

No repo-wide tests, lint or typecheck were run. This is focused proof, not a claim of full-suite coverage. Fresh main advanced to d0fbed7482655a492d44bdb5c7893751034fba91 in unrelated thread-effort files; no overlap with this eight-file diff and GitHub reports the PR mergeable. The tested candidate remains unchanged.

Review and cost

Independent reviewer: GPT-6-Luna via Codex, Prism role reviewer, thread sub.sub.sub.46b03420-8643-4703-8756-8602f14b39fb.dispatcher-44fcc5b593e0.dispatcher-bd006a50f509.reviewer-39ea349ada3e.

Verdict: success, no actionable findings, on exact head e90c0147a5c3ad693de2f371b27c648a42804889. Published findings. Verified newest-first commit status list: context review/independent, state success, creator lukemaj, target URL the findings above. The reviewer posted both the findings and status through the authenticated account.

Agent Observer: sync, then publish --task toolboxmd/chromeria#135 --repo toolboxmd/chromeria --pr 138 succeeded and published the cost record. Measurement gap: the report has zero attributed responses and flags sessions bound to no task. Its $0.00 must not be treated as a reliable cost estimate; actual task cost remains unknown. The publish requirement is met, with attribution limitations recorded.

Ready for user review. GitHub Check, all three Test Server shards, Fork Stack Model, Rust and Release Smoke passed on the candidate; the general Test job is still running. No full-CI success claim. No merge or installation authorized for this task.

Reversible assumptions and limits

  • Accept one optional bracketed suffix; preserve existing direction captures, URL normalization and fetch/push behavior without refactoring.
  • Use separate bare Git storage at /tmp/chromeria-135-git for the fresh worktree to leave the canonical checkout and its Git metadata read only. Existing worktrees and branches are untouched.
  • Keep the feature registry's branch comparison link rather than amending the commit just to add this PR number.
  • No UI or wire contract changes, so no client/browser verification applies. No live state, migrations, browsers, installation or merge.
  • Website/SEO impact: none, internal Git parsing only.
  • No versioning by design. This repository intentionally has no VERSION or .version-policy.json; the user explicitly excluded versioning.

Canonical handoff: #135 (comment)

Models/harnesses: coordination and dispatch by GPT-6.1-Sol through Codex; implementation by Prism-routed Claude Opus 5.5 through Claude Code; independent review by GPT-6-Luna through Codex.

Git appends the partial-clone filter to fetch lines in `git remote -v`
(`origin	<url> (fetch) [blob:none]`). The three remote-line parsers were
anchored after `(fetch)`/`(push)`, so partial clones lost repository
identity, listRemotes dropped the remote, and ensureRemote added a
duplicate. Accept an optional trailing bracketed filter in all three.

Closes #135

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Oct 2, 2026
@lukemaj

lukemaj commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Agent work on this PR

Estimated cost $0.00 · 0 responses · 73 sessions · 12.5 h wall time

Model Responses Tokens Estimated cost

Flags: 6 human corrections · 123 large tool outputs · 1 permission request · 64 repeated commands · 15 repeated failures · 36 repeated reads · 11 repeated skill loads · 73 sessions with usage bound to no task

Details: snapshot, prices, coverage, counters
  • Task toolboxmd/chromeria#135: outcome unknown (recorded acceptance only; a finished process never implies it).
  • Proof: fix(server): recognize remotes in partial clones #135
  • Snapshot 6de1127a02dc1f128006bc2c3b86de372d01c0502c765fc6606d95b852181541, records up to 2026-10-02 07:49 UTC.
  • 73 sessions on claude, codex; AgentsMD 14.6.0.
  • Not counted: 3,850 responses (at least $49.58) in sessions shared with other PRs that worked in no single PR's checkout.
  • 3,627 responses in these sessions worked on other PRs and are counted there.
  • Totals reconcile with the measured sessions: yes. Evidence complete: yes.
  • Prices: list-price estimate from T3 local rate table (path withheld) as of 2026-09-28, schedule 696aae45933d0a684a015d3f08cfb6f1aa2fef02e7d272b4689e3a692ea04fff. Unknown prices stay unknown, never zero.
    • T3 LiteLLM rate table when present; bundled schedule covers the rest.
  • Harness-reported cost: none reported.
  • Usage totals are not billing. Subscription spending is separate and is never posted as spend.
  • Crashed runs are counted separately: 0.

Token counters by model (native counter semantics; never added across semantics):

Selected rates (USD per million tokens). These rates value the report at the selected schedule date; they do not establish historical prices or subscription spending.

Model Input tier Input Cache read Cache write Other output Reasoning

Other output and reasoning are priced without double counting inclusive native output. Missing rates remain unknown.

Local measurement from native records; usage totals are not billing. Updated in place by agent-observer publish.

@lukemaj

lukemaj commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

What: The exact candidate passes independent review with no blocking findings.
Why: All three affected parsers accept Git's partial-clone suffix while preserving fetch/push direction handling and ordinary remote parsing.
So what: The user can continue the PR review and decide when to merge; this review does not merge it.

Reviewed exact head: e90c0147a5c3ad693de2f371b27c648a42804889 (PR #138; base d0fbed7482655a492d44bdb5c7893751034fba91). I read the complete eight-file diff, checked all parser consumers, and inspected the recorded proof.

Review findings: none. RepositoryIdentityResolver now recovers canonical identity from the fetch URL; GitVcsDriver.listRemotes retains both filtered origin and an ordinary fork; ensureRemote recognizes the filtered existing remote and does not create a duplicate. All three parsers retain the captured direction and URL; the suffix is optional, so ordinary (fetch) and (push) lines remain valid. Tests verify Git itself emits (fetch) [blob:none], then exercise each production caller. The saved baseline run shows the three expected failures with production source unchanged; the candidate run passes all 167 tests. Targeted lint, server typecheck, formatting, feature registry validation, fork check, and git diff --check are recorded successful. The one lint warning is on an untouched existing line.

Scope and delivery: eight files match #135; all six upstream source/test edits are recorded in both fork registries. No UI, contract, migration, versioning, or live-state work is implicated. The candidate is exact and the PR is mergeable; this review makes no merge claim or full-suite claim.

Verdict: success, no supported actionable finding in the reviewed scope.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB +2 B (+0.0%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB +3 B (+0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.4 KiB −1 B (−0.0%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 56.2 KiB 0 B (0.0%) 66.4 KiB ✅
Codex Live turn messages 9 9 0 (0.0%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB −4 B (−0.0%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −12 B (−0.2%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB +8 B (+0.1%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: 86d3269 · PR result: e90c014 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 114.0 KiB
  • Claude decoded thread snapshot: 114.7 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@lukemaj
lukemaj merged commit dafca35 into main Oct 2, 2026
22 checks passed
@lukemaj
lukemaj deleted the fix/partial-clone-identity branch October 2, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(server): recognize remotes in partial clones

1 participant