Skip to content

test: make the event-loop regression portable (macOS build fix) - #62

Merged
gitcommit90 merged 1 commit into
mainfrom
fix/event-loop-test-portability
Aug 3, 2026
Merged

test: make the event-loop regression portable (macOS build fix)#62
gitcommit90 merged 1 commit into
mainfrom
fix/event-loop-test-portability

Conversation

@gitcommit90

@gitcommit90 gitcommit90 commented Aug 3, 2026

Copy link
Copy Markdown
Owner

The 0.0.40 macOS release build correctly halted at npm test:

not ok - slow memory and readiness subprocesses leave the event loop responsive
  false !== true   at test/event-loop-unblocking.mjs:79

Line 79 is assert.equal(refreshed.ready, true), not a timing assertion. The test forces HELM_CHANNEL_COMPUTER_BACKEND=oci, but the OCI backend is only supported on linux/win32 (channel-computers.ts gates supported on platform() ∈ {linux, win32}). On the macOS Studio the same call correctly returns ready:false. Test-portability bug, not a product defect — the exact class AGENTS.override.md warns about.

Fix

The two ready-state assertions are gated on whether OCI runs on the current platform; each asserts the platform-correct value. The test's actual purpose — that the slow readiness refresh executes off the event loop — is unchanged: the refresh still runs on every platform, and the tick-count assertion that caught the original regression still runs everywhere.

Mutation-checked: reintroducing execFileSync in the memory bridge still fails the suite.

No version bump — this is part of the in-flight 0.0.40 whose artifacts are still being built.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated runtime readiness checks to account for platform and architecture support.
    • Preserved validation of event-loop responsiveness and caching behavior.

The event-loop-unblocking test forced HELM_CHANNEL_COMPUTER_BACKEND=oci and
asserted runtimeReadiness reports ready:true. The OCI backend is only
supported on linux and win32, so on the macOS release host the same call
correctly returns ready:false and the test failed - a test-portability bug,
not a product defect.

The two ready-state assertions are now gated on whether OCI is supported on
the running platform (linux/win32 + arm64/x64), asserting the correct value
either way. The point of the test - that the slow readiness refresh runs off
the event loop - is unchanged: the refresh still executes on every platform
and the tick-count assertion that actually caught the regression still runs
everywhere.

Verified: reintroducing execFileSync in the memory bridge still fails the
suite, so the guard is not weakened.
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 08dfd7d8-fd38-47f0-9ba7-d43541daff1e

📥 Commits

Reviewing files that changed from the base of the PR and between af77f39 and b3b1500.

📒 Files selected for processing (1)
  • test/event-loop-unblocking.mjs

📝 Walkthrough

Walkthrough

The runtime readiness test now derives expected OCI readiness from supported platform and architecture combinations. It continues to verify event-loop responsiveness during asynchronous refresh and cached readiness behavior.

Changes

OCI readiness validation

Layer / File(s) Summary
Platform-aware readiness assertions
test/event-loop-unblocking.mjs
The test derives expected OCI readiness from the current platform and architecture. It retains checks for slow asynchronous refresh and cached readiness.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • gitcommit90/1Helm#61: Introduces the event-loop and runtime-readiness test that this change extends.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem and fix, but it omits the required change type, release notes, acceptance ledger, verification, and post-merge sections. Add the required template sections and record the applicable checkboxes, acceptance evidence, release-note status, and verification results.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the portable event-loop regression test change and the macOS build fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/event-loop-test-portability

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

@gitcommit90
gitcommit90 merged commit 3e1ffce into main Aug 3, 2026
6 checks passed
@gitcommit90
gitcommit90 deleted the fix/event-loop-test-portability branch August 3, 2026 06:09
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