Repository navigation
Conversation
…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.
… forward prompt_cache_key
g1e2x87
marked this pull request as ready for review
December 5, 2026 06:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promote
nexttomain:v0.9.00925df313(0925df3131e6f4ed08261df4a3523b0fe359d68c, version0.9.0)CHANGELOG.md, section[0.9.0] - 2026-12-04LICENSE-MIT,LICENSE-APACHE,NOTICE,README.md,third_party/zeroclaw/).origin/main..origin/next(1,567commits) audited — 0 AI attribution.Do not merge or tag without explicit owner approval.
Gate Verification on Final Head (
0925df313)CI Run#1 (47415163359,pull_requestattempt 2)success, 20/20 jobs incl. Windows Check & Windows Installer Contract)CI Run#2 (47423436424,workflow_dispatch)success, 19/19 jobs)CI Run#3 (47432198169,workflow_dispatch)success, 19/19 jobs)Sec Audit(47415163432,pull_request)success)cargo deny check advisories bans licenses sources+cargo audit)77f4ffb61Round 2 +77f4ffb61..0925df313delta)src/channels/ramflux/,docs/rf-contract/,src/security/)ops/prx-local-ci-mac.shon0925df313)deny,audit,quick.*,fmt,clippy,clippy-all,machete,arch286/286,doc,tests-build,smoke,bench); 11,233/11,234 tests PASS (sole local failure is the documented macOSsandbox-execlaunchctlexceptionservice_status_macos_cli::status_names_only_the_prx_job)Binary equivalence note:
0925df313updates onlyCHANGELOG.mdon top ofa1da8b9a7(the release binary tested inrt-catalog-local-a1da8b9a7andrt-final-smoke-0925df313). Core context, agent production code, memory, gateway, and Ramflux bridge have zero diff frome5500f6b8..0925df313.Key Highlights Added Through
2026-12-04(0.9.0)be2ee31d3,3a4473d3c,e5500f6b8): fulldelegateparent lineage (parent_run_id,parent_session_key,parent_operation_id); MCPmcp.request(operation_id, run_id)correlation and atomic fail-open<workspace_dir>/memory/mcp-usage.jsonpersistence (0600,O_NOFOLLOW | O_NONBLOCK, wire_metauntouched); provider response IDs, reasoning/cache token telemetry (incl. GeminicachedContentTokenCount&thoughtsTokenCount), and privacy-preservingprompt_cache_key(prx-<32hex>) on OpenAI and OpenRouter.c4af7fd2a,b6564a018,984a0b0f2,f81ff2ff8): removed external Codex CLIauth.jsonimport in favor of compliant Sign in with ChatGPT loopback PKCE OAuth inprx init --interactive; redesigned centered animated stage; commanderSOUL.md9-file workspace scaffold; unified 5-theme palette defaulting to ink-greenjade.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(livelswitcher), andprx chatTUI (/lang).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:freetiers; 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,
asciinemaRecorded)All interactive real runs were recorded under
asciinema(.castfiles retained underreports/realtest-real/) with quota logged inops/quota/ledger.jsonl:rt-final-smoke-0925df313) — PASS:prx 0.9.0non-mock release binary (a1da8b9a7==0925df313Rust code) onopenrouter/nvidia/nemotron-3.5-lightning:free(4 compiled requests): nativememory_store(15 ms) +shell(6 ms) execution atFullautonomy, localizedzh-CN/costwith real metered prompt cache read (38.0k / 59.8k = 63.5%),--continuesession resume (80.8kcumulative), and inbound secret redaction (token [REDACTED]).rt-catalog-local-a1da8b9a7,rt-i18n-complete-041c23ffe) — PASS: localized CLI--help& errors (zh-CN/ja), centeredprx init --interactiveTier 5 macOS MLX/local list + livelswitcher,prx chat/help(26 keybindings),/tools,/cost, live/lang ja.rt-obs-kv-e5500f6b8) — 3/3 PASS: exactdelegateparent lineage,2/2MCPmcp.requestcorrelation +mcp-usage.jsonpersistence & symlink refusal,4/4provider_response_id+reasoning_tokens+prompt_cache_key_present=true, 0 leaks.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) andQ3forget-scrub verified; 2026-12-06 iron deadline met.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.PRX-58) — 7/7 PASS: all 7 joint rows (including row 5inbound.message_deletedand row 6inbound.controlagent_revokedacknowledged in 23.3 ms) passed end-to-end with real PRX enginee5500f6b8; paired with RF Core green pincas-pin/291f94afc5d1and RF GUI 3-client green CI (c4f7ea9e). Zero diff insrc/channels/ramflux/ordocs/rf-contract/through0925df313.O1,PRX-121) — MET:T20a–T25passed against Sylvode.Benchmark & External Hold Status (Transparently Tracked)
66x1(qa,prx-e5500f6b8-66x1-2026-12-04):|V| = 45/66valid reward-1.0 tasks).2026-12-04T13:32:49Z, 0 residual processes):361settled requests,96.15%KV cache read hit rate,1/12on attempted non-429|V|tasks (fin-saccr-rwaPASS, 8 zero, 3 timeout; 6 env errors outside|V|).33/45|V|tasks (30not-run +3cleanly 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): invokingsessions_spawn mode="process"in the same turn asmcp_status refresh=truefails closed on parent caller parity drift (next-turnB6bsucceeds).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.coordination/FOLLOWUPS.md.