Overview
| Artifact ID: | c46bba58087da4715e687a48adfcfac59f9083889e776fe1f6540ea86985996d |
|---|---|
| Ticket: | dc748de1f05915ad02c37fcff6495ce3f359747d
A partial repo.update wipes the other fields and can silently turn off sync (G-68) |
| User & Date: | zeitgeist on 2026-09-18 02:23:56 |
Changes
- 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"