Skip to content

fix(cli): accept --as on commit publish and drop - #1029

Merged
ragnorc merged 3 commits into
ModernRelay:mainfrom
ragnorc:claude/jovial-williams-1d29d6
Oct 17, 2026
Merged

ragnorc merged 3 commits into
ModernRelay:mainfrom
ragnorc:claude/jovial-williams-1d29d6

Conversation

@ragnorc

@ragnorc ragnorc commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #1023

Problem

commit publish and commit drop are writes: the CLI dispatches both through GraphClient::resolve_with_policy with cli.as_actor, and the engine runs them through publish_commit_as / drop_commit_as. The plane guard in crates/omnigraph-cli/src/planes.rs classified every Command::Commit as a read and refused --as, so on a direct graph these two commands could only take operator.actor, and the --as path was unreachable. The GQ spelling (mutate -e 'commit publish "<id>"' --as X) already accepted it.

Change

  • The --as row of the guard now matches the commit subcommands exhaustively: publish and drop take --as; list, show and changes still refuse it. A new commit subcommand will not compile until it is classified.
  • command_label descends into commit, so guard errors name the subcommand (`commit list` is a data command; --as … does not apply).
  • The comment that called all of commit a read is corrected, as is the parity harness's read list in tests/support/mod.rs, which mirrors the guard.
  • A served publish or drop still refuses --as in resolve_with_policy_scope before any request; the test verifies this.

What --as does here

A publication records no publisher. The published commit keeps the actor_id and created_at of the write that created it, as the unpublished-commits RFC specifies, and a drop records no actor. On these commands --as names the actor for the engine's commit_publish / commit_drop policy check. A direct CLI open installs no policy, so nothing about the commit changes on a direct graph. The branching guide now states that a published commit keeps its original actor.

Tests

  • planes::tests::scope_flag_matrix_matches_capabilities_issue_1023 (renamed owner): rows for commit list, show, publish and drop.
  • cli_data::commit_publish_and_drop_take_as_on_a_direct_graph_issue_1023:
    • proposes a commit with --as act-author and publishes it with --as act-reviewer; the published commit is on main with actor_id act-author;
    • drops a second proposal with --as; it no longer resolves and the unpublished listing is empty;
    • commit list/show/changes --as are refused;
    • served commit publish/drop --as are refused before any request.
  • Both tests failed before the fix with `commit` is a data command; --as … does not apply.

Run locally:

  • RUST_MIN_STACK=16777216 cargo test -p omnigraph-cli -p omnigraph-server --bin omnigraph: 165 passed.
  • The new test, the --as/Blob tests in cli_data, and all 37 parity_matrix rows pass. Under heavy machine load some parity rows first hit the 30 s server-readiness deadline; each passed on rerun.
  • cargo fmt --all --check, cargo clippy -p omnigraph-cli --all-targets --locked -- -D warnings -W clippy::dbg_macro, scripts/check-docs.py and typos are clean.

No Lance domain is involved: the change is CLI argument classification only.

The plane guard classified every `commit` subcommand as a read and refused
`--as`, so `commit publish` and `commit drop` against a direct graph could
only attribute `operator.actor`, although both dispatch through the write
resolver and the engine's `_as` entry points. The guard now matches the
`commit` subcommands exhaustively: publish and drop take `--as` on a direct
target, while list, show and changes still refuse it. A served publish or
drop still refuses `--as` before any request. Guard errors name the
subcommand (`commit list`, ...).

The published commit keeps the actor of the write that created it; the
branching guide now says so.
@ragnorc
ragnorc requested a review from aaltshuler as a code owner October 16, 2026 23:06
Comment thread crates/omnigraph-cli/tests/integration/cli_data.rs
Comment thread crates/omnigraph-cli/tests/integration/cli_data.rs Outdated
Comment thread crates/omnigraph-cli/src/planes.rs
@cursor

cursor Bot commented Oct 17, 2026

Copy link
Copy Markdown

Review: fix(cli): accept --as on commit publish and drop (head 2d256564)

Recommendation: approve. It can merge when ready. I found 0 blocking and 4 optional findings. This is a comment because the tool I used can only post comments, not an approval.

What the change does

  • The --as row in the plane guard now splits commit exhaustively. publish and drop accept --as. list, show and changes still refuse it (crates/omnigraph-cli/src/planes.rs:200-220).
  • Guard errors now name the subcommand (`commit list`), not only `commit` (planes.rs:361-367).
  • The parity harness read list, the CLI reference, the branching guide and a changelog note are updated to match.

