Skip to content

docs: fused bundle-uri implementation plan#130

Open
0lut wants to merge 1 commit into
mainfrom
docs/bundle-uri-plan
Open

docs: fused bundle-uri implementation plan#130
0lut wants to merge 1 commit into
mainfrom
docs/bundle-uri-plan

Conversation

@0lut

@0lut 0lut commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

A single, pick-up-ready plan for clean-slate item (c) bundle-uri, fusing: the design-doc intent, PR #76's implementation experience, and this session's operational findings. Docs-only (docs/bundle-uri-plan.md). No behavior change.

Why this doc

We established that #76 (the bundle-uri attempt) can't be merged as-is: it advertised the pre-#79 generation-bundle chain (bundle_key), and #79 deleted that layer for content-addressed packs — so #76 is CONFLICTING and semantically dead. bundle-uri also serves bundle-framed files, not raw packs, so a base-bundle artifact must be published. This plan says what to do instead.

The plan (phased)

  1. Salvage Add protocol v2 negotiation and bundle-uri advertisement to direct Git endpoint #76's protocol-v2 half (ls-refs/fetch/v2 advertisement) — textual conflicts only, independently useful, and a prerequisite. Land as its own PR; close Add protocol v2 negotiation and bundle-uri advertisement to direct Git endpoint #76 after extracting.
  2. Publish a content-addressed base bundle as a byproduct of generation publish/compaction (reuse the repack output), bundles/bundle-{sha256}.bundle, referenced from the snapshot manifest — done off the client path.
  3. Advertise bundle-uri from the snapshot layout, off by default (bundle_uri_enabled, bundle_uri_base_url); bytes served by S3/CloudFront/the existing Cloudflare front door, node serves only the small top-up.

Why it matters (measured)

Offloads the cold-clone base bytes to S3/CDN → attacks the linux ~233s read-through, the Cloudflare ~100s origin cap (node response becomes a small top-up), and the no-bitmap pack-objects + mutation-lock contention.

Cross-cutting gates (the fusion)

  • Freshness coupling: a stale base bundle ⇒ large top-up ⇒ little benefit. Must land with the async-materialize + scheduled-warm freshness fix (the generation is ~a day stale today precisely because synchronous /v1/materialize times out at Cloudflare and never publishes).
  • Private-repo URL safety: public/signed URLs only.
  • Shallow/blobless scoping: full unfiltered clones only; shallow/blobless stays on read-through.
  • Old-client v0 fallback; node git-version gate.

Includes acceptance criteria and a dev/origin validation method.

🤖 Generated with Claude Code


Open in Devin Review

Captures what to actually do about clean-slate item (c), fusing the design
intent, PR #76's implementation experience, and this session's operational
findings.

- Records why #76 can't be merged as-is: it advertised the pre-#79
  generation-bundle chain (`bundle_key`), which #79 deleted in favor of
  content-addressed packs; and bundle-uri serves bundle-framed files, not raw
  packs, so a base bundle artifact must be published.
- Phases the work: (1) salvage #76's protocol-v2 half (textual conflicts only,
  independently useful, prerequisite); (2) publish a content-addressed base
  bundle as a byproduct of generation publish/compaction; (3) advertise
  bundle-uri from the snapshot layout, off by default.
- Calls out the cross-cutting gates that determine real value: freshness
  coupling (async materialize + scheduled warm so the base isn't stale),
  private-repo URL safety (signed/public-only), shallow/blobless scoping
  (full clones only), old-client fallback, and the node git-version gate.
- Acceptance criteria + a dev/origin validation method.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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