haproxy/dev/patchbot/cgi
Willy Tarreau 13d465a61a DEV: patchbot: update: return the stored overlay as JSON on GET
This adds the read side of the review persistence CGI: GET
update.cgi?branch=X.Y now returns the current overlay for that branch
as a JSON array of {"cid", "state", "notes"} objects with absent fields
omitted; a missing or empty file yields "[]". The raw storage format
never travels: the notes are unescaped by the parser and JSON-escaped
on output, so the client can JSON.parse() the response and insert the
notes via textContent directly. Unparseable lines or fields are
silently skipped as everywhere else.

Reads are lockless: the atomic rename on the write side guarantees
that the file is always a complete valid version. The response carries
Cache-Control: no-store so that a browser never reuses a stale overlay
on refresh.
2026-07-07 14:45:32 +02:00
..
update.awk DEV: patchbot: update: return the stored overlay as JSON on GET 2026-07-07 14:45:32 +02:00
update.cgi DEV: patchbot: update: add an awk backend to persist review edits 2026-07-07 14:45:32 +02:00