Skip to content

feat(loops): runtime steer-firewall + dynamicLoopRunner analyze forwarding (RSI Gen-1)#139

Merged
tangletools merged 1 commit into
mainfrom
feat/rsi-gen1-close-loop
Jun 3, 2026
Merged

feat(loops): runtime steer-firewall + dynamicLoopRunner analyze forwarding (RSI Gen-1)#139
tangletools merged 1 commit into
mainfrom
feat/rsi-gen1-close-loop

Conversation

@tangletools

Copy link
Copy Markdown
Contributor

RSI Gen-1, PR-A (runtime closures; vitest-verified on src, no dist coupling).

Steer-firewall (selector ≠ judge), enforced at runtime. assertTraceDerivedFindings (in runAnalyze, fail-loud) rejects a finding whose evidence is a judge/verdict score — an EvidenceRef kind:'metric' with a verdict|judge|score uri scheme. span/event/artifact/finding refs and empty evidence stay legal (existing analysts + 4 fixtures unaffected). Provenance, not content: the external write-only judge can no longer leak back into steering.

dynamicLoopRunner.analyze forwarding — closes the gap that kept the runLoop wrapper from running f(trace, findings).

Tests (+4): artifact-ref PASSES · empty-refs PASSES · verdict:score metric REJECTED · non-judge latency_ms metric PASSES. tsc + biome clean; 30/30 loops tests.

Designed via a full /pursue cycle (5-seam audit + 4-lens adversarial review). The planner-directive surface (outer-loop seam) was deliberately deferred — gated on the inner-loop verdict, no optimizer consumes it yet. The bench live-loop runner + the measurement pilot are PR-B.

…rding (RSI Gen-1)

selector ≠ judge, enforced at runtime. The diagnosis the dynamic driver steers from
must be TRACE-derived, never judge-derived: assertTraceDerivedFindings (called in
runAnalyze, fail-loud) rejects a finding whose evidence is a judge/verdict score (an
EvidenceRef kind:'metric' with a verdict|judge|score uri scheme). span/event/artifact/
finding refs and empty-evidence findings stay legal, so existing analysts + the 4
fixtures are unaffected. Provenance, not content — the one coupling the architecture
forbids (the external write-only judge leaking back into steering) can no longer reach
the planner.

Also: dynamicLoopRunner forwards an optional `analyze` hook to createDynamicDriver,
closing the gap that kept the runLoop convenience wrapper from running f(trace, findings).

tests/loops/dynamic.test.ts +4: artifact-ref PASSES, empty-refs PASSES, verdict-scheme
metric ref REJECTED, non-judge (latency) metric ref PASSES. tsc + biome clean; 30/30 loops tests.
@tangletools tangletools merged commit 70a1360 into main Jun 3, 2026
1 check passed
@tangletools tangletools deleted the feat/rsi-gen1-close-loop branch June 3, 2026 17:02
drewstone added a commit that referenced this pull request Jun 6, 2026
Cuts the 58-commit backlog on main into a published release. Headline surface:
- runToolLoop / streamToolLoop — bounded turn-level tool-dispatch loop (#137)
- RSI agent tree: recursive Agent.act, Supervisor keystone, runProgram, the
  adaptive-driver channel (#139/#151/#165)
- optimization API collapsed onto agent-eval selfImprove; the runtime keeps the
  CODE-surface ImprovementDriver you pass as driver (#172)
- deployable benchmark adapters: AppWorld, commit0, aec-bench, EnterpriseOps-Gym;
  runBenchmarks over one ADAPTERS registry (#153/#156/#157)
- agent-eval floor raised to >=0.83.0 (#175)
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.

2 participants