ZDDC/zddc/internal
ZDDC fcb8fc6cf1 feat(server): edit-in-place for the .zddc.zip config bundle, with in-zip history
A zip is random-access (unlike a streamed .tgz), so a member can be rewritten
in place. ServeZipWrite (handler/zipwrite.go) handles PUT (write/create a
member) and DELETE (remove) inside the .zddc.zip bundle: read the whole archive,
snapshot the prior member into an in-zip .history/<member>/<ts> + append a
log.jsonl audit line, mutate, then write a fresh zip and atomically rename over
the original (serialized on one mutex). After a write the policy cache is
invalidated so .zddc policy members take effect immediately, and the apps.Bundle
mtime-reload picks up tool-HTML edits.

Gated to active admins and to the .zddc.zip bundle only (dispatch's bundle gate
already 404s everyone else; content zips — transmittal/WORM packages — stay
read-only and 405). Writing into the in-zip .history/ is refused (append-only).

Also fixes a read collision: a .zddc member INSIDE a zip (e.g. a policy member,
URL ".../.zddc.zip/<dir>/.zddc") was being grabbed by the raw-.zddc-view handler
and 500ing; that handler now excludes ".zip/" paths so the zip intercept serves
the member.

Tests: writer round-trip (incl. wildcard member); dispatch create+overwrite,
policy-takes-effect, in-zip history audit, read-back, non-admin 404, content-zip
405.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 14:28:06 -05:00
..
apps feat(zddc): retire defaults.zddc.yaml; .zddc.zip is the policy carrier (phase 6) 2026-06-05 11:35:21 -05:00
archive fix(archive): log swallowed walkdir errors during transmittal indexing 2026-05-21 16:41:29 -05:00
auth feat(server): self-issued bearer tokens + --no-auth flag 2026-05-08 07:40:28 -05:00
cache fix(cache): track background revalidation goroutines; drain on shutdown + in tests 2026-05-21 16:21:37 -05:00
config feat(server): local-only tool-HTML override; remove apps URL/version fetching 2026-06-04 08:59:28 -05:00
convert feat(editor): add revision/status/tracking_number FM hints + filename-mismatch warning 2026-06-05 08:34:28 -05:00
fs feat(zddc): retire defaults.zddc.yaml; .zddc.zip is the policy carrier (phase 6) 2026-06-05 11:35:21 -05:00
handler feat(server): edit-in-place for the .zddc.zip config bundle, with in-zip history 2026-06-05 14:28:06 -05:00
jsonschema feat(forms): augment served schema with cascade field_codes + locks 2026-05-19 09:58:21 -05:00
listing refactor(history): store under .zddc.d/history/; drop .history carve-out + dead .devshell 2026-06-02 13:48:41 -05:00
policy feat(zddc): retire defaults.zddc.yaml; .zddc.zip is the policy carrier (phase 6) 2026-06-05 11:35:21 -05:00
tlsutil feat(server): TLS hardening per NIST SP 800-52 Rev. 2 + HSTS 2026-05-04 17:55:52 -05:00
zddc feat(zddc): retire defaults.zddc.yaml; .zddc.zip is the policy carrier (phase 6) 2026-06-05 11:35:21 -05:00
zipfs feat(zddc): serve a .zip as a virtual directory (zipfs + dispatch intercept) 2026-05-12 12:17:47 -05:00