test: CI job exercising NAPI-load-failure graceful degradation path
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- ci-cd, testing-qa
Research direction
Start with packages/opencode/src/altimate/native/dispatcher.ts and the four cases in packages/opencode/test/skill/release-v0.9.6-adversarial.test.ts, then inspect the repository's CI workflows and native binding setup. The job is done when a real NAPI load failure exposes its specific error, a later Dispatcher.call retries registration successfully, and the check runs on the relevant platform matrix.
Written by the indexing model from the issue text.
Description
Deferred from the v0.9.6 release review (Chaos Gremlin persona).
Context
v0.9.6 ships a fix (packages/opencode/src/altimate/native/dispatcher.ts) for a bug where a transient NAPI load failure during Dispatcher.call's lazy-registration hook would poison the whole bridge for the process lifetime — every subsequent Dispatcher.call (not just the failing one) threw No native handler for X, and the CLI had to be restarted.
The fix caches the in-flight registration promise so:
- Concurrent callers share one attempt
- On failure the cached promise is cleared so subsequent calls can retry
- On success
_ensureRegisteredis nulled so the hook does NOT re-run unnecessarily
Unit tests are in packages/opencode/test/skill/release-v0.9.6-adversarial.test.ts (4 cases). But those exercise the dispatcher-layer state machine only — they don't verify the real-world scenario: a customer platform where the @altimateai/altimate-core NAPI binding actually fails to load (older glibc, unusual arch, permission issues, cold-cache first invocation).
What to do
Add a CI job that:
- Simulates a NAPI load failure on first
Dispatcher.call(e.g. by pointingaltimate-core.nodeat a missing/corrupted path) - Asserts the specific error surfaces to the caller (not a generic dispatcher error)
- Asserts a subsequent
Dispatcher.callre-attempts registration (i.e., the retry-after-failure invariant is preserved end-to-end, not just at the dispatcher unit-test level) - Runs on the platform matrix that most-likely hits real NAPI issues (linux-arm64, older Node runtime, etc.)
Belt-and-braces on the dispatcher retry fix. Not a repro of a customer report; prophylactic based on the release-review Gremlin lens.
Priority
P2 — the dispatcher unit tests cover the state machine; this CI job proves the state machine survives real-world NAPI failure modes.
- Dominant language
- TypeScript
- Stars
- 813
- Forks
- 134
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 62
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AltimateAI/altimate-code
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
AltimateAI/altimate-code#1323 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
AltimateAI/altimate-code#1288 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
AltimateAI/altimate-code#1285 ·
-
privacy: Altimate Base consent dialog no longer discloses persistent per-installation identifier Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
AltimateAI/altimate-code#1284 ·
-
Difficulty 2/5 Under an hour Newbie friendliness 72/100
AltimateAI/altimate-code#1283 ·
All issues in AltimateAI/altimate-code
Similar issues
-
S: triage
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
snapshot-labs/stamp#666 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
GauravKarakoti/SecureFlow#1070 · 1 comment ·
-
feature:Languages/Translations good first issue ready Web
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
digitalfabrik/integreat-app#4394 ·