Skip to content

Send Nova's known-shape calls through the witness - #39

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/nova-witness-wire-fbb8
Oct 7, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/nova-witness-wire-fbb8

Conversation

@warheart1984-ctrl

Copy link
Copy Markdown
Owner

What this is

When Nova's gate is on, a known call shape is sent by the witness or not sent at all. verifier/ickverify.py can recompute call_digest from a concrete call and join the witness log by allow receipt id. This does not prove observed effect.

What a reviewer can check

  • Provider HTTP calls and the local-model tools explain, status, code, and wire go through Witness.execute. Nova does not hold the witness key. NOVA_ICK_WITNESS is the socket for python -m runtime.witness_service. If the gate is on and no witness is configured, the call is not sent. post_json refuses a direct send while the gate is on.
  • A provider chat is an HTTP POST, so the derived effect is write.
  • ickverify.py --call recomputes call_digest with the standard library only. That digest matches runtime/call_binding.py. A forged digest and an omitted digest on a bound allow fail verification. The verifier cannot rebuild a call from a digest alone.
  • --witness-log reports mismatch, unauthorized, reused, late, and a bound allow with no execution. --witness-keys checks signatures. A witness key file that uses through is refused.

Tests

  • nova-shell/tests/test_witness_gate.py: a known shape cannot skip the witness.
  • tests/test_execution_binding.py and tests/test_standalone_verifier.py: forged and omitted digests fail verify, and the witness join reports the five cases above.
  • Existing executor-mode tests stay in place.

What this does not prove

  • Observed effect. A completed witness entry means this process sent the call and received bytes.
  • Observer mode, state_ref, retries, a witness heartbeat, and a two-account probe.
  • Egress. A caller who can reach the target without the witness is outside this control.
  • Gossip. Node gossip is still the older description-only gate.
  • python -m runtime and run_turn without a witness still call the provider after the kernel allows it.
  • A streamed known-shape provider call is refused while the gate is on. The witness binds one request body, not a stream.
  • risk and action are still the caller's claim. The clock is unproven. A compromised witness can sign a false execution. The authorization header is presence-only; User-Agent is sent and not hashed.

Limits are stated in docs/executor-mode.md.

Open in Web Open in Cursor 

cursoragent and others added 2 commits October 7, 2026 04:58
Provider HTTP and the local-model tool go through executor mode when the gate is on, or they are not sent. ickverify recomputes call_digest from a supplied call and joins the witness log by allow receipt id.

Co-authored-by: Jon Halstead <warheart1984@gmail.com>
The provider client is not called unless Witness.execute dispatched, and a direct post is refused while the gate is on.

Co-authored-by: Jon Halstead <warheart1984@gmail.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T05:08:16.020451Z 1a0dbde PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor
cursor Bot merged commit d577174 into main Oct 7, 2026
5 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a0dbde842

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

witness_key=Path(args.witness_key),
receipt_trusted_keys=Path(args.receipt_keys),
receipt_anchor=Path(args.receipt_anchor) if args.receipt_anchor else None,
dispatch=dispatch_known,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve provider timeouts in witness dispatch

When the gate is enabled, this newly selected production dispatcher routes every external and Ollama generation through dispatch_https, which constructs its HTTP connections with a hard-coded 10-second timeout (runtime/witness.py:103-107). This ignores the existing provider timeouts—60 seconds for registry providers and 120 seconds for /v1/chat Ollama—so otherwise valid model generations taking more than 10 seconds are consumed and recorded as failed. Pass the configured timeout to the witness or expose an equivalent witness timeout.

Useful? React with 👍 / 👎.

Comment thread runtime/witness.py
Comment on lines +90 to +91
if bound.kind == "https_request":
return dispatch_https(bound)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reject unsuccessful HTTP responses in witness dispatch

For witnessed provider calls, dispatch_known sends HTTP through dispatch_https, but that function returns response.read() without checking the status code (runtime/witness.py:123-124). Unlike the previous urllib clients, http.client does not raise for 4xx/5xx responses, so an authentication failure or provider outage is recorded as a completed witness execution and its error JSON may be returned as an empty or malformed completion. Treat non-2xx statuses as dispatch failures before recording completion.

Useful? React with 👍 / 👎.

Comment thread runtime/witness.py
raise WitnessError("dispatch", "a local model call needs prompt and model text")
temperature = arguments.get("temperature", 0.2)
max_tokens = arguments.get("max_tokens", 2048)
ollama = os.environ.get("NOVA_NODE_OLLAMA_URL", "http://localhost:11434/api/generate")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain the vLLM fallback for witnessed local tools

When the gate is enabled, local-model calls now execute here instead of through _direct, but this dispatcher only reads NOVA_NODE_OLLAMA_URL and never attempts the established NOVA_NODE_VLLM_URL fallback. Deployments configured for vLLM, or those relying on vLLM when Ollama is unavailable, therefore fail every governed code, wire, explain, or replay call even though the same configuration works with the gate off.

Useful? React with 👍 / 👎.

@warheart1984-ctrl
warheart1984-ctrl deleted the cursor/nova-witness-wire-fbb8 branch October 15, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants