Skip to content

feat(ledger): information blocks, mappings and reports take an entity - #259

Merged
jfrench9 merged 2 commits into
mainfrom
feature/information-block-entity
Oct 9, 2026
Merged

jfrench9 merged 2 commits into
mainfrom
feature/information-block-entity

Conversation

@jfrench9

@jfrench9 jfrench9 commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Summary

The facade side of RoboFinSystems/robosystems#1752, which scopes information-block reads to one entity of a reporting group.

  • getInformationBlock (plain and windowed documents) and listInformationBlocks take entityId; the envelope selects entityId, the entity it read.
  • listMappings(graphId, { entityId }): each mapping carries entityId (whose chart it maps from), and the option keeps one entity's.
  • createReport and createSchedule pass entityId through as entity_id.
  • getMappingCandidates(graphId, classification, { entityId }) narrows by that entity's reporting style.
  • Generated SDK types pick up CreateScheduleRequest.entity_id, the envelope's entity_id, and the reworded entity defaults.

Additive only → minor.

Waits on the server: the new documents name entityId arguments and fields that a server only serves once it carries robosystems#1752, so merge and publish this after the robosystems release that includes #1752 is deployed to prod.

Test plan

  • npm run generate against the local stack running #1752
  • npm test: 426 passed (new cases for entity threading on all four methods, and the absent entity on createReport)
  • lint, typecheck, format check

🤖 Generated with Claude Code

getInformationBlock and listInformationBlocks take entityId and the
envelope names the entity it read; listMappings names whose chart each
mapping maps and takes entityId; createReport passes entityId through.
jfrench9 added a commit to RoboFinSystems/robosystems-python-client that referenced this pull request Oct 9, 2026
…e an entity (#244)

## Summary

The Python facade side of RoboFinSystems/robosystems#1752, which scopes
information-block reads to one entity of a reporting group. Parity with
RoboFinSystems/robosystems-typescript-client#259.

- `get_information_block` / `list_information_blocks` take `entity_id`;
the envelope selects `entityId`, the entity it read.
- `list_mappings(graph_id, entity_id=...)`: each mapping carries
`entity_id` (whose chart it maps from), and the argument keeps one
entity's.
- `get_mapping_candidates(..., entity_id=...)` narrows by that entity's
reporting style.
- `create_report(..., entity_id=...)` and `create_schedule(...,
entity_id=...)` pass the entity through.
- `schema.graphql` refreshed from the local stack running #1752. It also
picks up `eventBlocks(eventClass)`, which shipped in v1.16.8 and was
missing from the snapshot. Generated REST models pick up
`CreateScheduleRequest.entity_id`, the envelope's `entity_id`, and the
reworded entity defaults.

Additive only → **minor**. Touches no symbol the integration template
imports.

**Waits on the server:** the documents name `entityId` arguments and
fields that a server serves only once it carries robosystems#1752, so
merge and publish this after the robosystems release that includes #1752
is deployed to prod.

## Test plan

- [x] `just generate-sdk` + `just generate-graphql` against the local
stack
- [x] `just test-all`: 671 passed, ruff + format + basedpyright clean
- [x] New cases: entity forwarded on both block reads, mapping
candidates and mappings (with `entity_id` on the row), `create_report`
wire body, `create_schedule` payload with and without an entity

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@jfrench9
jfrench9 merged commit 0b01330 into main Oct 9, 2026
5 checks passed
@jfrench9
jfrench9 deleted the feature/information-block-entity branch October 9, 2026 04:58
jfrench9 added a commit that referenced this pull request Oct 9, 2026
## Summary

2.10.0 (#259) added `entityId` to the information-block documents, which
makes it a required key on `InformationBlock`. The report package's
`items[].block` selection didn't get it, so a report block stopped
typing as an `InformationBlock`. roboledger-app's report page passes one
to the same `BlockView` the close panels use, and fails typecheck on
2.10.0.

- `reportPackage` selects `entityId` on each item's block.
- A compile-time assertion in `LedgerClient.ts` checks that
`ReportPackageItem['block']` is assignable to `InformationBlock`, so the
two selections can't drift apart again. Verified that it fails without
the query fix.

Patch, as the follow-on to 2.10.0 (→ 2.10.1). Like 2.10.0, it names a
field the server serves from robosystems #1752.

## Test plan

- [x] `npm run generate:graphql` against the local stack
- [x] typecheck, lint, format; `npm test` 426 passed
- [x] roboledger-app's typecheck on 2.10.0 fails only at
`reports/[id]/content.tsx`, which is this mismatch

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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