Skip to content

release: promote next to main for 0.9.0 - #227

Merged
g1e2x87 merged 1567 commits into
mainfrom
next
Dec 5, 2026
Merged

g1e2x87 merged 1567 commits into
mainfrom
next

Conversation

@g1e2x87

@g1e2x87 g1e2x87 commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Promote next to main: v0.9.0

  • Head: 0925df313 (0925df3131e6f4ed08261df4a3523b0fe359d68c, version 0.9.0)
  • Changelog: CHANGELOG.md, section [0.9.0] - 2026-12-04
  • Licence / Attribution: Dual MIT / Apache-2.0 aligned (LICENSE-MIT, LICENSE-APACHE, NOTICE, README.md, third_party/zeroclaw/).
  • Attribution Hygiene: origin/main..origin/next (1,567 commits) audited — 0 AI attribution.

Do not merge or tag without explicit owner approval.

Gate Verification on Final Head (0925df313)

Check Result
GitHub CI Run #1 (47415163359, pull_request attempt 2) PASS (success, 20/20 jobs incl. Windows Check & Windows Installer Contract)
GitHub CI Run #2 (47423436424, workflow_dispatch) PASS (success, 19/19 jobs)
GitHub CI Run #3 (47432198169, workflow_dispatch) PASS (success, 19/19 jobs)
GitHub Sec Audit (47415163432, pull_request) PASS (success)
Supply Chain (cargo deny check advisories bans licenses sources + cargo audit) PASS (0 advisories across 743 crates)
Security & Boundary Review (77f4ffb61 Round 2 + 77f4ffb61..0925df313 delta) ACCEPT (0 blockers; zero diff in src/channels/ramflux/, docs/rf-contract/, src/security/)
Local macOS CI Mirror (ops/prx-local-ci-mac.sh on 0925df313) 18/19 stages PASS (deny, audit, quick.*, fmt, clippy, clippy-all, machete, arch 286/286, doc, tests-build, smoke, bench); 11,233/11,234 tests PASS (sole local failure is the documented macOS sandbox-exec launchctl exception service_status_macos_cli::status_names_only_the_prx_job)

Binary equivalence note: 0925df313 updates only CHANGELOG.md on top of a1da8b9a7 (the release binary tested in rt-catalog-local-a1da8b9a7 and rt-final-smoke-0925df313). Core context, agent production code, memory, gateway, and Ramflux bridge have zero diff from e5500f6b8..0925df313.

Key Highlights Added Through 2026-12-04 (0.9.0)

  • End-to-End Traceability & KV Cache Forwarding (be2ee31d3, 3a4473d3c, e5500f6b8): full delegate parent lineage (parent_run_id, parent_session_key, parent_operation_id); MCP mcp.request (operation_id, run_id) correlation and atomic fail-open <workspace_dir>/memory/mcp-usage.json persistence (0600, O_NOFOLLOW | O_NONBLOCK, wire _meta untouched); provider response IDs, reasoning/cache token telemetry (incl. Gemini cachedContentTokenCount & thoughtsTokenCount), and privacy-preserving prompt_cache_key (prx-<32hex>) on OpenAI and OpenRouter.
  • Compliant OAuth & Interactive Onboarding (c4af7fd2a, b6564a018, 984a0b0f2, f81ff2ff8): removed external Codex CLI auth.json import in favor of compliant Sign in with ChatGPT loopback PKCE OAuth in prx init --interactive; redesigned centered animated stage; commander SOUL.md 9-file workspace scaffold; unified 5-theme palette defaulting to ink-green jade.
  • Complete 15-Locale Internationalization (ee0e777b2, 3f351eb73, 041c23ffe, a1da8b9a7): Ramflux-aligned 15 locales (ar, de, en, es, fr, hi, id, it, ja, ko, pt-BR, ru, tr, zh-CN, zh-TW), 1,070 keys/locale (0 nulls, 100% placeholder parity) covering CLI help/errors, prx init (live l switcher), and prx chat TUI (/lang).
  • 2026-12-04.1 Model Catalog & OS-Aware Local Inference Runtimes (829bfb01a, a1da8b9a7): 260 embedded models across 31 providers (+45 added incl. gpt-6.2-*, claude-fable-5-2, gemini-4-carbon/neon/hydrogen, qwen4-max, qwen4-35b-a3b, MiniMax-M4, glm-5.4, openrouter/auto-code, new :free tiers; 4 deprecated; 5 defaults upgraded); 12 OS-aware local OpenAI-compatible runtimes (ollama, omlx, vllm-mlx, mlx-lm, lmstudio, llamacpp, docker-model-runner, exo, foundry-local, lemonade, vllm, sglang) with 150 ms async loopback port detection.

