Skip to content

Remove unused and obsolete Git service paths - #109

Merged
carsonfarmer merged 3 commits into
cf/spin-repo-viewerfrom
cf/go-git-reduction
Sep 27, 2026
Merged

carsonfarmer merged 3 commits into
cf/spin-repo-viewerfrom
cf/go-git-reduction

Conversation

@carsonfarmer

@carsonfarmer carsonfarmer commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

The Git service duplicated repository initialization and retained support for discarded development state. This makes the authenticated /create API the sole initialization path; the local launcher creates its demo repositories through that API. It removes the old-ref repair endpoint and the fallback that invented main for stored roots missing HEAD. Catalogs now require a persisted branch HEAD and current valid ref names; default-branch configuration uses the same name checks. Unsupported old state is rejected, and current interrupted-write recovery remains intact.

Two unused go-git storage methods now return ErrUnsupported instead of walking the entire catalog or copying encoded objects. Explicit methods prevent fallback to the embedded memory store outside the WAL. The viewer also rejects missing HEAD while continuing to support valid unborn branches.

Go service runtime source: 4,088 → 3,971 lines (-117) across the same 26 files. Removed legacy-readability tests are replaced with current-state rejection coverage. AGENTS.md explicitly prohibits compatibility paths for discarded revisions.

Validation passed: make check, local Spin/MinIO Git-client suite (70.9 seconds), repository isolation, Spin configuration, viewer lint/types/tests/component build, Terraform formatting, and local Caddy admission tests. Independent correctness and simplification reviews found no remaining issues. Five-run lookup/pruning/fetch benchmark medians changed by -0.9% to +4.7%; those paths are unchanged and allocation counts remained stable.

Stacked on #104 to keep this reduction diff focused.

carsonfarmer and others added 3 commits September 27, 2026 15:42
Remove configured first-push initialization and preserve the one-command local demo by creating its repositories through the API. Update provider coverage and documentation.

Co-authored-by: Codex <noreply@openai.com>
Keep explicit unsupported interface methods so go-git cannot fall back to its embedded memory store outside the WAL. Smart HTTP pack import uses RawObjectWriter.

Co-authored-by: Codex <noreply@openai.com>
Delete old-ref repair and missing-HEAD substitution. Apply the current ref-name rules to stored catalogs and repository creation, and require persisted branch HEAD in the viewer. Keep recovery for interrupted current-format operations.

Co-authored-by: Codex <noreply@openai.com>
@carsonfarmer carsonfarmer changed the title Reduce Git service initialization and storage code Remove unused and obsolete Git service paths Sep 27, 2026
@carsonfarmer
carsonfarmer merged commit d3cb281 into cf/spin-repo-viewer Sep 27, 2026
4 checks passed
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