e8a202e5
web: mirror the git twin's description onto companion databases
The internal create endpoint accepts a description, but its only caller — dolt-git-hook — never sends one: git.sr.ht's push context does not carry it. Companion databases therefore all sat descriptionless on the dashboard while their git twins had perfectly good descriptions. Resolve the description server-side instead: a GitDescriber dependency (internal GraphQL query to git.sr.ht in the owner's name, the same network-key trust the hook uses to reach us, pointed the other way) is consulted on every /internal/repos call. A fresh companion is created with the twin's description; for an existing one the push doubles as the sync point — a changed, non-empty git description overwrites the stored one. An empty git description never clobbers one set in dolt's own settings, and every failure mode (no twin, git.sr.ht down, no resolver wired) degrades to no mirroring. The lookup is capped at 3s so the hook's own 5s POST timeout is never exceeded. Adds testify as a direct dependency for the new tests.
Eugene Blikh <bigbes@gmail.com> — 2026-08-06 20:10:23 UTC
Commit e8a202e5138d5b3cd879eb276ee5cf370a79c3d2 —
view raw patch
Parent(s):
8e7786cc
| File | Status | + | − |
|---|---|---|---|
cmd/doltsrht/main.go
|
M | +1 | |
go.mod
|
M | +4 | |
go.sum
|
M | +1 | |
web/adapters.go
|
M | +39 | |
web/deps.go
|
M | +12 | |
web/handlers_internal.go
|
M | +24 | |
web/handlers_internal_test.go
|
M | +56 |