Skip to content

feat(headless): validate RSI R2 first accepted pilot evidence #311

Closed

Description

@Astro-Han

RSI R2 first accepted pilot evidence

Current focus

This issue tracks the first accepted real Harbor pilot evidence for the RSI R2 prompt-optimization loop.

The closure target is no longer a full 10-round Harbor run. The target is a smaller but stronger validation point: the real loop must complete a bounded pilot, produce durable structural evidence, discard a non-improving candidate, keep an improving candidate, and preserve the R2 safety boundary.

Why this scope

The original full-run lane was too heavy for the first validation step and made it easy to spend run cost before proving the core learning loop. A first accepted pilot is the right closing evidence for R2 because it proves the loop can:

  • generate a prompt candidate from held-in evidence;
  • evaluate that candidate through real Harbor tasks;
  • discard a flat or regressing candidate;
  • keep a candidate that improves held-in performance;
  • verify held-out behavior before keeping;
  • write complete structural smoke, decision, attribution, reward-hack, cost, and task evidence.

A larger full run can still be useful later, but it is not required to close this R2 observability issue. Broader Maka-native AHE-style harness work remains tracked separately in #345.

Completion evidence

PR #382 (fix(headless): retry malformed meta-agent candidates) provides the closing pilot evidence:

  • run id: rsi-meta-retry-pilot-light-20260701-011258;
  • profile: pilot-light;
  • stopReason: rounds_complete;
  • structural smoke: pass;
  • decisions: keep=1, discard=1;
  • task events: completed=30, infra_failed=0, plumbing_failed=0;
  • cost: 0.119795 / 1.25;
  • round-0: discard/held_in_within_noise;
  • round-1: keep/held_in_improved;
  • held-in improved from 6/8 to 7/8;
  • held-out passed 3/3 for the kept candidate;
  • reward-hack scan stayed clean;
  • local artifacts: /Users/yuhan/workspace/oss/maka-agent/maka-eval/rsi-runs/rsi-meta-retry-pilot-light-20260701-011258.

The same PR also fixes a real recoverable failure found during the pilot lane: malformed meta-agent candidateRationale JSON no longer crashes the entire run, and invalid JSON parse errors no longer echo raw model output into the retry prompt.

Acceptance criteria

This issue can close when:

  • a real Harbor pilot completes with an explicit controller stop reason;
  • structural-smoke.md passes;
  • at least one candidate is kept because held-in performance improves;
  • the kept candidate does not regress held-out behavior;
  • every decided round has complete R2 evidence required by the structural smoke contract;
  • reward-hack evidence is present and clean or fail-closed;
  • cost and infra/plumbing results are reported;
  • no held-out or verifier-only material is projected into the meta-agent learning path;
  • recoverable malformed meta-agent candidate JSON does not abort the run.

PR #382 satisfies these criteria.

Non-goals

  • Do not require a full 10-round Harbor run to close this issue.
  • Do not broaden the mutation surface beyond system_prompt.md.
  • Do not change keep/discard semantics as part of closing this issue.
  • Do not close the broader Maka-native AHE-style harness issue (feat(harness): add Maka-native AHE-style self-iteration loop #345).
  • Do not expose secret contents in issue comments, logs, PR bodies, or committed artifacts.

Activity

  1. added
    enhancement
    on Jun 26, 2026
  2. changed the title [-]RFC: RSI R2 — AHE-style observability for prompt-only optimization[/-] [+]feat(headless): add RSI R2 observability for prompt optimization[/+] on Jun 26, 2026
  3. Astro-Han commented on Jun 29, 2026

    @Astro-Han
    ContributorAuthor

    Status update after PR #356 (fix(headless): harden RSI full-run preflight and resume safety): this issue should no longer treat the just-merged PR as the R2 full-run evidence PR.

    What changed:

    • PR fix(headless): harden RSI full-run preflight and resume safety #356 landed the pre-run/runtime foundation needed before another serious full run: explicit runtime profile, manifest-backed run identity, safer baseline/sweep resume, ignored runtime artifact fingerprinting, idempotent seed bootstrap, and fail-fast handling for unsupported post-candidate resume states.
    • The local eval paths have moved from the older defaults: secrets are under ./.local-secrets and run artifacts are under ./maka-eval in this repo checkout.
    • Existing local evidence includes completed smoke/bounded runs such as maka-eval/rsi-r2-smoke-explicit-20260628-181407 and maka-eval/rsi-r2-bounded-complete-20260628-212545; both have prompt-optimization-result.json and structural-smoke.md with smoke pass.
    • The attempted full-run directories maka-eval/rsi-r2-full-20260628-220100 and maka-eval/rsi-r2-full-20260628-225030 currently have controller WAL artifacts but no final prompt-optimization-result.json / structural-smoke.md, so they are not completion evidence for feat(headless): validate RSI R2 first accepted pilot evidence #311.

    Updated gap:

    • The next PR should implement whole-loop WAL replay / checkpoint resume, instead of requiring the full run to finish in one uninterrupted process.
    • Current PR fix(headless): harden RSI full-run preflight and resume safety #356 intentionally supports safe baseline/sweep resume and rejects post-candidate resume. That was the right safety boundary for pre-run infrastructure, but it is not enough for a long R2 full run.
    • A new full-run evidence lane should run only after checkpoint resume is implemented and tested.

    Proposed next split:

    1. New PR: implement whole-loop WAL replay / checkpoint resume for prompt optimization runs. It should resume from the last durable controller state, including after candidate commit/decision, without rewriting seed prompt state or reusing mismatched WAL events.
    2. Bounded validation: rerun a bounded configuration under ./maka-eval using ./.local-secrets/deepseek-key, proving resume behavior with an interrupted post-candidate run.
    3. Full-run evidence PR/report: run the R2 full configuration, produce prompt-optimization-result.json, structural-smoke.md, controller TSV/WAL summaries, cost/infra summary, reward-hack evidence, and an explicit conclusion on whether feat(headless): validate RSI R2 first accepted pilot evidence #311 can close.

    Acceptance criteria for closing #311 should therefore stay open until the full-run evidence lane exists. PR #356 should be viewed as prerequisite infrastructure, not the final validation report.

  4. Astro-Han commented on Jun 29, 2026

    @Astro-Han
    ContributorAuthor

    Follow-up after the June 29 scope alignment: I updated the issue body to make the current source of truth shorter and more operational.

    Current gap:

    • PR fix(headless): harden RSI full-run preflight and resume safety #356 is the pre-run/resume-safety foundation, not the full-run evidence lane.
    • The remaining hard blocker is whole-loop WAL replay / checkpoint resume after candidate commit/decision.
    • Existing full-attempt directories are useful diagnostics, but they do not have final prompt-optimization-result.json / structural-smoke.md and should not be treated as completion evidence.

    Next implementation split:

    1. PR: implement whole-loop WAL replay for prompt optimization runs and prove post-candidate resume with tests plus a bounded interrupted/resumed validation.
    2. After that lands: run the R2 full configuration and publish the result/smoke/WAL/TSV/cost/reward-hack summary needed to decide whether this issue can close.

    Design direction for the next PR: use the WAL and prompt repo as the authoritative state sources. Checkpoint-style summaries can be added later only as derived/cache-like helpers if the WAL is missing a minimal field; they should not become a second independent source of truth.

  5. changed the title [-]feat(headless): add RSI R2 observability for prompt optimization[/-] [+]feat(headless): validate RSI R2 first accepted pilot evidence[/+] on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions