feat(unblock): sustained 10min zero-wall loop + 10-agent SHIM-CD-01 first thin SIP probe design (VectorSteerer minimal guarded diff + full review package)#256
Conversation
…irst thin SIP probe design
- Add Zero-Wall Auto-Chain Mode to SUSTAINED_PHASE_ROUND_DRIVER.md (10min recovery scheduler as backstop, stub auto-continue with near-zero idle, mandatory PAUSE/OVERRIDE gate before dispatch).
- Upgrade long_running_orchestrator_stub.py to v0.2: --auto-continue, --max-wall-min, real OVERRIDE/BLOCKED gate (emits reports + sleeps on PAUSE instead of dispatching), wall-time logging + Process Improvement Notes for self-iteration.
- Record delegated OVERRIDE: ACTIVE in OPERATOR_OVERRIDE.md (user explicit grant 2026-05-28 to relax automatic hard PAUSE after repeated failures while preserving full honesty + research guard).
- High-agency 10-agent (A-J) wave on SHIM-CD-01 unblock:
- Diagnosis of historical failure pattern (large "research draft comment blocks" in tts:54-71 and antigravity seams that never became executable code).
- First concrete minimal guarded executable diff for VectorSteerer.steer (smallest surface; side-effect-free probe + activation record + metadata annotation under CHELATED_SHIM_RESEARCH=1; trivial rollback).
- Full pre-edit test harness, observables, SMOKE repros, rollback verification (C).
- Adversarial BHS L-tax + explicit go/no-go conditions with 8 human gates (D).
- Wave meta-audit (fidelity vs protocol, L9 self-callout on volume) (J).
- Literature mappings (ASA/AUSteer/SAS 2025-26 papers) with conditional improvements (F).
- Synthetic trace families for the probe sites (G).
- Tiny policy head sketch on cheap signals (H).
- Consolidated Human Review Package (exact B diff + all D/J conditions + risk/rollback + one-pager exec summary) ready for decision.
- All artifacts in research/loop_02/ + supporting docs, with full BHS honesty ("0 real SIPs wired so far", "0 substrate / does not satisfy goal #1 while BLOCKED + SHIM-CD-01", research guard absolute, Phase 3 0%).
Research-only spike. 0 prod edits. 0 overclaim. Ready for human review of the minimal guarded probe.
Refs: UNBLOCK_STRATEGY.md, Human_Review_Package_..., 21_-26_ wave artifacts, OPERATOR_OVERRIDE delegation.
There was a problem hiding this comment.
Code Review
This pull request introduces the research program, phase plans, and early implementation scaffolds for the Steering-Chelation-RAGDAG-MicroSLM (CHELATEDAI) framework, including the core ShimNode and ShimRegistry primitives and a long-running orchestrator stub. The reviewer's feedback focuses on improving the robustness of the orchestrator stub by using sys.executable for subprocesses, enforcing UTF-8 encoding for file operations, and utilizing absolute repository paths. Additionally, the reviewer identified a critical copy-safety violation in shim_node.py where get and lookup_by_context return direct internal references instead of deep copies.
| result = subprocess.run( | ||
| ["python", "scripts/check_block_flag.py"], | ||
| cwd=Path(__file__).parent.parent.parent.parent, # adjust to CHELATEDAI root | ||
| capture_output=True, text=True, timeout=10 | ||
| ) |
There was a problem hiding this comment.
Using "python" directly in subprocess.run can lead to issues if the active virtual environment's Python interpreter is not the default "python" in the system's PATH. It is more robust to use sys.executable to ensure the same Python interpreter is used to run the script.
| result = subprocess.run( | |
| ["python", "scripts/check_block_flag.py"], | |
| cwd=Path(__file__).parent.parent.parent.parent, # adjust to CHELATEDAI root | |
| capture_output=True, text=True, timeout=10 | |
| ) | |
| import sys | |
| result = subprocess.run( | |
| [sys.executable, "scripts/check_block_flag.py"], | |
| cwd=Path(__file__).resolve().parent.parent.parent.parent, # adjust to CHELATEDAI root | |
| capture_output=True, text=True, timeout=10 | |
| ) |
| """Returns (override_active: bool, reason: str). Must be called before every auto-chain.""" | ||
| override_file = Path(__file__).parent / "OPERATOR_OVERRIDE.md" | ||
| try: | ||
| content = override_file.read_text() |
There was a problem hiding this comment.
When reading or writing files that contain non-ASCII characters (such as § or —), calling read_text() or write_text() without specifying an explicit encoding can cause UnicodeDecodeError or UnicodeEncodeError on platforms where the default system encoding is not UTF-8 (e.g., Windows). It is highly recommended to specify encoding="utf-8".
| content = override_file.read_text() | |
| content = override_file.read_text(encoding="utf-8") |
| "note": "0 substrate / does not satisfy goal success def #1 while BLOCKED + SHIM-CD-01. PAUSE gate enforced per DRIVER:24 + PROTOCOL §8. No agents dispatched.", | ||
| "recommendation": "Edit OPERATOR_OVERRIDE.md to OVERRIDE: ACTIVE with reason + sign-off, or kill scheduler and scope-reduce." | ||
| } | ||
| gate_path = Path("loop_02") / f"auto_gate_{datetime.now(timezone.utc).strftime('%Y%m%d_%H%M')}_round{round_num:02d}.md" |
There was a problem hiding this comment.
Using relative paths like Path("loop_02") means the directory will be created in the current working directory from which the script is executed, which might not be the repository root. It is safer to define a repository root constant and construct absolute paths to avoid creating scattered directories.
| gate_path = Path("loop_02") / f"auto_gate_{datetime.now(timezone.utc).strftime('%Y%m%d_%H%M')}_round{round_num:02d}.md" | |
| repo_root = Path(__file__).resolve().parent.parent.parent.parent | |
| gate_path = repo_root / "loop_02" / f"auto_gate_{datetime.now(timezone.utc).strftime('%Y%m%d_%H%M')}_round{round_num:02d}.md" |
| } | ||
| gate_path = Path("loop_02") / f"auto_gate_{datetime.now(timezone.utc).strftime('%Y%m%d_%H%M')}_round{round_num:02d}.md" | ||
| gate_path.parent.mkdir(parents=True, exist_ok=True) | ||
| gate_path.write_text(json.dumps(gate_report, indent=2)) |
| "l9_risk": "Doc volume while #1 0% remains a carried L9 per plan:83/85." | ||
| } | ||
| } | ||
| out_path = Path("loop_02") / f"sustained_round_{round_num:02d}_summary.json" |
There was a problem hiding this comment.
Construct the absolute path using the repository root to ensure the summary JSON is written to the correct directory regardless of where the script is executed.
| out_path = Path("loop_02") / f"sustained_round_{round_num:02d}_summary.json" | |
| repo_root = Path(__file__).resolve().parent.parent.parent.parent | |
| out_path = repo_root / "loop_02" / f"sustained_round_{round_num:02d}_summary.json" |
| } | ||
| out_path = Path("loop_02") / f"sustained_round_{round_num:02d}_summary.json" | ||
| out_path.parent.mkdir(parents=True, exist_ok=True) | ||
| out_path.write_text(json.dumps(artifact, indent=2)) |
| - Never raises KeyError; absence is expressed as None (consistent with | ||
| soft lookup patterns in steering surfaces). | ||
| """ | ||
| return self._nodes.get(shim_id) |
There was a problem hiding this comment.
The implementation of get returns the internal ShimNode reference directly. This violates the documented contract that the returned vectors are independent copies, as any mutation to node.vectors or node.vectors[0] by the caller will directly modify the registry's internal state. To ensure strict copy safety and isolation, return a fresh copy of the ShimNode using from_dict(node.to_dict()).
node = self._nodes.get(shim_id)
if node is not None:
return ShimNode.from_dict(node.to_dict())
return None|
|
||
| scored.sort(key=lambda t: (-t[1], t[0])) # desc sim, then id lexical | ||
| return [n for _, _, n in scored[:top_k]] | ||
|
|
There was a problem hiding this comment.
Similar to get, lookup_by_context returns direct references to the internal ShimNode objects. To prevent callers from accidentally mutating the registry's internal state, return fresh copies of the matched nodes.
| return [ShimNode.from_dict(n.to_dict()) for _, _, n in scored[:top_k]] |
|
Parked (converted to draft): out of scope for the June 2026 drift-recovery campaign per the active scope freeze. SHIM substrate work resumes after the campaign's PR-4/PR-5 land. Do not merge in the campaign slipstream. |
What this PR saves for later pickup
This branch captures the full shift from short fragmented loops to a sustained, /goal-like 10min zero-wall auto-chain system + a high-agency 10-agent attack on the core blocker (SHIM-CD-01: 0 real SIPs ever wired into production after 11+ cycles).
Mechanics delivered (user-requested)
SUSTAINED_PHASE_ROUND_DRIVER.md: Added "Zero-Wall Auto-Chain Mode" (10min recovery scheduler as backstop; long-running stub auto-continues with near-zero idle after each round; mandatory re-read + OVERRIDE/BLOCKED gate before any dispatch).long_running_orchestrator_stub.py→ v0.2:--auto-continue,--max-wall-min 10, real PAUSE/OVERRIDE gate logic (emits gate reports + sleeps instead of dispatching when conditions met), wall-time accounting + "Process Improvement Notes" for self-iteration.OPERATOR_OVERRIDE.md: Recorded delegated ongoing OVERRIDE: ACTIVE (user explicit grant 2026-05-28) relaxing the automatic hard §128 PAUSE after repeated failures while preserving full brutal honesty + research guard.10-agent unblock wave on SHIM-CD-01 (executed under delegated authority)
Root-cause diagnosis: Historical work repeatedly stopped at large "research draft comment blocks" (tts:54-71 + identical in antigravity seams) that sketched thin guarded probes + MinMax pre-filters — but never produced executable code.
First concrete minimal guarded executable SIP probe design (Agent B, grounded in A):
tts_pipeline.pyVectorSteerer.steer (smallest surface, natural metadata contract already wired to TTSResult + callers).osimport + one guardedif CHELATED_SHIM_RESEARCH==1block (counter +_last_research_activation_record) + annotation of the existing 3-key return metadata dicts with three newresearch_shim_*keys.steering_metaon real inference.All artifacts (independent, in
docs/steering_chelation_rag_dag_research/loop_02/, full BHS honesty):21_agentA_research_mapping_SHIM_CD_01_unblock.md22_agentB_build_SHIM_CD_01_VectorSteerer_minimal_guarded_diff.md(the exact diff)03_cycle011_agentC_evidence_SHIM_CD_01_unblock_test_harness.md23_agentD_bhs_audit_...24_agentJ_meta_audit_...25_agentF_literature_...07_cycle011_agentG_traces_SHIM_CD_01_unblock.md26_agentH_micro_slm_policy_sketch_...SHIM_CD_01_Unblock_Strategy.md(living doc)Human_Review_Package_VectorSteerer_First_SIP_Probe_20260528.md(one-pager + exact diff + all D/J conditions + risk/rollback + exec summary — this is the review-ready artifact)Current honest state (repeated in every artifact):
Next step (human decision)
Review the exact diff in the Human_Review_Package (or the identical text from 22_agentB). If you approve with the 8 explicit conditions listed there (acknowledgment of reality, "first probe signal only", L9 risk, full coordination, C SMOKE producing first bhs json, D post-audit, your Tier B sign-off, etc.), we can execute the guarded edit + evidence run in the next cycle/stub invocation and finally produce the first real steer-path SIP signal.
If not approved or you prefer to scope-reduce: say so and we'll emit a final gate + pause per the repeated §128 recommendations.
Research-only spike. Full brutal honesty preserved. No overclaim. Ready to pick up exactly where we left off.
Refs: UNBLOCK_STRATEGY.md, all 21_-26_ + 07_/26_ wave artifacts, OPERATOR_OVERRIDE delegation entry.