Artifacts Associated With Ticket dc748de1f05915ad02c37fcff6495ce3f359747d
Ticket change [cae2883e0d] (rid 9351) by jva on 2026-09-16 18:17:54:
- Untracked field cmimetype: "text/x-markdown"
- comment initialized to:
Found during Jan's e2e campaign (jva), 2026-09-16, build 0.1.0-beta+4e516ed06124..dd4619ef72b9. Full write-up with numbered entries: https://zeitforge.app/r/jva/dantest-sandbox/doc/trunk/GOTCHAS.md Observed: another account's repo.update on dantest-sandbox (forge log 18:13:05Z) left description '' and mirrorable=false; afterwards /r/dantest-sandbox/xfer answered 404 to everyone (other repos fine) for ~20 minutes while the web pages kept working. api.md documents 'fields are applied whole' and hosting.md says a non-mirrorable repo answers not-found on clone; the two combine into a footgun. Suggest: patch only the named fields, or refuse a body that omits mirrorable; and let the owner see 'sync is off' somewhere.
- priority initialized to: "Medium"
- severity initialized to: "Important"
- status initialized to: "Open"
- subsystem initialized to: "api"
- title initialized to:
A partial repo.update wipes the other fields and can silently turn off sync (G-68)
- type initialized to: "Code_Defect"
Ticket change [774a2095f7] (rid 9365) by zeitgeist on 2026-09-16 18:39:20:
- icomment:
Triage (zeitgeist): CONFIRMED by reading the type. Same root cause as 2b8b96ae. repoUpdateIn declares Private, Chat and Mirrorable as plain bool, so a body omitting them says false. A partial update silently turns off chat, privacy and mirroring — and mirrorable=false makes xfer answer 404, which is how this became a 20-minute sync outage. quarry already has the tri-state idiom for exactly this: *bool, nil meaning "not mentioned", used in the teams ops. repo.update should use it. The sync consequence also belongs to the 74f040e0 group: a repository whose owner cannot clone it should say so somewhere rather than answer 404.
- mimetype: "text/x-markdown"
- icomment:
Ticket change [76554686c3] (rid 9534) by zeitgeist on 2026-09-17 13:19:12:
- icomment:
DECIDED by dmestas, 2026-09-17: FIX IT — an omitted field means unchanged. This was parked as a public-API-semantics call rather than a bug, so the decision is the thing that unblocks it. 'Fields are applied whole' stops being true: a body naming only description leaves chat, private and mirrorable as they were. Shape, from reading the code: repoUpdateIn's Private, Chat and Mirrorable are plain bools, so an omitted field arrives as false. quarry already has the tri-state idiom for exactly this — a pointer where nil means 'not mentioned' — used in the teams ops. The string fields need it too: jva observed description left empty by a partial call, and an empty description is a legitimate value, so absent and empty have to be different answers there as well. One implementation note so nobody is surprised: RepoRegistry.Update takes the whole record and the interface has no getter, so this wants read-modify-write against the existing Deps hooks (Descriptions, Private, Mirrorable, Visibility, and the repo meta for homepage/topics/chat) rather than sending a partial record and hoping the far side merges. Same root cause as 2b8b96ae, which is the same fix in the prefs matrix and is in progress.
- mimetype: "text/x-markdown"
- priority changed to: "High"
- icomment:
Ticket change [7da5137735] (rid 9987) by zeitgeist on 2026-09-17 22:42:04:
- icomment:
RAISED to Severe, because a fix of mine today made this reachable by everyone it was previously hidden from. b683c54b was the caps gate failing to find a body-carried repository, so repo.update answered 403 to every repository admin. That meant this partial-update footgun was only reachable by SITE admins. Landing c6c726bceca2 fixed the gate - and jva hit this within a minute of verifying it. Their measurement, 22:37:21Z on build 69c0194e93c7: POST /api/v1/repos/update with {name, description} applied the fields whole, reset mirrorable to false, and /r/dantest-sandbox/xfer then answered 404 to the next autosync - 'Round-trips 0, Autosync failed'. They restored it with a full-body update and sync came back. So a description-only update silently turns a repository's sync off, and as of today every repository admin can do it to their own repository through the documented API. That is no longer an API-semantics question about absent-means-false; it is a way to break a repository by editing its description. I caused the reachability and I am not going to decide the semantics: dmestas parked this deliberately as a public-API question (PATCH semantics versus PUT semantics on a documented endpoint). Recording the escalation and leaving the decision. If the answer is slow in coming, the narrow mitigation is to stop treating an ABSENT mirrorable as false, independently of the wider question. - mimetype: "text/x-markdown"
- severity changed to: "Severe"
- icomment:
Ticket change [c46bba5808] (rid 10186) by zeitgeist on 2026-09-18 02:23:56:
- icomment:
Both halves are fixed and guarded. **"Wipes the other fields"** -- repo.update no longer writes fields the body did not name. The first fix made the fields pointers and merged them over a read of the whole settings row, which closed the original hole (absent read as the zero value) but left every update a read-modify-write over every column. Landed in trunk at 8cfed9ba8696: the handler builds a RepoEdit carrying only the named fields, the registrar writes only the columns the patch sets, and SetChat became conditional -- it had been called with the merged value on every update. **"Can silently turn off sync"** -- two separate causes, both gone: 1. The merge read the EFFECTIVE mirrorable (false for any private repository, whatever the stored flag says) and wrote it back as the stored flag, so a repository taken private and restored to public came back public and unclonable. Fixed separately as G-115 by reading the stored flag from RepoMeta; this change removes the write-back that made the wrong read durable. 2. oltp.SetRepoAbout wrote homepage and topics as one statement, so naming either rewrote both. Split into SetRepoHomepage and SetRepoTopics. **Measured, not assumed.** Each guard was run against the defective shape and observed to fail before being kept: - `cmd/quarry/registrar_test.go` `TestUpdateWritesOnlyTheNamedColumns` -- a homepage-only update against a real database leaves description, topics, visibility and mirrorable untouched. Against the old column-pair write it fails with `topics = "", want "forge zit"`. - `internal/api/repoclobber_test.go` -- the patch crossing the seam carries only the named fields; a chat-only update writes no settings row; an empty body writes nothing. Reintroducing a single write-back fails all three. - The guard that required the merge is replaced rather than deleted: it described the first fix, and writing only named fields is what makes the merge unnecessary. Gate on merged trunk: make docs, gofmt, go vet, go build, go test -count=1 ./... all clean. **One caveat, stated rather than glossed.** The forge is still running 3362e687ac7d; trunk is 8cfed9ba8696. The behaviour change reaches zeitforge.app on the next deploy, so this is closed on landed-and-guarded evidence, not on a production measurement. The concurrent-writer case cannot be reproduced against a test double -- it needs two real admins -- so if it is seen again after the deploy, reopen and say so. Related: the settings trail that was the only evidence of the original incident is a 24-hour tail with no field name and no before value. A durable field-level audit log is proposed in 824a61b3.
- mimetype: "text/x-markdown"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment:
Ticket change [3f51d76600] (rid 12581) by zeitgeist on 2026-09-24 00:58:27:
- Untracked field number: "148"