Skip to content

An older CLI's pull of a ledger that dropped a graph succeeds and then can't open it, and the compatibility notes don't say so #2293

Open

Description

@aaj3f

@bplatz my review on #2272 came in after it merged (sorry about that), so I'm filing what still holds on main at 6f8ebfffa. Both are small, and neither is a problem with the transfer itself, which I thought was really nicely done. The shared-lifecycle cleanup I was going to suggest already landed in 258ef37d7 as LedgerState::apply_commit_graph_lifecycle, so that one's off the list.

The compatibility notes cover reads and pushes, not an older CLI's pull

This is more of a docs/release-notes ask than a code one. docs/reference/compatibility.md:375 says a commit that drops a graph "cannot be read by a release before this one, which refuses it". That's true of reads, and an older server refuses a pushed drop before writing anything (the 422 that push_failure now explains). The PR body's "an older CLI pulling one … refuses it" only holds for the paginated pull, though.

On v4.2.5, fluree pull takes the pack path whenever the remote serves packs, which it does. It ingests the pack (hash check only), then moves the local head with set_commit_head, a ref CAS that decodes nothing. So the pull reports success, and every later read of that ledger fails on unknown envelope flags: 0x20 until the CLI is upgraded. A clone does the same. Nothing is lost, since the upgraded CLI reads it as-is. (Claude read v4.2.5's flag refusal and pull paths in its source rather than running them, so it's worth a quick check.)

This comes from #2251's format rather than #2272, but compatibility.md:375 is where a user would look, and v4.2.6 (#2256) hasn't tagged yet, so it can go into that release's notes too. Perhaps a sentence like: "An older CLI's pull or clone of such a ledger stores the commits and then cannot open it until the CLI is upgraded."

No test pushes a drop through the HTTP route

Not a big deal, since the risk is low: the 403 is a direct map (PushError::Forbidden → ApiError::http(403), fluree-db-api/src/commit_transfer.rs:822) of the check at :463-472, and a_push_that_drops_needs_an_identity_without_a_restricting_policy (fluree-db-api/tests/it_graph_drop.rs:1144) covers that check at the API level. But nothing sends a drop through /v1/fluree/push, and fluree-db-server/tests/policy_transport_regression.rs:80-141 already pushes under an identity with a restricting policy, so one case there pushing a DROP DEFAULT under the restricted identity (and expecting the 403) would cover the transport cheaply.

Happy to talk through either of these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions