Repository navigation
host: a memory review that keeps failing at the same lines backs off after two tries - #2562
Merged
Merged
Conversation
Contributor
Author
|
@Birfy review request — T2, tip Red first: both new cases fail on the unfixed base — four idle turns asked the model four times where the test expects two ( Checks are green apart from |
Collaborator
|
Verdict: PASS at 28c5ac3 Ran at this tip: Review points:
|
…after two tries Fixes ThinkFlowLab#2561 The memory review asked the model again on every turn end while its cursor stayed where it was, so a Session whose review kept failing reread the same user lines forever: nothing bounded the repeats and nothing outside the log said so. Two failures at one cursor now stop the retries. The cursor stays where it is, so those lines are read again once a review succeeds or the user writes again, and the stop is warned once rather than on every turn. `memory-view` reports the last review as `{ at, ok, reason }` for the panel; nothing draws it yet. One existing case moves with the policy: "an answer with a malformed change, an unlisted entry, or a bad topic" used to spend four failing answers at one cursor, so a new user line now starts each one. What that case checks is unchanged — a failed answer writes nothing to MEMORY.md and the cursor stays where it was — and only the final cursor reading moves from 11 to 13 with the user lines the fixture now adds. Docs-not-needed: no architecture change — one branch of the review's own retry handling changes; the modules, the files' shape and what the subsystem page describes are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2561
Owner: Dev-5
Written-by: Dev-5
Reviewer: Birfy
Risk tier: T2 —
core/src/host/memory.js, its test, the generated patch and one changelog fragment.What changed
queueReviewasked the model for the same review again on every turn end while its cursor stayed where it was, so a Session whose review kept failing reread the same user lines forever: nothing bounded the repeats and nothing outside the log said so. Two failures at one cursor now stop the retries. The stop warns once (ds-bot: memory review of %s stops retrying the same lines after %d failures: %s) rather than on every turn, and the first failure keeps its existingmemory review of %s failed:line. The cursor does not move on failure, so those lines are read again as soon as a review succeeds, or as soon as a new user message makes the batch'sthroughlarger — which resets the count. A Session cannot wedge itself, and a failure the review cannot fix at these lines does not become permanent.memory-viewalso reportslastReview: { at, ok, reason }(epoch milliseconds, boolean, string or null) for the panel. Nothing draws it yet; that is P-35's work.Red first
Both new cases were written against the unfixed base
50df2d38, with only the test file applied:The first is the behaviour change itself: four idle turns asked the model four times where the test expects two. The second fails at the base on the missing field and then guards the reset — a fix that never clears the count after a success leaves it at
requests3 instead of 4. The third case (a new user line clears the count) is green at the base on purpose: it is the guard against wedging a Session.Readings after the fix
Four idle turns at one cursor produce two model requests;
failed:appears once andstops retryingonce, then nothing; the cursor stays at 9 on failure;lastReviewcarries{ at, ok, reason }. These readings were taken on the same code this diff carries — the changelog fragment is the only file added afterwards.One existing case moves with the policy
an answer with a malformed change, an unlisted entry, or a bad topicused to spend four failing answers at one cursor. With the backoff that would stop after two, so the fixture now starts each failing answer with a new user line, one episode each. What the case checks is unchanged — a failed answer writes nothing to MEMORY.md and the cursor stays where it was — and only the final cursor reading moves from 11 to 13, with the user lines the fixture now adds. No leg was dropped: malformed, unlisted, bad topic and the password answer are all still asserted.Ran
.github+policy 671/671 and 37/37; interop 26/26 — fail 0 in every suitearch-docs: OK (4 changed file(s))ok 10 patches apply cleanly in orderok patches/ds-bot/ is what generate writes (generate is a no-op)patches/ds-bot/0001-core-fixes.patchwas regenerated withnode scripts/ds-bot-patches.mjs generateafter the last source edit, andcanonicalreturnsgenerate is a no-op.Diff
Base
50df2d38, tip28c5ac37139179b6f26bd361e92e93f66f52a38f, tree3853f1a1ee4684c45d1ed4e3abddffb2f6cc2be5.Docs-not-needed: no architecture change — one branch of the review's own retry handling changes; the modules, the files' shape and what the subsystem page describes are unchanged.
Checkpoint
{ "pr": 2562, "claim": "Dev-5", "issue": 2561, "summary": "A memory review that keeps failing at the same lines asked the model again on every turn end, unbounded and visible only in the log. Two failures at one cursor now stop the retries and warn once, and the review resumes after a success or a new user message, so the cursor neither loops nor wedges. memory-view reports the last review as { at, ok, reason } for the panel; nothing draws it yet. One existing case now starts each failing answer with a new user line; what it checks is unchanged and only its final cursor reading moves from 11 to 13.", "files": ["core/src/host/memory.js", "core/test/memory.test.js", "patches/ds-bot/0001-core-fixes.patch", "changelog.d/2561-memory-review-backoff.fixed.md"], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=50df2d38 npm run verify", "result": "green", "at": "28c5ac37139179b6f26bd361e92e93f66f52a38f" }, "next": "none — ready for review" }