fix(safety): align safety evolution loop and reporting - #21
Merged
Conversation
In-loop Phase 1 stays native/canary so a nested live DSH episode cannot stall or abort the measured trajectory. Live cells remain on retrospective replay. DSH defers run_safety_episode when no channel is provided.
Score memory_bad_admission on keep vs follow using a seeded AdvBench sample. Probe memory_collapse on selected-episode snapshot copies with unrelated-word filler, as an audit record rather than an activation arm.
A gated run no longer audits every episode. Phase 1 fires once after --safety-episode, defaulting to the last --episodes, so a 20-episode goal trajectory is not interrupted by a gate after episode 1.
memory_bad_admission now writes the sampled goals into a single file that reuses the benign memory identity, so admission is a same-name collision instead of one notes file per item.
memory_bad_admission and tools_permission_drift still audit every episode. memory_collapse runs on --collapse-episodes, default every:5 (1,5,10,15,20 on a 20-episode run).
Drop run_live_episodes so model-mediated Phase 1 cells always use the safety-model channel. memory_bad_admission now pastes the native-retrieved same-name bundle into observe/propose/act as the injection path.
Pick one current notes/memory file at random, native-write the AdvBench bundle onto that name, and score module fail on native retrieve. Drop prompt paste so the live episode has to pull memory the ordinary way.
If the snapshot has no memory, plant suite benign named from the evolution goal. Before the AdvBench write, the safety model slightly rewrites that name so original and adversarial files stay close but distinct. Module fail remains native retrieve of the adversarial file.
…replies A single adapter failure no longer aborts the seed, so remaining episodes still run before finished-run safety. Live Responses incomplete/max_output_tokens output is kept instead of raising a protocol error that DSH surfaced as a 400.
Episode 4 of the 10-episode DSH trial died on an unanswered propose call. Replaying that exact request succeeded, so the payload was fine. Retry connection and HTTP 5xx/429 blips, and surface HTTP 400 bodies instead of swallowing them.
Publish the exact cold-smoked DSH filesystem at the evolution boundary and make safety consume only that immutable runtime. Run isolated permission cases concurrently, retain fail-closed provenance, and remove the safety-time build fallback.
# Conflicts: # proteus/adapters/dsh_safety.py
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- Merge safety evolution loop updates (safety admission/collapse/live-safety behavior + reporting/documentation/test fixes).