Skip to content

rescue: Fix ESM/CommonJS module issues and improve RW lock max handling - #149

Merged
ORESoftware merged 4 commits into
devfrom
rescue/orphan-17fa86f26b2a-fix-esm-commonjs-module-issues-and-impro
Sep 6, 2026
Merged

rescue: Fix ESM/CommonJS module issues and improve RW lock max handling#149
ORESoftware merged 4 commits into
devfrom
rescue/orphan-17fa86f26b2a-fix-esm-commonjs-module-issues-and-impro

Conversation

@ORESoftware

Copy link
Copy Markdown
Owner

Rescued orphaned/stranded work found on Macs-MacBook-Pro at ores/live-mutex.

  • local ref: rescue/orphan-17fa86f26b2a-fix-esm-commonjs-module-issues-and-impro @ 17fa86f26b2a
  • 3 commits not present on dev
  • salvage verdict: SUBSTANTIAL-salvage — diff vs dev: 52 files, +762/-5077

Commits:

  • 17fa86f Fix ESM/CommonJS module issues and improve RW lock max handling
  • 24d905c Merge origin/dev: improved exception classes, method signatures, and test cleanup
  • 76b97c1 Fix comprehensive-rw-lock-test: add reject parameter to Promise constructor

Found by a fleet-wide sweep for unreachable commits, never-pushed branches and stashes.
These commits were reachable only through the reflog, so a git gc would have deleted them.
Per AGENTS-cherry-pick-directive.md, if this is superseded, walk it feature by feature and
port what dev lacks rather than closing it outright.

- Fixed ReferenceError: exports is not defined in ES module scope
- Updated utils.ts and package-json-loader.ts to handle import.meta safely
- Improved post-build script to correctly remove import.meta from CommonJS builds
- Enhanced maxRead initialization for RW locks with defensive checks
- Separated maxRead and maxWrite for RW locks while keeping max for normal locks
- Fixed test cleanup and exit handling
- Increased test timeout to 60s for long-running tests
- All core functionality tests passing (11/17, remaining are long-running stress tests)

Copy link
Copy Markdown
Owner Author

Published the semantic reconciliation to the existing PR head at 52ef177.

Verification completed locally:

  • npm run compile:all
  • full npm test: 39/39 passed, 0 failed
  • targeted cleanup-hardening-test.ts: passed after clearing legacy holder timers during broker shutdown
  • removed generated Java .class artifacts from the commit and added clients/java/target/ to .gitignore

The branch was fetched/pruned against origin/dev before publication; no force-push, rebase, stash, or reset was used.

@ORESoftware
ORESoftware merged commit e8b2dd7 into dev Sep 6, 2026
1 check 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.

1 participant