mirror of
https://github.com/proffesor-for-testing/agentic-qe.git
synced 2026-09-19 08:45:47 +08:00
76383372da
Two related fixes for the init flow broken in v3.9.1:
1. aqe init --auto hangs at "Code intelligence pre-scan"
After v3.9.1 flipped useRVFPatternStore to true by default,
AQELearningEngine.initialize() would open patterns.rvf twice in
the same process:
a) createPatternStore() -> _createRvfStore('.agentic-qe/patterns.rvf')
acquires an exclusive native file lock via @ruvector/rvf-node
b) getSharedRvfDualWriter() -> getSharedRvfAdapter() ->
createRvfStore('.agentic-qe/patterns.rvf') tries to acquire the
same exclusive lock -> deadlocks forever
Fix: createPatternStore() now routes through the getSharedRvfAdapter()
singleton. Only one file handle exists per process; subsequent callers
receive the cached instance. RvfPatternStore.dispose() gains a
skipCloseOnDispose option so it won't close a shared adapter.
2. CLI doesn't exit after init completes
Native NAPI handles from @ruvector/rvf-node and @ruvector/router
kept the event loop alive indefinitely. cleanupAndExit() previously
used async dynamic imports for cleanup modules, which loaded more
native bindings before the unref'd 3s force-exit timer could fire.
Fix: cleanupAndExit() is now synchronous — fire-and-forget disposes
followed by immediate process.exit(). Init completes and exits
cleanly in ~7s.
Verification:
- aqe init --auto on fresh project: EXIT=0, ~7s, all 12 phases pass
- Isolated npm pack+install: aqe --version returns 3.9.2
- 65 pattern-store + rvf-pattern-store tests pass
- 15/15 performance gates pass
- Build + typecheck: zero errors
Note: Full unit suite runtime regression (>22min, unrelated to this
fix) tracked separately in #396.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.6 KiB
1.6 KiB
v3.9.2 Release Notes
Release Date: 2026-04-06
Highlights
Hotfix for aqe init --auto hanging at the "Code intelligence pre-scan" phase on projects that previously had v3.9.0 installed. Also fixes a related issue where the CLI process wouldn't exit cleanly after init completed.
Fixed
aqe init --autohangs at "Code intelligence pre-scan" — After v3.9.1 enabled RVF pattern store by default, the learning engine initialization openedpatterns.rvftwice in the same process: once directly viacreatePatternStore()and again throughgetSharedRvfDualWriter(). The native @ruvector/rvf-node binding holds an exclusive file lock on open, so the second call deadlocked waiting for a lock the same process already owned.createPatternStore()now routes through the shared adapter singleton, guaranteeing only one handle per process.- CLI doesn't exit after
aqe initcompletes — Native NAPI handles from RVF and router kept the event loop alive indefinitely, and the async dynamic imports in the cleanup path loaded even more native bindings before the 3-second force-exit timer could fire. The cleanup path is now synchronous with immediateprocess.exit(). Init completes and exits cleanly in ~7 seconds.
Changed
RvfPatternStore.dispose()respects shared adapters — NewskipCloseOnDisposeoption prevents accidentally closing adapters owned by the singleton, so other consumers retain access.
Upgrading
npx agentic-qe@3.9.2 init --auto
No manual migration needed. If you had v3.9.0 or v3.9.1 and aqe init --auto was hanging, the upgrade resolves it automatically.