Fix reflection fallback flow and dedupe duplicate integrated hooks#390
Fix reflection fallback flow and dedupe duplicate integrated hooks#390yeyeyeason wants to merge 1 commit intoCortexReach:masterfrom
Conversation
|
@yeyeyeason Thanks for the work, but this PR is too large to review safely — +4805 -4554 across index.ts, reflection-store.ts, and cli.ts is essentially a rewrite. For the reflection loop problem specifically, #369 solves it with a targeted +41 line fix (global re-entrant guard + serial cooldown). We're going with that approach. If you have additional improvements beyond the loop fix (recovery bundles, fallback path changes, CLI recovery commands), please split them into separate, focused PRs:
Each PR should be reviewable independently (<200 lines ideally). We can't merge a 5000-line PR that touches core registration and reflection logic in one shot. |
|
The issue is not just size. This PR currently mixes several separate changes into one review surface: reflection loop / hook dedupe, fallback flow rewrite, recovery bundles, and CLI recovery commands. That is already beyond what can be reviewed safely in a single pass. There is also regression risk in the current implementation. At minimum, I was able to confirm that the existing For the original reflection loop problem, I would strongly prefer the smaller and more targeted approach in #369. If the other improvements are still worth pursuing, please split them into focused follow-up PRs, for example:
That will make each change independently reviewable and testable. My recommendation is to close this PR and resubmit the piecesseparately. |
|
I'm inclined to close this PR. The issue is not just size. This PR currently mixes several separate changes into one review surface: reflection loop / hook dedupe, fallback flow rewrite, recovery bundles, and CLI recovery commands. That is already beyond what can be reviewed safely in a single pass. There is also regression risk in the current implementation. At minimum, I was able to confirm that the existing For the original reflection loop problem, I would strongly prefer the smaller and more targeted approach in #369. If the other improvements are still worth pursuing, please split them into focused follow-up PRs, for example:
That will make each change independently reviewable and testable. My recommendation is to close this PR and resubmit the pieces separately. |
Summary
Why
On
/new, embedded reflection failures were falling into a heavier CLI fallback path that could amplify latency and retries. In addition, the same integrated memory-reflection hooks could be registered multiple times in one process, causing a single/newevent to trigger serial duplicate reflection runs.What changed
Notes