Skip to content

feat: enhance WASI reactor module instantiation with real OS clock su… - #343

Merged
pikann merged 1 commit into
masterfrom
feature/enhance-plugin-platform-with-real-clock-support
Jul 30, 2026
Merged

feat: enhance WASI reactor module instantiation with real OS clock su…#343
pikann merged 1 commit into
masterfrom
feature/enhance-plugin-platform-with-real-clock-support

Conversation

@pikann

@pikann pikann commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • WASI reactor plugin modules were instantiated without WithSysWalltime() / WithSysNanotime(), so wazero silently fell back to its fake, deterministic clock — nanotime pinned to 1970-01-01, walltime pinned to 2022-01-01 — instead of the real OS clock. Any plugin code reading the time (time.Now() and friends) observed this frozen value.
  • Runtime.Load now passes WithSysWalltime() and WithSysNanotime() into wazero.NewModuleConfig(), so every WASI reactor plugin gets real wall-clock/monotonic time.

Fixes #339

Root cause of com.paca.webhook recording deliveries with created_at frozen at 2022-01-01 00:00:00 while reporting fake success=true, status_code=202 results that never actually reached the destination. Verified end-to-end: with the real OS clock wired in, deliveries now reach the destination and are recorded with accurate timestamps.

Fixes #339

Related

Ships alongside Paca-AI/paca-plugin-webhook#7 (merged), which adds Warn/Info logging around each webhook delivery attempt so future delivery problems show up in plugin logs instead of only as a silent row in webhook_deliveries.

Test plan

  • CI — Build, Lint, Unit & integration tests, E2E tests passing
  • Manually verified webhook deliveries reach their destination with correct timestamps after this fix

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Real OS clock for WASI reactor modules — chains WithSysWalltime() and WithSysNanotime() onto the existing ModuleConfig in Runtime.Load(), replacing wazero's default fake clock with time.Now() so plugins observe real wall time and monotonic time.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏

@pikann
pikann merged commit 59b157b into master Jul 30, 2026
4 checks passed
@pikann
pikann deleted the feature/enhance-plugin-platform-with-real-clock-support branch July 30, 2026 10:46
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.

com.paca.webhook plugin: deliveries logged as successful (202) with frozen/fake timestamps, destination never actually receives the request

1 participant