Repository navigation
Conversation
The plane guard's `--as` row listed the data reads to refuse, so any data verb missing from the list accepted `--as` and dropped it: `snapshot`, `export`, `schema show` and `branch list` did. One exhaustive classifier, `consumes_actor`, now answers for every command: engine `_as` writes and actor-bound cluster operations take `--as`, everything else refuses it. A family that holds both answers is matched to the subcommand, so a new command or subcommand does not compile until it is classified. Guard errors name the `branch` subcommand. The parity harness kept its own copy of the read list to decide where to pass `--as`. Its direct arm now takes the parity actor from `operator.actor`, which every write resolves and every read ignores, so the copy is gone.
…sifier # Conflicts: # crates/omnigraph-cli/src/planes.rs # crates/omnigraph-cli/tests/integration/parity_matrix.rs # crates/omnigraph-cli/tests/support/mod.rs
|
Recommendation: approve. Why
What
HowThe guard runs before dispatch and before a graph open. A false result from Mixed families match each subcommand, so a new variant fails to compile. Read-only families use ImpactThis is a breaking CLI change. Every Blocking findingsNone. Optional findings
Tradeoffs and liabilityThe old rule was a denylist of data-plane reads under capability The classifier matches dispatch on this head. These commands pass The fix removes the silent no-op and the second list in the harness. It adds one handwritten mirror of dispatch. A new command fails to compile until it has an arm. A command that stays true after it stops recording an actor would accept
This diff does not call Lance, open a dataset, or change storage. Pinned Lance 11.0.0 stays unchanged. No storage-cost row changes. A later Lance version does not affect this classifier. Open CLI pull requests do not change this flag contract. Pull request 1012 also edits branch-list CLI files, so a rebase will meet that diff. GitHub reports this head does not merge into current ValidationParent
Result: panic. All four accepted Head
Process check of the LimitationsThe parity integration suite did not run. The worktree had no CI on this commit ran The full CLI integration binary was not rerun here. Clippy on all targets of |
The merge with main shortened tuple-variant patterns, so one classifier arm now fits on a line. The breaking note also names the guard's new `branch` subcommand label, which a script matching the old error text would see.
|
Held until #1090 lands. #1090's |
Superseded by merged PR #1090 (
2c9eb1e051ef9366ff996c5b963d4773bb208b44). Its exhaustive actor classification, precise branch labels, operator-config parity actor and recorded-actor assertions are incorporated into the new target CLI and verified by the full CI and merge-queue gates.Follow-up to #1029, from the review on its
planes.rsthread.Problem
The plane guard's
--asrow for data commands was a list of reads to refuse. Any data verb missing from the list accepted--asand then ignored it.snapshot,export,schema showandbranch listall did this: they dispatch through the read resolver, which records no actor. The guard exists to refuse--aswhere it is a silent no-op, and a new read subcommand would have joined the gap by default.The parity harness (
run_bothintests/support/mod.rs) kept its own string copy of that list to decide where to pass--as, and the two copies could drift apart.Change
consumes_actor(cmd)incrates/omnigraph-cli/src/planes.rsanswers for every command.--asapplies to engine_aswrites and to actor-bound cluster operations:cluster planchecks the intended actor, andapplyandupgrade-ledgerattribute it. Everything else refuses it. The guard's--asrow is nowScopeFlag::As => consumes_actor(cmd).branch,blob,commit,schema,cluster) is matched down to the subcommand, so a new command or subcommand does not compile until it is classified. A family that only reads answers as a whole, so a subcommand added to it refuses--asuntil someone classifies it.command_labelnow names thebranchsubcommand, e.g.`branch list` is a data command; --as … does not apply.act-parityfromoperator.actorin its own operator home, instead of passing--as. Every write resolvesoperator.actorand every read ignores it, so the harness no longer keeps a read list, and an explicit--ason a read stays the guard's error. The parity rows still assert the direct arm'sactor_idon writes (blob put/clear,branch create/merge/delete), which shows the actor still arrives.Compatibility
This is breaking for scripts that pass
--astosnapshot,export,schema showorbranch list: those commands now refuse it, and the fix is to drop the flag. Seechangelog.d/as-refused-on-every-read.breaking.md. The CLI reference's--asrow now says every read command refuses it.Tests
planes::tests::scope_flag_matrix_matches_capabilities_issue_1023adds rows for every data verb's--asanswer:mutate,load,blob clear, the branch writes and reads,snapshot,export,schema showanddiff.planes::tests::as_refusal_names_the_subcommandpins the exact refusal text forbranch list,branch diff,commit show,snapshot,exportandschema show.branch listaccepting--as, and the label test becausebranch list --aspassed the guard.Run locally on this head (
RUST_MIN_STACK=16777216,cargo test -p omnigraph-cli -p omnigraph-server):parity_matrixrows, thecli_schema_configsuite and thecli_data--asowners: 66 passed;cargo fmt --all --check,scripts/check-docs.py,typosandscripts/check-agents-md.sh: clean.Before the rebase onto
main, the full CLI integration binary (323 passed) andcargo clippy -p omnigraph-cli --all-targets --locked -- -D warnings -W clippy::dbg_macrowere also clean on the identical change. I did not rerun clippy after the rebase because the machine was low on disk; CI's Lint job covers it.No Lance domain is involved: the change is CLI argument classification only.