Skip to content

feat(opencode): add qualified native clock sampling - #295

Merged
777genius merged 3 commits into
mainfrom
feat/opencode-clock-authority
Oct 4, 2026
Merged

777genius merged 3 commits into
mainfrom
feat/opencode-clock-authority

Conversation

@777genius

@777genius 777genius commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Original OpenCode event age cannot be checked from wall time alone. This adds a bounded read-only opencode-clock helper with boot/domain-qualified nanosecond intervals for Linux, Darwin and Windows. Windows resolves the precise interrupt-time export through the documented realtime API-set contract and uses precise wall time with no coarse fallback; unsupported or invalid authority fails closed. Existing notification journal behavior is preserved.

This is a prerequisite for dual-version notification admission. It does not yet wire the helper into the SDK/plugin or establish the five-platform packaged E2E matrix.

Validation: independent GPT-6.1 high review; exact integrated clock and full journal tests passed as an unprivileged user in fresh private TEST temporary roots; isolated Linux clock CLI dispatch passed on the same source; worker vet and cross-compilation passed. Historical root/temp environment failures are retained and explained, with no test skips or protection changes. Cross-compilation is not native-platform qualification.

The first native Windows run exposed a missing Kernel32 export on both Go matrix cells, while the strict boot ABI and precise wall checks passed. The repaired head 6602b0674b4c1041ae971008f60b84fedd178b74 binds api-ms-win-core-realtime-l1-1-1.dll, with separate load/export diagnostic predicates. Independent review, full unprivileged Linux journal/event tests and both Windows test-binary compilations passed for that exact two-file change. Native Windows CI on the repaired head is pending.

Related baseline: #294.

Add a bounded read-only clock helper and boot/domain-qualified samples for original native event admission. Preserve existing journal clock authority; Windows uses precise wall sampling without coarse fallback. Five-platform packaged qualification and notification admission integration remain pending.
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Compare the actual class90 boot identity ABI and precise counter against independent native calls. Retain the original whole-snapshot assertion and log bounded failure predicates without native identifiers.
Bind QueryInterruptTimePrecise to the documented realtime API contract. Retain strict boot identity and VOID pointer-output checks; report contract loading and export availability independently.
@777genius
777genius merged commit 7779529 into main Oct 4, 2026
17 of 20 checks passed
777genius added a commit that referenced this pull request Oct 4, 2026
Install one OpenCode notification plugin that selects the stock V1 or V2 observer. Preserve the original checkpoint history from #295, #298, #299, #300, #303 and #308.

Independent GPT-6.1 high reviews accepted the final source and installer integration. Installed business checks passed on Linux ARM64, Windows and real macOS ARM64 for both versions. Linux AMD64 TUI checks passed. One-shot run delivery remains best effort; native Intel desktop E2E remains unproved, and this merge does not publish a release.

Refs #105
Refs #301
Refs #302
Refs #309
Refs #320
Related #336

Related #337
@777genius
777genius deleted the feat/opencode-clock-authority branch October 4, 2026 20:37
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.

1 participant