Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

Add cmd/infinite-go: serve Go package with PullTime via git#2

Merged
imjasonh merged 4 commits into
mainfrom
claude/add-infinite-go-package-dYfNY
Apr 3, 2026
Merged

Add cmd/infinite-go: serve Go package with PullTime via git#2
imjasonh merged 4 commits into
mainfrom
claude/add-infinite-go-package-dYfNY

Conversation

@imjasonh
Copy link
Copy Markdown
Owner

@imjasonh imjasonh commented Apr 3, 2026

Refactor infinite-git to support pluggable content generation:

  • Extract ContentProvider interface (InitialFiles, GenerateFiles, CommitMessage)
  • Make repo.New accept initial files map instead of hardcoding content
  • Move infinite-git to cmd/infinite-git with gitContent provider
  • Add cmd/infinite-go that serves a Go module where each pull generates
    a new version with PullTime set to the pull timestamp
  • Include ?go-get=1 discovery middleware for Go module resolution

https://claude.ai/code/session_01HpvELk7HnbJoXEUjqHP7SU

claude added 4 commits April 3, 2026 08:22
Refactor infinite-git to support pluggable content generation:
- Extract ContentProvider interface (InitialFiles, GenerateFiles, CommitMessage)
- Make repo.New accept initial files map instead of hardcoding content
- Move infinite-git to cmd/infinite-git with gitContent provider
- Add cmd/infinite-go that serves a Go module where each pull generates
  a new version with PullTime set to the pull timestamp
- Include ?go-get=1 discovery middleware for Go module resolution

https://claude.ai/code/session_01HpvELk7HnbJoXEUjqHP7SU
Replace the go-git library tests with tests that shell out to `git clone`
and `git pull`, then verify each clone/pull produces a compilable Go
package with a unique PullTime. This more closely simulates the real
`go get @latest` with GOPROXY=direct flow.

- TestGoGet: 3 fresh clones, each builds and has unique PullTime
- TestGoGetPull: clone then 3 pulls, each builds and updates PullTime
- TestGoGetDiscovery: ?go-get=1 returns correct go-import meta tag

https://claude.ai/code/session_01HpvELk7HnbJoXEUjqHP7SU
Add TestGoGetE2E that binds to 127.0.0.1:80 and runs real
`go get 127.0.0.1@latest` against the server. Each iteration uses a
fresh module cache and verifies it gets a unique PullTime. Skips
gracefully when :80 can't be bound.

https://claude.ai/code/session_01HpvELk7HnbJoXEUjqHP7SU
TestGoGet (3 independent clones) is strictly weaker than both
TestGoGetE2E (real go get) and TestGoGetPull (clone + pulls with
go build verification). Remove it to reduce duplication.

Remaining tests:
- TestGoGetE2E: real `go get` on :80 (skips without privileges)
- TestGoGetPull: git clone + pull fallback (always runs)
- TestGoGetDiscovery: ?go-get=1 meta tag

https://claude.ai/code/session_01HpvELk7HnbJoXEUjqHP7SU
@imjasonh imjasonh merged commit 4ff9f1c into main Apr 3, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants