Files
floci/docs
themark007 486be8f5b0 feat(kinesis): add local inspection endpoints for UI (#1880)
* feat(kinesis): add local inspection endpoints for UI

* fix(kinesis): limit local record inspection

* fix(kinesis): include shard id in inspected records

* fix(kinesis): address reviewer comments on inspection endpoint

- Comment 1 (fix): sort order for Limit — already using a min-heap
  PriorityQueue (oldestFirst comparator) that evicts the oldest record
  when size > resolvedLimit, so the queue retains the newest N records.
  Records are then re-sorted ascending before return. Limit=2 on
  [oldest, middle, newest] now returns [middle, newest], not
  [oldest, middle]. The previous ascending-sort+limit path was replaced
  in the prior commit; this commit pins the behaviour in the test.

- Comment 2 (minor): unify error shapes on the /records endpoint.
  Moved the Limit <= 0 guard from KinesisService into
  KinesisInspectionController next to the StreamName guard so both
  query-parameter validations use the same plain {"message": ...} shape
  instead of the AwsException {"__type": ...} shape.

- Comment 3 (minor): consistent clamping policy. Removed the throw for
  limit <= 0 from resolveInspectionRecordLimit; both bounds are now
  clamped silently via Math.max/min, matching the behaviour of the
  sibling getRecords / getRecordsForAccount methods. Added Javadoc
  noting the 1000-record hard ceiling with no pagination cursor.

- Test: strengthened recordsEndpointHonorsLimit to assert which two
  records are returned (pk-2 and pk-3, the newest), not just hasSize(2).
  Added recordsEndpointRejectsNonPositiveLimit to cover the controller-
  level Limit=0 validation.
2026-08-13 00:24:37 -04:00
..
2026-03-15 17:43:56 -05:00