Skip to content

Stop the e2e hot-path tax and sidestep 402/429 off Cursor - #141

Draft
kvnloo wants to merge 3 commits into
masterfrom
fix/e2e-hot-path
Draft

kvnloo wants to merge 3 commits into
masterfrom
fix/e2e-hot-path

Conversation

@kvnloo

@kvnloo kvnloo commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • before_agent_start no longer awaits a fresh python -m z0int.automatic spawn. Receipts defer to the resident bridge worker. Hook RTT is recorded.
  • A missing Kerdoios / Evolution Lab interpreter returns immediately. Flyforge does not spawn it. A live kerdoios plan stays off this path.
  • 402 and 429 sidestep to Nous, Vercel, OpenRouter, Groq, then Nvidia. Cursor, Codex, and xAI are blocked.
  • Groq quota projects from local receipts when kerdoios.quota is missing.
  • Nous OAuth resolves in the Hermes venv, so the bridge interpreter does not import ruamel.

Tracks #139.

Validation

  • PYTHONPATH=src python3 -m pytest tests/test_hot_path.py tests/test_free_fanout.py — 8 passed on this branch.
  • Node harness: scheduleOmpAutomatic p50 0 ms, spawn: false. Prior warm spawn was 478 ms.
  • System Python resolved Nous credentials with ruamel_imported False. The key was not printed.

Not in this PR

OMP skill-compression 402 storms, TSP credit stalls, and parent-model inheritance for task subagents. Those are tracked on #139 and are not this repo.

2026-10-08 exact-head CI repair

  • Fixed in 3caa31f: older tests/test_bridge_worker.py runtime stubs now restore after each unittest; previously they contaminated test_hot_path.py in the combined suite.
  • The Node subprocess imports automatic-client.mjs from the checked-out repository rather than a machine-specific /mnt/zer0models path.
  • Optional Kerdoios quota projection retains the historical quota.dimensions response shape, with explicit sources and reset windows. Added fallback assertions.
  • Previous exact-head CI on c9f79af: 5 failed / 956 passed / 8 skipped / 5 live deselected. Failure log. Exact-head core unit CI 37815538738 completed successfully; the prior evidence receipt failed solely because this repository's minimal YAML parser does not strip quotes from SHA fields.

Promotion hold

Removing before_agent_start's old context response must not silently remove model-visible z0 context injection. Before default activation, verify a real OMP turn receives the intended evidence (or explicitly document the change as a separate opt-in behavior), and compare end-to-end outcome/cost, not just hook RTT. CI does not establish that runtime acceptance.

Evidence receipt

issue: 139
base_revision: 8cf1c6446a4f83ccd932f572e39c3b60b850de36
head_revision: 2f9604139a227f2f4f3b2286a9e94410ee39a3a9
tests:
  red: "Actions 37664653625 on c9f79af: 5 failed, including leaked bridge stubs, host-specific Node import and missing quota response."
  green: "Core unit CI 37815538738 completed successfully on exact head 2f96041, including the offline suite. Live installed OMP integration remains unverified."
limitations: "No live OMP context-injection or provider-network acceptance; no new measured end-to-end speed claim."

Context-delivery correction (2026-10-08)

The first hot-path implementation silently changed operator-enabled OMP automatic specialization: before_agent_start returned undefined even when automatic.py produced action=context; the deferred bridge op records a receipt but cannot inject into the active turn. This would have made the hook look faster by dropping model-visible work.

Commit 2f96041 restores the previous explicit opt-in context path. Default-disabled sessions retain the spawn-free fast path. The new tests/test_omp_hook_context.py exercises the registered TS OMP hook through the real Python automatic.py subprocess and a loopback fixture: disabled returns native/no provider call; enabled emits the model-visible specialized context and a consumption receipt.

Tradeoff: operator-enabled specialization still incurs the previous blocking Python call; this PR does not claim a 0 ms hook for enabled specialization. A future resident, synchronous delivery contract requires separate measured work. Exact-head core unit run 37815538738 passed, and receipt run 37834154703 passed. The new real-hook test is committed but installed OMP runtime acceptance and outcome-based latency comparison remain unverified. Retain draft until then.

before_agent_start no longer awaits a Python spawn. A missing Kerdoios interpreter returns without a subprocess. Groq quota projects without kerdoios.quota. Nous OAuth resolves in the Hermes venv so the bridge interpreter does not import ruamel.

Tracks #139.
@github-actions github-actions Bot added the area:verify Tests, mutation, evidence label Oct 7, 2026
Scope runtime stubs to unittest methods, resolve the OMP adapter in CI from the checkout, and keep QuotaState-compatible dimensions without an optional Kerdoios installation.

Prior CI on c9f79af had five failures and rejected the missing evidence receipt. Tracks #139.
@kvnloo
kvnloo marked this pull request as draft October 8, 2026 16:57
…lt hook spawn-free

Operator-enabled OMP automatic specialization retains its prior model-visible context and delivery receipt; the default-disabled path stays nonblocking with resident shadow scheduling. Add a real TS extension + Python automatic-adapter loopback regression exercising the original OMP hook surface. Tracks #139.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:verify Tests, mutation, evidence

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant