Repository navigation
Engine start budgets, status counters and owner-mode command updates - #9
Merged
Merged
Conversation
The encoding tests asserted the subprocess locale through locale.getencoding(), which exists only from Python 3.11, so all three failed under Python 3.10. locale.getpreferredencoding(False) gives the same answer under -X utf8=0 on every supported version.
A direct message from a sender ID that the channel's adapter does not accept, such as an SMS short code, made the approval lookup raise. Ingress observation then wrote an ingress_observation_exception warning and decision row for every such message. Check the sender ID with handle_fits before the lookup and reject the message like any other unapproved contact: no warning, no row and nothing pending. The ingress key already holds the adapter's canonical ID when the adapter accepts the sender, so every sender that was approved before is still approved.
Errors from installed engine, model, profile and channel extensions are re-raised with their entry point and distribution in the message. Every error that was not a ValueError became a RuntimeError, so an extension whose factory raised, for example, PermissionError ended setup with a traceback instead of the ACTION NEEDED line setup prints for OSError. Re-raise such errors as OSError, still naming the extension and chaining the original error. Other error types are unchanged.
The access command tests call the main CLI in process. Its first access command imports manage.py, whose standalone bootstrap puts a new owner_mode package object into sys.modules without the attributes of the submodules already imported. Python 3.10's mock.patch walks dotted targets through those attributes, so a later test patching owner_mode.automation failed when the whole core step ran. Restore the suite's package and its submodule bindings after each command, as support.load_cli does.
The owner-mode README now says that a command line whose first argument matches the first serve_argv argument warns when later configured arguments differ, so a one-shot command such as gateway status does warn. The extension guide names which errors identify the entry point and its distribution: load errors and collisions do, errors found while entry points are listed do not. The setup guide says that the files setup patches, not every configuration file, are read and written as UTF-8.
Setup keeps the text of openclaw.json, so the file can hold comments, trailing commas, single quotes, unquoted keys or a byte order mark, which the terminal's strict reader refused. The launcher now reads the file as JSON or JSON5 and hands the parsed configuration to the runner in the receipt it already writes to the pipe. The terminal uses that instead of parsing the file, and still writes only its private strict copy. The configuration is never placed in an argument, an environment variable or an error text. A runner started without a parsed configuration reads the file as strict JSON and otherwise ends with one fixed message that names the file. The launcher refuses a file that is not a JSON or JSON5 object before it creates the session grant, and returns the runner's exit status when the runner ends before reading the receipt.
Setup patched every existing JSON file in place, including the files it owns: openclaw-bridge.json, setup-result.json and the client configuration. One of those left empty, cut short or not UTF-8 then stopped every later setup with a parser message that named no file, and JSON5 text added to them survived although their readers are strict. Those files are written whole as strict JSON again. Only the harness configuration the user keeps is patched, and YAML stays YAML. Detection skips a bridge file it cannot read instead of stopping, so setup reaches the step that replaces it.
A gateway loads the model adapter group when a request arrives on a route saved with the legacy request-compatibility name. When an installed entry point failed to load or collided there, the request was answered with the fixed 502 text and nothing said which extension was the cause. The loader now records the entry point and distribution on the error it raises, and the request handler logs one fixed warning with those names and the route. The reply text is unchanged. The warning carries nothing from the request and not the failure's own text, and requests that do not meet the failure log nothing.
An installed entry point in the engine, model or profile group that could not be listed (an invalid name, the same name twice, or missing or invalid distribution metadata) raised an error that named nothing, so it did not say which installed package to correct. These listing errors now name the group and the entry point's name and value, and the gateway warning for a failing extension names them the same way. Channel plugin listing keeps its messages.
The access commands of the main command passed a refusal from the approval store on as an uncaught error, so an unknown channel or an empty contact ended in a traceback. The main command's adapter now prints the refusal's fixed text on one line of standard error and returns exit status 1. The store is not changed, and accepted commands print what they printed before.
Four small cases, each with its own test: - `flashalign why` skips a log line nested too deep to parse, like the other unreadable lines, instead of ending in a RecursionError. - A failing control reply whose JSON body is null gives the OpenClaw extension's fixed error with the control_request_rejected reason, like any reply without a usable reason code, instead of a TypeError. - Setup quotes a YAML string that a YAML 1.2 reader would take for a number, such as 1e3, 08 or 0o17. The library resolves YAML 1.1 numbers only and wrote those as plain text. - The bridge reads its configuration file as UTF-8, whatever the locale. The control error tests of the extension remove the temporary directories they make.
The runner parsed the session receipt outside any error handling. When the launcher was stopped while it wrote a receipt larger than a pipe buffer, the runner read a cut-short receipt and the runtime's own error output quoted its start, which holds the parsed configuration. A receipt that is cut short, empty or not JSON now ends the runner with one fixed line on standard error and exit status 1. Nothing of the receipt is written to standard output or standard error.
The Hermes README now names the `OWNER_MODE_EXTENSION` warning the provider proxy logs when it answers a request with HTTP 502 because an installed model adapter could not be loaded or registered, says what a new registration does after an in-process upgrade, and shows the `owner_turn` default for `tool_name` as the code has it. The OpenClaw README now names the `control_unavailable` code the extension records for a control connection failure.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Change
Engine and owner-mode changes since 1.2.0, with the READMEs brought in line with the code.
CHANGELOG.mdand the version are not changed here; they belong to the release.Engines
startup_timeoutinstead of the unusedstartup_timeout_secondsspelling; previously prepared deployments retain their old budget until prepared again.startup_timeoutfor vLLM, SGLang and llama.cpp engines as it already did for native Docker engines: it must be an integer from 60 to 7200 seconds, or setup stops withEngine startup_timeout must be an integer from 60 to 7200 seconds(native Docker setups previously reportedNative Docker startup_timeout …). Earlier releases accepted any value for these engines, so a plan with, for example,null,1800.0,30or10000now stops setup until the value is corrected.output_tokens_total,ttft_seconds_sumandttft_seconds_count, withnullfor unavailable measurements, integer counts and a floating-point seconds sum. The engine contract now documents the status schema and tells clients to treat missing counter fields as unavailable.status,doctoranddashboardnow shows graph mode, generation, expected, installed and exercised sites, active requests and GPU memory, and no longer shows theEXECUTIONline;numerical_attestationremains in status payloads and--jsonoutput. Output rate and mean first-token time have values for engines that report the new counters.Owner mode
flashalign channelstake effect without a restart on Hermes installs set up by this version; an existingallowed_channelssetting still limits the plugin until it is removed or setup is rerun.request_changed, without reusing the ticket's identity metadata.flashalign whyshows recent decision reasons across Hermes, OpenClaw and direct gateways without message content, and retains readable rows when a log contains invalid bytes or a line nested too deep to parse, or cannot be read.config.yamlas YAML with key order kept (comments, quoting, layout and anchor names are not kept; a string that a YAML 1.2 reader would take for a number, such as1e3or08, is quoted), and changes only the properties it owns in the harness's JSON and JSON5 files; CRLF becomes LF, the files setup patches are read and written as UTF-8, and a harness configuration file that is not valid UTF-8 is refused and left unchanged. FlashAlign's own files (openclaw-bridge.json,setup-result.jsonand the client configuration) are written whole as strict JSON, as in earlier releases.flashalign pauseturns owner mode off (stock replies; no turn counts as the owner's) andflashalign resumeturns it back on, without changing saved contacts, channels, mode or tool settings.flashalign; one that the store refuses, such as an unknown channel or an empty contact, prints one line that starts withAccess command stopped:, exits with status 1 and leaves the store unchanged.flashalign.engine_adapters,flashalign.model_adaptersorflashalign.profile_adaptersis loaded when a registry is first used, and again on each use until it loads; one that fails to load or collides with a built-in stops setup, profile validation and requests on routes with a legacy request-compatibility name until it is corrected or removed; setup and profile validation name its entry point and distribution, or its group, name and value when the entry point cannot be listed (an invalid name, the same name twice, or missing or invalid distribution metadata); the affected requests answer HTTP 502provider wrapper unavailablewithout naming it, and the gateway log gets oneOWNER_MODE_EXTENSIONwarning for each such request, naming the route and the extension, with nothing from the request and not the failure's own text; a profile adapter that collides or fails with anOSErrororValueErrorinstead makes setup list every local profile as skipped, with that error, and continue to profile selection.owner-mode.logbeside their approval store by default, so these files grow as decisions are recorded; readiness polling does not add false failure rows.audit_logandauditLogsettings into bridge and OpenClaw plugin configuration so both use the same decision log.reasonfield; the OpenClaw adapter records a fixed rejection code, outside readiness polls, when an HTTP error body is not JSON and returns the fixed control-failure message; its other control errors readOwner Mode control request failed: <reason>, and a connection failure reportscontrol_unavailableinstead of the connection error and, outside readiness polls, records it.config.yamlthat an older setup wrote as JSON is rewritten as YAML when setup saves it.channel_disabledinstead ofchannel_not_allowed.serve_argvargument warn withserving_process_mismatchwhen later configured arguments differ, including one-shot commands such asgateway statuswithserve_argv: [gateway, run]; other one-shot commands remain silent.Smaller changes without a line of their own above
Engines:
statusanddoctortext output changed (covered by Engines line 9).Owner mode:
openclaw.jsonas strict JSON: comments, single quotes, unquoted keys and trailing commas stay in the file, so a tool that reads it as strict JSON must accept JSON5. FlashAlign's native terminal does.openclaw.json, is kept; earlier releases removed it.RuntimeError,OSErrororValueErrorinstead of the plugin's own error such asImportError, and two messages about listing installed adapters no longer contain the word "channel".config.yamlvalues that JSON cannot hold, such as dates, sets and binary data; earlier releases stopped with an error on them.no_middleware_context; the Hermes plugin creates its log directory in every process that loads it, not only the serving one.openclaw.jsonholds comments, trailing commas, single quotes, unquoted keys or a byte order mark, and the file is not changed.openclaw.jsonthat is neither JSON nor JSON5 stopsflashalign terminalbefore a session is granted, with an error that names the file and shows nothing from it.openclaw-bridge.jsonit cannot read (empty, cut short or not UTF-8) instead of stopping, and setup then replaces the file.flashalign terminalfor OpenClaw readsopenclaw.jsonitself as JSON or JSON5 and stops before a session is granted when the file is missing, not UTF-8, not a JSON or JSON5 object, or holdsNaN/Infinity.READMEs
hermes-owner-mode/README.mdnow names theOWNER_MODE_EXTENSIONwarning that the provider proxy logs for each request it answers with HTTP 502 because an installed model adapter could not be loaded or registered, says that after an in-process upgrade a new registration leaves the previous release's registration running and registers nothing, and shows theowner_turndefault astool_name="".openclaw-owner-mode/README.mdnow namescontrol_unavailable, the code the extension records for a control connection failure.Validation
main, and two tests added here need numpy and httpx built for 3.10. This pull request's CI is the 3.10 check.Contributor rights
Submitted on behalf of Aevonix Inc. No third-party code is added.