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
42 changes: 40 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ src/inferrsi/
skill_eval_diagnostic.py Synthetic KV admission diagnosis task and grader
skill_eval_engineering.py Serving-parser task, public vectors and vector judgment
improvement.py Improvement-step thresholds and acceptance rules
preparation.py Frozen D023/P1 preparations over a Benchmark-owned task
summary.py Versioned benchmark metrics over retained facts; no execution or I/O
comparison.py Knowledge-comparison rules over normalized retained facts
contracts/
runspec.py Immutable experiment contract; the initializer re-exports only RunSpec
json_v1.py Canonical inferrsi-json-v1 encoder and decoder
Expand All @@ -183,6 +186,7 @@ src/inferrsi/
repository_packs.py Neutral REPO_TYPES and pack.json reader; imports no inferrsi module
apps/
api.py Python entry points for assembling and publishing Apps operations
knowledge.py Standalone knowledge operations composed through Knowledge ports
cli/ CLI entry `main` and its argument parser
inspection.py Environment inspection bound to the host probe and Git identity
host/
Expand Down Expand Up @@ -216,6 +220,7 @@ src/inferrsi/
__init__.py CannbotChannel implementation and channel result adaptation
project.py Opt-in checkout/interpreter grant and read-only operations
read_worker.py Standalone worker run by the approved Cannbot interpreter
round_knowledge.py Managed round knowledge through the read-only CANNBot worker
anthropic/
anthropic_agent.py Bounded direct Messages agent with frozen cost reservations
anthropic_edit_agent.py Bounded edit-and-check protocol
Expand All @@ -226,7 +231,20 @@ src/inferrsi/
mcp.py Stdio MCP for the two approved local MindIE reads
read_worker.py Standalone worker run by the approved MindIE interpreter
artifacts.py Apps-owned hashing, file lock and evidence writes
delivery/
projection.py Project retained records without execution or assessment
schema.py Versioned delivery projection
snapshot.py Read-only bounded snapshots with availability and integrity facts
render.py Offline Markdown and HTML reports from one projection
adapters.py Historical record adapters that disclose mapping gaps
benchmark_usage.py Identity-bound native usage for Benchmark reports
archive.py ... skill_evaluation.py, cannbot/, mindie/
Static compatibility exports of the canonical modules above
(#490); a separate reviewed PR removes them
views/
attempt.py Read a fixed Harness revision and its archived assessment
attempt_html.py Render a fixed attempt for the report and Dashboard
comparison_report.py Offline comparison report over the retained result projection
summary_chart.py Stdlib SVG gain chart (chain/branch) and report figure spec
optimization_chart.py Managed optimization objective/token curves and final result
dashboard.py Offline snapshot and HTML rendering
Expand All @@ -235,7 +253,10 @@ src/inferrsi/
dashboard_timeline.py Stage/result timeline SVG
dashboard_workflow.py Paired command events into reviewable work units
dashboard_external.py Protocol-specific external measurements
template.html Dashboard view template
dashboard_experiments.py Evidence-linked experiment projection for both layouts
retrieval_projection.py Read-only retrieval and round-search projection
*.html Dashboard, overview, experiment, knowledge, review and
round-decision templates
optimization_story.py Caller narrative resolved against captures and runs
profile_searches.py Pre-profile search presentation
experiment_timing.py Experiment timing presentation
Expand All @@ -244,8 +265,14 @@ src/inferrsi/
capture_delivery.py Visible capture resources in a reviewed tool return
codex_search.py Bounded attributable file-search evidence from Codex rollouts
codex_tool_returns.py Correlate Codex tool-return windows
codex_knowledge.py Decode recorded InferRSI CLI results from a rollout
round_citations.py Bind citations in a retained round reason to the rollout
knowledge/
catalog.py Knowledge search and cited context
knowledge_find.py One ranked lookup across packaged skills, records and checkout cases
channels.py Read-only external knowledge channels ranked beside the corpus
retrieval.py Execution observations, separate from item and resource payloads
_knowledge_errors.py Errors shared by knowledge readers and optional dependencies
skill_catalog.py Packaged/default or custom skill metadata/body/resource resolution
knowledge_operations.py Normalized reads and bounded Collect (KnowledgeReader)
knowledge_store.py Authorized local store Create/Update (KnowledgeStore)
Expand All @@ -260,6 +287,9 @@ src/inferrsi/
local_process.py Windows Job / POSIX process group; deadline, cancel, cleanup
run_store.py Local SQLite RunStore: claim, owner lock, fixed records
errors.py H PublicError codes and partial execution facts
execution_spec.py Pure ExecutionSpec encoding helpers
generation.py Seal one generation attempt's inputs before registration
artifact_primitives.py Harness-owned digest, file hash and file lock
records/
evidence.py Bounded evidence reads and record text rules
optimization_log.py Campaign log write/read and reference checks
Expand All @@ -272,6 +302,14 @@ src/inferrsi/
optimization_session.py Shared start/knowledge/round/final operation assembly
project.py Freeze supplied project checks and assess retained results
task_protocol.py Freeze supplied task resources and load their protocol
protocol_child.py Child entry for one operation of a frozen task protocol
candidates.py Retain declared candidate inputs only
agent_sessions.py Recorded handoff to a host's native fresh-session tools
project_service.py Project-owned service protocols and their retained evidence
service_evidence.py Validate retained receipts behind service-reuse decisions
service_observations.py Read settled service observations
service_backfill.py Publish supplemental profiles under a settled round
measurement.py Paired statistics for alternating baseline/candidate samples
optimization.py Current-Agent round budget, records and recovery
usage.py Shared observed-token normalization and totals
improvement.py Offline search progression over injected assessments
Expand Down Expand Up @@ -314,7 +352,7 @@ the dependency checks.

| Add | Main extension locations | Required qualification |
| --- | --- | --- |
| Model or scenario | `harness/serving`, `benchmark/metrics.py`, `benchmark/validators`, `harness/scenarios` | Frozen request and metric contract; model-specific quality coverage |
| Model or scenario | `harness/serving`, `benchmark/metrics.py`, `benchmark/validators`; trials run through the model-independent `harness/scenarios/external.py` | Frozen request and metric contract; model-specific quality coverage |
| Repository | `apps/host/targets`, a composed scenario, `harness/data/repo_packs` | Stable source identity; command/result contract; environment isolation |
| Hardware | `apps/host/platforms` | Device selection, process exclusivity and independent backend/model evidence; a backend is registered in `apps/host/platforms/__init__.py` and its probe command is defined in the implementing module under `apps/host/platforms/`, not in package data |

Expand Down
7 changes: 5 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ policy does not renormalize existing blobs or authorize edits to frozen files.
Nightly checks cover Linux and Windows checkouts with `core.autocrlf` set to
`false`, `true` and `input`.

Use `harness/scenarios`, `harness/serving` and `benchmark/validators` for new models,
`apps/host/targets` with `harness/data/repo_packs` for repositories, and
Use `harness/serving` for a new model's server and request protocol and
`benchmark/metrics.py` with `benchmark/validators` for its metric and quality checks.
`harness/scenarios/external.py` runs any external command as one trial and is the
same for every model. Use `apps/host/targets` with `harness/data/repo_packs` for
repositories, and
`apps/host/platforms` for hardware. A backend is registered in
`apps/host/platforms/__init__.py`; its probe command is defined in the
implementing module under `apps/host/platforms/`. That
Expand Down
10 changes: 5 additions & 5 deletions docs/module-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ cleared `harness reaches model/infra` (12 hits): `agent_sessions`, `candidates`,
`inferrsi.infra` and `inferrsi.infra.artifacts`. They now take `digest`, `sha256`
and `file_lock` from `harness/artifact_primitives.py` and `atomic_write_json` from
`harness/atomic_json.py`, whose function bodies equal those in `infra/artifacts.py`.
`infra/artifacts.py` stays for its other users. No Harness module reaches
`infra/artifacts.py` stayed for its other users until #498 removed `infra/`. No Harness module reaches
`inferrsi.infra` or `inferrsi.model`. R3 cleared `runtime resource loaders: 5`.

`knowledge-model-policy` stays the only required status. Until a separate
Expand Down Expand Up @@ -438,9 +438,9 @@ The leaf's own import rule and `REPO_TYPES` object identity govern it.
is not a Knowledge input. Benchmark modules and every `inferrsi.harness.*` module reach no
other core, no Apps module, and no old root leaf. Apps reaches no old root
leaf. Since R1 an old root leaf is any of the eleven retired root module
names, with or without a file behind it. `inferrsi.infra`
reaches no Knowledge, Harness, Benchmark, or Apps module, so `infra` → root
`catalog` → Knowledge fails while `infra` → the data leaf passes.
names, with or without a file behind it. Since #498 the names `inferrsi.infra`
and `inferrsi.model` are retired as a whole, so any import of either fails. Before
that, `inferrsi.infra` reached no Knowledge, Harness, Benchmark, or Apps module.
- **New H entries.** The registered entry modules are
`inferrsi.harness.api`, `inferrsi.harness.execution_service`,
`inferrsi.harness.input_binding`, `inferrsi.harness.local_process`,
Expand Down Expand Up @@ -534,7 +534,7 @@ The rule covers that one importer, target, name and shape, and nothing wider:

- Any other module outside Knowledge that imports the leaf fails as a second
importer. That includes another `apps.host` module, `apps/host/__init__.py`,
another Apps module, a Harness, Benchmark or Infra module and any root file.
another Apps module, a Harness or Benchmark module and any root file.
- In the declared importer, another leaf name, an alias, a star import, the
leaf imported as a module object, an import below module level, a
`sys.modules` use and a dynamic import each fail.
Expand Down
5 changes: 3 additions & 2 deletions src/inferrsi/apps/views/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Read-only views: the optimization dashboard, its live server and its templates.
"""Views over recorded evidence: dashboards, reports, charts and their templates.

Nothing here runs an experiment or accepts a result. The dashboard renders
recorded evidence.
recorded evidence. ``search_attribution`` and the Codex helpers it uses also write
the search evidence that ``campaign import-search`` adds to a campaign.
"""
3 changes: 2 additions & 1 deletion src/inferrsi/harness/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Harness plane: scenario composition, AB/BA orchestration, verdicts and reports."""
"""Harness: command execution and RunStore records, the AB/BA runner, optimization
sessions and their records. Verdict labels come from contracts; reports are injected."""

from inferrsi.contracts.claim import Verdict, parse_verdict

Expand Down
5 changes: 4 additions & 1 deletion src/inferrsi/harness/scenarios/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
"""Scenario result adapters; experiment scheduling stays in harness.runner."""
"""External command trials and their retained checks, independent of model and device.

Experiment scheduling stays in harness.runner.
"""
Loading