Run 5 API Proxy — Byproducts
Summary
Section titled “Summary”The smallest run in the project. Pure type and method updates in the @arda-cards/api-proxy TypeScript package, mirroring the operations API changes. The most useful side effect was confirming that the type hierarchy established by the api-proxy project (see type-hierarchy.md) handled the new shape without restructuring — CompositeRenderResult and GroupRenderResult slotted into the existing reference/shared/types.ts location used by the previous RenderResult.
Learnings
Section titled “Learnings”- The
reference/shared/types.tsplacement held up. The originalRenderResultlived there becausereferenceis the lowest domain in the proxy’s dependency graph that needed it. The new composite types stayed in the same file with no reorganisation required. PrintOptionsas an options bag survived a brief debate over individual positional booleans; the bag form is materially cheaper to extend (Run 3’s diagnostic flags expanded the parameter set, and the next print-related ticket is likely to add another).unmarkPrintedis the first proxy method onKanbanProxythat does not return an entity. It returns a state-change record. The pattern matches operations but introduced a new return-type shape to the proxy’s vocabulary; documented in the proxy’s CHANGELOG so consumers know what to expect.
Alternatives considered
Section titled “Alternatives considered”- Keep
RenderResultas a deprecated alias forCompositeRenderResultso the frontend could migrate at its own pace — rejected. The package version was still in0.1.xand the only consumer (arda-frontend-app) was being updated in the same project. Carrying a deprecated alias would have added long-term maintenance for short-term convenience. - Three positional boolean parameters for diagnostic flags — rejected in favour of
PrintOptions. The call siteprintLabels(ids, { debug: true })reads better thanprintLabels(ids, true, false, undefined)and tolerates new flags without breaking signatures. - Generate the proxy from the OpenAPI spec — out of scope. The api-proxy package uses hand-written types per its own type-consolidation conventions; generation would have been a separate project.
Suggestions / follow-ups
Section titled “Suggestions / follow-ups”- OpenAPI parity check in CI. A periodic job that fetches the operations OpenAPI spec and asserts the proxy’s types still match would have caught this drift earlier (the proxy was out-of-date from Phase 1’s first commit until Run 5). Not in scope.
- Typed error variants for
printLabels-style methods. Today errors come back as a singleArdaApiError; per-group errors inside aCompositeRenderResultare typed as{ error: string }, which is permissive. A discriminated union could surface error codes at the type level. Not in scope.
Skipped
Section titled “Skipped”Nothing in scope was skipped. All four planned tasks (T-5.1 through T-5.4) shipped.
Specification delta (post)
Section titled “Specification delta (post)”No deviations from phase-5-api-proxy/specification.md. All six requirements (REQ-P5-001 through REQ-P5-006) ship as specified.
Copyright: (c) Arda Systems 2025-2026, All rights reserved
Copyright: © Arda Systems 2025-2026, All rights reserved