Commit graph

180 commits

Author SHA1 Message Date
Anton Razzhigaev
a0157fe1c1 Merge updated ouroboros base into net-resilience: web-search client keeps OpenRouter app attribution through the keepalive factory; size-ratchet manifest regenerated on the merged tree 2026-08-30 04:06:23 +00:00
Anton Razzhigaev
e9bf6f148e Convergence fixes A7-A13: finalize_now honest no-resend during outage, typed proxy chains, loopback route fact, terminal wordings, Q14 margin, contract tests
- A7: finalize_now (deadline/ceiling/owner stop) arriving during an active
  transport-wait episode no longer dispatches a forced provider call over the
  proven-dead egress: _maybe_early_finalize routes the exit through the
  transport no-resend terminal (finalize_now_transport_terminal helper closes
  the episode's durable evidence with detail=finalize_now); mailbox-drain
  control bookkeeping is unchanged and the task terminalizes promptly.
- A8: is_pre_dispatch_transport_failure types the standard unreachable-proxy
  chain (requests ProxyError -> MaxRetryError -> urllib3 ProxyError ->
  NewConnectionError/ConnectTimeoutError); proxy HTTP responses and
  post-dispatch read failures stay untyped.
- A9: additive route_is_loopback fact on AttemptRequest/PhysicalAttemptCapture
  (set from the target base_url host in _attempt_request via
  is_loopback_base_url); classify_llm_exception excludes loopback routes from
  transport_unavailable alongside provider=='local', so a stopped Ollama/LM
  Studio/vLLM server fails fast instead of waiting out a phantom outage.
- A10: provider_terminal_fallback_text keys fail-fast wording on NOT
  wait_eligible, adds an eligible-but-zero-wait wording, and replaces
  INTERRUPTED with outage phrasing that cannot collide with the supervisor's
  STATUS_INTERRUPTED lifecycle term.
- A11: the Q14 final free redial reserves a named 3s margin
  (_FINAL_REDIAL_MARGIN_SEC) so round-top overhead cannot get the granted
  redial refused by the admission gate.
- A12: contract tests — error_kind_changed episode exit resumes ordinary
  fallback; unknown-outcome redial takes provider_outcome_unknown_no_resend
  with zero further dials; episode window carries zero dispatched paid
  attempts; nonstandard OUROBOROS_TRANSIENT_RETRY_MAX keeps the one-attempt
  transport contract; review actors' physical_attempt_limit(2) rail pinned.
- A13: _WAIT_BACKOFF_START_SEC promoted to config.py as
  NETWORK_WAIT_BACKOFF_START_SEC (config stays 1600 lines); generalized
  _self_check_round comment; dropped redundant capture-None guard in the
  classify branch; CLB RUNBOOK notes headless tasks keep the idle rail as an
  additional bound. Size-ratchet manifest regenerated (loop.py byte debt
  shrinks 312847 -> 312831).
2026-08-30 03:12:20 +00:00
Anton Razzhigaev
9a20df6a63 fix: separate OpenRouter application attribution
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-30 00:28:29 +03:00
Anton Razzhigaev
3fff0496d7 WIP: adversarial fixes A1-A6 (transport-wait terminal truthfulness, mid-chain episode latch, honest fast-fail text, contract pins) 2026-08-29 20:57:48 +00:00
Anton Razzhigaev
19327d429a Wait out remote transport outages instead of dying: typed transport_unavailable kind, round-level wait episode with free redials, deterministic no-resend terminal
A REMOTE pre-dispatch transport failure (released custody + typed predicate +
non-local provider) now classifies as its own kind, takes exactly one physical
attempt per call, and is paced by a round-level wait episode in the new
ouroboros/loop_transport.py: durable network_wait events, owner progress notes
(first immediately, then min(NETWORK_WAIT_NOTE_INTERVAL_SEC, idle/2) cadence),
an owner-signal-interruptible backoff sleep capped at the existing 60s bound,
and free redials of the same round until the task's own rails (deadline minus
the dispatch-admission reserve with one last free redial, budget, Stop, the
supervisor ceiling). The fallback chain runs at most once per episode and only
when USE_LOCAL_FALLBACK makes it local; a chain candidate dying pre-dispatch
stops the walk. Direct-chat/ephemeral turns fail fast instead of waiting.
Exhaustion takes a deterministic no-resend terminal keyed on the episode's
latched cause (transport_unavailable_no_resend, reason provider_unavailable,
infra_failed) with no forced-final provider call; the in-episode deadline
sliver suppresses the paid deadline-local finalize so the terminal story
cannot fork. Provider-failure hint/salvage helpers move to loop_transport
(loop.py sits at its byte-ratchet cap). ARCHITECTURE and the CL-Bench runbook
disclose the changed outage-time semantics of OUROBOROS_TRANSIENT_RETRY_MAX.
2026-08-29 19:25:11 +00:00
Anton Razzhigaev
4a5505899e Heal the full-matrix reds: replay conclusion gate, cybergym portability, deterministic test seams
The whole 3-OS matrix predates this branch in red; every leg is now
root-caused (four investigation lanes, all dispositions verified on this
host where reproducible).

