Skip to content

ACL zones: zone-based rights, implicit creator write, agent-keyed discovery - #1254

Draft
joepio wants to merge 15 commits into
developfrom
cursor/acl-zones-5ab2
Draft

ACL zones: zone-based rights, implicit creator write, agent-keyed discovery#1254
joepio wants to merge 15 commits into
developfrom
cursor/acl-zones-5ab2

Conversation

@joepio

@joepio joepio commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

ACL zones, agent-keyed pkarr discovery, DID open/share hints, and related planning (atomic: URI rename remains planning-only).

CI chase (resolved)

  1. e2e oxlint padding + pre-commit oxlint --fix
  2. data-browser oxfmt on DID open / overlay files
  3. Dagger mount for testdata/resolve-agent-response.json
  4. Auth: check_append no longer falls back to write on the new child (implicit creator write hole). Append only on zone(parent) per planning/zones.md.

Benchmarks (zones PR vs develop)

New Criterion suite: cargo bench -p atomic_lib --bench rights_bench --features db-redb.

Same machine, --measurement-time 5. Public-deny path (must walk ancestors) is where depth hurts:

check depth develop zones PR
check_read public deny 10 1.09ms 0.60ms (~1.8×)
check_read public deny 25 2.76ms 1.32ms (~2.1×)
check_read public deny 50 5.54ms 2.46ms (~2.3×)

Owner allow stays ~2µs on both (already O(1) via drive stamp / creator short-circuit). Create-200 and width-1000 are within noise (~same / ~1.09×). Shallow public deny (depth 1) is slightly slower on zones. Remaining O(depth) on deny is zone derivation walking parents — the persisted zone index in planning/zones.md is still TODO.

Status

Main (Mancave) CI was green on 64cb145f; rights_bench added after.

Test plan

  • Local unauthorized/authorized COMMIT sync + hierarchy/zones + drive_rights
  • CI Main (Mancave) green
  • Criterion rights_bench vs develop worktree
Open in Web Open in Cursor 

@gitguardian

gitguardian Bot commented Aug 5, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
26549932 Triggered Generic High Entropy Secret 02abcda lib/src/discovery.rs View secret
26549932 Triggered Generic High Entropy Secret 02abcda lib/src/discovery.rs View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

cursoragent and others added 7 commits August 20, 2026 13:51
…scovery

Introduce zone roots (ACL-bearing or parentless resources) as the unit of
access control: check_rights resolves the nearest zone and evaluates only that
ACL (nested zones replace outer ones). Drop per-genesis write insertion in
favor of implicit creator write via genesis_signer so every DID resource is
not accidentally a zone.

Add agent-keyed pkarr publish/resolve (agent Ed25519 key is the pkarr key,
optional public zone DID) aligned with DID/mainline discovery; keep legacy
drive-keyed announces during migration. Server announces the agent record at
boot.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
Wire DID resolving into the data-browser and OS deep-link path:

- Cmd+K / search parse pasted did:ad:… and offer Open DID
- atomic://open?subject=&agent=&node= plus bare did:ad: deep links
- GET /resolve-agent for pkarr agent→NodeID lookup
- Error page “Try N known devices” when a DID is missing locally
- Android (Tauri + Flutter) accepts did: and atomic://; desktop queues both

Known peers (Sync paired devices) are the contacts fallback when the link
has no node/agent hint.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
Copy link from the Share dialog/page now builds HTTPS show URLs (or
atomic://open in Tauri) with agent + node query params so recipients can
pkarr-resolve or dial without a drive hint. Invite URLs carry the same
hints. Show route reads agent/node and runs DidResolveOnShow on open.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
Add stubbed vitest for resolve order and /resolve-agent contract fields,
proxy /resolve-agent in Vite so browser tabs can look up agents, and a
Playwright suite for search Open DID, share-link hints, show-URL dials,
and ErrorPage known-device fallback.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
Cmd+K / nav Search opened OverlayContainer, not routes/Search/SearchOverlay,
so paste-DID never showed Open DID. Port resolve+row there, relax e2e
assertions, and confirm did-open.spec (5) green.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
Capture canonical opaque atomic: grammar (no //), did:ad: read aliases,
Copy link emit rules, and migration checklist while still in beta.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
After rebase onto develop's Active/Landed index, zones is In progress and
atomic-uris is Active; link the landed node-id rule to the pending prefix
rename.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
@cursor
cursor Bot force-pushed the cursor/acl-zones-5ab2 branch from d01aa95 to c7541aa Compare August 20, 2026 13:53
cursoragent and others added 8 commits August 20, 2026 17:46
Satisfy CI cargo fmt --check after the develop rebase.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
CI fails fast on format; make the agent checklist explicit so pushes are not
redded by rustfmt drift.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
Ship a root pre-commit hook (cargo fmt + oxfmt on staged files) and teach
agents to enable it and to monitor gh pr checks after every push.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
Also run oxlint --fix from the pre-commit hook so stylistic rules
that oxfmt misses are caught before push.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
CI format-check failed on OverlayContainer, didResolve, SearchOverlay,
and ErrorPage after the e2e lint fix unblocked the later lint step.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
jsBuild already mounts pairing-request.json at /testdata for the
relative ../../../../testdata path; didResolve.test.ts needs the same
for resolve-agent-response.json.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
Falling back to write on the new child let any genesis signer create
under any parent once creator write became implicit. Match zones.md:
append (or write→append) on zone(parent) only; born zones stay open.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
Measures check_rights across parent-chain depth, sibling width, and
create-under-drive so zones can be compared against develop.

Co-authored-by: Joep Meindertsma <joep@ontola.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants