Skip to content

chore(release): v0.3.0 — final train (hardening + evals + MCP + approver semantics) - #78

Merged
ajianaz merged 5 commits into
mainfrom
chore/release-v030-final
Sep 12, 2026
Merged

ajianaz merged 5 commits into
mainfrom
chore/release-v030-final

Conversation

@ajianaz

@ajianaz ajianaz commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

What (description of the change)

The complete v0.3.0 release train, owner-approved as version 0.3.0 with the full content: version bump 0.2.0 → 0.3.0, full CHANGELOG (Added: --workspace, job_start/job_poll, resume-with-prompt, usage ledger, agentic eval harness, MCP client; Changed: 429 retry classification, no per-step transcript clone; Fixed: risk-derived replay safety, component-based jail validation, JSONL torn-line recovery, AllowlistApprover constructor semantics), publish workflow shipping BOTH tole-core and tole-cli to crates.io, CLI pinning tole-core 0.3.0.

Why (the problem you're solving)

Owner directive: release v0.3.0 with everything included — the merge brings #70 (approver constructor semantics), #75 (OWASP hardening: threat model, fenced tool results, env scrubbing, destructive-argv gate, job log cap), #76 (agentic eval harness + Evals CI job), #77 (MCP client) onto main in one reviewed train.

Testing (how you verified this works)

Full workspace suite + both feature profiles green at 0.3.0 (170+ tests incl. 4 Tier-1 eval contracts, 4 MCP trust-model tests); release binary reports 0.3.0; cargo package dry-runs clean for both crates; live E2E passed for MCP (handshake + 14 tools + call) and all Tier-2 missions. Pre-tag cora scan triaged (1 CRITICAL + 3 MAJOR fixed in #68); pre-release cora scan + full CI green on this branch.

After merge (owner-approved): tag v0.3.0 ON the main merge commit → publish workflow fires (tole-core then tole-cli to crates.io — closing #60 part 2).

ajianaz and others added 5 commits September 12, 2026 18:07
…structive-argv gate, job log cap (#75)

* fix: OWASP agentic hardening — fenced tool results, env scrubbing, destructive-argv gate, job log cap (issue #72)

Threat model (docs/threat-model.md) maps tole against the OWASP
Agentic/LLM Top 10; every item resolved to control/gap/N-A with
rationale. Four quick-win gaps closed in the same change:

- Fence: tool results on the wire are wrapped in TOOL_RESULT markers
  with forged markers neutralized from the inside (ZWSP), so workspace
  data cannot forge the data boundary (prompt-injection mitigation).
- ENV-1: children of every spawn point (run_command, job_start, git,
  gh, cora, uteke) inherit a scrubbed env — secret-shaped names
  (API_KEY/_SECRET/_TOKEN/PASSWORD) removed; GITHUB_TOKEN kept for
  auth, documented as a deliberate limitation.
- RC-1: destructive argv gate applied to run_command AND job_start via
  a shared check_destructive_argv scanner — path-qualified programs,
  teardown tools (dd/mkfs/shutdown/...), and recursive rm escaping the
  workspace are refused; wrapper payloads (sh/bash -c incl. combined
  flags and nested wrappers, env with assignments/-u/-C, busybox,
  xargs, nohup) are recursed/scanned conservatively. Token-level
  matching keeps benign commands (cat middleware.ts, which rm) working.
- JOB-2: job logs append-mode (no sparse NUL holes), truncated at poll
  to a bounded window (no unbounded memory/disk growth), jobs dirs
  0700.

Verification: 24 scanner unit cases (16 refused incl. wrapper/nested
bypasses, 12 benign), fence unit test, env-scrub integration-style
test via child env, log-cap test; full workspace + mobile profile
green; clippy -D warnings clean. CodeCora review loop on this diff ran
5 rounds (12 majors raised, all real, all fixed) before coming clean.

* fix: sudo/doas in destructive wrapper set; honest scope note (CodeCora round 6)

CodeCora flagged sudo/timeout/find/python bypasses. sudo/doas are
cheap to wrap (added, tested). The rest are accepted residual risk of
a best-effort blocklist: the doc comment now says so explicitly, and
threat-model.md RC-1 row no longer claims a full fix — primary control
is the approval gate, argv sandboxing is a different product.

---------

Co-authored-by: ajianaz <[email protected]>
… Tier3 baselines (issue #73) (#76)

Mandate (arXiv:2607.03691): harness evolution itself causes regressions
practitioners misattribute to the model; unit tests verify mechanisms,
not agentic outcomes.

- Tier 1 (evals_tier1.rs, wired into a new Evals CI job): deterministic
  behavioral contracts through the real turn loop + storage —
  wire-shape stability (pinned golden request body: KV-cache prefix
  stability), resume equivalence (crash-mid-sandwich outcome ==
  uninterrupted run), abort-path contracts (park resumable + durable
  audit), approval interaction matrix (allow/deny x risk, destructive
  structurally unregistrable).
- Tier 2 (evals/tier2/run.py): three live BYOK missions —
  read_and_report, echo_chain, crash_resume (real failure-recovery:
  read missing file, create it, re-read) — scored on success, steps,
  usage-ledger tokens, tool-error rate. Timeout sentinel records a
  failed mission without aborting the run; session count is real.
- Tier 3 (baselines/ + diff.py): per-release baselines, >25% metric
  growth or any success drop = REGRESS exit 1.
- request_body made pub for external wire-shape assertion.

Live: all three missions pass (crash_resume now 6 tool calls across
failure+recovery); baseline stored; diff self-test PASS and synthetic
regression flagged. CodeCora loop: 6 rounds clean.

Co-authored-by: ajianaz <[email protected]>
* feat: MCP client — stdio servers into the tool registry (issue #74)

Direction A of #74: tole connects to external MCP servers over stdio
and registers their tools into the normal registry.

- `mcp` feature gate (off in mobile/embedder profiles); rmcp 3.3
  client + child-process transport; dedicated background tokio
  reactor thread with serialized request handling.
- Trust model: every MCP tool registers as Risk::Write regardless of
  server metadata — the approval gate fires on every call, and the
  approval prompt now includes the model-controlled arguments (marked
  when truncated). Server env is scrubbed like every other spawn
  point (ENV-1); kill_on_drop prevents orphaned server processes.
- Wire hygiene: tool results are fenced + scrubbed like native
  results, capped at 256 KiB with a marked suffix; tool registrations
  capped at 64/server.
- Robustness: reactor-side timeouts on handshake/list/call so one
  hung server cannot wedge the shared loop; connections evicted on
  transport failure and on timeout; sync-side budget kept strictly
  larger than the reactor budget so the reactor's verdict always wins
  (no abandoned in-flight effects); tool-reported errors (isError)
  settle as failures without evicting healthy connections.

Live E2E (release binary, mcp feature): fs server handshake + 14
tools listed + list_directory call + answer MCP-OK 2328 (matched
ls -A /tmp count). Threat model and CHANGELOG updated.

Closes #74

* style: cargo fmt

* fix: sanitize MCP tool names for provider-safe registry keys (CodeCora)

---------

Co-authored-by: ajianaz <[email protected]>
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 1a143c3 into main Sep 12, 2026
15 checks passed
@ajianaz
ajianaz deleted the chore/release-v030-final branch September 12, 2026 14:39
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.

1 participant