-
-
Notifications
You must be signed in to change notification settings - Fork 72
fix: sleep profile folds every derive pass instead of once per night #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7707bba
fix: sleep profile was folding every derive pass, not once per night
abdulsaheel a535b2d
fix bot findings: serialize the profile fold against concurrent days
abdulsaheel d1ccf16
fix round 2: cross-isolate fold guard, and a test that was vacuous
abdulsaheel 45f0939
fix round 3: don't fail a whole day on a bookkeeping write
abdulsaheel 365c6f8
tests: settle two PR Agent claims with coverage instead of argument
abdulsaheel e029dfd
correct two claims I got wrong rather than paper over them
abdulsaheel 7d9c8e4
assert the day_id format the folded-days cap depends on
abdulsaheel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Do not lose a fold when bookkeeping contention occurs.
After this catch, a day can be finalized without its
day_idinfolded_days. On the next pass,_sleepCandidateForDayreturns the cached finalized candidate at Lines 1133-1150 before loading the profile or producingobservationJson._foldObservationIntoProfileis then never retried. The same path prevents folding after an override is removed. Persist a pending observation, or bypass the finalized-candidate cache until the day is recorded infolded_days.🤖 Prompt for AI Agents