Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
32acb01
Add one-command local Git demo
carsonfarmer Sep 26, 2026
429cbf8
Allow local demo to select an optional Spin manifest
carsonfarmer Sep 26, 2026
4784391
Add a minimal TypeScript Spin repository viewer
carsonfarmer Sep 26, 2026
4b75613
Simplify repository viewer with Bun, Preact, and Biome
carsonfarmer Sep 26, 2026
288df99
Separate repository viewer into a TypeScript WAL reader
carsonfarmer Sep 26, 2026
2255261
Create viewer output directory before composition
carsonfarmer Sep 26, 2026
93ac45b
Include local startup in the repository viewer branch
carsonfarmer Sep 27, 2026
312017e
Create repositories through an authenticated API
carsonfarmer Sep 27, 2026
d1cf1a4
Support explicit repository creation in the TypeScript viewer
carsonfarmer Sep 27, 2026
696661f
Count the canonical repository suffix in the name limit
carsonfarmer Sep 27, 2026
fbc34b0
Connect the TypeScript viewer to repository creation
carsonfarmer Sep 27, 2026
65329ad
Use explicit API creation for Git repositories
carsonfarmer Sep 27, 2026
db5b289
Remove unused Git object storage implementations
carsonfarmer Sep 27, 2026
8e072d5
Remove compatibility paths for discarded Git state
carsonfarmer Sep 27, 2026
d3cb281
Merge pull request #109: Remove unused and obsolete Git service paths
carsonfarmer Sep 27, 2026
dee95f3
Create Git repositories on their first successful push
carsonfarmer Sep 28, 2026
db97606
Merge pull request #111 from carsonfarmer/cf/git-push-first
carsonfarmer Sep 28, 2026
5a87731
Show progress while importing Git pushes
carsonfarmer Sep 28, 2026
c0b20cb
Polish repository controls and lazy commit navigation
carsonfarmer Sep 28, 2026
d19ca2a
Pad viewer instructions and separate status panels
carsonfarmer Sep 28, 2026
de6301a
Merge pull request #115 from carsonfarmer/cf/git-push-progress
carsonfarmer Sep 28, 2026
bb5e78a
Merge pull request #117 from carsonfarmer/cf/viewer-polish
carsonfarmer Sep 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,27 @@ jobs:
- name: Test composed WASI credentials
run: make wasi-credential-test

repo-viewer:
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: examples/git/viewer
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: "1.3.13"
- name: Install wac
run: |
mkdir -p "$RUNNER_TEMP/wasi-tools"
curl -fsSL https://github.com/bytecodealliance/wac/releases/download/v0.11.0/wac-cli-x86_64-unknown-linux-musl -o "$RUNNER_TEMP/wasi-tools/wac"
echo "83259349b630f79a60490322b068e7ad2dba784720b0d467decccc0aecc743b5 $RUNNER_TEMP/wasi-tools/wac" | sha256sum -c -
chmod +x "$RUNNER_TEMP/wasi-tools/wac"
echo "$RUNNER_TEMP/wasi-tools" >> "$GITHUB_PATH"
- name: Lint, typecheck, and build viewer
run: bun install --frozen-lockfile && bun run check && bun test && bun run build

spin-key-value:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- Do not add garbage collection until checkpoint safety and uncertain-result
resolution have tests.
- Do not use OpenSpec.
- Do not add compatibility readers, migrations, or repair paths for discarded
revisions. Reject unsupported durable state and use a fresh storage namespace.

## Design

Expand Down
19 changes: 12 additions & 7 deletions GIT_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ rules remain outside the Rust core.
- Classic receive-pack push, branches, annotated tags, stale-write rejection,
fast-forward policy, connectivity validation, and malformed-input rejection.
- Atomic publication of refs and the sparse object catalog.
- Arbitrary configured repository paths with isolated WAL identities and an
explicit SHA-1 or SHA-256 format. Adding a repository requires configuration,
not source changes.
- Arbitrary repository paths with isolated WAL identities and an explicit
SHA-1 or SHA-256 format. First-push creation requires no per-repository
configuration or restart; named access policies remain optional overrides.
- Per-repository reader, writer, and administrator permissions; read-only mode;
a persisted default branch; and recovery without a local repository cache.
- Automatic maintenance that prunes unreachable Git objects and invokes bounded
Expand Down Expand Up @@ -84,7 +84,9 @@ The service uses unmodified upstream go-git and componentize-go, including its
bundled adapter. It pins the unchanged go-pkg PR #13 revision pending upstream
review. Exact revisions, licenses, and upstream references live in `THIRD_PARTY.md`.
New fork-only behavior requires owner review and focused tests. The service uses
ordinary Spin and unmodified object storage.
ordinary Spin and unmodified object storage. The optional TypeScript viewer
uses the owner-approved opaque-resource compiler fix in ComponentizeJS PR #357;
remove its package override when a release includes the fix.

## Service readiness

Expand All @@ -100,9 +102,12 @@ in #39.
The declarative repository map supplies canonical nested paths, stable WAL
identities, immutable object formats, default branches and independent
read/write/admin groups. Duplicate identities, aliases and malformed paths are
rejected. Unknown repositories fail closed. Reads and administration open
existing WALs; an authorized first-push discovery can materialize a configured
repository before accepting a pack.
rejected. A wildcard policy admits authorized first pushes to new names.
Missing repositories remain absent on reads; discovery for a first push advertises
both formats without initializing storage. The first successful push publishes
format, default branch, refs and catalog through the existing repository WAL.
Scheduled maintenance currently requires named entries; dynamic discovery is
separate work.

Remote tests added a nested SHA-256 repository through configuration while
preserving the component artifact. Read discovery returned 404 with no durable
Expand Down
14 changes: 11 additions & 3 deletions HANDOFF.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ The Git service supports unchanged SHA-1 and SHA-256 clients, protocol-v2 clone
and have-aware fetch, shallow history, classic push, branches, tags, access
control, cold recovery, automatic tail checkpoints, and explicit maintenance.
Refs and its sparse object catalog publish atomically through one WAL commit.
Local MinIO tests pass with unmodified go-git. Repository paths, formats, default
branches and per-action groups now come from configuration. Only an authorized
writer can materialize a configured repository; reads open existing state.
Local MinIO tests pass with unmodified go-git. The first successful authorized
push creates a repository without per-name configuration. A wildcard policy
supplies defaults; exact entries replace it. Canonical names derive isolated WAL
identities. The initial push publishes format, default branch, refs and catalog
through one WAL commit; browsing and rejected pushes publish no Git root.
The host maintenance worker still visits only named configuration entries.
Cognito access-token validation and a separate administration-only machine
client are wired. Password mode is the explicit local default and requires a
password. Public EC2 HTTPS qualification has passed real Cognito browser login,
Expand All @@ -87,6 +90,11 @@ go-pkg PR #13 while it remains under review. Dependency provenance and reference
authority. Use ordinary Spin and unmodified
S3-compatible storage.

The optional repository viewer has its own TypeScript Spin API and reads the
existing WAL catalog; it adds no routes or code to the Go Git service. Its
compiler temporarily uses the focused opaque-resource fix in ComponentizeJS
PR #357, with exact provenance in `THIRD_PARTY.md`.

Spin 4.1's affected OpenTelemetry SDK remains pinned pending its coordinated
upstream upgrade. The optional Caddy host rejects oversized or overlong W3C
`baggage` before Spin; other HTTP embeddings must enforce the same boundary.
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: check test bench minio-test minio-performance gc-acceptance git-check git-build git-spin-config-test wasi-credential-test git-provider-test git-qualification-tools-test
.PHONY: check test bench minio-test minio-performance gc-acceptance git-check git-build git-local git-spin-config-test wasi-credential-test git-provider-test git-qualification-tools-test

check:
cargo fmt --all --check
Expand All @@ -25,7 +25,7 @@ gc-acceptance:

GIT_EXAMPLE_DIR = examples/git
WAL_COMPONENT = examples/wal-component/Cargo.toml
GIT_TEST_FILES = access.go access_test.go auth.go auth_test.go repositories.go repositories_test.go imports.go imports_test.go receive_transport.go receive_transport_test.go request_config.go request_config_test.go import_pack.go import_pack_test.go import_pack_lifecycle_test.go limits.go limits_test.go index.go index_test.go codec.go codec_test.go delta.go delta_test.go read_retry.go read_retry_test.go retention.go retention_test.go retry.go retry_test.go fetch_policy.go fetch_policy_test.go validate_objects.go validate_objects_test.go validate.go validate_refname.go validate_refname_test.go validate_native_test.go
GIT_TEST_FILES = access.go access_test.go auth.go auth_test.go repositories.go repositories_test.go imports.go imports_test.go receive_transport.go receive_transport_test.go receive_progress.go receive_progress_test.go request_config.go request_config_test.go import_pack.go import_pack_test.go import_pack_lifecycle_test.go limits.go limits_test.go index.go index_test.go codec.go codec_test.go delta.go delta_test.go read_retry.go read_retry_test.go retention.go retention_test.go retry.go retry_test.go fetch_policy.go fetch_policy_test.go validate_objects.go validate_objects_test.go validate.go validate_refname.go validate_refname_test.go validate_native_test.go

git-check: git-qualification-tools-test
test -z "$$(gofmt -l $(GIT_EXAMPLE_DIR)/*.go $(GIT_EXAMPLE_DIR)/tests/*.go)"
Expand All @@ -48,6 +48,9 @@ git-build:
$(MAKE) -C $(GIT_EXAMPLE_DIR) build
cd $(GIT_EXAMPLE_DIR) && wac plug --plug ../wal-component/target/wasm32-wasip2/release/object_log_component.wasm main.wasm -o git.wasm

git-local:
./scripts/run-git-local.sh

git-spin-config-test: git-build
./scripts/test-git-spin-config.sh

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ host. Spin dependencies remain outside the core and KV workspaces.
[AWS host](https://github.com/carsonfarmer/object-log/blob/main/examples/git/qualification/aws/HOSTING.md)
supplies HTTPS, instance-role credentials, and a worker that schedules those
endpoints.
Use the provider suite to qualify the intended storage, client and host limits.
Run `make git-local` for a disposable local service, or use the provider suite
to qualify the intended storage, client and host limits.

The core library has no Git, Spin, or serverless-runtime dependency.

Expand Down
19 changes: 19 additions & 0 deletions THIRD_PARTY.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,25 @@ pins through go-pkg's public `Unpin` function after the bindings return Go
values. Build inputs are recorded in `examples/git/Makefile` and `go.mod`;
their upstream licenses apply.

## Optional TypeScript repository viewer

The viewer uses Bun, TypeScript, Biome, Preact, `fflate`, `@noble/hashes` and the
Spin JavaScript SDK. Its `examples/git/viewer/bun.lock` records exact versions
and package integrity. Their upstream licenses apply.

The compiler uses a temporary package based on official ComponentizeJS 0.23.0,
with the binding splicer rebuilt from
[revision `a47770b`](https://github.com/carsonfarmer/ComponentizeJS/commit/a47770bd1b63a7497d785c5b32e841812de16700).
[Upstream PR #357](https://github.com/bytecodealliance/ComponentizeJS/pull/357)
fixes missing classes for imported resources without methods, reported in
[issue #221](https://github.com/bytecodealliance/ComponentizeJS/issues/221).
The packaged JavaScript bindings and all engine/cache files remain identical
to the official release; only the compiled binding splicer changes. Source and
build details accompany the
[temporary package](https://github.com/carsonfarmer/ComponentizeJS/releases/tag/opaque-resource-v0.23.0).
Remove the package override once an upstream release includes this fix.
The compiler change adds no viewer behavior or Git-specific code.

## Native Spin provider

The isolated [Spin key-value provider](integrations/spin-key-value/README.md)
Expand Down
16 changes: 8 additions & 8 deletions docs/blog/02-running-git-on-the-wal.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ of both Spin and Git, and can also run natively.

Configuration maps repository paths to stable WAL identities, hash formats,
default branches, and permissions. Each repository has its own storage
namespace. An authorized writer's first push discovery creates its durable
state; reads only open existing repositories. Adding a repository changes
configuration, not the component binary.
namespace. The first successful authorized push publishes the format, refs and
catalog together; reads only open existing repositories. A wildcard
access policy can admit new repository names without changing the component
binary or configuration.

## From a push to durable refs

Expand Down Expand Up @@ -133,9 +134,8 @@ curl --fail-with-body -u git:local-git-password \
-X POST http://127.0.0.1:19100/_validate_backend
```

The default configuration exposes
`http://127.0.0.1:19100/sha1.git` and
`http://127.0.0.1:19100/sha256.git`.
Storage starts empty. The first successful push creates a repository at the
chosen path and records its Git format with the refs.

In a third terminal, push a commit and clone it back. Use an empty working
directory for these commands and keep your ordinary Git author configuration:
Expand All @@ -146,11 +146,11 @@ cd demo
echo 'Stored through object-log.' >README.md
git add README.md
git commit -m 'Try object-log'
git remote add origin http://127.0.0.1:19100/sha256.git
git remote add origin http://127.0.0.1:19100/team/project.git
git push -u origin main
cd ..
git -c protocol.version=2 clone \
http://127.0.0.1:19100/sha256.git demo-clone
http://127.0.0.1:19100/team/project.git demo-clone
git -C demo-clone fsck --full
```

Expand Down
2 changes: 2 additions & 0 deletions examples/git/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
/git.wasm
/.spin/
/.componentize/

/spin.viewer.toml
Loading
Loading