fix(sleep): harden merged outcome, grouping, and Copilot paths - #203
Merged
Yifan Yang (Yif-Yang) merged 3 commits intoAug 6, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens SkillOpt-Sleep’s consolidation and judging/harvest pipelines following earlier merges, focusing on refusal detection robustness, enforcing read-only shared memory in grouped consolidation, and preventing secret persistence when harvesting Copilot CLI sessions.
Changes:
- Update
no_refusaldetection to measure refusal length after stripping leading Markdown markers and avoid Unicode lowercasing length distortion. - Enforce shared-memory isolation in
consolidate_groups()by overriding any caller-suppliedevolve_memory. - Redact secrets in Copilot CLI session text before applying the 4000-character clipping bound.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_sleep_multi_skill.py | Adds coverage ensuring callers cannot override grouped shared-memory isolation. |
| tests/test_outcome_judges.py | Adds regression tests for refusal-length measurement vs Markdown prefixes and Unicode lowercasing expansion. |
| tests/test_harvest_copilot_cli.py | Adds tests asserting secrets are redacted (including before clipping) when harvesting Copilot CLI sessions. |
| skillopt_sleep/multi_skill.py | Hardens grouped consolidation to always force evolve_memory=False without duplicate-kw failures. |
| skillopt_sleep/judges.py | Refines refusal detection to strip Markdown markers before length checks and avoid lowercasing length distortion. |
| skillopt_sleep/harvest_copilot_cli.py | Redacts secrets before truncating harvested Copilot CLI text. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ( | ||
| "s1", | ||
| 0, | ||
| f"Use Authorization: Bearer {user_secret} for this task", |
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.
Follow-up hardening for #198, #186, and #200 after preserving their original merge commits and contributor attribution.
Changes
Verification