Skip to content

feat(dashboards): shared agent dashboard service and conditional editing - #51

Merged
VibeSWE merged 7 commits into
mainfrom
dashboard/prerequisite-agent-api
Oct 22, 2026
Merged

VibeSWE merged 7 commits into
mainfrom
dashboard/prerequisite-agent-api

Conversation

@VibeSWE

@VibeSWE VibeSWE commented Oct 19, 2026 •

Copy link
Copy Markdown

REST, the native frontend, and dashboard tools now share authoritative dashboard reads and conditional mutations. The service adds ID-addressed patches, revisions/ETags, durable retry receipts, title reservations, locators, tombstones, and local/cloud conditional-storage adapters. Configuration validation stays separate from explicit bounded SQL, builder, and PromQL execution. External dashboard mutations require P_DASHBOARD_AGENT_WRITES=true plus operation-specific RBAC, tenant, and owner/admin checks.

Legacy REST compatibility repairs preserve modified-descending listing, existing limit/tag behavior, plaintext error contracts, typed create/replace/add-tile validation, and unkeyed PUT without a client revision. Such PUT captures a source revision server-side and uses conditional storage; clients must send their observed revision to detect changes made before the request. Malformed stored JSON is skipped during listing. Tool discovery retains its Query authorization and suspension gate. PATCH and agent mutations retain strict validation and explicit revision requirements.

LocalFS metadata uses persistent lock generations and read-only metadata reads. Review found that newly created object-directory ancestors were not synced. Commit f254fb7a11d12781912af21f77c77ab9b8c08a93 syncs ancestors through the storage root under the exclusive metadata lock, including preexisting directories created by concurrent writers and directories recreated after deletion. The regression failed before the fix and passes afterward. This adds directory-sync work to each exclusive metadata operation; its cost has not been benchmarked.

Validation:

  • Previous head 28fa0abf: CI passed Rust tests (774 default tests plus 17 Kafka tests), frontend checks/browser tests, and standalone/distributed integration smoke tests.
  • Current head f254fb7a: local LocalFS suite passed all 13 tests; full library suite passed 775 tests with one ignored; library Clippy passed. The directory-sync regression covers absent and preexisting-unsynced hierarchies, concurrent creators, tenant paths, and recreation with a nonzero lock generation. Strace confirms real directory fsync calls; no physical power-loss test was performed.
  • Current-head CI passed Rust default/Kafka tests, Clippy, frontend unit/browser/build checks, image build, and standalone/distributed Quest smoke tests. Independent review of the durability repair found no new actionable issues; the original finding is resolved. The local all-targets Clippy attempt reported errors in other test files; the repository CI lint workflow passed on this head.

The first independent review found only the directory-sync issue above. The fix was independently verified and its inline thread is resolved. The concurrent keyed-create race fix is isolated in dependent PR #52 and should follow this PR.

Deployment qualification remains incomplete: verify live S3/MinIO, Azure, and GCS conditional writes and CPU/RAM costs before rollout. Listing reads all tenant dashboard documents before filtering/pagination. Unsupported conditional writes fail explicitly. All writers must use the new protocol; mixed old/new serving nodes and rollback with tombstones are unsupported. LocalFS requires stopping and upgrading all writers together, and private lock files must be retained. The storage root's own entry in its parent is outside this directory-sync repair. Interrupted operations may require operator recovery. This PR does not claim measured performance gains or physical power-loss qualification.

Comment thread src/storage/localfs.rs
create_dir_all can create .users, .dashboard-titles, .dashboard-locations
or an owner's dashboards directory, but only the object's immediate parent
was fsynced, so an acknowledged first write could depend on unsynced
directory entries. Under the exclusive lock, fsync every ancestor from the
object's grandparent to the storage root before mutating. Existence and a
nonzero lock generation do not prove durability (a concurrent opener may
have created the directory without syncing, and prefix deletes keep locks),
so the chain is synced on every exclusive operation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@VibeSWE
VibeSWE marked this pull request as ready for review October 22, 2026 20:00
@VibeSWE
VibeSWE merged commit 8cd64c6 into main Oct 22, 2026
15 checks passed
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.

1 participant