Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions changelog.d/331-rrsi-fidelity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Changed
RRSI wiring fidelity closure (`examples/rrsi/rrsi_policies.py`): the wired
proposer/selector now consume the **pinned upstream fixtures**, not
approximations. Component attribution goes through `components.normalize` /
`classify_diff` (the upstream `K` / `K_STR` evidence rules — `skills/x/SKILL.md`
is a `skill` edit, `ToolRegistry(...)` is `client_tool`, pure prose is
`prompt`), replacing the first-path-segment heuristic. The per-edit ledger is
`history.History` (the pinned durable JSONL) when `build_rrsi_bundle(
history_path=...)` is given, with an in-memory twin for scratch runs pinned to
the same summaries by a parity test. `RRsiProposalPolicy` reads
`History.render` / `prune_set` (with the actionable accepted edits) /
`stall_flag`; `RRsiAcceptance` scores novelty over
`History.incumbent_component_counts`; the aggregator checkpoint now carries
only the search state (round, S*, incumbent cost, progress), while the
per-edit evidence is the History's own file — so a resumed run reads the same
evidence the loop conditioned on. Six fidelity tests pin the vocabulary, the
memory/file parity, durable resume and a genuinely novel structural component
carrying a within-band candidate.
24 changes: 18 additions & 6 deletions docs/algo-rrsi.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,28 @@ out of the tried set \(T_t\) and the yield \(g_t\). From it:
## Wired into `evolve()` (`examples/rrsi/rrsi_policies.py`)

`build_rrsi_bundle(complete, protected=..., reviewer=..., config=...,
base_score=...)` assembles the three slots into one `Policies` bundle and
returns `(bundle, state)`. The three share one :class:`RRsiState` — `S*`, the
measured per-edit ledger, the component bookkeeping and the annealed round
counter — which is what makes them one algorithm rather than three knobs.
base_score=..., history_path=...)` assembles the three slots into one
`Policies` bundle and returns `(bundle, state)`. The three share one
:class:`RRsiState` — `S*`, the measured per-edit history, the component
bookkeeping and the annealed round counter — which is what makes them one
algorithm rather than three knobs.

**Fidelity.** The wiring consumes the pinned fixtures, not approximations:
component attribution goes through :mod:`~examples.rrsi.components` (the
upstream `K` / `K_STR` / `normalize` evidence rules — `skills/x/SKILL.md` is a
`skill` edit, `ToolRegistry(...)` is `client_tool`, pure prose is `prompt`),
and the per-edit ledger is :class:`~examples.rrsi.history.History` (the pinned
durable JSONL) when `history_path` is given, with an in-memory twin for scratch
runs pinned to the same summaries by a parity test. The search state (round,
`S*`, incumbent cost, progress) rides the aggregator checkpoint; the per-edit
evidence is the History's own file, so a resumed run reads the same evidence
the loop conditioned on.

| Slot | Policy | What it regularizes |
|---|---|---|
| `Policies(screen=...)` | `RRsiCritic` | Pre-evaluation screen: annealed edit-budget gate (`len(ops) > b_t` rejected) and deterministic leakage screening against the evolve set (`protected` strings), plus an optional model `reviewer`. Runs **before measurement** (issue #221: "screening before evaluation is important"), so a leaking or over-budget card is settled and reported as `critic-rejected` without a held-out sweep. |
| `Policies(proposal=...)` | `RRsiProposalPolicy` | The regularized proposer: injects the annealed budget, the measured per-edit history, pruning targets and the stall-exploration note into the reflection prompt. |
| `Policies(acceptance=...)` | `RRsiAcceptance` | The pinned `selection.judge` decision — historical-best floor, both cost-rule branches, novelty — with `S*` advanced through the pinned `update_best_score`. `S*`, the ledger and the round counter checkpoint/restore through the aggregator's optional acceptance hook, so a resumed run does not lose the floor. |
| `Policies(proposal=...)` | `RRsiProposalPolicy` | The regularized proposer: injects the annealed budget, the measured per-edit history (`History.render`), pruning targets with the actionable accepted edits (`History.prune_set`) and the stall-exploration note (`History.stall_flag`) into the reflection prompt. |
| `Policies(acceptance=...)` | `RRsiAcceptance` | The pinned `selection.judge` decision — historical-best floor, both cost-rule branches, novelty over `History.incumbent_component_counts` — with `S*` advanced through the pinned `update_best_score`. `S*`, the round counter and the progress trajectory checkpoint/restore through the aggregator's optional acceptance hook, so a resumed run does not lose the floor. |

### Declared deviations (recorded, not silent)

Expand Down
Loading
Loading