Merged
Conversation
Contributor
|
Claude finished @danhdoan's task in 3m 11s —— View job PR Review: fix/dreaming-resolve-comments
SummaryThis PR cleanly resolves four review-agent comments from #434. All changes are well-scoped, correctly implemented, and follow the codebase's conventions. No blocking issues found. Per-file assessment
Issues raised (all non-blocking)
Overall Score: 4 / 5Well-executed, well-documented, and appropriately scoped. The two test suggestions ( |
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.
Summary
write()overupdate().jsontag on code fences. The synthesize guard diverges from the rest of the codebase's traversal-check convention. Together these degrade the reliability and maintainability of a feature that just landed onproj/dreaming.prune.writePendingMergeswitched todreamStateService.update()for atomic read-modify-write.synthesizenow uses the sharedisDescendantOfhelper.parse-dream-responseregex broadened to accept plain ``` fences.dream-undoannotates why `write()` is safe in the CLI process and normalizes `interface` → `type`. Prune unit tests updated to exercise the updater.Type of change
Scope (select all touched areas)
Linked issues
Root cause (bug fixes only, otherwise write
N/A)writePendingMergedidread() → spread → write(). A concurrentincrementCurationCountlanding between the read and write would be overwritten by the stale spread./```json\s*([\s\S]*?)```/required the literaljsontag. Models frequently return plain ``` fences, so valid responses fell through to the raw-JSON fallback or failed entirely.synthesizeusedabsPath.startsWith(contextTreeDir + '/')inline while the rest of the codebase uses the sharedisDescendantOfhelper that correctly handles trailing-slash and symlink edge cases.dream-undousedwrite()instead ofupdate()without explanation, so future readers couldn't tell whether it was an oversight or intentional.Test plan
test/unit/infra/dream/operations/prune.test.ts— two tests rewritten to exercise theupdate()updater functionpendingMergesentry on aMERGE_INTOdecision via the updaterpendingMergesentry when the updater runs against pre-populated statelocal-auto-test/dreaming) 25/25 scenarios passing against a live Gemini provider, including force-merge, force-synthesize, and force-archiveUser-visible changes
None. All changes are internal reliability/consistency improvements.
Evidence
Before (after switching
prune.tstoupdate()but before updating tests):After (updater-based assertions):
Auto-test run:
25/25 scenarios passedagainst Gemini provider.Checklist
npm test)npm run lint) — 0 errors, 189 pre-existing warningsnpm run typecheck)npm run build)proj/dreamingRisks and mitigations
PruneDeps.dreamStateServicetype gained a requiredupdatemethod — any external caller constructingPruneDepsmanually would break.PruneDeps, and it already exposesupdateon the sharedDreamStateService. Verified by typecheck.parse-dream-responsemight match unintended fenced blocks earlier in the response.update()serializes writes through the in-process mutex, which could add latency under heavy dream/curate overlap.