feat(server): enable edit-history on the project-level personal workspace
Per the working-folder design: <project>/working/<email>/ is each user's personal workspace (public by default, owned by the creator who can privatize via .zddc). The post-reshape defaults had stripped that node to a bare aggregator, so personal markdown drafts got no history. Add history: true + an auto_own (un-fenced) per-user-home rule to the project-level working node. archive/<party>/working/ keeps its own history: true. Scope stays working-only (staging/reviewing unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e58e66a49c
commit
c489a78f34
2 changed files with 30 additions and 4 deletions
|
|
@ -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/<party>/working/ slots AND the home for
|
||||
# each user's personal workspace at <project>/working/<email>/.
|
||||
virtual: true
|
||||
# Edit-history versioning for personal markdown drafts (inherits
|
||||
# to the <email>/ homes below). archive/<party>/working/ carries
|
||||
# its own history: true separately.
|
||||
history: true
|
||||
paths:
|
||||
"*":
|
||||
# Per-user personal workspace: <project>/working/<email>/.
|
||||
# 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]
|
||||
|
|
|
|||
|
|
@ -49,10 +49,11 @@ func TestDefaultToolAt_FromEmbeddedConvention(t *testing.T) {
|
|||
}
|
||||
|
||||
// TestHistoryAt_Defaults — the embedded convention enables edit-history
|
||||
// versioning on archive/<party>/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
|
||||
// <project>/working/ + its per-user <email>/ homes, and (b) the per-party
|
||||
// archive/<party>/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},
|
||||
|
|
|
|||
Loading…
Reference in a new issue