Real-Run Verification (Real Non-Mock Binaries, Real Models, Isolated States, asciinema Recorded)

All interactive real runs were recorded under asciinema (.cast files retained under reports/realtest-real/) with quota logged in ops/quota/ledger.jsonl:

  • Final-Head Real-Model Interactive TUI Smoke (rt-final-smoke-0925df313) — PASS: prx 0.9.0 non-mock release binary (a1da8b9a7 == 0925df313 Rust code) on openrouter / nvidia/nemotron-3.5-lightning:free (4 compiled requests): native memory_store (15 ms) + shell (6 ms) execution at Full autonomy, localized zh-CN /cost with real metered prompt cache read (38.0k / 59.8k = 63.5%), --continue session resume (80.8k cumulative), and inbound secret redaction (token [REDACTED]).
  • 2026-12-04.1 Catalog + OS-Aware Local Runtimes & Complete 15-Locale i18n (rt-catalog-local-a1da8b9a7, rt-i18n-complete-041c23ffe) — PASS: localized CLI --help & errors (zh-CN / ja), centered prx init --interactive Tier 5 macOS MLX/local list + live l switcher, prx chat /help (26 keybindings), /tools, /cost, live /lang ja.
  • Full Traceability & KV Cache (rt-obs-kv-e5500f6b8) — 3/3 PASS: exact delegate parent lineage, 2/2 MCP mcp.request correlation + mcp-usage.json persistence & symlink refusal, 4/4 provider_response_id + reasoning_tokens + prompt_cache_key_present=true, 0 leaks.
  • Context Engine Iron Gate (T30, T64, T128, T258, T500, T800, T1M, T-O + CE-A/B/C) — 100% PASS (cet-t500-77f4ffb61-2026-12-04, cet-tO-7932cd8a1-2026-12-03, rt-lb-7932cd8a1): all tiers including overflow retry (1,087,206 > 1,048,576) and Q3 forget-scrub verified; 2026-12-06 iron deadline met.
  • Path-Independent Workspace Identity (L-A), Broken Skill Diagnosis/Repair (L-B1/B2), Pre-66x1 Closeout (A12/M5/MCP-2/I3/MCP-3), Security Regression (REG-1..3), and Local Ramflux Group Inbound (L-C) — ALL PASS.
  • Three-Party Ramflux Real-Engine Joint Verification (PRX-58) — 7/7 PASS: all 7 joint rows (including row 5 inbound.message_deleted and row 6 inbound.control agent_revoked acknowledged in 23.3 ms) passed end-to-end with real PRX engine e5500f6b8; paired with RF Core green pin cas-pin/291f94afc5d1 and RF GUI 3-client green CI (c4f7ea9e). Zero diff in src/channels/ramflux/ or docs/rf-contract/ through 0925df313.
  • MCP 2026-07-28 (O1, PRX-121) — MET: T20a–T25 passed against Sylvode.

Benchmark & External Hold Status (Transparently Tracked)

  • Terminal-Bench 4.1 Native 66x1 (qa, prx-e5500f6b8-66x1-2026-12-04):
    • Native oracle baseline completed (|V| = 45/66 valid reward-1.0 tasks).
    • Kimi Slice 1 completed cleanly at the 8 h wall limit (2026-12-04T13:32:49Z, 0 residual processes): 361 settled requests, 96.15% KV cache read hit rate, 1/12 on attempted non-429 |V| tasks (fin-saccr-rwa PASS, 8 zero, 3 timeout; 6 env errors outside |V|).
    • Remaining 33/45 |V| tasks (30 not-run + 3 cleanly quarantined in .quarantine-429/) paused because Kimi hit its 7-day weekly usage limit (HTTP 429). Ready for idempotent resume after weekly reset or fresh OpenRouter :free (or/or2) run per owner decision.