Contract check (correctness)

  • Direct path: the guard passes, then resolve_with_policy, then resolve_cli_actor (--as, else operator.actor), then GraphClient::Embedded { actor }, then publish_commit_as / drop_commit_as, then enforce_commit_control (client.rs:1620-1626, client.rs:1655-1660, omnigraph.rs:3874, omnigraph.rs:3947). The --as path in main.rs:957-1015 is now reachable, which closes CLI: commit publish and commit drop reject --as although they write #1023 as written.
  • Served path: the guard now passes, so the refusal moves to resolve_with_policy_scope. It refuses --as before any request (client.rs:482-491). The new test proves no request is sent. Invariant 10 (trust at the boundary) holds: a client still cannot supply a trusted actor to a server.
  • Reads: commit list/show/changes --as still fail. The test checks all three.
  • Matches existing behaviour: branch create and branch delete already accept --as on a direct graph and use the actor only for the _as policy gate (omnigraph.rs:3481, omnigraph.rs:3641). The GQ form mutate -e 'commit publish "<id>"' --as X also accepts it. After this PR, the CLI verb and the GQ statement follow the same rule.

Tradeoff, stated plainly

Today, on a direct graph, --as on publish or drop has no observable effect:

  • A direct CLI open installs no policy (client.rs:589, Omnigraph::open), so enforce returns before it reads the actor (omnigraph.rs:1053).
  • Publish and drop record no actor. The unpublished-commits RFC says "This release does not add durable approval or publisher provenance."

The PR body says this openly. The guard's own comment says to reject --as where it is a silent no-op, so there is some tension. I accept the PR's position: the deciding question is whether the command is a write that goes through an _as entry point, which is the same rule branch create/delete already use. The other fix (keep refusing --as and delete the dead path in main.rs) would make the verb and the GQ statement disagree. It would also have to be undone when a direct open installs a policy or when publisher provenance is added.

Liability: low. There is no format, protocol or storage change, and no Lance domain is involved. The exhaustive match lowers future drift for commit.

Regression proof (my runs)

Environment: worktree at 2d2565648975acff1ead7406f948139d40f183a1 (base 9c2b3679), Rust 1.97.1, protoc 3.21.12, RUST_MIN_STACK=16777216.

  1. Before the fix, the test fails for the predicted reason. I restored only crates/omnigraph-cli/src/planes.rs from 9c2b3679 and kept the PR's test.
    cargo test -p omnigraph-cli --locked --test integration -- cli_data::commit_publish_and_drop_take_as_on_a_direct_graph_issue_1023 --exact
    Result: FAILED at the commit publish --as step, with stderr `commit` is a data command; --as sets the actor for a direct-engine or actor-bound cluster operation and does not apply.
  2. Mutation check on the unit row. On the head, I changed Publish | Drop => true to false.
    cargo test -p omnigraph-cli --locked --bin omnigraph planes::tests::scope_flag_matrix_matches_capabilities_issue_1023
    Result: FAILED with As on 'commit publish' (Any), left: false, right: true.
  3. On the exact head (restored, git diff --quiet HEAD clean):
    • cargo test -p omnigraph-cli --locked --bin omnigraph planes:: gives 4 passed.
    • cargo test -p omnigraph-cli --locked --test integration -- cli_data::commit_publish_and_drop_take_as_on_a_direct_graph_issue_1023 cli_data::as_on_a_served_write_is_rejected cli_data::optimize_with_as_flag_errors plus 7 cli_data::blob* tests gives all passed.
    • Parity rows that pass through the edited harness list: parity_commit_list, parity_commit_list_branch, parity_commit_changes, parity_commit_changes_filtered, parity_blob_put_and_clear_share_receipts_and_refusals, parity_blob_stat_preserves_exact_managed_and_external_metadata, parity_branch_create_delete give 7 passed.
  4. Manual probe of the new doc claim. I proposed with --as act-author, waited 1.2 s, then ran commit publish --as act-reviewer. actor_id stayed act-author and created_at stayed the same (1792198816972432) in the publish answer and in commit show.

A .gqt case cannot express this defect (CLI flag classification), so the in-source matrix row plus the CLI integration test are the right tiers.

Limits:

  • I did not run the full workspace gate, clippy or fmt locally. CI on this head shows 28 pass, 5 skipped, 0 fail.
  • No test can show that the --as value reaches publish_commit_as on a direct graph, because nothing there reads it. I checked that by reading the code.
  • My first parity attempt failed because the harness could not start omnigraph-server: the binary was not built and stderr was empty. After I built it, the rows passed. The PR did not cause this.

Optional findings

  1. Test covers half of a new doc claim (inline at cli_data.rs:3095). Assert created_at as well as actor_id.
  2. Test ownership (inline at cli_data.rs:3131). The served refusal could be two rows in as_on_a_served_write_is_rejected instead of a parallel block.
  3. Follow-up: negative list (inline at planes.rs:209). The other families still default to accepting --as, and the harness keeps a string copy of the read list. One exhaustive "consumes actor" classifier would remove both risks.
  4. Doc nit. docs/user/branching/index.md:149 was not rewrapped after the edit (118 characters, while the paragraph wraps at about 78).

Other open PRs and direction

The publish regression now also checks that the published commit keeps
the proposal's `created_at`, the second half of the branching guide's
claim. The served `--as` refusal for `commit publish` and `commit drop`
moves into `as_on_a_served_write_is_rejected` as two more argument rows
instead of a parallel fixture. Rewrap the edited guide paragraph.
@cursor

cursor Bot commented Oct 17, 2026

Copy link
Copy Markdown

Re-review: fix(cli): accept --as on commit publish and drop (head 030b5870)

Recommendation: approve. It can merge when ready. I found 0 blocking findings and 2 optional ones. One optional finding is still open from the first review; the other is new and small. I post this as a comment because my tool can only post comments, not approvals.

This re-review covers the one new commit since my review at 2d256564 (first review), and its effect on the whole PR.

