You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.1 Confirm at HEAD that EventsController::buildRunsheetContext() (lib/Controller/EventsController.php:163-235) still calls getObjects('character') and getObjects('player') with no filters, and that RegisterObjectFetcher::getObjects() (lib/Service/RegisterObjectFetcher.php:329-357) forwards a filters array to the OpenRegister mapper's findAll()
1.2 Read the OpenRegister ObjectService/mapper findAll() filter contract (openregister repo) to confirm whether it supports array-field "contains" matching (e.g. events containing a given UUID) or only scalar-equality filters; record the finding here before writing task 2
2.1 If array-contains filtering is supported: change buildRunsheetContext() line 167 to $this->objectFetcher->getObjects('character', filters: ['events' => $eventId])
2.2 If NOT supported: implement a paginated scan (limit/offset loop) through the character register that stops once no more pages remain, and note in a code comment why a full unfiltered findAll() was replaced with pagination (avoids loading the whole register into one PHP array at once, still bounded per page)
2.3 Preserve the existing is_array($events) === false guard and in_array($eventId, array_map('strval', $events), true) membership check as the final correctness check even when the OR-side filter pre-narrows the set (defense in depth against a filter that under- or over-matches)
3.1 Change indexPlayers() (lib/Controller/EventsController.php:242-258) to accept the already-filtered cast's player-id set and fetch only those players (by id, or via an id-in-list filter) instead of getObjects('player') unfiltered
3.2 Update buildRunsheetContext()'s call order so player ids are known before indexPlayers() runs (resolve cast first, collect distinct player/ocName ids, then look up only those)
4.1 Extend tests/e2e/spec-coverage/event-runsheet-export.spec.ts (or add a PHPUnit test on EventsController) asserting the runsheet still returns the correct cast for an event when the register contains characters NOT linked to that event (regression guard against the new filter over- or under-matching)
4.2 Add a PHPUnit test (or extend an existing EventsController test) that asserts RegisterObjectFetcher::getObjects() is called with a scoping filter/limit rather than no arguments, via a mock/spy on objectFetcher
4.3 @spec annotations on the changed methods pointing at this change (gate-16)
5.1 composer check:strict green
5.2 Hydra gates green on the diff
Synced from openspec/changes/larpinq-runsheet-scoped-cast-query by OpenSpec workflow App: larpinq
Artifacts
Specs
Tasks
EventsController::buildRunsheetContext()(lib/Controller/EventsController.php:163-235) still callsgetObjects('character')andgetObjects('player')with no filters, and thatRegisterObjectFetcher::getObjects()(lib/Service/RegisterObjectFetcher.php:329-357) forwards afiltersarray to the OpenRegister mapper'sfindAll()ObjectService/mapperfindAll()filter contract (openregister repo) to confirm whether it supports array-field "contains" matching (e.g.eventscontaining a given UUID) or only scalar-equality filters; record the finding here before writing task 2buildRunsheetContext()line 167 to$this->objectFetcher->getObjects('character', filters: ['events' => $eventId])limit/offsetloop) through thecharacterregister that stops once no more pages remain, and note in a code comment why a full unfilteredfindAll()was replaced with pagination (avoids loading the whole register into one PHP array at once, still bounded per page)is_array($events) === falseguard andin_array($eventId, array_map('strval', $events), true)membership check as the final correctness check even when the OR-side filter pre-narrows the set (defense in depth against a filter that under- or over-matches)indexPlayers()(lib/Controller/EventsController.php:242-258) to accept the already-filtered cast's player-id set and fetch only those players (by id, or via anid-in-list filter) instead ofgetObjects('player')unfilteredbuildRunsheetContext()'s call order so player ids are known beforeindexPlayers()runs (resolve cast first, collect distinctplayer/ocNameids, then look up only those)tests/e2e/spec-coverage/event-runsheet-export.spec.ts(or add a PHPUnit test onEventsController) asserting the runsheet still returns the correct cast for an event when the register contains characters NOT linked to that event (regression guard against the new filter over- or under-matching)EventsControllertest) that assertsRegisterObjectFetcher::getObjects()is called with a scoping filter/limit rather than no arguments, via a mock/spy onobjectFetcher@specannotations on the changed methods pointing at this change (gate-16)composer check:strictgreenSynced from
openspec/changes/larpinq-runsheet-scoped-cast-queryby OpenSpec workflowApp:
larpinq