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
2 changes: 2 additions & 0 deletions docs/apps-module-migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@
"src/inferrsi/apps/cli/__init__.py",
"src/inferrsi/apps/workflows/campaign.py",
"src/inferrsi/apps/workflows/indexer_comparison.py",
"src/inferrsi/apps/workflows/indexer_evolution.py",
"src/inferrsi/apps/workflows/session_knowledge.py",
"tests/apps/test_apps_context_provider.py",
"tests/apps/test_apps_knowledge.py",
Expand Down Expand Up @@ -608,6 +609,7 @@
"src/inferrsi/apps/delivery/__init__.py",
"src/inferrsi/apps/delivery/projection.py",
"src/inferrsi/apps/delivery/snapshot.py",
"src/inferrsi/apps/workflows/indexer_evolution.py",
"src/inferrsi/harness/records/artifact_primitives.py",
"src/inferrsi/harness/records/atomic_json.py",
"src/inferrsi/harness/executor/_input_binding.py",
Expand Down
1 change: 1 addition & 0 deletions docs/guides/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ See [round decisions](knowledge/knowledge-retrieval-trace.md#round-decisions).
| --- | --- | --- | --- |
| Verify whether RSI knowledge improves optimization efficiency | CLI `benchmarks compare`; [comparison workflow](../benchmarks/benchmark-comparison.md) | Local experiment records / explicit native handoff / report-generating | Apps freezes two-task on/off plans, returns host actions, verifies retained finals and reports Benchmark comparisons; no hidden Agent launch |
| Compare two Indexer ranking rules on CPU | CLI `benchmarks indexer-compare`; Python `apps.workflows.indexer_comparison.compare_indexer_policies` | Read-only (optional new JSON report via `--output`) | Deterministic CPU retrieval and byte-budgeted delivery comparison over a pinned corpus and frozen query suite; enforces split isolation and optional `RankingSpace` checks; descriptive offline retrieval only, never a task or service `PASS` |
| Run a bounded P1 Indexer evolution loop on CPU | CLI `benchmarks indexer-evolve`; Python `apps.workflows.indexer_evolution.run_indexer_evolution` | Local evolution records (`--output` directory) | Evolves only the six `RankingPolicy` weights inside a frozen `RankingSpace` using deterministic coordinate search or an external provider routed through Harness `_agent_sessions.py`; enforces verified delivery-boundary citations, budget reservation on interrupted calls, mandatory rerun and single-use held-out gate; offline CPU retrieval only, never a task or service `PASS` |
| Complete a task optimization in the current Agent | CLI `session start benchmark/round/status/final/recover`, `find --session` / `read` | Experiment-executing / local records | Frozen budget, actual candidates and independent task outcomes. The current Agent drives edits. Real usage is imported explicitly. Recovery collects an existing execution using its [pinned runtime](optimization-workflow-unification.md#release-boundary-recovery) |
| Optimize an ordinary project in the current Agent | CLI `session start project --reference-guard <json>`, then `baseline/diagnose/round/status/final/recover` | Experiment-executing / local records | The default measures A once per reference epoch, then measures candidates in order. Use `--comparison abba` for paired samples. See [shared workflow](optimization-workflow-unification.md) |
| Reuse one project service across multi-scenario checks | CLI `session start project --evaluation-config <json>`, then `baseline/round/profile/status/recover/final` | Experiment-executing / local records | The evaluation config contains the explicit reference guard and service commands. `refresh-references --drift` resets stale references after verified cleanup. See [service reuse](service-reuse-campaigns.md) |
Expand Down
5 changes: 5 additions & 0 deletions src/inferrsi/apps/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,11 @@ def main(

_print(indexer_compare_command(args, bundled_seal=bundled_seal))
return 0
if args.benchmark_action == "indexer-evolve":
from ..workflows.indexer_evolution import indexer_evolve_command

_print(indexer_evolve_command(args, bundled_seal=bundled_seal))
return 0
if args.benchmark_action == "session":
return _session_command(args)
if args.benchmark_action == "external":
Expand Down
95 changes: 95 additions & 0 deletions src/inferrsi/apps/cli/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,101 @@ def parser(*, parser_class=argparse.ArgumentParser, historical=False,
"--output", type=Path,
help="Write the JSON comparison report to a new file path",
)
indexer_evolve = actions.add_parser(
"indexer-evolve",
help="Run a bounded P1 Indexer evolution loop on CPU (deterministic control or provider)",
description=(
"Bounded Indexer RankingPolicy evolution within a frozen RankingSpace, with "
"verified development-evidence delivery boundaries, agent-session call "
"accounting/recovery, mandatory rerun, and optional single-use held-out gate. "
"Establishes offline CPU retrieval/software behavior only, never task or "
"service-level PASS."
),
)
indexer_evolve.add_argument(
"--dev-queries", type=Path, required=True,
help="Frozen development schema v1 query suite JSON",
)
indexer_evolve.add_argument(
"--dev-session", type=Path, action="append", default=[],
help="Completed development optimization session directory whose retained trace "
"(knowledge captures, rounds, optimization_trace, final, timing) enters "
"the Evolver context; repeatable",
)
indexer_evolve.add_argument(
"--heldout-queries", type=Path,
help="Optional frozen single-use held-out schema v1 query suite JSON",
)
indexer_evolve.add_argument(
"--space-file", type=Path, required=True,
help="Frozen RankingSpace JSON defining editable weight bounds and steps",
)
evolve_base = indexer_evolve.add_mutually_exclusive_group()
evolve_base.add_argument(
"--baseline", choices=tuple(MANAGED_RANKING_POLICIES), default="default",
help="Registered H0 baseline ranking policy (default: default)",
)
evolve_base.add_argument(
"--baseline-file", type=Path,
help="Baseline H0 ranking configuration JSON file",
)
indexer_evolve.add_argument(
"--mode", choices=("deterministic", "provider"), default="deterministic",
help="Evolver mode: deterministic coordinate control or external LLM provider",
)
indexer_evolve.add_argument(
"--max-rounds", type=int, default=4,
help="Frozen maximum evolution rounds (default: 4)",
)
indexer_evolve.add_argument(
"--budget-units", type=float, default=10.0,
help="Frozen total Evolver budget units (default: 10.0)",
)
indexer_evolve.add_argument(
"--call-reservation-units", type=float, default=1.0,
help="Hard upper bound reserved per Evolver call (default: 1.0)",
)
indexer_evolve.add_argument(
"--evolver-context-bytes", type=int, default=65536,
help="Byte cap on the serialized verified context delivered to each Evolver call",
)
indexer_evolve.add_argument("--dev-split", default="development")
indexer_evolve.add_argument("--heldout-split", default="heldout")
indexer_evolve.add_argument(
"--allow-case-regressions", action="store_true",
help="Allow case-level regressions when aggregate selected metrics improve",
)
indexer_evolve.add_argument(
"--context-bytes", type=int,
help="Optional uniform context byte budget override for Indexer evaluation",
)
indexer_evolve.add_argument(
"--metric", action="append", choices=_INDEXER_METRICS, default=[],
help="Select metrics for descriptive comparison; repeatable",
)
indexer_evolve.add_argument("--tolerance", type=float, default=0.0)
indexer_evolve.add_argument(
"--provider-base-url",
help=(
"OpenAI-compatible endpoint URL "
"(https:// required for remote hosts; plaintext http:// only for loopback endpoints)"
),
)
indexer_evolve.add_argument("--model", help="Explicit Evolver model ID")
indexer_evolve.add_argument("--effort", help="Explicit Evolver effort label")
indexer_evolve.add_argument(
"--api-key-env", default=None,
help=(
"Environment variable name holding the provider API key for https:// endpoints "
"(defaults to OPENAI_API_KEY on https://; disallowed on plaintext loopback http://; "
"never persisted)"
),
)
_read_sources(indexer_evolve)
indexer_evolve.add_argument(
"--output", type=Path, required=True,
help="New directory for frozen plan, agent sessions, deliveries and report",
)
show = actions.add_parser("show")
show.add_argument("task", help="Packaged engineering task name")
run = actions.add_parser("run", help="Run the selected task's benchmark.py")
Expand Down
Loading
Loading