Why, what, how, impact

  • Why: On a direct graph, commit publish and commit drop are writes, but the CLI guard refused --as on every commit subcommand (CLI: commit publish and commit drop reject --as although they write #1023).
  • What: The guard now matches the commit subcommands exhaustively: publish and drop accept --as, and list, show and changes still refuse it. 030b5870 changes only tests and one doc paragraph.
  • How (the delta):
    • The issue test keeps the whole propose answer and now asserts that the published created_at equals the proposal's created_at (cli_data.rs:3104-3107).
    • The parallel served-refusal block is removed. commit publish <id> and commit drop <id> are now two more write rows in the existing owner as_on_a_served_write_is_rejected. Each row runs with and without --graph, and the owner still requires zero requests (cli_data.rs:3024-3055).
    • The branching guide paragraph is rewrapped. I diffed the word sequence: the change is whitespace only, and no line is longer than 78 characters.
  • Impact: There is no change to production code since 2d256564. The tests now pin the full doc claim ("actor and timestamp"), and the served refusal has one owner. This removes one parallel fixture.

Status of the first review's findings

# Finding Status
1 Test pinned actor_id but not created_at Resolved in 030b5870. A mutation check shows the assertion is effective (see Validation).
2 Served refusal had a parallel setup Resolved. The rows are now in as_on_a_served_write_is_rejected.
3 Other command families still use a negative --as list, and the harness keeps a string copy Still open, deferred by agreement. I accept the deferral. No follow-up issue exists yet (see inline reply).
4 Doc paragraph not rewrapped Resolved (whitespace only).

Findings at this head

Blocking: none.

Optional:

  1. Track the deferred classifier follow-up (reply on the planes.rs:209 thread). The author said this goes to a separate follow-up, but I found no open issue for it. Please file one before merge so the debt does not depend on memory.
  2. Changelog wording (inline at changelog.d/commit-publish-drop-accept-as.fixed.md:1). The guide and the test now say the published commit keeps the actor and timestamp. The changelog still says only "keeps the actor". This is a one-phrase change for consistency, and the current text is not wrong.

Contract and liability

  • Contract: This is unchanged since my first review. On a direct graph, --as reaches publish_commit_as / drop_commit_as. A served publish or drop still refuses --as in resolve_with_policy_scope before any request. The trusted actor stays at the server boundary (invariant 10). A publication still records no publisher; the RFC says this release adds no publisher provenance.
  • Tradeoff: This is the same as before. On a direct open, --as on publish or drop has no observable effect today, because no policy is installed and nothing records the publisher. The deciding rule is still "a write that goes through an _as entry point accepts --as", which matches branch create/delete and the GQ commit publish statement.
  • Liability: The delta lowers it. It removes one IntentApiFixture setup (net −5 lines in tests) and adds one assertion that guards a documented behavior. It adds no new API, state or format. No Lance surface is involved. created_at is OmniGraph lineage metadata that publish copies from the proposal record (crates/omnigraph-catalog/src/unpublished.rs:761), not Lance tag metadata. A future Lance version cannot change this contract.

Validation (my runs)

Environment: isolated worktree at 030b587065c5b09d746540bbf3cc4e7dac53feaf (base 9c2b3679), Rust 1.97.1, protoc 3.21.12, RUST_MIN_STACK=16777216, separate CARGO_TARGET_DIR.

  1. Exact head (clean tree, git diff --quiet HEAD):
    • cargo test --locked -p omnigraph-cli --bin omnigraph planes:: gives 4 passed.
    • cargo test --locked -p omnigraph-cli --test integration -- cli_data::commit_publish_and_drop_take_as_on_a_direct_graph_issue_1023 cli_data::as_on_a_served_write_is_rejected cli_data::optimize_with_as_flag_errors --exact gives 3 passed.
    • Parity rows that go through the edited harness read list (parity_commit_list, parity_commit_list_branch, parity_commit_changes, parity_commit_changes_filtered, parity_branch_create_delete, parity_blob_put_and_clear_share_receipts_and_refusals, parity_blob_stat_preserves_exact_managed_and_external_metadata) give 7 passed.
    • cargo fmt --all --check is clean. cargo clippy -p omnigraph-cli --all-targets --locked -- -D warnings -W clippy::dbg_macro is clean.
  2. Before the fix: the same tests fail for the predicted reason. I restored only crates/omnigraph-cli/src/planes.rs from 9c2b3679 and kept the head's tests. Then I ran the two cli_data tests above. Result: 2 FAILED.
    • as_on_a_served_write_is_rejected fails on the new row ["commit", "publish", "some-commit"] None. Stderr shows `commit` is a data command; --as sets the actor … does not apply, not the served refusal. So the moved served rows are real regression coverage.
    • The issue test fails at the commit publish --as step with the same message.
  3. Mutation check for the new created_at assertion. I changed unpublished.rs:761 to created_at: property.created_at + 1. The issue test FAILED at cli_data.rs:3104 with left: 1792221573082002, right: 1792221573082001. A one-microsecond re-stamp on publish is caught.
  4. Not vacuous. A manual run showed the proposal and publish JSON both carry the same non-null created_at (1792221524507173) across a 1.1 s gap. created_at is a required i64 in the API commit type, so Null == Null cannot occur.
  5. I restored every temporary edit. After the restore, the head reran green and git status was empty. I pushed nothing.
  6. CI on 030b5870: 27 checks pass, including Test Workspace, Fix Regression Gate, Lint (clippy) and GQ Logic Tests; 5 release-only jobs are skipped; 0 fail.

A .gqt case cannot express this contract. The defect is CLI argument classification and CLI JSON output, and GQT does not run the CLI parser. So the in-source matrix row and the CLI integration owner are the right tiers.

Limits:

  • I did not run the full workspace gate locally; CI covers it at this head.
  • My first parity attempt failed with "server did not become ready" after 30 s. The harness looks for <checkout>/target/debug/omnigraph-server, and with a separate target directory it falls back to cargo run, which builds the server inside the readiness window. With CARGO_BIN_EXE_omnigraph-server set, all 7 rows passed. This is local setup, not the PR.
  • As before, no test can show that --as changes anything on a direct publish or drop, because nothing reads it there today. I checked the path by reading the code.

Other open PRs and direction

Comment thread changelog.d/commit-publish-drop-accept-as.fixed.md Outdated
The branching guide and the regression test state both the actor and the timestamp; the release note now says the same.
@ragnorc
ragnorc enabled auto-merge October 17, 2026 18:29
@ragnorc
ragnorc added this pull request to the merge queue Oct 17, 2026
Merged via the queue into ModernRelay:main with commit a152dd4 Oct 17, 2026
32 checks passed
ragnorc added a commit to ragnorc/omnigraph that referenced this pull request Oct 18, 2026
ModernRelay#1036)

* fix(cleanup): finish a table whose interrupted sweep removed its index directory

The collector deletes a swept version's files before its manifest, so a
pass that stops in between leaves the manifest for the next pass. On a
local store that next pass failed for the table: `delete_paths` called
`remove_dir_all` again on the `_indices/<uuid>` directory the stopped pass
had removed, and Lance's local provider reports an absent directory as
`NotFound`. The table kept the error and deleted nothing on every later
run. Object stores list the prefix empty and succeed, so S3, Azure and
the DST memory store converged already.

An absent index directory is now already deleted, as an absent file
already was. The files-before-manifest order is unchanged, and the
deletion set still holds only paths no retained root marks.

The failpoints test stops a pass at `cleanup.sweep_pre_manifest_delete`
after it removed an index directory only the pruned pin names, then
proves the next pass removes that manifest, reports no error, and leaves
every retained root's paths in place.

* docs(cleanup): state the sweep order before the retry outcome

Reword the maintenance guide's sentence on an interrupted cleanup so the
deletion order and the next run's outcome read as two steps, and point
the release note at the guide's Cleanup section.

* test(cleanup): interrupt the sweep between manifests and before dead-staging manifests

Cover the directory-touching windows of the collector's sweep on a local
store, where Lance reports removing an absent directory as NotFound:

- a pass stopped between two manifests of the published sweep, with an
  index directory among the files it already deleted;
- a pass stopped after the dead stagings' files and before their
  manifests, through the new seam cleanup.sweep_pre_dead_manifest_delete.

Each retry reports no error, removes the remaining manifests and keeps
every retained root's paths.

* test(cleanup): run the sweep crash windows on S3 and Azure

The three collector-retry fixtures in failpoints.rs become helpers over a
graph uri. The file tests keep their names and call them on a temporary
directory; one RustFS/S3 test and one Azure/Azurite test run all three, each
on a fresh graph root, and both CI jobs require them by name.

The first fixture now also stops a pass at cleanup.sweep_pre_file_delete,
the one sweep window no failpoint test reached: the pass deletes nothing
and the next pass plans the same sweep. Its retry asserts what the other two
already did, no error on any table and nothing left to remove.

Index-directory presence goes through the storage adapter's exists rather
than std::fs, so the same assertion holds on an object store. The RFC's
crash-window gate is satisfied and leaves blocked_on; the evidence bullet
names the owners per backend.

* test(dst): reach the dead-staging sweep window

Register cleanup.sweep_pre_dead_manifest_delete in the crash-window
catalog (appended, 53 windows) and give it a milestone recipe: insert,
index build, insert, cleanup. The reach census's setup crash stops the
index build before its manifest commit, stranding a detached staging; the
second insert moves main's head past the head the staging recorded, so
the recipe's cleanup judges it dead and crosses the window.

A window inside cleanup's per-table pass does not fail the op: cleanup
records the table's error and returns Ok. The harness treated that as a
plain success, so no retry was judged and the report kept no trace of
the window. crash_op now returns CleanupDeferred when the op's deferrals
name the scheduled window; the universe records deferred:<window>@op<i>
and runs the obligation pass a crashed cleanup gets (a clean rerun that
defers nothing, the collector oracle, the world read). This covers
cleanup.table_gc and the three earlier sweep windows as well.

The pin dst_dead_staging_sweep_window_is_reached_and_retried probes the
window and stops the recipe's cleanup at it; the sensitivity proof gains
a deferred-cleanup case. Both go red with the routing reverted.

* test(dst): schedule setup crashes in the hunt and the fleet

cleanup.sweep_pre_dead_manifest_delete needs an earlier crash's
aftermath: an index build stopped before its manifest commit. Only the
reach census added that crash, by spending the universe's one
crash_on_match slot on it, so the hunt and the fleet scheduled the window
on a cleanup with no dead staging and it never fired there.

Scenario::setup_crash is a second slot, matched before crash_on_match and
always a real crash, even under probe_only; crash_on_match starts matching
after it. harness::setup_crash_for replaces the test-only census_setup
and keeps only its live entry; window_needs_wide and
window_needs_schema_ops include the setup's needs. The reach census, the
hunt and the fleet's window arm take the setup from it, and the hunt
counts a hit from the window's own verdict instead of crashes > 0, which
a setup crash alone would satisfy. The pin now stops the cleanup through
the fleet arm's scenario instead of a pinned op index.

* feat(release): publish daily pinnable edge builds and stamp and attest every release (ModernRelay#1031)

* feat(release): publish daily, pinnable and attested edge builds

Edge releases now build once a day from the newest audited commit on main
and publish each build as its own prerelease, edge-<commit date>-<short
commit>, which never changes once published; the rolling edge release copies
it and only moves forward. Both release workflows share one archive build
that stamps the commit and channel into the binaries, runs each archive on
its platform and verifies the exact set, and both attest build provenance.
Each edge release states its storage format and HTTP contract next to the
latest stable release's, then the notes recorded since that release.

* fix(release): attest only the commit a release run is for

The provenance predicate takes its source commit from the run's OIDC sha
claim, not from the checkout. An edge run now builds only its own commit,
waiting up to 90 minutes for that commit's audit instead of walking back to
an older one, and both publishers refuse to attest a build of any other
commit; a stable backfill from v0.14.0 is dispatched at its tag.

* fix(release): keep edge runs from overlapping

A newer edge run could move the rolling tag after an older run published
but before its installer checks ran, failing a release that succeeded.
Whole runs now share one concurrency group.

* feat(release): stamp and attest the container image

The image's bookworm-built binaries now carry the same commit and stable
channel stamp as the release archives, checked inside the image before it is
pushed, and the pushed GHCR digest carries a build provenance attestation
under the same rule: only for the run's own commit, and from v0.14.0 a
backfill is dispatched at its tag.

* fix(release): address review of the edge release rework

- Refuse an edge build while the package version is not above the latest
  stable release: X.Y.Z-edge+<commit> sorts before X.Y.Z, so the ordering
  claim held only after main advanced its version.
- Require the commit's CI Gate as well as its vocabulary audit, waiting up to
  180 minutes, since the build becomes a pinnable, attested release; a run
  cancelled because main moved on now ends the edge run with a notice.
- Keep the newest edge build of every storage format beyond the retained 30,
  read from a marker line in the release text, so the build that can export
  an abandoned development format survives.
- Report one build identity from omnigraph-api-types: the CLI, /healthz and
  the MCP server info share the stamped version and its compile-time checks.
- Compose the edge release text from the real release-note preview in CI, and
  hold the two copies of the v0.14.0 attestation cutoff to one value.

* feat(load): plan CSV overwrites and reuse validation reads (ModernRelay#1026)

* fix(cli): accept --as on commit publish and drop (ModernRelay#1029)

* fix(cli): accept --as on commit publish and drop

The plane guard classified every `commit` subcommand as a read and refused
`--as`, so `commit publish` and `commit drop` against a direct graph could
only attribute `operator.actor`, although both dispatch through the write
resolver and the engine's `_as` entry points. The guard now matches the
`commit` subcommands exhaustively: publish and drop take `--as` on a direct
target, while list, show and changes still refuse it. A served publish or
drop still refuses `--as` before any request. Guard errors name the
subcommand (`commit list`, ...).

The published commit keeps the actor of the write that created it; the
branching guide now says so.

* test(cli): pin created_at and fold the served refusal into its owner

The publish regression now also checks that the published commit keeps
the proposal's `created_at`, the second half of the branching guide's
claim. The served `--as` refusal for `commit publish` and `commit drop`
moves into `as_on_a_served_write_is_rejected` as two more argument rows
instead of a parallel fixture. Rewrap the edited guide paragraph.

* docs(changelog): say a published commit keeps its timestamp too

The branching guide and the regression test state both the actor and the timestamp; the release note now says the same.

* fix(cli)!: send a server token only to the server it is keyed to (ModernRelay#1030)

* refactor(cli): centralize invocation and command boundaries (ModernRelay#1047)

* refactor(cli): capture operator config during client setup

* refactor(cli): reuse config for aliases and served clusters

* refactor(cli): isolate invocation parsing

* refactor(cli): make scope resolution pure

* refactor(cli): separate application completion from process exit

* refactor(cli): extract query family and typed preparation

* refactor(cli): capture presentation and preserve delivery outcomes

* test(cli): qualify captured presentation across execution

* refactor(cli): isolate graph history execution and output

* fix(cli): track dedicated commit write outcomes

* docs(cli): describe history delivery and outcome boundaries

* refactor(cli): isolate transfer execution and delivery

* refactor(cli): isolate schema lifecycle and lint execution

* refactor(cli): isolate maintenance execution and delivery

* refactor(cli): isolate cluster control execution and delivery

* refactor(cli): complete invocation config and I/O boundaries

* fix(cli): preserve failures and recovery across output errors

* docs(cli): consolidate server credential guidance

* feat(commits): page a branch's commit list (ModernRelay#1013)

* feat(commits): page a branch's commit list

GET /commits returned a branch's whole lineage, and building it read all of
__history. It now takes `limit` (1 to 1,000) and an opaque `page_token`;
a paged answer names `head_commit_id`, the head its first page resolved,
and a `next_page_token` while older commits remain. Later pages answer
for that head's first-parent chain even after the branch moves, and the
token carries a digest of the branch, never its name. Without either
parameter the answer is unchanged.

A page walks first parents by falling generation from the head or the
token's next commit: the head and buffer cost nothing, and an older commit
is read by id with the rest of its __history extent, so a page costs the
extents its own commits occupy and never the history below them.

`omnigraph commit list --limit/--page-token` and the MCP `commits_list`
tool page the same way.

* test(commits): register the paged commit list as a read-only surface

The public and coordinator API registries in forbidden_apis classify every
async entry point; Omnigraph::list_commits_page and
GraphCoordinator::first_parent_page read and publish nothing.

* test(commits): track the reworded commit list description in the vocabulary inventory

The listCommits description still names the graph-manifest version in its
ordering sentence; its prose digest changed with the paging text.

* test(commits): pin commit-list page storage calls in the DST cost golden

The newest and the oldest page of main's commit list on a reopened handle,
after 12 and 36 publishes under a 2048-byte history release. Both rows
match at the two depths: a page reads the extents of its own commits, not
the history above or below them.

* fix(commits): prove a commit-list continuation for a branch-scoped caller

A commit-list page token is checksummed, not signed, so the commit a
continuation starts at is the caller's claim. A caller allowed to read
main only could re-sign a main token to list a secret branch's commits,
which GET /commits?branch=secret and GET /commits/{id} both refuse it.

Under a policy, a continuation by a caller without the graph-wide read gate
(the gate of GET /commits/{commit_id}) now goes through
list_commits_page_on_branch: the token's commit must be the first commit
below its generation on the branch's first-parent chain from the head, or
the page is refused with 400. That proof walks the chain, so such a
continuation costs what the whole listing costs; a caller with graph-wide
read keeps the page cost. The list_commits_page doc says what the token
does not prove.

Pages through both doors concatenate to the listing on an upgraded root,
whose converted commits carry pre-upgrade ids.

* fix(commits): check a scoped commit-list continuation cheaply, through a read check

list_commits_page_on_branch becomes list_commits_page_readable, which takes
the same ReadCheck as diff_page_readable. A continuation's commit is on the
branch's history when the branch's __manifest holds it (its head or buffer),
when a branch the caller may read published it, or else when a walk down
the branch's first-parent chain finds it. So a branch-scoped caller paging
its own branch no longer walks the history on every page; only a commit
neither cheap rule covers costs the walk. The page is read once and the
check uses its first commit. An unknown commit is refused exactly as an
unreadable one is.

A missing commit met inside the walk is an integrity error, not a 404.
The server shares one read decision between the diff and commit-list
doors. The API documents that a continuation's head_commit_id is the one
its token carries, and openapi.json describes the scoped caller's cost.

* feat(release): publish an edge container image from each edge build (ModernRelay#1060)

* feat(release): publish an edge container image from each edge build

The daily edge run now also publishes a container image of the same build.
It packages the published build release's Linux x86_64 archive, checked
against its checksum and its attestation for this workflow and commit, on
Debian trixie, since the Ubuntu-built archives need glibc 2.39 or newer. The
root Dockerfile takes its base as BASE_IMAGE, bookworm by default, so the
stable image is unchanged.

The image is tagged edge-<commit date>-<short commit> on GHCR and Docker Hub,
checked inside the image for its commit and channel, attested on both
registries, and tagged edge only when the rolling edge release moved. It
never moves latest, and a rerun reuses the image first pushed for the build.

* fix(release): match the image's server features and follow edge as it is now

- Build every release archive with the server's aws feature, as the stable
  image already is, so the edge image packaged from the Linux archive accepts
  OMNIGRAPH_SERVER_BEARER_TOKENS_AWS_SECRET like the image it replaces. Lance's
  S3 support already builds the AWS SDK base; the feature adds one crate. The
  gate checker requires both release builds to enable it.
- Move the edge image tags, and check the edge installer channel, only while
  the rolling edge release still names this build, so a rerun of an older
  run's failed job cannot move them behind a newer build.

* fix(release): skip an edge build whose workflows no longer match main (ModernRelay#1061)

GitHub refuses the workflow token a new tag on a commit whose workflow files
differ from main's current ones ("refusing to allow a GitHub App to create or
update workflow"), and the token can never hold the workflows permission.
An edge build of 02026b5 failed this way after a workflow change merged
during its build. The edge run now checks that the build's workflow files
still match main's before building and again before tagging, and otherwise
publishes nothing, with a notice; the image and installer jobs run only for
a published build.

* fix(release): build the Linux x86_64 archive on a pinned Ubuntu 24.04 runner (ModernRelay#1063)

`ubuntu-latest` moves to Ubuntu 26.04 between 2026-10-19 and 2026-11-19
(actions/runner-images#14748), and a run may land on either image during the
rollout. A Linux archive needs the glibc it was linked against, so the x86_64
archive would start requiring Ubuntu 26.04's glibc, breaking Ubuntu 24.04
and Debian 13 users and the trixie edge image. Pin it to ubuntu-24.04, as the
arm64 archive already is (ubuntu-24.04-arm), document the archives' glibc
2.39 floor, and have the gate checker refuse ubuntu-latest for archive
builds.

* fix(release): pull image bases from Docker Hub when logged in (ModernRelay#1065)

The first edge image build failed twice pulling debian:trixie-slim from ECR
Public: "429 Too Many Requests: Data limit exceeded". GitHub-hosted runners
pull it anonymously from shared addresses, whose data limit is often spent,
and the stable image pulls its bookworm base the same way. Both image
workflows now log in to Docker Hub when the DOCKERHUB_* secrets exist and
build on the Docker Official Image; the stable workflow's rust:1-bookworm
builder pull is then logged in too. Without the secrets, the base still
comes from ECR Public.

* fix(schema): drop a property together with the constraints that name only it (ModernRelay#1062)

A property-level @index, @unique or @key is also stored as a type-level
constraint naming the property by stable id. Dropping the property made
the planner see that constraint disappear and refuse the whole change,
because the constraint comparison did not know which properties the
plan drops. An indexed property could therefore never be removed.

The property planner now returns the stable ids of the properties it
drops, and the constraint comparison no longer refuses a removed
constraint when every field it names is one of them. A @key, a
constraint that also names a field that stays (a remaining property or
@src/@dst), and a constraint removed from a property that stays are
still refused. Apply needs no change: the drop's Operation::Project
already removes the index on the dropped column, and the evolved table
declares full-text analyzers from the desired catalog.

ConstraintIR::fields replaces two copies of the same match in
schema_ir.rs and serves the new rule.

Fixes ModernRelay#1014

* feat(query)!: refuse full-text calls without a full-text index (ModernRelay#1066)

* query: refuse full-text calls without a full-text index (T27, FullTextIndexRequired)

A full-text call (`search`, `fuzzy`, `match_text`, `bm25`) reads its
property's full-text index, whose analyzer folds case and stems; without
one Lance scans with a bare, case-sensitive tokenizer, so the same call
answered differently on an indexed and an unindexed property.

- T27 at type checking: a full-text call on a String node property with no
  one-column full-text `@index`/`@key` is refused, from the schema alone.
  `PropType::index_kind` moves to the compiler and index maintenance uses
  it, so the type checker and the index builder cannot drift. An enum's fix
  points at `=`; a non-String field keeps its operand error.
- FullTextIndexRequired at planning (HTTP 409, `full_text_index_required`
  in the error body): the planner reads the coverage of every property a
  full-text call names, filters included, and refuses `absent`. An
  untrained segment, which every write now declares, is `partial` and
  answers; a table with no fragment, or a type the snapshot does not hold,
  counts as covered. Acceptance refuses a plan that records no coverage,
  or `absent`, for a call, and replay re-derives every recorded coverage
  from the pinned dataset.

Regressions: cases/v2/issue_747_full_text_calls_need_a_full_text_index.gqt
and search.rs::a_full_text_index_with_no_segment_refuses_the_call_issue_747,
both red with their check removed.

* docs: rescope RFC 0047 step 3 and document the full-text index requirement

RFC 0047 records step 3 as refusing only an index with no segment, now
that every write declares a declared column's analyzer, with a
decision-log entry, and its rollout table records steps 2 and 2a as
merged. The search guide, troubleshooting page and execution guide
describe T27 and the 409; the release notes call T27 breaking and tell
operators to validate stored queries before upgrading.

* feat(query): the ranked binding roots its component (ModernRelay#1069)

* feat(query): the ranked binding roots its component

A nearest(), bm25() or rrf() order on a binding a traversal reaches was
refused at planning unless that binding was declared first, and a ranked
binding no declaration introduced could not be ranked at all.

Lowering now roots the top-level component holding the bindings the
leading order key ranks at that binding; a ranked binding only a
traversal introduces gets a NodeScan of its checked type, and every
other binding of the component is reached by a forward or reverse
expand. An rrf() whose arms rank two bindings one traversal connects is
the type error T59. The planner codes P001 and P005 are withdrawn; the
planner keeps both checks as internal errors.

* docs(search): rank a traversal-reached binding

* test(cleanup): qualify scoped retries and keep setup pending until a crash

---------

Co-authored-by: Azim Afroozeh <13484327+azimafroozeh@users.noreply.github.com>
Co-authored-by: Andrew Altshuler <andrew@modernrelay.com>
Co-authored-by: aaltshuler <andrew@collectivelab.io>
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.

CLI: commit publish and commit drop reject --as although they write

1 participant