Skip to content

Add executor mode that binds a call to its allow - #38

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/executor-mode-fbb8
Oct 7, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/executor-mode-fbb8

Conversation

@warheart1984-ctrl

Copy link
Copy Markdown
Owner

What this is

Executor mode, from the execution-binding design. A witness Nova does not hold the key for recomputes call_digest, checks the allow, consumes it, and only then sends the call. This does not prove observed effect.

What a reviewer can check

  • The signer, given a concrete call, derives effect and target for https_request and local_model_tool, computes call_digest, and denies a disagreement (DESCRIPTION_DISAGREEMENT) or an unknown shape (UNKNOWN_CALL_SHAPE). The deny records the derived call, not the lie.
  • call_digest is hashed into the proposal and, when present, into the receipt. Older receipts that omit it keep their ids. infinityctl evaluate copies the field; it does not derive it. The kernel does not interpret the digest. A non-empty payload.binding_fault can only deny.
  • The witness (runtime/witness.py) checks that the receipt log chains, the receipt exists, the verdict is allow, the digest matches, the allow is unused, and it is not expired. It appends a signed started entry before dispatch, then completed or failed. Mismatch does not consume the allow. One allow, one execution. No retry.
  • Witness entries live in a separate log, signed with the witness key (infinityctl witness-append / witness-verify). through key retirement is not applied; a key file that uses it is refused.

Tests

tests/test_execution_binding.py covers:

  • Allow a read, execute a write: mismatch, nothing sent, then the read still runs once.
  • Replay of one allow: reused, one dispatch.
  • Lying at proposal time (write described as a read, including with the write's digest): deny, and executing that receipt is unauthorized.
  • Wrong digest with a matching description, unknown shape, expiry (late), a broken receipt log (unauthorized), a failed send consuming the allow, a real localhost GET (the mismatched POST is not seen), and redirects not followed.

What this does not prove

  • Observed effect. completed means this process sent the call and got bytes back.
  • Nova's HTTP routes. They are not wired through the witness. infinityctl evaluate without the signer still trusts the caller's description.
  • A second implementation of call_digest. Only runtime/call_binding.py computes it. ickverify.py does not recompute it and does not read the witness log.
  • Observer mode, state_ref, retries, a witness heartbeat, or two OS accounts for the witness. The tests use two keys in one process.
  • That the witness clock or issued_at is true. That a taken-over witness cannot sign a false execution. That the target cannot be reached except through the witness.

Details and the remaining limits are in docs/executor-mode.md.

Open in Web Open in Cursor 

The signer derives effect and target from a known call and puts call_digest on the receipt. A witness Nova does not hold the key for recomputes that digest, consumes the allow, and only then sends the call. A mismatch, replay, or proposal-time lie is refused and recorded. This does not prove observed effect.

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-07T04:14:49.753744Z f3048c5 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.

@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: f3048c5ace

ℹ️ 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".

Comment thread runtime/witness.py
Comment on lines +119 to +123
receipt = self._find_receipt(allow_receipt_id)
if receipt is None or receipt.get("verdict") != "allow":
return self._diverge("unauthorized", digest, allow_receipt_id)
if derived is None or digest != receipt.get("call_digest"):
return self._diverge("mismatch", digest, allow_receipt_id)

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 legacy receipts before trusting call_digest

When the receipt log contains a signed v1 allow, an attacker who can edit the log but lacks the signing key can add any call_digest and refresh issued_at; v1 verification deliberately hashes neither field, so the receipt signature, chain, and anchor still verify. Because this path checks only the verdict and injected digest, the attacker can turn an old harmless allow into authorization for an arbitrary matching call and bypass the TTL. Require a receipt version whose digest and timestamp are covered before dispatching.

Useful? React with 👍 / 👎.

Comment thread runtime/witness.py
body=None,
error=str(exc),
)
completed = self._append(self._execution("completed", digest, allow_receipt_id))

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 Bind the response bytes into completed entries

When dispatch succeeds, body is returned to the caller but the signed completed entry contains only the call digest and status. Two executions receiving completely different bytes therefore produce indistinguishable witness evidence, so the log cannot support the documented claim that it records or proves the bytes received. Include a response digest in the completed entry and its signed material.

Useful? React with 👍 / 👎.

The Unix socket server was created at import time, so Windows test collection died before any skip could run. The class is now defined only where Unix sockets exist.

Co-authored-by: Jon Halstead <warheart1984@gmail.com>
@cursor
cursor Bot merged commit 81e99f8 into main Oct 7, 2026
2 of 4 checks passed
@warheart1984-ctrl
warheart1984-ctrl deleted the cursor/executor-mode-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