Repository navigation
fix(sleep): do not harvest api-request-blob records and host notices as user prompts - #382
Open
Aditya Nikam (adityaanikam) wants to merge 1 commit into
Open
Aditya Nikam (adityaanikam) wants to merge 1 commit into
Aditya Nikam (adityaanikam) wants to merge 1 commit into
Conversation
This branch has not been deployed
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 #371.
digest_transcriptbranched only onmessage.role, so anapi-request-blobrecord (the raw API payload, roleuser, noisMeta) was counted as a typed prompt, and a loaded skill's body could count as negative feedback. Records with a type other thanuserorassistantare now skipped. A record without a type is still read, as before, because transcripts of that shape exist in the tests.Two other kinds of user records passed
_is_meta_promptas well and are now skipped:<task-notification>messages from background tasks, and the summary the host writes after compaction.The four new tests in
tests/test_sleep_harvest_non_user_records.pyrun the example from the issue: three fail on main and all pass here. The full suite has the same 22 failures with and without this change on my Windows machine.