Production fixes:
- web/modules/chat.js: merge #358 over-narrowed the durable-replay
  conclusion gate to typed terminal facts only, but the wire never stamps
  one on an ordinary bare final row - on replay a subagent final leaked
  into main chat, orphaned cards never converged, and a bare-final card
  sat on Working forever (three ui-smoke contracts). A plain untyped
  final row concludes again; every marked row class the checkpoint
  defended (system_type/msg_type) still never concludes. Verified by the
  full ui_browser sweep (50 passed) and the checkpoint's own pins.
- cybergym: two real Windows portability bugs - virtual symlink targets
  are container-side POSIX paths and are now classified with PurePosixPath
  semantics instead of host Path; the applied-settings integrity hash now
  binds the platform-newline serialization write_text_atomic actually
  persists (CRLF on Windows always tripped "changed during producer
  write").

Platform truth (with the files' own precedents): fifteen cybergym tests
assert POSIX-exclusive capabilities of a Linux-container docker benchmark
(descriptor-safe extract primitives, POSIX-absolute mount paths, POSIX
mode bits) and now carry the established capability guards/skipif
patterns already used in the same files - they reactivate automatically
wherever the capability exists.

Deterministic test seams (no assertion weakened, no production change):
process-global time.monotonic patching replaced with bounded injection;
float-precision and microsecond-truncation clock comparisons made
representable; hidden-deadline waits and fixed mock-LLM sleeps replaced
with event-gated synchronization and explicit in-flight drains; the
process-lifetime supervisor event-bus shutdown latch is isolated per the
in-repo fixture precedent (the xdist pollution behind the "local-green,
CI-red" attachment staging pair and the inflight-seam trio); the
ui-smoke status test now gates on history hydration before emitting
(per the project-continuity precedent).

chat.js and the manifest stay inside their byte ratchets (comment
compaction on this branch's own additions); the size-ratchet lane and
manifest --check are green against the drifted base.
2026-08-29 16:21:13 +00:00
Anton Razzhigaev
515dcfa3f6 Heal part 2: split the cybergym benchmark under the module caps, regenerate the manifest
The drift landed four cybergym modules over the 1600-line cap, which the
ratchet manifest generator structurally refuses to except. Behavior-
preserving splits along real seams: the executor sheds its docker/
container machinery (cybergym_docker.py) and run-settle accounting
lifecycle (cybergym_lifecycle.py) as mixin layers assembled in the
original class; the adapter sheds its stateless protocol layer
(cybergym_protocol.py: constants, validators, provenance, argv builders);
the sidecar sheds observation parsing and connectivity evaluation
(cybergym_observations.py); the executor test suite sheds its wire-
protocol cluster (test_cybergym_executor_wire.py). Every name any other
file imports stays importable from its original module.

loop.py returns to the upstream byte-debt record via wording trims on
this branch's own additions (no pinned phrase touched). The manifest
regenerates cleanly with band rationales for every drift arrival; the
blocking CI ratchet lane (-m size_ratchet) is green against the drifted
base - it was red even on the pristine target tip.

All cybergym suites pass (protocol, server, executor, wire); ruff -F
clean; full canonical pytest re-run on this tree.
2026-08-29 12:23:29 +00:00
Anton Razzhigaev
4ace26d339 Merge branch 'ouroboros' @3a5c0a0c: adopt identity SSOT, keep truth states; heal part 1
Integrates four upstream merges (#337 nested-coordination, #352 cybergym,
#353 mainleak, #358 review-checkpoint). Conflict resolution adopts the
new harness_presentation identity SSOT (SVG marks + branded labels; the
chip's icon field retires) while keeping this branch's chip truth states
- labels become "Codex - 2 ok" style and the review_truth pins move with
them.

Also carries heal part 1 for the target's latent size-ratchet debt (the
drifted tip fails its own blocking CI ratchet lane): config.py returns to
exactly 1600 lines via the settings_integrity extraction (snapshot pin +
write guards, config.X re-exports, deduped verified-read paths),
supervisor/events.py and the benchmarks test drop under their byte caps,
and the cybergym executor sheds its wire layer (typed faults, urllib
transport, telemetry parsing) into cybergym_wire.py.
2026-08-29 12:23:28 +00:00
Anton Razzhigaev
e7f4788318 Reuse verified CyberGym input attestations
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-29 00:25:51 +00:00
Anton Razzhigaev
e755a7d4e1 Prepare CyberGym DeepSeek Flash benchmark smoke
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-29 00:08:55 +00:00
Anton Razzhigaev
007bfe1a33 Raise CyberGym full-run concurrency 2026-08-28 18:38:18 +00:00
Anton Razzhigaev
891141bdcb Switch CyberGym arm to Gemini 3.7 Flash 2026-08-28 18:22:38 +00:00
Anton Razzhigaev
3db78f1ad6 Harden CyberGym workspace alias setup
Leave failed metadata staging artifacts in the disposable ignored workspace instead of path-cleaning a potentially replaced temporary object.

Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-28 12:09:35 +00:00
Anton Razzhigaev
0a17dc61ac Fix CyberGym workspace backend alias
Keep the container backend spelling and structured workspace tools on the same generated task root without changing Ouroboros core path semantics.

Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-28 12:02:21 +00:00
Anton Razzhigaev
733fbedcd9 Prefer authoritative CyberGym cost totals
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-28 06:33:18 +00:00
Anton Razzhigaev
213e390b1b Harden CyberGym cancellation custody accounting
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-28 06:31:09 +00:00
Anton Razzhigaev
db910f5fc3 Harden CyberGym isolated settings and archive publication
Bind applied settings to the isolated child, keep the snapshot immutable, and make archive publication and cleanup descriptor-safe across replacement races. Add focused regression coverage and document the three-task smoke contract.

Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-28 04:49:41 +00:00
Anton Razzhigaev
b3a0bfaeea Harden CyberGym settings and archive isolation
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-28 03:42:28 +00:00
Anton Razzhigaev
dec70517b4 Close strict settings patch race
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-28 03:05:35 +00:00
Anton Razzhigaev
b1aec00350 Harden CyberGym settings provenance and isolation
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-28 03:01:00 +00:00
Anton Razzhigaev
8e6e528c57 Keep CyberGym refusal manifests single-provider
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-28 02:47:39 +00:00
Anton Razzhigaev
b6bc0ab66c Harden CyberGym single-model settings provenance
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-28 02:45:02 +00:00
Anton Razzhigaev
a209bc55e6 Apply CyberGym single-model pilot settings
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-28 01:24:09 +00:00
Anton Razzhigaev
a01979c19c Expose CyberGym round and task cost caps
Record explicit per-task runtime and ledger controls in the applied settings and run manifest.

Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 20:33:48 +00:00
Anton Razzhigaev
385fc3584f Harden CyberGym archive and workspace custody
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 16:29:21 +00:00
Anton Razzhigaev
84213801da Update CyberGym pilot contract and workspace guidance
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 15:01:13 +00:00
Anton Razzhigaev
f1a2dde134 feat: add CyberGym Level-1 execution adapter
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 07:42:43 +00:00
Anton Razzhigaev
724f7ee0fa Harden CyberGym launcher admission and ledger
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 02:42:44 +00:00
Anton Razzhigaev
c3c4faf70a Preserve wrapped CyberGym query compatibility
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 02:34:00 +00:00
Anton Razzhigaev
939c297e6e Harden CyberGym verifier response handling
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 02:24:48 +00:00
Anton Razzhigaev
eee0c91bfd Add isolated CyberGym Ouroboros server wrapper
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 02:19:17 +00:00
Anton Razzhigaev
be5a029aef Harden CyberGym execution and result contracts
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 01:52:32 +00:00
Anton Razzhigaev
559474e6c5 Wire the CyberGym Level-1 execution adapter
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 01:10:22 +00:00
Anton Razzhigaev
63e93b0c28 Harden CyberGym sidecar boundary checks
Use the upstream documented readiness route, reject the public API-key fingerprint, and prevent control environment overrides or arbitrary in-container Docker endpoints. Preserve the server data root across an identical absolute bind mount and cover the fail-closed cases with Docker-free tests.

Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 01:06:02 +00:00
Anton Razzhigaev
b843b92915 Harden sidecar identity and cleanup custody
Require resolved image digests for production expectations, keep task ids out of workspace-visible aliases and environment, and make cleanup attest exact owned network/container ids.

Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 00:39:03 +00:00
Anton Razzhigaev
980df8600b Harden CyberGym launcher admission and final evidence
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 00:39:03 +00:00
Anton Razzhigaev
0964693159 Harden CyberGym protocol callback handling
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 00:38:57 +00:00
Anton Razzhigaev
37d2d722c5 Reject unowned cleanup targets
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 00:11:21 +00:00
Anton Razzhigaev
e756b8c446 Probe protected query and fix routes
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 00:10:35 +00:00
Anton Razzhigaev
3c0778f66b Harden sidecar secret and route validation
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 00:05:01 +00:00
Anton Razzhigaev
58fdc2cb8a Require internal network attestation
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-27 00:02:50 +00:00
Anton Razzhigaev
c73999d988 Add CyberGym sidecar custody helpers
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-26 23:59:55 +00:00
Anton Razzhigaev
01d69b5a3f Add CyberGym launcher protocol and budget ledger
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-26 23:57:05 +00:00
Anton Razzhigaev
7054f564d1 Add CyberGym benchmark profile and methodology
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-26 23:44:07 +00:00
Anton Razzhigaev
7b2f68fd04 devtools: pin bench review-cycle ceiling; docs: contract-fingerprint scope note
Owner decisions Q6-A and Q3-A (2026-08-21).

Q6-A: the shared OUROBOROS_REVIEW_MAX_CYCLES cap (shipped default "2") also
bounds task-acceptance panels (passes = cycles - 1); past bench campaigns ran
3-26 paid acceptance panels per task, so the shipped default would silently
change bench methodology comparability. Pin the ceiling off in every bench
scaffold:
- add "OUROBOROS_REVIEW_MAX_CYCLES": "unlimited" (the canonical unlimited
  sentinel per ouroboros/review_cycles.py) to all bench settings templates:
  continual_learning, gaia, osworld, programbench settings_base.json and the
  four swe_bench_pro e1v2 templates (settings_base, _run_settings.example,
  settings_sonnet46_probe, profiles/light_subagents_gpt55);
- terminal_bench has no JSON template: pin the same value in the
  harbor_installed_agent container env beside the other review knobs;
- forward the key through _ISO_SETTINGS_ALLOW_EXACT in common/server_runner.py
  so a live-settings pin reaches isolated bench servers like the other
  non-secret review-policy knobs.

Also align swe_bench_pro/e1v2/settings_base.json to
OUROBOROS_REVIEW_ENFORCEMENT=advisory: METHODOLOGY.md documents that E1v2
templates deliberately stay advisory (the in-bench commit_reviewed evolution
lane is structurally uncommittable under blocking with the no-version-bump
steer); "blocking" in settings_base was a disclosed discrepancy. Pure JSON
forbids an inline comment, so the rationale lives here and in METHODOLOGY.md.

Q3-A: document in docs/DEVELOPMENT.md the deliberate review-contract
fingerprint scope — roster, routes, enforcement, resolved efforts, prompt
constants; governance-document contents (BIBLE/CHECKLISTS/ARCHITECTURE) stay
outside it, so editing them neither lapses recorded verdicts nor frees
replays; the accepted trade-off is that an old verdict can replay under
amended governance text.

No scoring/grading/task code touched; version carriers unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 04:46:26 +00:00
Ouroboros
d1673dd76b Bind Harbor smoke to its effective Light actor
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-20 04:52:26 +03:00
Ouroboros
8d109c1e41 Persist complete fixed benchmark actors
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-20 04:25:13 +03:00
Ouroboros
83a736a171 Close fixed-model benchmark route provenance
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-20 03:34:32 +03:00
Ouroboros
dd890dd345 Fix fixed-model benchmark actor provenance
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-20 02:32:32 +03:00
Ouroboros
96dc4fb6bb Fix benchmark actor provenance
Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-08-20 02:32:32 +03:00