Skip to content

[codex] node:v8 lifecycle helper surfaces#3622

Draft
andrewtdiz wants to merge 1 commit into
PerryTS:mainfrom
andrewtdiz:perry-node-compat-6
Draft

[codex] node:v8 lifecycle helper surfaces#3622
andrewtdiz wants to merge 1 commit into
PerryTS:mainfrom
andrewtdiz:perry-node-compat-6

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Summary

Closes #3139
Closes #3141

  • adds the node:v8 native module namespace for Perry-backed lifecycle helpers only
  • implements v8.promiseHooks.onInit/onBefore/onAfter/onSettled/createHook on Perry Promise allocation, callback execution, and settlement paths
  • implements v8.startupSnapshot normal-runtime helper state: isBuildingSnapshot() returns 0, registration helpers throw ERR_NOT_BUILDING_SNAPSHOT
  • updates manifest/codegen/runtime dispatch, generated API docs, parity gap metadata, and a focused lifecycle fixture

Validation

  • command -v curl && command -v python3 && bash ~/.codex/skills/deepwiki/scripts/run.sh --repo PerryTS/perry --question ... --output /tmp/perry-node-v8-lifecycle-deepwiki.md --timeout 1800 - passed
  • cargo fmt --check - passed
  • cargo check -p perry-runtime - passed
  • scripts/regen_api_docs.sh - passed
  • target/release/perry test-files/test_parity_v8_lifecycle.ts -o /tmp/perry_v8_lifecycle && /tmp/perry_v8_lifecycle - passed; output matches the equivalent Node plain-JS probe
  • ./run_parity_tests.sh --filter test_parity_v8_lifecycle - local environment skipped the fixture because /usr/bin/node v22.22.1 is built without TypeScript stripping (ERR_NO_TYPESCRIPT for any .ts file)
  • cargo test -p perry-codegen --test manifest_consistency - passed (4 tests)
  • cargo test -p perry-api-manifest - passed (12 tests + doctests)
  • cargo test -p perry-runtime - attempted; the parallel full suite reported gc::tests::barrier::test_minor_gc_promotes_after_two_survivals once and then hung in long GC tests. Reran cargo test -p perry-runtime gc::tests::barrier::test_minor_gc_promotes_after_two_survivals -- --nocapture and it passed.

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.

node:v8: expose startupSnapshot helper state node:v8: implement promiseHooks lifecycle callbacks

1 participant