1
0
Fork 0
mirror of https://github.com/imjasonh/infinite-git synced 2026-07-08 17:15:37 +00:00
Commit graph

15 commits

Author SHA1 Message Date
Jason Hall
4ff9f1cae0
Merge pull request #2 from imjasonh/claude/add-infinite-go-package-dYfNY
Add cmd/infinite-go: serve Go package with PullTime via git
2026-04-03 13:18:28 +01:00
Claude
77b616e05f
Remove redundant TestGoGet (clone-only test)
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
2026-04-03 12:17:15 +00:00
Claude
89734da0dd
Add end-to-end go get test on :80
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
2026-04-03 12:15:40 +00:00
Claude
4455b83a47
Rewrite infinite-go tests to use git clone + go build
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
2026-04-03 12:11:45 +00:00
Claude
96dd2d9604
Add cmd/infinite-go: serve Go package with PullTime via git
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
2026-04-03 08:22:45 +00:00
Jason Hall
16db43a3af
Merge pull request #1 from imjasonh/claude/debug-code-issues-Bj3GV 2026-04-02 09:00:02 +01:00
Claude
1246262218
Combine CI jobs into a single "test" job
https://claude.ai/code/session_015F9BYQoCy2P2zYZBuVeXHH
2026-04-02 07:28:32 +00:00
Claude
43e577d58d
Add CI workflow for PRs and pushes to main
Runs build, tests (with race detector), and go vet.

https://claude.ai/code/session_015F9BYQoCy2P2zYZBuVeXHH
2026-04-02 07:17:13 +00:00
Claude
29666530cc
Fix four bugs: packfile offset tracking, HTTP error ordering, ref ordering, and race condition
- packfile.go: ReadObject now uses a countingReader to track compressed
  bytes consumed and properly advances r.offset, fixing sequential
  multi-object reads.
- handlers.go: Use commitSHA from GenerateCommit directly instead of
  re-reading refs, which fixes both the HTTP error-after-body-written
  issue and ensures HEAD is always advertised first (Git protocol
  requirement).
- commit.go: GenerateCommit now holds the repo lock for the entire
  read-modify-write cycle, preventing concurrent generates from reading
  the same parent and losing ref updates.
- repo.go: Added Lock/Unlock/GetRefsLocked methods to support holding
  the mutex across multiple repo operations.

https://claude.ai/code/session_015F9BYQoCy2P2zYZBuVeXHH
2026-04-02 05:52:24 +00:00
Jason Hall
09281ac00c
Update README.md 2025-07-23 23:11:15 -04:00
Jason Hall
db0c5c91a5
Update to use single hello.txt file instead of creating new files
Instead of creating a new file for each pull (pull_1.txt, pull_2.txt, etc.),
now updates a single hello.txt file with the pull number and timestamp
with nanosecond precision.

Changes:
- Modified commit generator to update hello.txt instead of creating new files
- Added hello.txt to initial repository commit
- Updated tests to verify hello.txt content instead of checking for new files
- Fixed test expectations to account for counter increment during clone

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 22:56:40 -04:00
Jason Hall
45d3788735
Deploy to Cloud Run with Terraform
- Add Terraform configuration using regional-go-service module
- Configure Artifact Registry for container images
- Set up networking infrastructure
- Deploy service with public access enabled
- Add Terraform files to .gitignore

The service is now deployed at:
https://infinite-git-nd2dq3gc7a-uk.a.run.app

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 22:47:52 -04:00
Jason Hall
8919cd5826
Implement pure Go Git HTTP server without CLI dependencies
Major rewrite to eliminate git CLI dependency:
- Created object package for Git object format handling (blob, tree, commit)
- Implemented packfile generation from scratch
- Rewrote repo initialization to create Git repos without CLI
- Implemented git-upload-pack protocol in pure Go
- Updated all server handlers to use new implementation
- Added Git packet tracing to test.sh for debugging
- Fixed tests to work with new implementation

The server now works entirely with Go code, no git commands needed.
Clone operations work correctly, but pull operations still have protocol
negotiation issues that need further debugging.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 22:28:50 -04:00
Jason Hall
30ca57dae3
Implement infinite Git HTTP server
This server generates a new commit every time someone pulls from it.
Features:
- Pure Go implementation of Git object format and protocols
- No dependency on git CLI commands
- Thread-safe commit generation
- Read-only Git HTTP smart protocol support
- Comprehensive test suite

Each pull creates a new commit with a unique file containing a timestamp
and counter, making the repository grow infinitely with each pull operation.

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 21:19:02 -04:00
Jason Hall
fefad053a8
Initial commit 2025-07-23 21:17:28 -04:00