Skip to content

inject host time into datastream wasm rules engine (SCHY-471)#87

Merged
cbrady merged 2 commits into
mainfrom
chris/schy-471-datastream-wasm-rules-engine-panics-unreachable-on-wasmtime
Jul 13, 2026
Merged

inject host time into datastream wasm rules engine (SCHY-471)#87
cbrady merged 2 commits into
mainfrom
chris/schy-471-datastream-wasm-rules-engine-panics-unreachable-on-wasmtime

Conversation

@cbrady

@cbrady cbrady commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

The raw wasm has no clock under wasmtime, so metric-period reset computation trapped (wasm unreachable) and entitled companies wrongly fell back to the flag default. Call setCurrentTimeMillis with the host wall-clock before checkFlagCombined; add a regression test that reproduces the trap and asserts correct evaluation.

@cbrady cbrady self-assigned this Jul 13, 2026
@cbrady cbrady requested a review from a team as a code owner July 13, 2026 19:57
cbrady and others added 2 commits July 13, 2026 14:05
The raw wasm has no clock under wasmtime, so metric-period reset
computation trapped (wasm unreachable) and entitled companies wrongly
fell back to the flag default. Call setCurrentTimeMillis with the host
wall-clock before checkFlagCombined; add a regression test that
reproduces the trap and asserts correct evaluation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Annotate the _entitled_company fixture as RulesengineCompany instead of
object so it type-checks as check_flag's company argument.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cbrady cbrady force-pushed the chris/schy-471-datastream-wasm-rules-engine-panics-unreachable-on-wasmtime branch from 55919ba to b605771 Compare July 13, 2026 20:05
@cbrady cbrady merged commit ff0413a into main Jul 13, 2026
4 checks passed
@cbrady cbrady deleted the chris/schy-471-datastream-wasm-rules-engine-panics-unreachable-on-wasmtime branch July 13, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants