[GH-ISSUE #4666] [Bug] Binary session status projection tests cast an asynchronous result as synchronous #2431

Closed
opened 2026-10-17 21:04:34 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @morluto on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4666

Before submitting

  • Searched open and closed reports for BinarySessionStatus and async status projection.
  • Removed sensitive target data and credentials.

Area

Other: source test consumer

Observed behavior

All three BinarySessionStatus.test.ts controls fail on main e567033a71. Their helper casts the Promise returned by binarySessionStatus() into a synchronous projected status. Assertions read undefined capabilities; the repeated-limitations control throws a TypeError.

Reproduction

Executed npm run test:local -- src/application/binary/BinarySessionStatus.test.ts in an isolated clean checkout at that revision: 3 failed, 0 passed. The same failures occurred in the audit worktree before repair.

Expected behavior

Await the completed asynchronous status before checking exact provider capability grouping, overlays, empty collections and repeated limitations. Validate the projection with its named contract rather than casting a Promise into the desired result.

Impact and scope

Observed broken source validation for three status semantics. No demonstrated CLI/MCP runtime defect or Evidence corruption. Broader CI effects: NOT_ENOUGH_INFO; CI was not inspected for this report.

REA version

6.5.0 source, e567033a71; async migration introduced in150e996a86f2bec4982ba87f37bf502a8d5e8214.

Runtime and platform

Node24.18.0, Darwin arm64; recording provider ports, no native engine.

Target and artifact context

No binary target; synthetic provider capability projection.

Interface

Other: source tests

Earliest failure stage

Test result consumption

Relevant output or evidence

AssertionError: expected undefined to deeply equal [] at line360; TypeError: Cannot read properties of undefined (reading '0') at line375. Helper lines120-153 returns binarySessionStatus(...) as unknown as ProjectedStatus.

Typed outcome or recovery expected

Completed schema-validated status; no runtime outcome change required.

Analysis or suspected cause

Source-derived: a double cast hid the asynchronous migration from TypeScript. Draft repair awaits the owner, removes the cast and validates the selected sessionProvider contract fields. All three controls now pass locally; unpublished at report time.

Additional context

No native-provider or cross-platform verification claim.

Originally created by @morluto on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4666 ### Before submitting - [x] Searched open and closed reports for BinarySessionStatus and async status projection. - [x] Removed sensitive target data and credentials. ### Area Other: source test consumer ### Observed behavior All three `BinarySessionStatus.test.ts` controls fail on main e567033a7137d5eebf49147ed325cad141cff5c2. Their helper casts the Promise returned by `binarySessionStatus()` into a synchronous projected status. Assertions read undefined capabilities; the repeated-limitations control throws a TypeError. ### Reproduction Executed `npm run test:local -- src/application/binary/BinarySessionStatus.test.ts` in an isolated clean checkout at that revision: 3 failed, 0 passed. The same failures occurred in the audit worktree before repair. ### Expected behavior Await the completed asynchronous status before checking exact provider capability grouping, overlays, empty collections and repeated limitations. Validate the projection with its named contract rather than casting a Promise into the desired result. ### Impact and scope Observed broken source validation for three status semantics. No demonstrated CLI/MCP runtime defect or Evidence corruption. Broader CI effects: NOT_ENOUGH_INFO; CI was not inspected for this report. ### REA version 6.5.0 source, e567033a7137d5eebf49147ed325cad141cff5c2; async migration introduced in150e996a86f2bec4982ba87f37bf502a8d5e8214. ### Runtime and platform Node24.18.0, Darwin arm64; recording provider ports, no native engine. ### Target and artifact context No binary target; synthetic provider capability projection. ### Interface Other: source tests ### Earliest failure stage Test result consumption ### Relevant output or evidence `AssertionError: expected undefined to deeply equal []` at line360; `TypeError: Cannot read properties of undefined (reading '0')` at line375. Helper lines120-153 returns `binarySessionStatus(...) as unknown as ProjectedStatus`. ### Typed outcome or recovery expected Completed schema-validated status; no runtime outcome change required. ### Analysis or suspected cause Source-derived: a double cast hid the asynchronous migration from TypeScript. Draft repair awaits the owner, removes the cast and validates the selected `sessionProvider` contract fields. All three controls now pass locally; unpublished at report time. ### Additional context No native-provider or cross-platform verification claim.
Author
Owner

@morluto commented on GitHub (Oct 17, 2026):

Published on main in 870dcb1fda.

The helper now awaits completed status and validates the selected sessionProvider fields. Removed the double cast and constructed complete typed recording inputs; the producer depends only on its required router port.

Executed: all 3 controls failed on unchanged e567033a7 in an isolated checkout, then passed after repair; the combined405-test run and check:fast also passed. No provider runtime behavior change or real-provider verification claim.

<!-- gh-comment-id:6229057682 --> @morluto commented on GitHub (Oct 17, 2026): Published on main in 870dcb1fda49cdc8049c6d84594ac403898bea63. The helper now awaits completed status and validates the selected sessionProvider fields. Removed the double cast and constructed complete typed recording inputs; the producer depends only on its required router port. Executed: all 3 controls failed on unchanged e567033a7 in an isolated checkout, then passed after repair; the combined405-test run and check:fast also passed. No provider runtime behavior change or real-provider verification claim.
Author
Owner

@morluto commented on GitHub (Oct 18, 2026):

Closing as fixed on main after reconciling this report with the landed owner/consumer changes.

  • 870dcb1fd: test(binary): await and validate session status projections. Validation: all three controls failed on unchanged e567033a7 and pass after repair; check:fast passed. No provider runtime behavior claim.

Evidence scope: this closure uses the landed source, regression coverage and validation already recorded in the linked commits/thread. No new local tests or native-provider reproduction were run during this backlog pass; previously documented platform and real-provider gaps still apply.

<!-- gh-comment-id:6255994925 --> @morluto commented on GitHub (Oct 18, 2026): <!-- rea-backlog-reconciliation-2026-10-19-4666 --> Closing as fixed on `main` after reconciling this report with the landed owner/consumer changes. - [870dcb1fd](https://github.com/morluto/rea/commit/870dcb1fda49cdc8049c6d84594ac403898bea63): test(binary): await and validate session status projections. Validation: all three controls failed on unchanged e567033a7 and pass after repair; check:fast passed. No provider runtime behavior claim. Evidence scope: this closure uses the landed source, regression coverage and validation already recorded in the linked commits/thread. No new local tests or native-provider reproduction were run during this backlog pass; previously documented platform and real-provider gaps still apply.
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
morluto/rea#2431
No description provided.