§6 error surface drift: UiaRequiredSignal escape, literal-$ messages, §6.4 table mismatches, missing @Throws #140

Closed
opened 2026-08-27 19:21:11 +02:00 by thecrealm · 0 comments
Owner

Review finding 2026-08-27 (A7). Concrete items:

  • MatrixApiClient.kt:210,257: UiaRequiredSignal : RuntimeException escapes plain invoke() on any UIA 401 (only invokeUia handles it) — untyped, untested;
  • KatrixException.kt:124, SendQueue.kt:265,269: ${'$'} produces literal $actualBytes, $limitBytes, ${config.maxTotal} in messages;
  • KatrixSession.kt:421 downloadAttachment throws SendFailed("null", …); :495,585 decryptCached/isDeviceVerified swallow instead of CryptoUnavailable; :258 reauthenticate uses check (ISE); :328 typed send require; :430 parseMxc require; CodecRegistrationException extends IAE, not KatrixException; connect throws CryptoUnavailable (:752,840,869) not listed in §6.4;
  • @Throws missing on cachedEvent, SendHandle.*, TimelineReader.older, and all of api/crypto/appservice/bot JVM surfaces.

Acceptance (§6.1, §6.2, §6.4, D67): every item fixed or the §6.4 table amended; an exhaustiveness test ties the table to what the session throws; UIA AuthRequired branch tested.

Review finding 2026-08-27 (A7). Concrete items: - `MatrixApiClient.kt:210,257`: `UiaRequiredSignal : RuntimeException` escapes plain `invoke()` on any UIA 401 (only `invokeUia` handles it) — untyped, untested; - `KatrixException.kt:124`, `SendQueue.kt:265,269`: `${'$'}` produces literal `$actualBytes`, `$limitBytes`, `${config.maxTotal}` in messages; - `KatrixSession.kt:421` `downloadAttachment` throws `SendFailed("null", …)`; `:495,585` `decryptCached`/`isDeviceVerified` swallow instead of `CryptoUnavailable`; `:258` `reauthenticate` uses `check` (ISE); `:328` typed send `require`; `:430` `parseMxc` `require`; `CodecRegistrationException` extends IAE, not `KatrixException`; `connect` throws `CryptoUnavailable` (`:752,840,869`) not listed in §6.4; - `@Throws` missing on `cachedEvent`, `SendHandle.*`, `TimelineReader.older`, and all of api/crypto/appservice/bot JVM surfaces. Acceptance (§6.1, §6.2, §6.4, D67): every item fixed or the §6.4 table amended; an exhaustiveness test ties the table to what the session throws; UIA `AuthRequired` branch tested.
thecrealm added
now
and removed
next
labels 2026-09-01 11:02:43 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
thecrealm/katrix#140
No description provided.