Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

docs(evendrive): unify inherited-walk semantics at both walk sites (R1-L3)

M7a8f9feb4842
diff --git a/control-ui/components/gfsInheritedAccess.ts b/control-ui/components/gfsInheritedAccess.ts
index 2642e9719..01f93b1f6 100644
--- a/control-ui/components/gfsInheritedAccess.ts
+++ b/control-ui/components/gfsInheritedAccess.ts
@@ -23,7 +23,26 @@ export { planInheritedRoleChange, strongestInheritedSource } from './gfsInherite
* (R1-H1).
*/
-/** `/docs/report.md` → `['/docs', '/']` (nearest ancestor first). */
+/**
+ * Walk semantics (R1-L3, unified with the desktop walk in
+ * desktop-app/ui/src/gfs/inheritedAccess.ts):
+ * - BOUNDED in depth: at most GFS_INHERITED_WALK_MAX_DEPTH ancestors are
+ * visited (the desktop rid-chain walk bounds itself with the same number
+ * via GFS_BREADCRUMB_MAX_DEPTH).
+ * - BEST-EFFORT skip-and-continue: an ancestor that cannot be resolved or
+ * whose ACL cannot be listed (moved, deleted, rate-limited, unviewable) is
+ * skipped and the walk CONTINUES with the remaining ancestors — per-ancestor
+ * failures never fail the derivation. Only a walk that resolves NO ancestor
+ * at all reports a total failure (R1-M3).
+ * - Because this walk addresses ancestors by canonical PATH, each ancestor is
+ * independent: skipping one still leaves every higher path reachable. The
+ * desktop walk chains parent ids instead and can only stop when an ancestor
+ * cannot be resolved at all — that single divergence is documented at its
+ * walk site.
+ */
+const GFS_INHERITED_WALK_MAX_DEPTH = 64
+
+/** `/docs/report.md` → `['/docs', '/']` (nearest ancestor first, depth-capped). */
export function gfsAncestorPaths(path: string): string[] {
const segments = (path.startsWith('/') ? path : `/${path}`)
.split('/')
@@ -34,7 +53,8 @@ export function gfsAncestorPaths(path: string): string[] {
ancestors.push(`/${segments.slice(0, count).join('/')}`)
}
ancestors.push('/')
- return ancestors
+ // Nearest-first cap, mirroring the desktop rid-chain walk's bound.
+ return ancestors.slice(0, GFS_INHERITED_WALK_MAX_DEPTH)
}
interface InheritingRow {
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index aa6fe2991..5340e6d03 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.592",
+ "version": "0.1.593",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.592",
+ "version": "0.1.593",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/frontend-components": "file:../packages/frontend-components",
diff --git a/control-ui/package.json b/control-ui/package.json
index a2f38f71b..7174bcbb0 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.592",
+ "version": "0.1.593",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",
diff --git a/desktop-app/ui/src/gfs/inheritedAccess.ts b/desktop-app/ui/src/gfs/inheritedAccess.ts
index 6a64d117d..ff3732138 100644
--- a/desktop-app/ui/src/gfs/inheritedAccess.ts
+++ b/desktop-app/ui/src/gfs/inheritedAccess.ts
@@ -25,6 +25,22 @@ function ridOf(resourceId: string): string {
return resourceId.replace(/-/g, '').toLowerCase()
}
+/**
+ * Walk semantics (R1-L3, unified with the control-ui walk in
+ * control-ui/components/gfsInheritedAccess.ts):
+ * - BOUNDED in depth: at most GFS_BREADCRUMB_MAX_DEPTH ancestors are visited
+ * (the control-ui path walk caps itself with the same number via
+ * GFS_INHERITED_WALK_MAX_DEPTH).
+ * - BEST-EFFORT skip-and-continue: an ancestor whose ACL cannot be listed
+ * (view-ACL = manage-ACL server-side) is skipped and the walk CONTINUES
+ * upward — per-ancestor failures never fail the derivation.
+ * - One documented divergence: this walk chains parent ids, so each ancestor
+ * is only reachable by resolving the one below it. An ancestor that cannot
+ * be RESOLVED at all therefore ends the walk — its parent id (the only
+ * route to higher ancestors) is unavailable. The control-ui walk addresses
+ * ancestors by canonical path instead and skips unresolvable ones while
+ * continuing with the rest.
+ */
export async function deriveGfsInheritedAccess(
resourceId: string,
drive: string = DEFAULT_DRIVE