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
13 changes: 7 additions & 6 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ and starts its task-owned protocol in an isolated child with `run_task_protocol`
The CLI resolves task resources and supplies the task assessor, knowledge access and
capture callback to `harness/manager/_session.py`.
The external Agent chooses and edits candidates between round submissions.
The same controller serves ordinary projects through `campaign start/round/final`
and packaged tasks through `benchmarks session`. The
The same controller serves ordinary projects and packaged tasks through
`session start project` and `session start benchmark`. The
[shared workflow and sequence diagram](guides/optimization-workflow-unification.md)
describe multi-file candidates, explicit acceptance inputs, stop rules and
dashboard projections from one control record. Harness Executor freezes caller-provided
Expand Down Expand Up @@ -125,10 +125,11 @@ defaults to `INCONCLUSIVE` under the frozen rules.
### A7 — Legacy compatibility and frozen evidence

[D013](contracts/current-design.md#d013--legacy-entry-point-compatibility)
preserves its legacy CLI entry points, arguments, `Path` behavior, output bytes
and [old `run` exit codes](guides/module-layout.md#old-run-exit-codes), while
[historical evidence](#compatibility-and-historical-evidence) retains its
original bytes and a new campaign with a changed implementation requires
preserves the `run` entry point, arguments, `Path` behavior, output bytes
and [exit codes](guides/module-layout.md#old-run-exit-codes). The release that
ships the [replacement commands](contracts/current-design.md#rfc-762-campaign-retirement)
retires `campaign` execution. [Historical evidence](#compatibility-and-historical-evidence)
retains its original bytes. A new run with a changed implementation requires
fresh frozen references.

**Checked by** `tests/apps/test_legacy_run_v0_frozen.py` for the legacy `run` exit codes
Expand Down
4 changes: 2 additions & 2 deletions docs/benchmarks/benchmark-comparison.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ The CLI neither starts a hidden Agent CLI nor invents a conversation identity.
New comparisons freeze the same diagnosis requirement for both arms. Before
search, each session profiles the frozen baseline or uses measurements from the
same workload and environment. It records the measured bottleneck with
`benchmarks session diagnose --session <campaign> --bottleneck '<observed-bottleneck>'
`session diagnose --session <campaign> --bottleneck '<observed-bottleneck>'
--evidence <measurement-summary.txt>`. The UTF-8 input should contain the
measured values and scope. Knowledge retrieval is optional when enabled and
follows the diagnosis. The comparison JSON includes diagnosis IDs for each round.
Expand Down Expand Up @@ -132,7 +132,7 @@ Native observation JSON uses the existing `agents record` format, plus:
These remain caller-exported observations, not authenticated host attestations.
Retain their underlying receipts. Include actual `usage_scope: session_total`
and `usage` counters when available; cached input is a subset of input. Final
host usage is never added to campaign round subtotals. Missing usage stays null.
host usage is never added to session round subtotals. Missing usage stays null.
Do not replace missing final counters with an earlier partial observation.

When the host reports when the native session started and ended, add that
Expand Down
2 changes: 1 addition & 1 deletion docs/benchmarks/benchmark-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ and actual input/output counters, a receipt can declare `benchmark_token_coverag

The timestamps above are placeholders, not measurement data. Apps checks the
trial/session identities and requires the declared interval to cover the retained
campaign start through settlement, and every required inclusion flag to be true.
session start project through settlement, and every required inclusion flag to be true.
Only that complete declared scope can produce a token ratio. Keep the underlying
host receipt: these are caller-exported observations, not authenticated proof of
all Agent behavior. Failed or restarted sessions omitted from that scope remain
Expand Down
6 changes: 3 additions & 3 deletions docs/benchmarks/moe-forward-benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ MoE 题包提供 `optimization.py`,可以使用与 Qwen 相同的 Harness 完
执行 Agent 在已经准备好的环境中启动:

```bash
inferrsi benchmarks session start moe-forward-npu \
inferrsi session start benchmark moe-forward-npu \
--session ./outputs/moe-session \
--rounds <rounds> --max-minutes <budget-minutes> \
--evaluation-timeout-seconds 1500 --final-reserve-seconds 1500 \
Expand All @@ -110,12 +110,12 @@ inferrsi benchmarks session start moe-forward-npu \
Agent 阅读返回的 `frozen/TASK.md`,修改 `work/candidate.py`;每次修改后提交假设:

```bash
inferrsi benchmarks session round --session ./outputs/moe-session \
inferrsi session round --session ./outputs/moe-session \
--candidate ./outputs/moe-session/work/candidate.py \
--hypothesis '<本轮优化策略与理由>'

# 完成声明的轮次后,独立复测已留存的最佳源码
inferrsi benchmarks session final --session ./outputs/moe-session
inferrsi session final --session ./outputs/moe-session
```

知识库开启时,用 `find "<问题>" --session <目录>` 留存命中,执行选中命中返回的 `read` 后留存正文。关闭知识时,受管检索和读取均受冻结条件约束。外部来源和直接文件读取的隔离由对照实验的执行环境与 Agent 访问约定负责。
Expand Down
18 changes: 9 additions & 9 deletions docs/benchmarks/optimization-benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ submits candidates, reads independent feedback and completes the declared rounds
The session controller retains each attempt, selects the best valid candidate
and independently retests it before emitting the final optimization result.

This path and ordinary `campaign start/round/final` now use the same Harness
This path and ordinary `session start project/round/final` now use the same Harness
controller and dashboard read model. See the
[shared workflow and sequence diagram](../guides/optimization-workflow-unification.md).
Ordinary projects default to the current conversation; a benchmark task defaults
Expand Down Expand Up @@ -44,7 +44,7 @@ allocator obtains one available NPU for each measurement. The current Agent
continues its analysis and edits between measurements.

```bash
inferrsi benchmarks session start qwen21-denoise-npu \
inferrsi session start benchmark qwen21-denoise-npu \
--session ./outputs/qwen-rsi \
--rounds 8 --max-minutes 180 --evaluation-timeout-seconds 1200 \
--condition current-agent-with-rsi \
Expand All @@ -70,7 +70,7 @@ search after diagnosis for a specific implementation question. Run a selected
hit's scoped read command to receive the body and its delivery reference.

```bash
inferrsi benchmarks session diagnose --session ./outputs/qwen-rsi \
inferrsi session diagnose --session ./outputs/qwen-rsi \
--bottleneck '<measured-bottleneck>' --evidence ./measurement-summary.txt
inferrsi find 'Ascend denoising conditioning reuse normalization fusion' --session ./outputs/qwen-rsi
# Execute the returned read command for the chosen hit.
Expand All @@ -84,8 +84,8 @@ sets the experiment allowance. The report checks the bytes the round received.

### Include CANNBot in the round

Add `--cannbot-platform <platform>` at `benchmarks session start` or AB/BA
`campaign start` to freeze the external source and an explicit Ascend platform.
Add `--cannbot-platform <platform>` at `session start benchmark` or AB/BA
`session start project` to freeze the external source and an explicit Ascend platform.
Start a benchmark session from the Git project with the
[CANNBot grant](../guides/knowledge/external-channels.md). An AB/BA campaign uses the Git project of
its `--repo` target. The session records the checkout identity, including the
Expand All @@ -108,14 +108,14 @@ InferRSI applies its standard evidence redaction to the combined query before
searching and retaining it. Use a locator from this round's external result:

```bash
inferrsi benchmarks session knowledge-read --session <session-dir> \
inferrsi read --session <session-dir> \
--search-ref <external.reference.path> --locator <card-locator> --page 1
```

The read verifies the revision and digest recorded by the search. Card text
returns to the authorized CLI caller. The session retains only the source,
locator, revision, digest, page and search reference. Read additional pages
with `--page`. Use the equivalent `campaign knowledge-read` command for AB/BA.
with `--page`. Use the same command for AB/BA projects.

At candidate submission, repeat `--knowledge-ref` for each delivery you used.
Pass the read's `reference.path` for an external card page, or
Expand All @@ -131,7 +131,7 @@ score. A search hit or read receipt alone does not record a citation.
## Submit a round and use its feedback

```bash
inferrsi benchmarks session round --session ./outputs/qwen-rsi \
inferrsi session round --session ./outputs/qwen-rsi \
--candidate ./outputs/qwen-rsi/work/candidate.py \
--hypothesis 'Reuse request-invariant conditioning across denoising steps'
```
Expand Down Expand Up @@ -185,7 +185,7 @@ their verdicts must not be rewritten with the new task protocol.
## Independently retest and report

```bash
inferrsi benchmarks session final --session ./outputs/qwen-rsi
inferrsi session final --session ./outputs/qwen-rsi
```

The controller selects the best valid retained source and evaluates it in a
Expand Down
29 changes: 29 additions & 0 deletions docs/contracts/current-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,35 @@ Decision: old entry points, arguments, `Path`, stdout, stderr, and old run 0/1/2

Current reading: this covers the CLI commands and the `inferrsi` and `python -m inferrsi` entry points. It no longer covers old root Python module paths. The revised delivery decision in #412, #451 and #408 retires those paths without aliases, in the change that moves their last consumers. R1 (#412) removed the old-run root modules `evaluation`, `execution` and `reporting` together with root `inspection`; the old run is `inferrsi.apps.legacy` and the host inspection binding is `inferrsi.apps.host.prepared_environment`. A1 (#408) then moved root `cli.py` and `arguments.py` to `inferrsi.apps.cli` and `inferrsi.apps.cli.arguments` and deleted both root files; the console script and `python -m inferrsi` call `inferrsi.apps.cli:main`.

### RFC #762: campaign retirement

The release that ships the replacement commands also switches generated argv,
plugin bundles, scripts, and guidance. A live `campaign` invocation exits 2
with its replacement before opening a workload, session, or evidence store for
writing. There is no compatibility window for execution through `campaign`.

| Retired command | Replacement |
| --- | --- |
| `campaign start` | `inferrsi session start project` |
| `campaign status/diagnose/round/final/recover` | Same action under `inferrsi session` |
| `campaign baseline/profile/refresh-references/resume` | Same action under `inferrsi session` for service reuse |
| `campaign knowledge` | `inferrsi find QUERY --session DIR` |
| `campaign knowledge-read` | `inferrsi read --session DIR --search-ref REF --locator LOCATOR [--page N]` |
| `campaign capture-context` | `inferrsi collect --archive DIR --capture-id ID`, with `--id REF` for explicit material |
| `campaign init/record/decide/attach-profile/import-mindie/import-search/assemble-trace/log` | Same action under `inferrsi evidence` |

DSH supports its previous plugin with its previous ZIP and the cutover plugin
with its matching ZIP. Either mixed pairing fails before executing a workload
or writing a workspace, session or evidence record. The cutover DSH plugin
keys the pairing to its bundled runtime, and the ZIP checks the pairing
before public command dispatch.

Historical argv, manual evidence, and frozen plans keep their original
encoding for read-only interpretation. Recovery requires the matching
frozen runtime and keeps the recorded plan, prior results and budget. The
`benchmarks session` retirement decision and the six spellings tracked in
#709 are separate from this decision.

## D014 — events remain local, not a new shared event schema

Decision: #333 and #371 are both **Proposed**, not accepted event schemas. `ExecutionEventV1` is only an H-local fact read model; it is explicitly not a new format for #333 production events and does not cross-write legacy `events.jsonl`. Legacy STAGES/verdict capture/reconciliation belong to H; presentation belongs to Apps. A formal unified event implementation belongs to its own later slice and does not block K01/H01.
Expand Down
Loading
Loading