ZDDC/zddc/internal
ZDDC 662bfbdbf9 refactor(records): converge all record-write paths on WriteWithHistory
The in-dir form create/update (serveFormCreate/serveFormUpdate) wrote
records with plain WriteAtomic + date+email naming — no audit stamping,
no filename composition, no field_codes/folder_fields. So "+ Add row"
from a per-party mdl/rsk table produced un-stamped, mis-named rows that
the tables tool's own PUT-update path (which composes) would then 422
on. Only PUT and the project rollup honored the record machinery.

Now every record-write entry point converges on WriteWithHistory:

- Extract the shared field_defaults + folder_fields + row-assign +
  compose step into recordCreatePrep (history.go); the rollup uses it
  too, replacing its inline copy.
- serveFormCreate: when a records: rule with a filename_format applies
  in the target dir, compose the name + route through WriteWithHistory;
  otherwise keep the generic date+email submission write.
- serveFormUpdate: route through WriteWithHistory unconditionally — it
  stamps/historizes records and plain-writes non-records. Editing a
  tracking-number component in place now 422s (identity is the
  filename; renames are delete+create).
- Drop originator from required: in the per-party mdl/rsk forms and mark
  it readOnly, matching the rollup forms — it's server-derived from the
  party folder, so a create needn't send it.

Docs (AGENTS.md, ARCHITECTURE.md) updated for the converged wire
surface. Tests: in-dir record create composes + stamps audit +
folder-binds originator; in-dir update bumps revision and rejects an
in-place component edit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 14:48:52 -05:00
..
apps chore(embedded): cut v0.0.22-beta 2026-05-21 11:30:06 -05:00
archive refactor(archive): use shared zddc.ParseTransmittalFolder 2026-05-07 09:14:19 -05:00
auth feat(server): self-issued bearer tokens + --no-auth flag 2026-05-08 07:40:28 -05:00
cache fix(cache): root-escape guard in mirror walker purgeOrphans 2026-05-09 09:10:14 -05:00
config docs+server: document the .zddc bootstrap config + warn at startup 2026-05-19 12:40:47 -05:00
convert refactor(convert): wrapper-in-image owns the sandbox; Go just exec's binaries 2026-05-19 07:47:58 -05:00
fs fix(listing): synthetic table.yaml/form.yaml verbs reflect actual authority 2026-05-21 13:23:12 -05:00
handler refactor(records): converge all record-write paths on WriteWithHistory 2026-05-21 14:48:52 -05:00
jsonschema feat(forms): augment served schema with cascade field_codes + locks 2026-05-19 09:58:21 -05:00
listing feat(listing): per-entry verbs string for client-side capability gating 2026-05-21 08:14:25 -05:00
policy feat(listing): per-entry verbs string for client-side capability gating 2026-05-21 08:14:25 -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(records): simplest default tracking number + folder-bound originator 2026-05-21 14:31:49 -05:00
zipfs feat(zddc): serve a .zip as a virtual directory (zipfs + dispatch intercept) 2026-05-12 12:17:47 -05:00