diff --git a/zddc/internal/zddc/defaults.zddc.yaml b/zddc/internal/zddc/defaults.zddc.yaml index 4cffa80..2b12a03 100644 --- a/zddc/internal/zddc/defaults.zddc.yaml +++ b/zddc/internal/zddc/defaults.zddc.yaml @@ -206,7 +206,24 @@ paths: working: default_tool: browse available_tools: [browse] + # Project-level working is BOTH an outstanding-only aggregator of + # the per-party archive//working/ slots AND the home for + # each user's personal workspace at /working//. virtual: true + # Edit-history versioning for personal markdown drafts (inherits + # to the / homes below). archive//working/ carries + # its own history: true separately. + history: true + paths: + "*": + # Per-user personal workspace: /working//. + # auto_own (NOT auto_own_fenced) makes the creator the owner + # (rwcda + a .zddc they can edit) while leaving the home PUBLIC + # by default — the owner opts into privacy by adding + # inherit:false / restricting permissions in their own .zddc. + default_tool: browse + available_tools: [browse] + auto_own: true staging: default_tool: browse available_tools: [browse] diff --git a/zddc/internal/zddc/lookups_test.go b/zddc/internal/zddc/lookups_test.go index 028f463..366e9ab 100644 --- a/zddc/internal/zddc/lookups_test.go +++ b/zddc/internal/zddc/lookups_test.go @@ -49,10 +49,11 @@ func TestDefaultToolAt_FromEmbeddedConvention(t *testing.T) { } // TestHistoryAt_Defaults — the embedded convention enables edit-history -// versioning on archive//working/ and (because history is -// subtree-inheriting and ignores the auto_own_fenced homes' inherit:false) -// on the per-user homes and any depth beneath them. Sibling slots do not -// get history. +// versioning on BOTH (a) the project-level personal workspace +// /working/ + its per-user / homes, and (b) the per-party +// archive//working/ + its homes. History is subtree-inheriting and +// ignores the homes' inherit:false fences. Sibling slots (staging, +// reviewing, mdl, incoming, received) do NOT get history. func TestHistoryAt_Defaults(t *testing.T) { resetCache() root := t.TempDir() @@ -60,9 +61,17 @@ func TestHistoryAt_Defaults(t *testing.T) { path string want bool }{ + // Project-level personal workspace. + {filepath.Join(root, "Project-X", "working"), true}, + {filepath.Join(root, "Project-X", "working", "alice@example.com"), true}, + {filepath.Join(root, "Project-X", "working", "alice@example.com", "notes"), true}, + // Per-party working. {filepath.Join(root, "Project-X", "archive", "Acme", "working"), true}, {filepath.Join(root, "Project-X", "archive", "Acme", "working", "alice@example.com"), true}, {filepath.Join(root, "Project-X", "archive", "Acme", "working", "alice@example.com", "notes"), true}, + // Sibling slots get no history. + {filepath.Join(root, "Project-X", "staging"), false}, + {filepath.Join(root, "Project-X", "reviewing"), false}, {filepath.Join(root, "Project-X", "archive", "Acme", "mdl"), false}, {filepath.Join(root, "Project-X", "archive", "Acme", "incoming"), false}, {filepath.Join(root, "Project-X", "archive", "Acme", "staging"), false},