Skip to content

feat(ledger): add promote-obligations outbox + set-write-policy APIs#127

Merged
jfrench9 merged 1 commit into
mainfrom
feature/outbox
Jun 2, 2026
Merged

feat(ledger): add promote-obligations outbox + set-write-policy APIs#127
jfrench9 merged 1 commit into
mainfrom
feature/outbox

Conversation

@jfrench9
Copy link
Copy Markdown
Member

@jfrench9 jfrench9 commented Jun 2, 2026

Summary

Regenerates the robosystems_client to incorporate two new server-side capabilities: period-drafts outbox disposition (promote obligations) and connection write-policy management. This is an auto-generated client update reflecting new ledger API surface area.

Key Accomplishments

New API Endpoints

  • set_connection_write_policy — Allows configuring the write policy on a connection (e.g., controlling write access semantics). Includes sync and async variants with full HTTP response support.
  • op_promote_obligations — New ledger extension operation to promote obligations from period drafts via the outbox disposition pattern. Supports sync and async execution with detailed error handling.

New Models

  • SetWritePolicyRequest / SetWritePolicyRequestWritePolicy — Request payload and write-policy enum for the connection write-policy endpoint.
  • PromoteObligationsRequest / PromoteObligationsResponse — Request/response models for the promote-obligations operation.
  • PromoteObligationsResponseErrorsItem — Structured error representation for partial failures during obligation promotion.
  • OperationEnvelopePromoteObligationsResponse / OperationEnvelopePromoteObligationsResponseStatus — Envelope wrapper with status tracking for the async operation pattern.

Modified Models

  • ConnectionResponse — Extended with new fields to reflect write-policy state on connections.
  • RuleVariableLite — Expanded with additional optional attributes (significant additions to the model).
  • CreateEventBlockRequest / EventBlockEnvelope — Minor adjustments (likely field-level type or optionality changes).

GraphQL

  • Updated ledger query module exports to include new query definitions.

Breaking Changes

  • CreateEventBlockRequest and EventBlockEnvelope have been modified — consumers constructing these models directly should verify field compatibility.
  • RuleVariableLite has significant new fields — existing code using to_dict() or pattern-matching on this model may need updates.
  • ConnectionResponse has new fields — generally additive but deserializers with strict schemas should be reviewed.

Testing Notes

  • Since this is a generated client, verify that the upstream OpenAPI spec matches the generated output.
  • Integration tests should cover the new set_connection_write_policy and op_promote_obligations endpoints against a staging ledger instance.
  • Validate that existing consumers of modified models (RuleVariableLite, ConnectionResponse, CreateEventBlockRequest, EventBlockEnvelope) continue to serialize/deserialize correctly.
  • Test both sync and async code paths for the new API endpoints.

Infrastructure Considerations

  • No new dependencies are introduced — this is purely additive/modified Python model and API client code.
  • Downstream services consuming the client library will need to update their dependency version to access the new APIs.
  • The new outbox disposition pattern (promote obligations) may require corresponding server-side configuration for the ledger extension to be active.

🤖 Generated with Claude Code

Branch Info:

  • Source: feature/outbox
  • Target: main
  • Type: feature

Co-Authored-By: Claude noreply@anthropic.com

…set-write-policy

Hand-add the QB write-back disposition fields (willPublishToQb + qbPublishCount/localOnlyCount/qbWritebackConnectionId/qbWritePolicy) to the periodDrafts GraphQL query (codegen doesn't touch hand-written queries). Regenerate the REST client from the current API, which also brings in set-connection-write-policy and promote-obligations, plus connection_response.write_policy and the rule_variable_lite null-qname fix.
@jfrench9 jfrench9 merged commit 803597f into main Jun 2, 2026
1 check passed
@jfrench9 jfrench9 deleted the feature/outbox branch June 2, 2026 18:53
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