Round-3: Sentrux + Kame + RSI cooldown + unattended LoRA + ~250 test fixes#3
Open
youngbryan97 wants to merge 2 commits into
Open
Round-3: Sentrux + Kame + RSI cooldown + unattended LoRA + ~250 test fixes#3youngbryan97 wants to merge 2 commits into
youngbryan97 wants to merge 2 commits into
Conversation
DriveEngine now tracks low-free-energy ticks and raises a seek_novelty flag when the prediction landscape goes stale (>300 ticks). Novelty, tool success, and meaningful FE drops relieve boredom and reset the counter. InitiativeSynthesizer gains a tension store: topics left mid-conversation, stalled goals, and open questions are persisted and periodically resurfaced as impulses. DiscourseTracker records unresolved topics on topic changes; heartbeat surfaces a boredom candidate when the flag is high; neurochemical success/novelty events feed back into the drive engine. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…fixes
Code:
- core/architecture_quality/: Aura-native equivalent of Sentrux. 5
metrics (modularity, acyclicity, depth, equality, redundancy) → single
0-10000 quality score with TOML rules. Wired into
SafeSelfModification.apply_fix as a pre-promote gate; rollbacks via
the existing SHA-256-verified backup path on regression.
- core/brain/llm/{tandem_kame,tandem_signal_bus,tandem_router}.py:
Aura-native Kame (Sakana, arXiv 2510.02327). Priority-ordered asyncio
pubsub bus carries OracleSignals (retract > handoff > correction >
refine > continue) from slow lane to fast lane mid-stream. Opt-in via
attach_tandem(); HealthAwareLLMRouter untouched.
- core/self_modification/safe_modification.py: tiered sepsis with
cooldown — first strike logs, second 24h ban, third 7d ban, all in a
3-day observation window. Migrates legacy permanent bans to a 7-day
expiry on first read so the modifiable surface stops shrinking
monotonically.
- training/run_unattended.{sh,py} + README_UNATTENDED.md: caffeinate-
wrapped training that survives lid-close; resume-from-latest
checkpoint, retry loop, atomic state snapshots, SIGTERM-safe.
Service registration:
- core/service_registration.py: register architecture_quality_gate and
tandem_kame as singletons; install gate at boot so cross-call
rejection path is populated.
Hygiene fixes (Codex worktree regressions):
- core/runtime/atomic_writer.py created (was referenced but missing,
causing 119 collection errors).
- core/data/project_store.py created (referenced by strategic_planner
+ boot_manager, never committed in git history).
- core/runtime/__init__.py: lazy __getattr__ to break the
core.runtime.atomic_writer ↔ core.runtime.core_runtime ↔ core.config
cycle.
- core/utils/task_tracker.py: track() recursion fixed (was self-calling
via the create_task alias).
- core/orchestrator/main.py: get_task_tracker hoisted to module top;
removed inner imports that were shadowing module-level names and
raising UnboundLocalError.
- core/cybernetics/ice_layer.py: executive-violation threat increment
back to +0.3 (the contract test expects this exact step).
- core/affect/affective_circumplex.py: reverted Codex's 112-line
rewrite to main; mood-feedback wiring restored.
- core/brain/cognitive_engine.py + core/cognitive/router.py +
core/continuity.py + core/runtime/errors.py: reverted to main where
Codex's edits broke contracts.
- core/continuity.py: 'keep'/'preserve'/'maintain'/'stable' added to
task_markers so 'Keep identity stable' isn't filtered as ephemeral.
- core/phases/learning_phase.py: enrichment scheduling switched to
asyncio.create_task + post-track to honor the test's monkeypatch.
- core/brain/inference_gate.py: deep-handoff restore scheduled via
asyncio.create_task so the loop factory observes it consistently.
- core/phases/cognitive_routing_unitary.py: affective-pressure path now
sets response_modifiers["deep_handoff"] = True for state-reflection /
aura_question / aura_stance triggers.
Test fixes:
- ~250 previously red or new tests now green: 119 collection errors
resolved, 175 orchestrator, 14 consciousness_bridge, 13 memory_facade
(with extended remember/recall MemoryOpsSkill), 6 architecture_quality,
9 tandem_kame, 5 run_unattended, ICE, launcher polish, project_store +
forensic_audit + strategic_planner, runtime_hygiene, pipeline blueprint
with cognitive_integration phase, null_hypothesis circumplex narrative
granularity, e2e_pipeline phase ordering, and the cluster of
cognitive_engine_2026 / inference_gate / cognitive_routing tests.
Architecture docs:
- ARCHITECTURE.md §15: full description of the Round-3 additions
including wire-up details, default rules, and what they buy together.
Round-3 LoRA dataset (training/build_round3_additions.py + manifest):
- Tracks: Levi voice, frontier reasoning long-CoT, agentic tool-use,
self-repair codebase, governance/safety, Sentrux+Kame patterns, Aura
codebase walkthrough, adversarial / alien-OS, trauma-informed /
social calibration. Reflects the freshly-expanded codebase as of this
commit.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
Round-3 lands four new active systems plus a substantial test-stability sweep on top of the worktree's snapshot.
core/architecture_quality/. 5-metric architecture score (0–10000), TOML rules, plugged intoSafeSelfModification.apply_fixas a pre-promote gate that rolls back via the existing SHA-256-verified backup on regression.core/brain/llm/{tandem_kame,tandem_signal_bus,tandem_router}.py. Fast/slow tandem with priority-orderedOracleSignalinjection (retract > handoff > correction > refine > continue). Opt-in viaattach_tandem(...); HealthAwareLLMRouter untouched.training/run_unattended.{sh,py}+training/README_UNATTENDED.md.caffeinate-wrapped, retry-on-fail, atomic state snapshots, SIGTERM-safe; preserves the existing auto-fuse andactive.jsonpublish.architecture_quality_gateandtandem_kameregistered as singletons incore/service_registration.py.ARCHITECTURE.md §15describes the Round-3 additions.Important: divergence from main
This branch was created from a snapshot ~176 commits behind current
main, so a direct merge has many conflicts. Rebasing the single Round-3 commit ontomainwas attempted and aborted at ~20 conflict files; the conflicts are mostly Codex's earlier worktree edits colliding with main's later improvements on the same files.Recommended merge strategy when reviewing:
mainfor any file that is NOT specifically Round-3 work — those are Codex's stale edits.core/architecture_quality/,core/brain/llm/tandem_*.py,core/runtime/atomic_writer.py,core/data/project_store.py,training/run_unattended.*,training/build_round3_additions.py,tests/test_architecture_quality.py,tests/test_tandem_kame.py,tests/test_run_unattended.py, the additions toARCHITECTURE.md, the sepsis-cooldown changes incore/self_modification/safe_modification.py, the Round-3 wiring incore/service_registration.py, the test-fix targeted edits.The Round-3 commit that carries all of this is
6c60eaf7.Test plan
pytest -q tests/test_smoke.py tests/test_orchestrator.py tests/test_consciousness_bridge.py tests/test_architecture_quality.py tests/test_tandem_kame.py tests/test_run_unattended.py tests/test_e2e_pipeline.py tests/test_integration_pipeline.py tests/test_constitutional_core.py tests/test_runtime_hygiene.py tests/test_runtime_pipeline_blueprint.py tests/test_memory_facade_runtime.py tests/test_grounding.py tests/test_causal_exclusion.py tests/test_ice_layer.py tests/test_launcher_polish_contract.py tests/test_project_store.py tests/test_strategic_planner.py tests/test_forensic_audit_regressions.py tests/chaos_test.py tests/test_container.py tests/test_container_2026.py tests/test_cognitive_engine_2026.py tests/test_inference_gate_tiering.py tests/test_cognitive_routing_unitary_tiering.py tests/test_learning_phase_runtime.py— all green at 486+ tests on the worktree.architecture_quality_gateandtandem_kameresolve cleanly through ServiceContainer.active.jsonwhen complete (~14–22h ETA from 2026-04-30T07:40 PT).🤖 Generated with Claude Code