Known Follow-Ups Carried Post-0.9.0 (FOLLOWUPS.md)

  • FU-MCP-SAME-TURN-REFRESH-PROCESS-CHILD (B6a): invoking sessions_spawn mode="process" in the same turn as mcp_status refresh=true fails closed on parent caller parity drift (next-turn B6b succeeds).
  • FU-CE-FORGET-SCRUB-LIMIT: handoff summary scrubbing covers identifier-like tokens (6+ chars containing a digit); plain words/paraphrases and prior notes are documented scope limits.
  • Remaining minor follow-ups tracked in coordination/FOLLOWUPS.md.

…ed errors

The non-streaming Chat Completions, legacy chat_with_system and Responses
paths built their HTTP error from the body text alone, so the reliable
layer never saw the upstream Retry-After and fell back to its own wait
schedule. They now attach the header as the structured RetryAfterHint
through the same helper api_error uses; the error text is unchanged.
The header-wait limit now takes the request builder and strips reqwest
errors itself, so provider files keep no unscanned .send() chains and
gemini.rs stays within the line limit.
A turn resolves its model on every tool admission, so one call logged the
same WARN dozens of times. The warning for a provider, model and set of
unproven requirements is shown once; repeats log at debug. The model still
runs unchanged.
A delegate, task or worker child issued by a bridge turn lost the turn's
serving_agent, so scheduled work it created was attributed to main instead
of the agent bound to the rf account. The ordinary child execution source
now copies serving_agent from the issuing turn's envelope on both its paths
(with and without a recorded input); task segments clone that envelope. A
parent without serving_agent gives a child without it.
A writer's retention pass skips the stream it writes and gc_scope had no
production caller, so an owner whose traffic all went over one stream never
had that stream's expired rows collected. The daemon tick now starts an
idle-scope sweep on the blocking pool: the existing retention rule, at most
one cycle per retention interval, at most 64 scopes per tick, each in its own
short writer transaction; scopes with a live lease wait for a later sweep.
In the sweep a row that cannot be read is rolled back to its savepoint,
logged and left in place, and a failing scope is logged and skipped; the
writer paths keep failing on such rows as before.
A turn targeted at a named agent carries that agent as its partition and
leaves agent_id unset, so the completion announcement of a child it spawned
was addressed to the parent session as main and refused with
receiver_agent_mismatch. The announcement now addresses the parent session as
the agent its turn runs as, the same address the gateway registers for that
session's inbox. The receiver check itself is unchanged.
The retention sweep logged the mailbox error text; the payload-free log
scanner requires error_class for error fields.
…d agent

The worker manifest carries the issuing turn's serving_agent (optional,
sealed with the rest of the manifest; absent means none), and the worker's
ordinary segment envelopes take it from there, so a process-mode child of a
bridge turn attributes scheduled work to the bound agent like an in-process
child.
sessions_list recovered every child-segment / operator-worker-segment run
from the message rows as a run of its own, so a child showed up twice: once
from the registry and once as a completed memory-only segment. Segment rows
now fold into their child's run (input payload task_run_id, else the spawn:
session) with the message backfill merge.
…ng files

Pure move, no behaviour change: DelegateScope, parse_delegate_scope,
delegate_session_key and delegate_event_scope move to
src/tools/delegate/scope.rs, and the three task/result event recorders to
src/tools/delegate/events.rs, unchanged apart from pub(super) visibility.
Two imports stay in delegate.rs for the existing tests only.
… run id

A running delegate had no registry row of its own (its loop runs under the
caller's work), so nothing could tell it from a run recovered from memory.
spawn_delegate_loop now registers one row under the delegate run id, below
the caller's work and with the loop's own cancellation token. The guard moves
into the child task and drops with it on every exit, so the row never
outlives the loop; the caller's cancellation still stops the delegate.
A recovered delegate run whose id resolves in the live work registry is now
rendered as source=runtime(delegate), manageable=false, running inside its
caller's delegate call, instead of as a run recovered from memory only.
…s_send

/msg passed a bare run id through as a session key, so a message to a child
named by its run id was refused as receiver_unknown while sessions_send,
which maps a run id to the child's session, accepted it. send_command now
maps a known child run id (running or finished) to its session the same
way; #N and explicit session keys are unchanged.
merge_recovered_run copied the detail of every task event, older ones too,
while the status followed the newest, so a task.steered payload status
running sat beside a task.completed: completed (memory): running. A newer
event's detail now replaces the old one (a change of state without one
clears it), an older event only fills a gap in the same state, and a
finished row drops a bare live state word. operator-segment runs fold into
their child like the other segment runs.
The in-turn compaction report measured the canonical history's stored
text: replayed tool rounds of acknowledged replies were left out and the
handoff note was counted in its long stored form. A switch that folded a
large replayed round therefore printed a growing token count and
reclaimed ~0 tokens. Both sides are now measured with the provider
weights the switch folds by.
Every turn reserves min((window - reserve) / 8, 8192) tokens of the input
window for decision work before the tool surface is reserved, so the hard
limit of the history is lower than the documented formula gave (19449,
not 22687, on a 30000 window with a 3217-token tool surface).
The once paths of the cron tool, prx cron once and the gateway delay route
stored shell one-shots with delete_after_run=false, so the row stayed after
its run while an agent one-shot was removed. They now use the delete variant;
the run-commit transaction removes the row of a successful run.
…t job

A job created from a conversation turn that will never post there ends its
tool result with a note. For an agent job the note said to create an agent
job; it now says to set deliver to 'message'. A shell job keeps the old note.
…heduler does

POST /api/cron/jobs/{id}/run passed every job's command to the command
policy. An agent job has none, so the empty command was refused at the
default Full level while the scheduler ran the same job. The check now
applies to shell jobs only.

The route also runs the claimed job the way the scheduler runs a due job:
on a task of its own, registered for prx tasks, owned by a cleanup scope,
with the caller's pinned config generation carried across the spawn. A
dropped request no longer cancels the run between its commit and its
delivery.
…utes

The check compared the next run after now with the next run after now plus
one second, which is the same occurrence, so every cron expression read as a
zero-minute period and a */5 job was warned. It now compares two consecutive
occurrences; exactly five minutes is not warned. The warning never refuses.
…versations included

Retire paused and purge removed only the jobs whose owner was the install
owner. Work the agent created in an rf conversation is owned by that
conversation's owner, so it kept running after the agent was retired.
Both now select cron jobs, Xin tasks and Xin goals by the recorded creator
agent (n:<name>:), whichever conversation owns them; work of another agent
or of the install owner never matches. Retire no longer takes the owner.
The cron tool's run action in a process without the bridge (a prx chat or
prx agent turn with no daemon in it) cannot answer in the bridge
conversation that created a message job, so the result goes to the creating
session's mailbox. The tool result now carries a delivery_note that says so
and names the daemon's paths.
A Xin agent task always ran on the configured default model, so a task a
child session created while running on another model ran on the default.
The task row now records the provider and model of the creating turn
(origin_provider, origin_model; Xin store schema version 4, no migration).
The run follows the child sessions' order: a step's own model, else the
creating named agent's model, else the creating turn's model (a task's
recorded one, a step's goal defaults), else the default.

The agent entry now lets an explicit job or step model win over the named
agent's model; a provider other than the agent's resolves its own
credential.
A xin run from a tool call executed the nested agent turn on the calling
turn's task, so a delegate turn calling xin run stacked one agent turn on
another. The manual run now executes on a task of its own and the caller
awaits its result, as a delegate child does. The task-locals the run reads
are carried across the spawn: Xin's config generation and manager, the
caller's effective autonomy level, a cleanup scope registered with the
caller's tracker, the seeded spawn lineage, the progress beat, the current
work id, the channel approvals and memory view, and the tracing subscriber.
No depth limit is added.
…onversation

A one-shot job created in a bridge conversation with an announce to that
same conversation started two turns there: the run's message delivery and
the announce after the commit. The message delivery now records the bridge
conversation it reached for the cron run, and the scheduler, after the
commit, skips an announce to exactly that conversation. The decision follows
what the run delivered: a deliver=none job, a message that went to the
mailbox or was not delivered, and an announce elsewhere are unchanged.

Existing deliver_if_configured test calls pass None for the new argument.
…sactions

A history erase deleted every row of its scopes in one transaction, which
held the SQLite writer for about 5 s on a 300k-row store. While the erase
fences hold, the message_events rows of the scopes are now deleted first in
chunks aimed at 100 ms (at most 8,192 rows each, a pause between chunks).
Each chunk writes the manifest entries of its rows and adds its count to
agent_erase_work.chunk_counts in the same transaction, so a retry resumes
with exact totals. The listing identifiers are read once before the first
chunk and saved in agent_erase_work.listing; the main transaction reads them
from there, merges the chunk counts and runs the listing, manifest and
derived-copy rewrites and main_erased=1 as before.

Rows referenced by ingress_recovery or recovery_attestations stay for the
main transaction, and a store where another table references message_events
is not chunked, so no cascade fires in a chunk and the receipt counts,
manifest and rewrites equal the single-transaction result.
…ckground

The background drain of the transcript-index purge queue used the pace of a
request path: 40 ms chunks with a pause as long as the chunk, so the writer
worked half of the time. A secure-delete costs about 2.7 ms per row whatever
the chunk size (measured at 8 to 4,096 rows per chunk on a 300k-row store),
so the duty cycle sets the drain speed. A drain without a deadline now aims
at 120 ms chunks (at most 512 rows) with a pause of a quarter of the chunk
within 20-100 ms, about 80% writer time. Request-path drains keep their
bound and pace.
Resolve each tool call's call_id once per round (provider call id when present, otherwise UUIDv7) and share it across live notifications, RoundLog tool rows, skill load rows, tool scheduler execution, and audit/usage logs. Also attach workflow lineage keys to skill.load.recorded payloads.
Persist optional parent_operation_id on ChildSessionRecord from active write provenance when sessions_spawn creates or continues a child from a model tool call.
…cing

Add edit_installed_skill with staged validation and atomic rename, wire action='edit' into skills_manage with synced schemas and goldens, and emit payload-free INFO logs on target skill_usage for skill_read and skills_manage.
…ates

Include ramflux in KNOWN_CHANNEL_LABELS and document skills_manage edit, unified call_id/operation_id correlation, parent_operation_id, and skill_usage tracing in docs/tools.md.
Seal each MCP catalog entry's canonical server-config digest and parent
runtime counters (state_epoch, server_generation) inside
ProcessCatalogSnapshot and seed the uninitialized session-worker McpTool
with that authenticated baseline.

On initial non-forced discovery, the worker aligns its counters to the
parent's baseline if and only if its canonical effective server config
matches both the sealed config digest and binding_digest. The baseline is
consumed once on initial discovery, preserving in-process ABA invalidation
on any subsequent refresh, config change, or tool-list update.
… and fold keys

- Refuse symlinked SKILL.toml and SKILL.md manifests across diagnose,
  load, repair, and edit while preserving symlinked skill directories.
- Enforce MAX_MANIFEST_BYTES on edited SKILL.md outputs, preserve CRLF
  YAML frontmatter in skill edit, and use symlink_metadata in stage_file.
- Reject ':', '#', and control characters in Ramflux conversation_id and
  sender.principal_id, percent-encode group key components, and hold
  group_epochs lock atomically across persistence.
- Refuse symlinked memory/ or workspace-id paths with O_NOFOLLOW and
  bounded reads in workspace_identity, and remove workspace_id path
  fallbacks in ingress_recovery, agent_erasure, and agent_purge.
- Include range bounds and replaced_hash prefix in lossy_fold fallback
  idempotency keys so consecutive folds never collide.
…independent id

- Prefer manifest.workspace_id then shared_memory_db_path parent over
  worker-private memory_workspace_id in shared_worker_workspace_id so hybrid
  draft merge requests target the parent workspace instead of the worker dir.
- Fall back to SessionsSpawnTool.workspace_dir when security.workspace_id is
  empty (e.g. default SecurityPolicy) in SessionsSpawnTool::memory_fabric.
- Persist workspace-id and wire config.workspace_id() into fabric, mailbox
  factory, and SecurityPolicy in mailbox_harness and shell_parity_working_root.
- Update retired_escalation_tests, channels history test, and
  ordinary_process_worker integration tests to query the persisted
  workspace_id rather than the raw workspace directory path.
Propagate caller (operation_id, run_id) write provenance across rmcp's spawned service loop onto mcp.request log lines (falling back to "-" for background discovery, listen, poll, and inbound requests) without modifying JSON-RPC wire payloads.

Persist cumulative MCP usage counters to <workspace_dir>/memory/mcp-usage.json (version 1) via atomic 0600 temp-file replacement with symlink refusal, O_NOFOLLOW/O_NONBLOCK (guarded by #[cfg(unix)]), a 1 MiB read cap, and fail-open behavior so counting never delays or refuses any MCP request.
@g1e2x87
g1e2x87 marked this pull request as ready for review December 5, 2026 06:49
@g1e2x87
g1e2x87 merged commit 0925df3 into main Dec 5, 2026
99 of 102 checks passed
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