Skip to content

chore: sync upstream (docs guide, e2e suite, network_guidance) - #46

Merged
mannuch merged 5 commits into
feat/split-mode-continual-harnessfrom
chore/sync-upstream-2026-11-02
Nov 3, 2026
Merged

mannuch merged 5 commits into
feat/split-mode-continual-harnessfrom
chore/sync-upstream-2026-11-02

Conversation

@mannuch

@mannuch mannuch commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #45. Merges three upstream commits:

  • 7e5c41e docs: a short README and a docs/ guide (#245). The README becomes a landing page, and its content moves into docs/.
  • 970e567 tests: run a hosted model end to end, local and split (#244). Adds an e2e suite under tests/e2e, run only with -m e2e, and its workflow.
  • 48da1d9 feat: add network_guidance policy to drop network-dependent prompt guidance (#240). A policy flag that drops the prompt's network-dependent sentences (the package-install hint and the online-solutions clause of the Git guard).

Conflict resolution

Docs guide (PrimeIntellect-ai#245)

README.md was the only conflict. Upstream rewrote the old README content into new pages instead of moving it verbatim, so the fork's README sections are rewritten into that layout:

  • README.md: upstream's landing page, plus:
    • the fork's clone URL
    • feature bullets for tiered compaction and the continual harness
    • two rows in the docs index
    • the fork's acknowledgements
  • New docs/continual-harness.md: the fork's whole "Continual harness" section, with headings promoted and links pointed at the new pages, and the global-store layout from the old "Session directory" section.
  • New docs/prompt-optimization.md: the fork's GEPA section.
  • Existing pages:
    • context.md: the tiered compaction subsections (windows vs branches, rollups, staircase, verbatim tail, pinned prompt, drill-down, budgets); compaction/rollup records and the harness window reason in the ledger; hist.blocks/hist.expand in the history example; harness/ in the session tree. The checkpoint-prompt sentence now describes the fork's prompt.
    • runtime-contract.md: the harness and prompt_overrides fields; the three compaction policy fields; the refine-v1 prompt meta; the refinements-v1 snapshot and harness counts; the refined stop reason; the compaction_attempt, refinement_attempt and refinement edges; and the rlm harness operator commands.
    • python-api.md: rlm.harness/rlm.refine rows, the hist naming, and the split-mode episode fallback for history().
    • tools.md: the fork's kernel-environment description (inherit minus a blocklist, which is what build_kernel_env does), the uv pip install --python {sys.executable} note, and a pointer to authored skills.
    • split-execution.md: the skills mirror replaces "the workspace needs the same files" for SKILL.md skills.
  • Runbooks: scripts/gepa/RUNBOOK.md and scripts/refine_eval/RUNBOOK.md now point at the new pages instead of README sections.

Formatting-only differences from the old README (table alignment, JSON spacing) are dropped in favor of upstream's text.

docs/architecture.md still says the kernel environment is rebuilt from an allowlist. That doesn't match build_kernel_env, but the page is unchanged upstream text, so it is left as is.

network_guidance (PrimeIntellect-ai#240)

The conflicts in acp.py, engine.py, prompt.py and tests/test_acp.py were additive: the limits snapshot, engine init and test fixtures keep the fork's compaction and harness fields, with network_guidance placed right after allow_git as upstream has it. The kernel packages line keeps the fork's uv pip install --python {sys.executable} hint on top of upstream's new KERNEL_PREINSTALLED_PROMPT prefix, so with network_guidance=false it drops to the same preinstalled-only line as upstream. Upstream didn't document the flag, so docs/runtime-contract.md gets a network_guidance policy row.

Test plan

  • uv run pytest tests/: 500 passed. The upstream Linux-only test_kernel_recovery.py::test_remote_execution_preserves_state_and_brokers_children is deselected, along with the e2e suite (opt-in, needs a hosted model).

🤖 Generated with Claude Code

hallerite and others added 5 commits November 2, 2026 00:20
## Why

The README had grown to 600 lines in the order features were added:
shell jobs, crash recovery and subscriptions sat under "Testing", agent
cleanup notes after the test command, and `rlm.services`, `rlm.hints`
and the policy fields were not documented at all. Someone new could not
find how the pieces fit, and someone looking for one fact had to read
everything.

## What

The README becomes a landing page, and the content moves into a guide
under `docs/`, where each page opens with what its subject is for.

<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://raw.githubusercontent.com/PrimeIntellect-ai/nano-rlm/477080dca24ad094c5543bf2dbc1766fd9f00a19/docs/images/overview-dark.svg">
<img alt="An ACP client sends the runtime contract and prompts to rlm.
The engine runs the agent loop against the model API and appends to the
session ledger; its tool calls run in a persistent IPython kernel, whose
rlm.* calls reach the supervisor; the supervisor owns child agents, each
with its own engine, kernel and session directory."
src="https://raw.githubusercontent.com/PrimeIntellect-ai/nano-rlm/477080dca24ad094c5543bf2dbc1766fd9f00a19/docs/images/overview.svg">
</picture>

- **README:** what nano-rlm is, the overview figure above, install, a
quickstart ACP client, and an index of the pages. I ran the quickstart
against a hosted model with only the endpoint swapped.
- **The pages:**

  | Page | Covers |
  |---|---|
|
[Architecture](https://github.com/PrimeIntellect-ai/nano-rlm/blob/477080dca24ad094c5543bf2dbc1766fd9f00a19/docs/architecture.md)
| the components, one turn through them, and trust boundaries |
| [Runtime
contract](https://github.com/PrimeIntellect-ai/nano-rlm/blob/477080dca24ad094c5543bf2dbc1766fd9f00a19/docs/runtime-contract.md)
| every runtime field and policy, prompts, steering, snapshots and stop
reasons, tracing headers |
| [Python
API](https://github.com/PrimeIntellect-ai/nano-rlm/blob/477080dca24ad094c5543bf2dbc1766fd9f00a19/docs/python-api.md)
| agents, inbox and `wait`, shell jobs, services, watches, history,
hints |
| [Tools and
skills](https://github.com/PrimeIntellect-ai/nano-rlm/blob/477080dca24ad094c5543bf2dbc1766fd9f00a19/docs/tools.md)
| native and built-in Python tools, tool packages, `SKILL.md`, MCP, the
kernel's environment |
| [Context and
history](https://github.com/PrimeIntellect-ai/nano-rlm/blob/477080dca24ad094c5543bf2dbc1766fd9f00a19/docs/context.md)
| compaction, tool-output truncation, the ledger |
| [Kernel and
processes](https://github.com/PrimeIntellect-ai/nano-rlm/blob/477080dca24ad094c5543bf2dbc1766fd9f00a19/docs/processes.md)
| timeouts, crash recovery, and which processes outlive a call, a
restart or the session |
| [Split
execution](https://github.com/PrimeIntellect-ai/nano-rlm/blob/477080dca24ad094c5543bf2dbc1766fd9f00a19/docs/split-execution.md)
| the workspace worker over stdio or TCP, its cost and responsibilities
|

- **Checked against the code.** Every fact was checked against the code,
which corrected a few the README had wrong:
- a compaction gives up after `max_compaction_attempts` (5) attempts,
not three;
  - `max_tokens` is a per-agent completion budget;
  - the native `wait` tool is offered whenever `ipython` is;
  - the built-in Python tools include `bash`.
- **AGENTS.md** asks a change to user-facing behavior to update its page
in the same PR.

Links, anchors and images were checked across all pages, and the pages
render with GitHub's markdown renderer, figures in light and dark.

PrimeIntellect-ai#246 added a README paragraph on ACP stop reasons; it is now a table in
the runtime contract, keyed by the snapshot's `last_stop_reason`.

PrimeIntellect-ai#244 also edits the README's testing section. Whichever merges second
moves the end-to-end notes to the new layout.
…-ai#244)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Upstream turned the README into a landing page with a docs/ guide. The
fork's README sections move into that layout: the continual harness and
prompt optimization get pages of their own, and the fork's changes to
compaction, the ledger, the runtime contract, the Python API, tools and
split execution go into the pages that now describe them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…idance (PrimeIntellect-ai#240)

Adds `ExecutionPolicy.network_guidance` (default `true`). It controls
the two system-prompt sentences that assume outbound network access:

- the `!uv pip install <pkg>` hint in the kernel packages line;
- the "online solutions or hints specific to this task" clause of the
git history guard.

A box with no network can set it to `false`, so the prompt doesn't
suggest actions that can't work there. The default leaves the prompt
byte-identical.

Rendered diff with `network_guidance=false`:

```diff
-Pre-installed in the kernel venv: requests, …, pydantic. Install extra packages with `!uv pip install <pkg>` in a code cell — that targets the kernel venv (a uv-managed venv with no pip module).
+Pre-installed in the kernel venv: requests, …, pydantic.
-Do not cheat by using online solutions or hints specific to this task, or by copying or inferring solutions from other branches, …
+Do not cheat by copying or inferring solutions from other branches, …
```

The flag is wired like `allow_git`: through the engine, the ACP runtime
contract and the session limits snapshot. Sub-agents inherit it with the
policy.

Tested: 380 passed. The one failure,
`tests/test_skills.py::test_valid_bash_skill_metrics`, also fails on
main. ruff check and format are clean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Default-on policy keeps existing behavior; changes only affect
optional prompt strings and runtime metadata fields.
> 
> **Overview**
> Adds **`ExecutionPolicy.network_guidance`** (default **`true`**) so
air-gapped or no-network runs can omit system-prompt lines that assume
outbound access.
> 
> When **`network_guidance`** is **`false`**, **`build_system_prompt`**
swaps the kernel packages blurb for a pre-installed-only line (drops
**`!uv pip install`**) and uses an offline git history guard that keeps
local-history rules but drops the “online solutions” clause. With the
default **`true`**, composed prompts stay unchanged.
> 
> The flag is threaded like **`allow_git`**: stored on the engine,
passed into prompt construction, exposed on the ACP **`limits`**
snapshot and **`_LimitsSnapshot`**, and inherited with the rest of
**`ExecutionPolicy`** for sub-agents. Tests cover config/ACP fixtures
and a dedicated prompt test for online vs offline wording.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ef195f8. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the network_guidance policy (PrimeIntellect-ai#240). Conflicts were additive: the
limits snapshot, engine init and test fixtures keep the fork's compaction and
harness fields alongside network_guidance, and the kernel packages line keeps
the fork's `--python {sys.executable}` install hint on upstream's split
KERNEL_PREINSTALLED_PROMPT prefix. docs/runtime-contract.md gains a
network_guidance policy row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mannuch mannuch changed the title chore: sync upstream (docs guide, e2e suite) chore: sync upstream (docs guide, e2e suite, network_guidance) Nov 2, 2026
@mannuch
mannuch added this pull request to stack #47 November 3, 2026 00:16
@mannuch
mannuch marked this pull request as ready for review November 3, 2026 00:16
@mannuch
mannuch merged commit 68ea1e4 into main Nov 3, 2026
7 of 11 checks passed
@mannuch
mannuch deleted the chore/sync-upstream-2026-11-02 branch November 3, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants