Commit graph

3 commits

Author SHA1 Message Date
Ouroboros
e74094d2df Implement contextual action policy and Cyber agency (local checkpoint) 2026-09-13 00:10:07 +03:00
Ouroboros
2085019152 merge: absorb upstream drift b9f7597f..8d13373b into v7next (F6 rolling sync)
Upstream = semantic truth, campaign = structural truth. Every upstream
semantic delta lands in its campaign owner leaf; upstream duplicate
extractions do not survive as twins:

- acceptance_dialogue.py -> folded into loop_acceptance{,_review}.py
  (A-material paid identity, free replay, identical-refusal terminal,
  dialogue history, inconclusive-dialogue reducer semantics)
- delivery_protocol.py -> folded into loop_delivery.py (hold-control
  literals, RecursionError-degraded and trailing-object protocol parsers
  over the shared strip_protocol_fence normalization)
- chat_delivery_events.py -> folded into events_chat_delivery.py
  (unified _delivery_chat_id incl. chat-0 media, send_links/send_quiz,
  registry merged via **_CDE)
- events review-wave handler retired for telemetry_events.py registry
- python_interpreter.py -> process_interpreters.py (upstream as-is);
  registry/tool_resolution/shell retargeted; interpreter_attestation
  scope in registry_core; node post-gates predispatch
- R5 typed process facts: process_facts.py channel + loop-side merge
  into the typed result_meta; describe_returncode SSOT retargeted
- deadline_utils.deadline_expired public name adopted (rename-class);
  test pins moved off the private spelling
- protected surfaces (BIBLE.md, safety.py, CHECKLISTS.md, registry.py,
  gateway/contracts.py incl. endpoint_index extraction) landed as-is
- web wave, VERSION 6.113.5, package data landed as-is
- size_ratchet_manifest regenerated via scripts/regenerate_size_ratchet.py
  (band rationales recorded for the F6-grown leaves); tools/core.py
  link/quiz/escalate spans moved to core_artifacts.py to stay under the
  giant gate; _run_shell and registry dispatch shaved under the
  function gate via shell_process/registry_core helpers
2026-09-01 11:12:47 +00:00
Anton Razzhigaev
55af051ec5 Resolve node/npm launches through an execution-probed runtime ladder
On macOS the generic process surfaces (run_command, run_script,
start_service, verify_and_record) resolved bare node/npm through the
host PATH, which can point at a Homebrew node the kernel SIGKILLs on
launch (CODESIGNING, ~9ms) while a working signed bundled node ships
inside the application. shutil.which proves existence, not runnability.

process_interpreters.py (renamed from python_interpreter.py; one generic
InterpreterResolutionTrace with a family field, python event payloads
byte-identical) gains the node branch of the resolver: POST-GATES - the
health probe EXECUTES a candidate, so it must sit below the light fence,
shell guards and safety refusals
(test_light_fence_refuses_before_the_node_probe_can_execute pins that a
planted PATH shim's payload cannot run off a refused call); guards
inspect the original argv and the substitution reaches the handler
through a scoped attestation. Ladder: bootstrap_process_path first;
non-local executor backends are skipped; a healthy PATH node is a
byte-identical no-op in argv, child env, rendered prose and receipts
(the typed resolution trace event is deliberate observability, symmetric
with python's); a missing or probe-dead PATH node falls back to the
bundled runtime (argv rewrite only for bare node/nodejs; an attested
child-env PATH prepend for npm-family launches and for sh/bash/zsh/dash
bodies found via shell_parse.shell_tokens, wrappers matched by
basename); no usable node runs as written with the probe facts
disclosed - never a pre-block.

ouroboros/node_runtime.py owns the execution-probed health memo
((path, mtime, size)-keyed; missing never cached so a mid-session
install is noticed; a timeout verdict is cached with its probe budget
and re-probed only by a larger one; a relative which() result is never
trusted) and the skill-family policy select_skill_node_runtime
(bundled-first with health rollback), used by skill_exec, companions,
isolated deps, workspace preflight and the world profiler;
platform_layer lazily re-exports the public names (PEP 562, both import
orders pinned).

Handlers publish typed process facts (exit_code, POSIX signal name,
duration_ms, resolved_runtime) through the thread-local seam in
tools/process_facts.py; loop_tool_execution consumes them for the same
call, and the regex harvest over rendered text remains the read
fallback. Verify receipts disclose duration/signal/runtime while the
ORIGINAL check text stays the receipt identity. A signal death (rc < 0)
leaves the cosmetic bucket (POSIX; Windows is a disclosed residual), the
web log renders it as an error, and an executed serial pin proves our
own cancel custody never surfaces as tool_failure. Durations are
monotonic; the filesystem freshness audit keeps its own epoch stamp.

Three adversarial rounds, a triad+scope review round (12 runs) and a
delta + full-scope verification round (4 runs) are dispositioned in the
sprint plan; the accepted findings are folded in (Windows-only token
normalization, padded-head declassification, relative-which no-op on
both resolver lanes, basename-matched shell wrappers, case-aware env
overlay merge shared with the companion manifest lane, budget-scoped
timeout memo, size-gate surgery).
2026-08-30 19:53:59 +00:00
Renamed from tests/test_python_interpreter.py (Browse further)