Skip to content

Cross-graph share controls on the ledger client - #182

Merged
jfrench9 merged 3 commits into
mainfrom
feature/cross-graph-share-controls
Aug 9, 2026
Merged

Cross-graph share controls on the ledger client#182
jfrench9 merged 3 commits into
mainfrom
feature/cross-graph-share-controls

Conversation

@jfrench9

@jfrench9 jfrench9 commented Aug 9, 2026

Copy link
Copy Markdown
Member

Regenerates against the backend's new cross-graph share-control surface (RoboFinSystems/robosystems#1118) and adds the LedgerClient facade methods for it.

Merge after the backend deploys. These three endpoints don't exist in prod yet, so publishing ahead of it would advertise a 404.

Facade additions (stable tier, additive → minor)

Method What it does
block_source_graph(graph_id, source_graph_id, reason=None, purge=False) Bars a sender from sharing reports in. Idempotent; purge also removes what already landed.
unblock_source_graph(graph_id, source_graph_id) Reopens the channel. Does not restore purged reports.
revoke_report_share(graph_id, report_id, target_graph_id) The sender's half — withdraws a delivered copy.
list_blocked_source_graphs(graph_id, ...) The GraphQL read, via a new ListLedgerBlockedSourceGraphs operation.

An omitted reason is sent as UNSET, not an explicit null.

Generated tier

schema.graphql refreshed, ariadne-codegen regenerated from it, and the three new operations plus their models produced by generate-sdk.

The regen also swept in two changes unrelated to this feature, both already on main in the backend:

  • the delete-report and share-report descriptions
  • OrgUsageSummary loses its four API-call fields (total_api_calls, daily_avg_api_calls, projected_monthly_api_calls, api_calls_limit) — from fix(orgs): remove API-call fields that could never be non-zero. A generated-tier narrowing; the facade is unaffected. Worth naming in the release notes for the version that carries it, since a pinned consumer sees it nowhere else.

Tests

Six facade tests covering envelope unwrapping, purge/reason forwarding, the UNSET reason, the already-deleted-copy case on revoke, and the paginated GraphQL read.

just test-all green: 526 passed, 17 skipped, 0 typecheck errors.

Regenerates against the backend's new share-control surface and adds the
LedgerClient facade methods for it:

- block_source_graph / unblock_source_graph — the recipient's exit from
  cross-graph report sharing, with optional purge of what already landed
- revoke_report_share — the sender's half, withdrawing a delivered copy
- list_blocked_source_graphs — the GraphQL read, via a new
  ListLedgerBlockedSourceGraphs operation

Also picks up two unrelated backend changes the regen swept in: the
delete-report and share-report descriptions, and the removal of the
API-call fields from OrgUsageSummary that could never be non-zero.

All additive on the facade; the generated-tier removal on OrgUsageSummary
is a response-model narrowing, not a facade change.
Picks up the backend's admin-role requirement on unblock, added after the
initial generation. Docstring only — path, operationId, request and response
models are unchanged, so the facade is untouched.
@jfrench9
jfrench9 merged commit 26ef9d7 into main Aug 9, 2026
1 check passed
@jfrench9
jfrench9 deleted the feature/cross-graph-share-controls branch August 9, 2026 21:25
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.

1 participant