Skip to content

Replay a recomputed authorization, on verified-cli v0.1.5 - #10

Merged
zy4 merged 2 commits into
mainfrom
derivation-replay
Oct 13, 2026
Merged

zy4 merged 2 commits into
mainfrom
derivation-replay

Conversation

@zy4

@zy4 zy4 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

The TypeScript half of dekrops/verified-python#20: the pin moves to verified-cli v0.1.5, and one function is added over its new crate. The two SDKs stay level.

What is added

replayDerivation(pack, trust): DerivationReplay

A replay package carries a contract, signed statements and the result a first verifier arrived at for a Cedar-backed authorization. The function computes that result again from the evidence, under your trust registry, and compares. Nothing presented is believed.

A DerivationReplay reports:

  • outcome: reproduced or not-reproduced, with stage, code and detail when not;
  • authorizations: for each work event the outcome (ALLOW, DENY, UNDETERMINED), the failed guards, and engineDecision, which is what Cedar itself returned and is never the outcome;
  • decision: the contract's;
  • bindings: which contract requirements depend on which derivations.

This is a draft outside the protocol. It is proposed in RFC 0005 of dekrops/wvp, which no specification defines yet. The comments, the changelog and docs/protocol-compatibility.md say so, draft is always true, and the function may change or be removed.

Every rule is upstream's verified-derivation. The Rust side is one call; the TypeScript side is types.

For review

  • The WebAssembly module grows from about 0.5 MB to 3.7 MB, because it now contains the Cedar policy engine. Everyone who installs the package pays that, whether or not they call the new function. If that is too much, the alternative is a second module loaded on demand; I did not build it.
  • Cedar runs inside WebAssembly here: the six new tests replay real packages through it and pass.
  • Licences. Zlib and Apache-2.0 WITH LLVM-exception are added to the allowed list (two crates in Cedar's graph, the second build-time only), and THIRD-PARTY-LICENSES.md is regenerated.
  • Cedar's time and memory are not bounded in a replay. The comment says not to call it on packages from parties you would not let run code.
  • Fixtures. Four of verified-cli's synthetic example packages and their registry are copied byte for byte into tests/fixtures/derivation, and excluded from the formatter so they stay that way.
  • No release, no version change.

Checks run locally

biome check, tsc --noEmit, vitest (136 passed, 1 skipped; the conformance file does not load here because the corpus submodule is not checked out, as before this change), cargo fmt --check, cargo clippy for wasm32-unknown-unknown with warnings denied, cargo deny check, notices regenerated.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByMeGbW8csxqgxHZM89s4c

seungzin and others added 2 commits October 13, 2026 13:51
replayDerivation computes a presented recomputed authorization again
from its evidence, under the caller's trust registry, and compares. A
draft, proposed in RFC 0005 and not part of the protocol. Every rule is
upstream's verified-derivation crate; nothing here prepares, decides or
compares anything.

The pin moves to v0.1.5. The module now links the Cedar policy engine
and grows from about 0.5 MB to 3.7 MB; two licences join the allowed
ones and the notices are regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ByMeGbW8csxqgxHZM89s4c
A licence text in Cedar's graph has CRLF line ends, which the
repository's line-end normalisation rewrote, so the committed notices
differed from what CI generates. The file is now stored as generated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ByMeGbW8csxqgxHZM89s4c
@zy4
zy4 merged commit 7691b18 into main Oct 13, 2026
10 checks passed
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