ZDDC/zddc/internal/handler
ZDDC db110665f0 feat(server): flat top-level party peers + pure-WORM archive (impl)
Reshape the project layout from "archive/ is the only physical dir + six
virtual aggregators" to a flat set of physical, party-partitioned peers:

  archive/<party>/{received,issued}   pure WORM (one rule, no exceptions)
  incoming|reviewing|working|staging/<party>/   workspaces
  mdl|rsk/<party>/*.yaml              registers (cross-party aggregate at the
                                      peer root, $party from the real subdir)
  ssr/<party>.yaml                    submittal status register AND the
                                      authoritative party registry

A party exists iff ssr/<party>.yaml exists; the new `party_source: ssr`
cascade key gates party-folder creation under every other peer (archive
included) — create <peer>/<party> only when the registry row exists, else
409. Registration is a plain create of ssr/<party>.yaml (no WORM gymnastics),
so archive/ stays purely WORM.

Server core:
- defaults.zddc.yaml rewritten to the flat-peer + WORM-archive + party_source
  shape; every virtual: removed; mdl/rsk get document_controller rwcd.
- slots.go: projectPeers/IsProjectPeer; perPartySlots={received,issued}.
- party_source key end-to-end (file.go/walker/lookups/cascade) + PartyRegistered.
- ensure.go canonical-ancestors generalized to peers; virtual reject removed.
- virtualviews.go: deleted the virtual-URL resolver/types/regex; kept
  ListParties (reads ssr/*) + repointed ListRollupRows (physical <peer>/*/*).
- fs/tree.go: mdl/rsk peer-root listing aggregates physical party subdirs
  (replaces the subdir folder-nav); ssr flat; spec entries advertised.
- fileapi.go: deleted virtual PUT/DELETE rewrites; mkdir allowlist → peers;
  partySourceGate on mkdir/PUT/move.
- virtualviewhandler.go → ServeInjectedRow ($party/name injected on read so
  the tables client renders the column unchanged).
- ssr/form/table handlers repointed to real paths (SSR create writes
  ssr/<party>.yaml; rollup create writes mdl|rsk/<party>/<file>.yaml; SSR
  rename is registry-only); IsDefaultSpec recognizes the new spec locations.
- accept-transmittal source incoming/<party>/<txn> (+ PartyRegistered guard);
  plan-review scaffolds top-level reviewing/<party> + staging/<party>.
- main.go dispatch: removed virtual-row GET + folder-nav 302; injects the
  source column on register-row reads.

