Skip to content

Fix issues from repo review - #4

Merged
JenD86 merged 2 commits into
rename-to-modulofrom
fix/report-findings
Oct 27, 2026
Merged

JenD86 merged 2 commits into
rename-to-modulofrom
fix/report-findings

Conversation

@JenD86

@JenD86 JenD86 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #3 (rename); fixes from the internal repo review.

Fixes

  • Degeneration retry used a stale prompt: after dropping vectors, the unsteered retry was generated from the old prompt that still listed them as active. It is now re-encoded.
  • Manual apply()/drop() between steps were off by one: a manually applied vector got two full-strength turns, and a manual drop blocked re-use for three turns. Both now match the model's own tool calls.
  • Harness system prompts: a leading system message is merged into the steering prompt instead of sending two.
  • steer now rejects inf (previously only NaN); zero or non-finite vector norms raise instead of injecting NaN.
  • torch.load(..., map_location="cpu"); extraction always removes its capture hook.
  • Demo logs: the --seed prompt is now logged; inputs are logged under the turn they feed into; the misleading "decay" event is now "steering_state" (replay.py still reads old logs).
  • Added pyproject.toml (pip install -e .) and removed unused config constants. AGENTS.md documents both, and notes that Gemma-2 (no system/tool roles) isn't supported yet.

Deliberately not changed: report feedback still isn't written to registry.yaml. It's available in StepResult.tool_results and the session logs; where it should be persisted is a design call.

Testing (RTX 4090 RunPod, Qwen2.5-7B-Instruct)

  • pytest: 32 passed (CPU + GPU). 6 new CPU tests, all confirmed to fail on the old code.
  • verify_vector.py --vector assistant_axis --strength 12: clear ± shifts versus the baseline.
  • ./run.sh --auto --max-turns 5: the model steered itself to -15 and degenerated; the detector dropped the vector and the retry was coherent. The replay shows the seed and the new turn labels.

🤖 Generated with Claude Code

JenD86 and others added 2 commits October 27, 2026 16:42
…g, logs, packaging

- Degeneration fallback re-encodes the prompt after dropping vectors, so the
  unsteered retry no longer tells the model they are still active.
- apply()/drop() called between steps now match the model's own tool calls:
  one full-strength steered turn, and a COOLDOWN_TURNS-long cooldown.
- A harness's leading system message is merged into the steering prompt
  instead of producing two system messages.
- steer rejects non-finite strengths (inf), not just NaN.
- Raise on zero/non-finite vector norms instead of steering with NaN.
- torch.load uses map_location="cpu"; extraction always removes its hook.
- Demo logs: record the --seed prompt, log inputs under the turn they feed,
  and rename the "decay" event to "steering_state" (replay reads both).
- Add pyproject.toml (pip install -e .) and drop unused config constants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… setup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JenD86
JenD86 merged commit a75e11f into rename-to-modulo Oct 27, 2026
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