Skip to content

refactor(visual): rename R2 buckets, /gittensory/shot route, and R2 key prefixes to loopover - #5531

Merged
JSONbored merged 1 commit into
mainfrom
loopover/r2-migration
Jul 13, 2026
Merged

refactor(visual): rename R2 buckets, /gittensory/shot route, and R2 key prefixes to loopover#5531
JSONbored merged 1 commit into
mainfrom
loopover/r2-migration

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Provisions two new live Cloudflare R2 buckets (loopover-review-audit, loopover-visual-capture-public) replacing gittensory-review-audit and gittensory-visual-capture-public, and adds an r2_buckets binding to wrangler.jsonc for the first time — REVIEW_AUDIT was previously configured only via the Cloudflare dashboard, entirely undeclared in code, meaning env.REVIEW_AUDIT likely resolved to undefined on the hosted Worker. This PR both renames and actually wires it for the first time.

Renames the public screenshot route from /gittensory/shot to /loopover/shot (src/api/routes.ts, src/auth/rate-limit.ts's cost classification) and the R2 key namespace from gittensory/ to loopover/ throughout capture.ts, shot.ts, actions-fallback.ts's two fallback-shot namespaces, blob-store.ts, and s3-blob-store.ts, plus every doc comment describing them.

Per explicit maintainer decision: no data migration, no permanent alias for old links, no dual-serving window — old screenshots are not preserved, this is a clean forward cutover so everything is correctly named going forward. The two old buckets are left in place (not deleted) for now.

Deliberately unchanged

  • gittensory-review-enrichment GitHub Actions artifact name / RUN_NAME_PATTERN in actions-fallback.ts — a cross-repo contract with visual-capture-fallback.yml in consuming repos, tracked by issue Rename the visual-capture-fallback.yml cross-repo contract with a compatibility alias #5338 (renaming it here without coordinating the other side would break the fallback dispatch entirely).
  • GITTENSORY_* env var names, the .gittensory.yml config convention, the domain, and Sentry naming (each a separate, already-tracked or explicitly deferred surface).

Test plan

  • Full npm run test:ci gate green (typecheck, coverage, engine-parity, mcp/miner builds, UI lint/typecheck/test/build).
  • Fixed 4 test files whose assertions depended on the renamed route/namespace (auth.test.ts, visual-shot.test.ts, visual-capture.test.ts, actions-fallback.test.ts — 249 tests).
  • npm run typecheck and npm run cf-typegen — regenerated worker-configuration.d.ts for the new r2_buckets binding.
  • Confirmed via the two new buckets' creation timestamps that they're live and empty, ready for the renamed code to write to on next deploy.

Closes #5332.

…ey prefixes to loopover

Provisions two new live Cloudflare R2 buckets (loopover-review-audit,
loopover-visual-capture-public) replacing gittensory-review-audit and
gittensory-visual-capture-public, and wires the REVIEW_AUDIT R2 binding into
wrangler.jsonc for the first time (it was previously configured only via the
dashboard, undeclared in code) so it actually resolves on the hosted Worker
going forward.

Renames the public screenshot route from /gittensory/shot to /loopover/shot
(src/api/routes.ts, src/auth/rate-limit.ts's cost classification) and the R2
key namespace from gittensory/ to loopover/ throughout capture.ts, shot.ts,
actions-fallback.ts's two fallback-shot namespaces, blob-store.ts, and
s3-blob-store.ts, plus every doc comment describing them.

Per explicit maintainer decision: no data migration, no permanent alias for
old links, and no dual-serving window — old screenshots are not preserved,
this is a straight-forward cutover so everything going forward is correctly
named. The two old buckets are left in place (not deleted) for now.

Closes #5332.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.79%. Comparing base (c81f314) to head (8d3ed4b).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5531   +/-   ##
=======================================
  Coverage   94.79%   94.79%           
=======================================
  Files         566      566           
  Lines       45065    45065           
  Branches    14675    14675           
=======================================
  Hits        42718    42718           
  Misses       1613     1613           
  Partials      734      734           
Flag Coverage Δ
shard-1 43.65% <71.42%> (-0.56%) ⬇️
shard-2 35.53% <71.42%> (+0.06%) ⬆️
shard-3 32.11% <57.14%> (+0.16%) ⬆️
shard-4 31.35% <57.14%> (-0.58%) ⬇️
shard-5 33.32% <71.42%> (+0.45%) ⬆️
shard-6 43.72% <85.71%> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/api/routes.ts 94.30% <100.00%> (ø)
src/auth/rate-limit.ts 98.88% <100.00%> (ø)
src/review/unified-comment-bridge.ts 99.57% <ø> (ø)
src/review/visual/actions-fallback.ts 98.25% <100.00%> (ø)
src/review/visual/capture.ts 96.00% <100.00%> (ø)
src/review/visual/shot.ts 92.82% <100.00%> (ø)
src/selfhost/blob-store.ts 100.00% <ø> (ø)
src/selfhost/s3-blob-store.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 13, 2026
@loopover-orb

loopover-orb Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-13 02:18:26 UTC

16 files · 2 AI reviewers · no blockers · readiness 100/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): src/auth/rate-limit.ts (matched src/auth/**), src/review/unified-comment-bridge.ts (matched src/review/**), src/review/visual/actions-fallback.ts (matched src/review/**), src/review/visual/capture.ts (matched src/review/**), src/review/visual/shot.ts (matched src/review/**), and 5 more.

Review summary
This is a clean, mechanical rename of R2 buckets, the /gittensory/shot route, and R2 key prefixes to loopover, plus the first-time wiring of an r2_buckets binding in wrangler.jsonc (previously dashboard-only, so env.REVIEW_AUDIT was likely undefined on the hosted Worker). The rename is applied consistently across routes.ts, rate-limit.ts, shot.ts, capture.ts, actions-fallback.ts, blob-store.ts, s3-blob-store.ts, env.d.ts, and the corresponding test files, with worker-configuration.d.ts regenerated to match. All CI checks pass, including the coverage gate, and the diff shows no lingering references to the old gittensory/shot path or namespace.

Nits — 7 non-blocking
  • The PR description doesn't state whether wrangler.jsonc's r2_buckets binding has actually been applied to the live hosted Worker (bucket provisioning is an out-of-band Cloudflare operation) — worth confirming in the PR thread before merge so REVIEW_AUDIT doesn't silently resolve undefined post-deploy.
  • src/api/routes.ts, unified-comment-bridge.ts, actions-fallback.ts, and shot.ts are already flagged as long files by static size checks; not introduced by this diff, but worth a follow-up split issue.
  • VISUAL_CAPTURE_PUBLIC binding is added but per the description is not yet read/written by any code path — confirm this is intentional forward-provisioning and not dead config.
  • Confirm in the PR thread (or a follow-up comment) that the loopover-review-audit and loopover-visual-capture-public buckets have been created in the actual Cloudflare account before merge, since wrangler deploy will fail if they don't exist yet.
  • Consider a short CHANGELOG or migration note pointing out that old screenshot links under gittensory-review-audit/gittensory/shot are now dead (404) since there's no dual-serving window, so downstream consumers aren't surprised.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 2 reviewers, synthesized
Linked issue ✅ Linked #5332
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 44 registered-repo PR(s), 36 merged, 403 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 44 PR(s), 403 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence. LLM value judgment: moderate — This closes a real, previously-undeclared-in-code R2 binding gap (env.REVIEW_AUDIT likely undefined on the hosted Worker) while completing a consistent renaming sweep tied to issue #5332, though it is largely mechanical rename work rather than new capability.
Linked issue satisfaction

Partially addressed
The PR renames the /gittensory/shot route to /loopover/shot, repoints the listed consumer files and key prefixes, and adds new R2 bucket bindings in wrangler.jsonc, addressing the route-rename and consumer-repointing scope; however per its own description it explicitly does no data migration/back-fill of existing objects and provides no permanent alias or grace window for old links, meaning zero-d

Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, Ruby, Go, JavaScript, MDX, Shell, Solidity
  • Official Gittensor activity: 44 PR(s), 403 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
[BETA] Chat with Gittensory

Ask Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 13, 2026
@JSONbored
JSONbored merged commit ff94e35 into main Jul 13, 2026
18 checks passed
@JSONbored
JSONbored deleted the loopover/r2-migration branch July 13, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

R2 bucket migration (2 live buckets) and the public /gittensory/shot route

1 participant