Non-test build is green. Test suites still assert the OLD layout (verified:
all current failures are stale expectations, not bugs) — the test rewrite,
browse/tables client updates, and the data-migration script follow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 11:40:09 -05:00
..
accepthandler.go feat(server): flat top-level party peers + pure-WORM archive (impl) 2026-06-03 11:40:09 -05:00
accepthandler_test.go feat: reviewing/ lifecycle — Plan Review endpoint, virtual received window, browse context-menu workflows 2026-05-15 16:08:04 -05:00
admin_helpers.go chore: elevation slot in every tool + docs + helper file splits + smell cleanup 2026-05-14 12:15:41 -05:00
archivehandler.go feat(http): include missing_verb in ACL-deny 403 bodies 2026-05-21 08:14:49 -05:00
archivehandler_test.go refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
auth_invariants_test.go test(handler): un-skip the profile existence-hiding invariant 2026-05-21 16:41:29 -05:00
authcheck.go refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
authcheck_test.go refactor: unified listing protocol + form-editor retirement + admin elevation 2026-05-14 12:15:07 -05:00
converthandler.go refactor(convert): wrapper-in-image owns the sandbox; Go just exec's binaries 2026-05-19 07:47:58 -05:00
cors.go feat(server): authenticated CRUD + verb-based RBAC with WORM archive folders 2026-05-05 15:58:04 -05:00
cors_test.go feat(zddc-server): admin debug page + X-Auth-Request-Email default + hidden-segment guard 2026-04-28 14:02:06 -05:00
default-mdl.form.yaml refactor(records): converge all record-write paths on WriteWithHistory 2026-05-21 14:48:52 -05:00
default-mdl.table.yaml feat(records): simplest default tracking number + folder-bound originator 2026-05-21 14:31:49 -05:00
default-project-mdl.form.yaml feat(form): ui:mirrorFrom — reflect a sibling field into a read-only field 2026-05-21 15:44:43 -05:00
default-project-mdl.table.yaml feat(records): simplest default tracking number + folder-bound originator 2026-05-21 14:31:49 -05:00
default-project-rsk.form.yaml feat(form): ui:mirrorFrom — reflect a sibling field into a read-only field 2026-05-21 15:44:43 -05:00
default-project-rsk.table.yaml refactor: nest lifecycle slots per-party + add virtual top-level aggregators 2026-05-21 07:57:45 -05:00
default-rsk.form.yaml refactor(records): converge all record-write paths on WriteWithHistory 2026-05-21 14:48:52 -05:00
default-rsk.table.yaml feat: per-party RSK + project-level SSR/MDL/RSK rollup tables 2026-05-18 21:47:56 -05:00
default-ssr.form.yaml feat(forms): cascade-driven filename composition + audit on row create 2026-05-19 09:55:07 -05:00
default-ssr.table.yaml feat: per-party RSK + project-level SSR/MDL/RSK rollup tables 2026-05-18 21:47:56 -05:00
directory.go feat(http): include missing_verb in ACL-deny 403 bodies 2026-05-21 08:14:49 -05:00
directory_test.go refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
errors.go feat(http): include missing_verb in ACL-deny 403 bodies 2026-05-21 08:14:49 -05:00
fileapi.go feat(server): flat top-level party peers + pure-WORM archive (impl) 2026-06-03 11:40:09 -05:00
fileapi_test.go refactor(history): store under .zddc.d/history/; drop .history carve-out + dead .devshell 2026-06-02 13:48:41 -05:00
formhandler.go feat(server): flat top-level party peers + pure-WORM archive (impl) 2026-06-03 11:40:09 -05:00
formhandler_test.go refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
history.go refactor(history): store under .zddc.d/history/; drop .history carve-out + dead .devshell 2026-06-02 13:48:41 -05:00
history_test.go refactor(history): store under .zddc.d/history/; drop .history carve-out + dead .devshell 2026-06-02 13:48:41 -05:00
logring.go feat(zddc-server): user profile page replaces /.admin/ 2026-04-29 16:32:02 -05:00
logring_test.go feat(zddc-server): admin debug page + X-Auth-Request-Email default + hidden-segment guard 2026-04-28 14:02:06 -05:00
mdhistory_test.go refactor(history): store under .zddc.d/history/; drop .history carve-out + dead .devshell 2026-06-02 13:48:41 -05:00
middleware.go refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
middleware_test.go test: lock down elevation gate, .zddc write matrix, audit-log attribution 2026-05-18 16:29:43 -05:00
paths.go refactor(history): store under .zddc.d/history/; drop .history carve-out + dead .devshell 2026-06-02 13:48:41 -05:00
planreview.go feat(server): flat top-level party peers + pure-WORM archive (impl) 2026-06-03 11:40:09 -05:00
planreview_test.go fix(roles): restate document_controller at project_team slot grants 2026-05-21 11:03:42 -05:00
profile_assets.go refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
profilehandler.go perf(server): scope /.profile/access?path= to the requested location only 2026-06-01 13:23:22 -05:00
profilehandler_test.go perf(server): scope /.profile/access?path= to the requested location only 2026-06-01 13:23:22 -05:00
profilepage.go refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
profileprojects.go refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
profileprojects_test.go feat: project creation gated by cascade ActionCreate, not hardcoded admin 2026-05-18 10:25:19 -05:00
projecthandler.go refactor(zddc-server): demote routing-shape redirects from 301 to 302 2026-05-10 14:37:02 -05:00
projecthandler_test.go refactor(landing): project landing is now a single-file SPA, not server-rendered 2026-05-10 07:57:30 -05:00
projectshandler.go fix(policy): read-path ACL honors admin bypass via AllowFromChainP 2026-05-18 09:54:46 -05:00
singleflight.go feat(zddc): MD→{docx,html,pdf} server-side conversion via stock pandoc + chromium containers 2026-05-13 10:33:56 -05:00
ssrhandler.go feat(server): flat top-level party peers + pure-WORM archive (impl) 2026-06-03 11:40:09 -05:00
ssrhandler_test.go feat: per-party RSK + project-level SSR/MDL/RSK rollup tables 2026-05-18 21:47:56 -05:00
static.go Initial commit 2026-04-27 11:05:47 -05:00
subtreezip.go refactor(audit): pre-release cleanup pass 2026-05-18 16:28:07 -05:00
subtreezip_test.go refactor: virtual file extensions for subtree zip + MD conversion 2026-05-14 12:23:37 -05:00
tablehandler.go feat(server): flat top-level party peers + pure-WORM archive (impl) 2026-06-03 11:40:09 -05:00
tablehandler_test.go feat: per-party RSK + project-level SSR/MDL/RSK rollup tables 2026-05-18 21:47:56 -05:00
tables.html chore(embedded): cut v0.0.27-beta 2026-06-03 08:55:39 -05:00
tokenhandler.go feat(server): self-issued bearer tokens + --no-auth flag 2026-05-08 07:40:28 -05:00
tokenhandler_test.go feat(server): self-issued bearer tokens + --no-auth flag 2026-05-08 07:40:28 -05:00
virtualviewhandler.go feat(server): flat top-level party peers + pure-WORM archive (impl) 2026-06-03 11:40:09 -05:00
wormbypass_test.go test(handler): lock-in invariants for admin/elevation/WORM behavior 2026-05-18 09:12:37 -05:00
zddcfile.go feat(zddcfile): ?effective=1 composed-cascade inspection query 2026-05-21 09:39:29 -05:00
zddcfile_test.go feat(zddcfile): ?effective=1 composed-cascade inspection query 2026-05-21 09:39:29 -05:00
ziphandler.go feat(zddc): serve a .zip as a virtual directory (zipfs + dispatch intercept) 2026-05-12 12:17:47 -05:00
ziphandler_test.go feat(zddc): serve a .zip as a virtual directory (zipfs + dispatch intercept) 2026-05-12 12:17:47 -05:00