omnigraph policy validate|test|explain --cluster <dir> --graph <id> refuses the
cluster layout the documentation prescribes.
select_cluster_policy (crates/omnigraph-cli/src/helpers.rs) matches every bundle
whose applies_to contains graph.<id> or cluster, then refuses when more
than one matches:
graph `knowledge` in cluster `./company-brain` matches 2 policy bundles ([graph, server]);
the cluster model expects one bundle per graph scope
Both docs/user/operations/policy.md and skills/omnigraph/references/server-policy.md
document exactly that layout: one bundle bound to a graph id, a second bound to
cluster (which is what grants graph_list, and now config_manage). So the
policy commands are unusable on a normal cluster.
Two related defects in the same selector:
- A
cluster bundle is always compiled as a graph bundle
(PolicyEngine::load_graph_from_source), so its graph_list / config_manage
rules are rejected by the kind check. A cluster whose only bundle is the
cluster one therefore fails policy validate outright.
policy explain --action graph-list evaluates against the graph bundle rather
than the bundle the server actually asks.
The server does not have this problem: crates/omnigraph-server/src/settings.rs
routes bindings to slots (one bundle per graph, one cluster bundle) and asks the
bundle that owns each request. The CLI had drifted from that model.
Expected: the policy commands select a bundle per request the way serving does —
graph actions from the --graph bundle, graph_list / config_manage from the
cluster bundle, with no fallback between scopes.
Existing CLI coverage only ever applied a single bundle, so nothing caught this.
omnigraph policy validate|test|explain --cluster <dir> --graph <id>refuses thecluster layout the documentation prescribes.
select_cluster_policy(crates/omnigraph-cli/src/helpers.rs) matches every bundlewhose
applies_tocontainsgraph.<id>orcluster, then refuses when morethan one matches:
Both
docs/user/operations/policy.mdandskills/omnigraph/references/server-policy.mddocument exactly that layout: one bundle bound to a graph id, a second bound to
cluster(which is what grantsgraph_list, and nowconfig_manage). So thepolicy commands are unusable on a normal cluster.
Two related defects in the same selector:
clusterbundle is always compiled as a graph bundle(
PolicyEngine::load_graph_from_source), so itsgraph_list/config_managerules are rejected by the kind check. A cluster whose only bundle is the
clusterone therefore failspolicy validateoutright.policy explain --action graph-listevaluates against the graph bundle ratherthan the bundle the server actually asks.
The server does not have this problem:
crates/omnigraph-server/src/settings.rsroutes bindings to slots (one bundle per graph, one
clusterbundle) and asks thebundle that owns each request. The CLI had drifted from that model.
Expected: the policy commands select a bundle per request the way serving does —
graph actions from the
--graphbundle,graph_list/config_managefrom theclusterbundle, with no fallback between scopes.Existing CLI coverage only ever applied a single bundle, so nothing caught this.