Repository navigation
Conversation
|
@guibeira is attempting to deploy a commit to the rohitg00's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
| # ============================================================================= | ||
| # agentmemory configuration | ||
| # ============================================================================= | ||
| # |
There was a problem hiding this comment.
🟡 Commits retain prohibited attribution trailers
Both 0a056c7 and eb131ee contain Co-authored-by: iii harness (claude-opus-5-5). The repository prohibits AI attribution headers in commits.
Learn more
The repository's contribution rules prohibit attribution headers naming Claude in commit messages. Both new commit messages include a Co-authored-by trailer naming claude-opus-5-5; this is separate from their missing DCO sign-offs.
Example: The commit restoring this header ends with Co-authored-by: iii harness (claude-opus-5-5) <noreply@iii.dev>.
Recommended fix: Remove the prohibited trailers while amending the two commits.
Was this helpful? React with 👍 or 👎 to provide feedback.
The merge in 678c67a joined the first header lines into "# ====...# agentmemory configuration". Restore the four header lines from main. Signed-off-by: guibeira <contact@guibeira.dev>
…server and clear runtime timers - An unreadable boot vector checkpoint was retried on every 30 s tick, and every retry rebuilt the whole BM25 index. The retry re-set its own "unavailable" flag, a paused recovery counted as a reason to rebuild, and the pause message in lastError read as a failed checkpoint save. Retries now back off from 30 s to 30 min, and an unusable checkpoint no longer triggers a keyword rebuild. - A checkpoint that comes back with the wrong embedding dimension logged "Refusing to start" on every tick while the worker kept running. It now pauses recovery once (pauseForUnusableCheckpoint) and is not retried. - The engine::on-workers-changed observer is created through Bindings.observeRuntime, so it gets the OBSERVER_ID_CONFLICT retry and appears in runtime.bindings, and it filters input.event to worker_connected and worker_disconnected in the engine. - The duplicate-worker check runs at boot, when the state worker returns and on worker connect/disconnect events instead of polling engine::workers::list every 30 s. A disconnect now clears the warning. - Shutdown clears the runtime tick and the compression sweep and stops the re-arm. - Status and the 0.26 upgrade guide no longer say that delete cascades, relation reactions, failure audits and post-remember graph extraction run as direct calls; those observers have no direct-call path and are reported separately. Tests boot the real src/index.ts main() against an in-memory engine (test/helpers/fake-engine.ts) and drive the tick and SIGTERM handler it installs. Signed-off-by: guibeira <contact@guibeira.dev>
2026280 to
f608db8
Compare
…nged observer and clear runtime timers Run the duplicate-worker check as soon as the workers-changed observer becomes active again, so a short outage between two ticks is covered, and keep the tick check only while that observer is not active. A check now publishes its result only when no check started after it has already finished, so a late response cannot erase a newer warning. Signed-off-by: guibeira <contact@guibeira.dev> Co-authored-by: iii harness (claude-opus-5-5) <noreply@iii.dev>
…nged observer and clear runtime timers Treat a workers-changed conflict replacement that is already active as a recovery, so the events missed during the conflict get one duplicate check, and report no worker changes after stop(). Drop a comment that only restated onRuntimeHandle. Signed-off-by: guibeira <contact@guibeira.dev> Co-authored-by: iii harness (claude-code/claude-opus-5-5) <noreply@iii.dev>
Follow-up to #1753. This PR targets
feat/iii026-observers, so it lands in #1753 before #1753 merges.Each issue below was first reproduced with a test that failed on 6c324d7, the current head of #1753. The fix makes that test pass. For issues 1, 3 and 4, the code lives inside
main(), so the tests boot the realsrc/index.tsmain()against an in-memory engine (test/helpers/fake-engine.ts). They capture the intervals thatmain()installs and run the 30 s runtime tick with the clock moved forward.Before and after
engine::on-workers-changedobserverBindings, so it is missing fromruntime.bindingsand gets noOBSERVER_ID_CONFLICTretryBindings, retried on conflictengine::workers::listcalls.env.exampleheadermainChanges
1. Checkpoint retry loop (
src/index.ts,src/state/index-persistence.ts,src/runtime/recovery.ts)An unreadable boot checkpoint was retried on every 30 s tick, and every retry rebuilt the whole BM25 index. There were three causes:
pending()stayed true.pauseRecovery()writes its message tolastError, socheckpointSaveFailedwas also true without any failed save.The fixes:
createRetryBackoff). A real state-worker return still retries at once.IndexPersistence.checkpointSaveFailed()is true only after a real save failure.pauseForUnusableCheckpoint()instead ofprepareBackfill(null). It is logged once, is not retried, and the message no longer says "Refusing to start". The boot path is unchanged.2. Workers-changed observer (
src/runtime/state-worker.ts,src/runtime/bindings.ts)The observer is now created through
Bindings.observeRuntime(). It filtersinput.eventtoworker_connectedandworker_disconnectedin the engine. It now appears inruntime.bindings, and theOBSERVER_ID_CONFLICTretry covers it.3.
engine::workers::listpolling (src/index.ts,src/runtime/bindings.ts)The duplicate-worker check runs at boot, when the state worker returns, and on each worker connect or disconnect event. A disconnect also clears a stale duplicate warning left after a quick restart. The 30 s tick checks only while the workers-changed observer is not active (
Bindings.runtimeActive()), and once more when that observer comes back to cover the events it missed. A rejected observer therefore does not leave the warning stale.4. Shutdown (
src/index.ts)clearInterval(rearmTick),clearInterval(sweepTimer)andrearm.stop()run at the start of shutdown.5. Status wording (
src/runtime/bindings.ts,src/runtime/pipeline-observers.ts,src/functions/status.ts,docs/upgrades/iii-0.26.md)Pipeline observers now carry a
fallbackflag. Onlymem::compressandmem::post-session-*have a direct-call path; the callers checkobserving(). The delete cascade, relation reaction, failure audit andmem::post-remember-graphobservers are reported as having no direct-call fallback. Theobserver-rejectedstatus message and the 0.26 upgrade guide now say the same.6.
.env.example: restores the header frommain.Behavior changes
runtime::on-workers-changedobserver is now also registered whenAGENTMEMORY_BINDINGS=inline. It is runtime infrastructure, not part of the post-capture pipeline.engine::workers::listonly while that observer is not active.Tests
test/main-runtime-ticks.test.ts: issues 1a, 1b, 3 and 4, and the duplicate-check fallback while the workers-changed observer is rejected, against the realmain().test/main-checkpoint-restore.test.ts: a matching checkpoint that becomes readable again is still restored, with one keyword rebuild and no further reloads.test/state-worker-return.test.ts: workers-changed observer filter, ownership and conflict retry;createRetryBackoff; the pauses a retry cannot fix.test/bindings.test.ts: direct-call reasons for issue 5.Verification
npm test: 5044 passed, 7 skipped, 1 failed. The failure istest/release-install-policy.test.ts(npm packfails in my environment), and it fails the same way on 6c324d7.tsc -p tsconfig.json --noEmit: the same 27 errors before and after; none in the changed files.npm run docs:check: passes.