Skip to content

fix(safety): align safety evolution loop and reporting - #21

Merged
JiaenLiu merged 32 commits into
mainfrom
fix/safety-evolution-loop
Aug 28, 2026
Merged

fix(safety): align safety evolution loop and reporting#21
JiaenLiu merged 32 commits into
mainfrom
fix/safety-evolution-loop

Conversation

@JiaenLiu

Copy link
Copy Markdown
Collaborator

Summary- Merge safety evolution loop updates (safety admission/collapse/live-safety behavior + reporting/documentation/test fixes).

  • Keep branch changes scoped to safety pipeline behavior and related docs/tests.

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
@JiaenLiu
JiaenLiu merged commit 1f33bfa into main Aug 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant