Skip to content

feat(ledger): allocation share reads and record_acquisition - #276

Merged
jfrench9 merged 1 commit into
mainfrom
feature/allocation-share-acquisition
Oct 22, 2026
Merged

jfrench9 merged 1 commit into
mainfrom
feature/allocation-share-acquisition

Conversation

@jfrench9

Copy link
Copy Markdown
Member

Summary

Facade methods for two backend additions in robosystems feature/group-acquisition: the allocation share reads behind roboledger-app's allocation-override form, and recordAcquisition for a member bought from its owners.

Changes

  • get_allocation_share(graph_id, entity_id, period) → AllocationShare | None: the member's month result, the outside owners' pro-rata share, the override if set, the share the consolidating entries use (effectiveAmount), and closed. Amounts in cents.
  • list_allocation_overrides(graph_id, entity_id) → list[AllocationOverride], oldest month first.
  • record_acquisition(graph_id, entity_id=, consideration=, basis=, nci_fair_value=, allocations=, confirm_bargain_purchase=); returns the drafted acquisition with its goodwill.
  • Regenerated SDK and GraphQL types: RecordAcquisitionRequest, AcquisitionResponse, AcquisitionAllocation, and cause on ConsolidationResidual. All additive.

Release

Generated tier plus new facade methods, no break: a client minor. It waits on the robosystems release that carries feature/group-acquisition (after v1.19.6): until then the GraphQL fields and the operation do not exist on the server. The twin of typescript-client #292.

Testing

tests/test_ledger_client.py: record_acquisition sends the body; get_allocation_share parses the share and sends the variables; list_allocation_overrides unwraps, empty when none. Ruff, basedpyright and the suite (725) pass; the GraphQL schema snapshot refreshed and codegen regenerated. Regenerated against the local API on the backend branch.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VPxBBHkqhwkZ6Eq8EXSBR6

`get_allocation_share(graph_id, entity_id, period)` reads a member's month
as the consolidation engine will: its result, the outside owners' pro-rata
share, the override if one is set, the share the entries use, and whether
the month is closed. `list_allocation_overrides` lists the months an
override is set for. `record_acquisition` records a member bought from its
owners. Regenerated against robosystems feature/group-acquisition; the
residual gains its `cause`. The twin of typescript-client #292.

Claude-Session: https://claude.ai/code/session_01VPxBBHkqhwkZ6Eq8EXSBR6
@jfrench9
jfrench9 merged commit a37a114 into main Oct 22, 2026
6 checks passed
@jfrench9
jfrench9 deleted the feature/allocation-share-acquisition branch October 22, 2026 02:39
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