Repository navigation
feat(dashboards): shared agent dashboard service and conditional editing - #51
Merged
Merged
Conversation
VibeSWE
commented
Oct 22, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=trueplus 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
f254fb7a11d12781912af21f77c77ab9b8c08a93syncs 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:
28fa0abf: CI passed Rust tests (774 default tests plus 17 Kafka tests), frontend checks/browser tests, and standalone/distributed integration smoke tests.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.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.