Main made the strict ruff config the default (`ruff check .`, blocking), and
the branch's code carried 278 findings under it (main itself is clean). Fixed:
- PLW1510 (86): `check=False` on each subprocess.run, preserving behaviour,
as main's own sweep (0006a5e229) did.
- ASYNC220 (9, test fixtures only): `noqa` with the reason, main's convention
for a Popen that returns at once and whose handle the test drives.
- ruff's safe autofixes plus the narrow unsafe ones (UP006/UP037/RUF100/RUF013/
PLR0402/RUF059 underscore renames/UP031/UP041/UP017/FURB167/PIE807/RUF007/
RUF015/RUF022/FURB162), and by hand: four %-formats to f-strings, three
unused unpacked names, one fixture loop over `.items()`.
No behaviour change. `ruff check .` passes; scripts/check passes; the 412 test
files mirroring every edited file pass (3 tests/pm files that fail only under
that batch's uv lookup pass solo, before and after this commit).
Code-health ratchet on PR #106742 (BLE001/S110/HX006), no behaviour change:
- narrow per-row JSON skips: hosted_room_attachments.reconcile_room_events
(ValueError/TypeError/AttributeError/RecursionError), hermes_state_gateway
routing-entry lookups (ValueError/TypeError/RecursionError)
- approval_context: only the gateway import is optional (ImportError);
finite_turn_required() is a ContextVar read that cannot fail
- deliberate boundaries keep their behaviour and now log the traceback:
profile park (exc_info), session-store init (module logger, same
"gateway.run" name, still WARNING), a2a profile dispatch (local log;
outbound reply stays redacted), readiness probe and session_search
profile open (debug), Windows control-pipe thread hand-off (debug; start()
re-raises), eval harness top level (logger.exception)
- managed_worker.main: traceback goes to the worker's own stderr (the owner
spawns it with stderr=DEVNULL) via a non-propagating handler, never the
channel or profile log files; the owner still gets only
managed_worker_failed
- evals/shared_gateway: timeout=30 on git rev-parse/diff calls
(cherry picked from commit dfc56cdd5ab875bd14b921de71be4a5bc8afc57f)
12 conflicted files, resolved in three lanes:
- gateway/run.py: take the branch split; main's tirith removal and spool-replay
ordering ported into run_runtime_init.py / run_bootstrap.py.
- config migrations: main keeps v50 (tirith); the branch's bot-chat timeout removal
becomes v51 (_config_version 51, template + test updated).
- hermes_state_usage.py: main's voice_chat task route threaded through the branch's
owner transaction; worker.persist usage allowlist accepts task.
- tui_gateway/server.py: branch side; main's edits applied where the code now lives
(agent_factory, session_registry). Desktop sessions get the catalog toolset on the
authority path; daemon-run finite CLI turns are not watched turns; lazy session info
reports nous/welcome on the free tier.
- Desktop/Ink: one branch-child spinner fix (main's route-token check); main's
uninstall i18n keys kept, pool keys stay removed; voice_turn forwarded and accepted
by the authority submit (surface_v1.voice_turn).
- chat_ws / PTY keepalive test: main's stricter test kept.
Merge #8: 2,771 commits from main (4b05f764fa). Ports main's moved code into the
unified runtime (run.py/run_turn.py splits, tui_gateway server, backup/restore
split), keeps the detached-daemon Desktop lifecycle, and adapts main's new tests
to the owner/authority contracts (canonical session deletes, retired-id
tombstones, zero-writer browsing, hermes_yaml, platforms() markers).
The merge kept the old lease_token/lease_generation writes in run_turn_prepare.py while
session_state moved to lease_tokens[generation]; the busy guard then treated every
turn as still running ('Another turn is still running on this session').
The unified runtime copied _init_registries_and_clocks and the cron bootstrap from a
pre-fix snapshot: HookRegistry() (one process-wide registry, so served secondaries'
hooks/ never load and fire the launch profile's handlers) and default_profile="default"
with _multiplex_profile_homes (a --profile <name> multiplexer's own jobs treated as a
secondary's). Restore ProfileHookRegistries and _cron_tick_profile_homes /
runner._primary_profile_name from main (#108453, #108428).