Repository navigation
feat(ledger): information block reads, schedules, saved statements and mappings name their entity - #1752
Conversation
Block reads take entity_id (default the group parent) on GraphQL informationBlock/informationBlocks and the two MCP read tools. A block shared by the group (statements, metrics, disclosures) shows that entity's fact sets; a schedule, reconciliation or forecast always shows its owner's, and the list leaves out other entities' own blocks. The envelope names the entity it read. A forecast's history, and compute-forecast's choice of actual structure, follow the forecast's entity.
- create-information-block's schedule body takes entity_id; every schedule made through it used to land on the group parent. - statement(reportId) renders in the reporting style of the entity the report is about. - mappings lists each mapping with the entity whose chart it maps from, and takes entityId to keep one entity's; mappingCandidates narrows by the named entity's style. - Entity defaults read 'the group parent' throughout, not 'the earliest-created entity'.
|
Change classification: normal — platform or application code changed. A normal change carries a documented automated review on this pull request before merge, in place of a second human approver. The |
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 35s —— View job PR review: information block reads, schedules, saved statements and mappings name their entityVerdict: looks good. I found no blocking issues, only a few small nits. This was a read-through of the diff and the surrounding code. I did not run the test suite, so I'm relying on the PR's reported run (16,876 passed).
What I checked
Nits (non-blocking)
TestsCoverage is good. |
…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)
…#259) ## 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 - [x] `npm run generate` against the local stack running #1752 - [x] `npm test`: 426 passed (new cases for entity threading on all four methods, and the absent entity on `createReport`) - [x] lint, typecheck, format check 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
Closes the entity gap on the information-block surface of a multi-entity graph. Statement structures come from the reporting style and are shared by the group, so the reads that pick "the newest set of this structure" showed whichever entity had closed last, and a statement series could mix entities.
entity_id(GraphQLinformationBlock/informationBlocks, MCPget-information-block/list-information-blocks), defaulting to the group parent as the ledger reads do. A block shared by the group (statements, metrics, disclosures) shows that entity's fact sets. A schedule, reconciliation or forecast is one entity's own and always shows its owner's; the list leaves out other entities' own blocks. A statement read in a scenario with no entity named reads the scenario's entity. The envelope gainsentityId, naming the entity it read.compute-forecast's choice of actual structure, follow the forecast's entity (each entity can be on a different style). A forecast's entity stays recorded on its lever fact set.CreateScheduleRequest.entity_id. The command already took it; schedules made throughcreate-information-blockall landed on the parent.statement(reportId)renders in the reporting style of the entity the report is about.mappingsnames the entity whose chart each mapping maps from and takesentityId;mappingCandidates(entityId)narrows by that entity's style.No migration:
fact_sets.entity_idandstructures.entity_idalready exist.Client impact
Additive only (new optional arguments and fields) → client minor. The facades follow in RoboFinSystems/robosystems-typescript-client#259 and RoboFinSystems/robosystems-python-client#244, both to merge after this ships to prod. A combined report across the group stays out of scope (multi-entity M2 step 4).
Test plan
just test: 16,876 passedmappingsnames both entities🤖 Generated with Claude Code