Skip to content
Code Recycle

Component · for humans & their agents

Approval Binding

verified · first-partyactively maintained$0 during beta (was $59)

An approval should stop meaning "yes" when the thing it approved changes. Binds approvals to a content hash, so editing a request after sign-off is a refusal rather than a silent pass.

by saltyhash · Code Recycle admin

Get it free — beta

Every claim on this page is refundable if it is untrue — refund policy.

21 tests · 4/4 deliberate defects caught. One Node built-in (crypto), nothing else.

The defect

Almost every approval queue stores this:

  approvals: { requestId, approvedBy, approvedAt }

So the record says "Dana approved request 41." It does not say **what request 41 said when Dana approved it.** The requester edits the amount, the recipient, the SQL, the deploy target — and the approval is still sitting there, still valid-looking, now authorising something nobody agreed to.

Nothing errors. The audit log is complete and entirely misleading: a correct approval, by a real approver, at a real time, for content that no longer exists.

  const decision = evaluateApprovals(editedRequest, [danasApproval], policy, { now });
  // { allowed: false, reason: "payload_changed",
  //   detail: "1 approval(s) were given for a different version of this request…" }

payload_changed is reported before insufficient_approvals, deliberately. "Insufficient approvals" sends somebody off to collect a second signature for content nobody has reviewed.

The other four, all variations on "who actually agreed"

| refused | because | |---|---| | self_approval | the requester approved their own request (off by default; enabling it should be deliberate) | | insufficient_approvals | counted distinct humans — one person holding two roles is one person | | stale_approval | a six-week-old approval authorising today's deploy | | already_executed | two approvers clicked at once; for a payment or a migration, the second run is the incident |

The quorum rule is worth dwelling on. Counting approval rows turns a two-person policy into a one-person policy that still reads as two in the audit log — the same person, two roles, two clicks. A Set on the approver is the entire difference.

Hashing, where a false alarm is as costly as a miss

Keys are sorted recursively before hashing. JSON.stringify preserves insertion order, so the same request built by two code paths would otherwise hash differently, every approval would look tampered with, and everyone would learn to click through the warning — which costs you the signal exactly when it is real.

Array order is preserved, because for a list of recipients or migration steps the order is the content.

What it does not do

| not included | why | |---|---| | Storing approvals, or a UI | decision logic only; it fits whatever queue you have | | Deciding who may approve | that is your authorisation system's job — this consumes the result | | Notifying approvers | no transport |

approvalContext() returns the hash for display. An approval UI that never shows what is being approved, in a form the approver can compare later, is how the drift above goes unnoticed for months.

01Capabilities

Does

  • + Approval queue
  • + Audit logs
  • + Approval workflows

Doesn’t

  • No exclusions declared

02Requirements & stack

Depends on

No declared dependencies

Credentials needed

None declared

Stack

03Community

No endorsements yet

No verified confirmations yet — be the first.

Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.

Open an issue

Sign in to confirm — weight comes from verified usage, not vote count.

Nobody has reported anything yet — a success counts as a report too.

04Trust Passport

Full passport →
–/100

0/0 automated components pass. An automated score is never a security guarantee.

✓ Verified · first-partyreviewed Sep 20, 2026 · re-verification due Dec 19, 2026
  • publisher identity Publisher status verified; 1 verification(s) on file
  • malicious pattern scan No known malicious-behavior patterns across 7 source file(s) plus listing text
  • capability contract All 0 observed capability reference(s) match the declared manifest
  • agent safety scan No injection patterns in agent-readable content
  • provenance No release signature or provenance attestation
  • behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.

Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.

VersionChannelReleasedNotes
0.1.0stableAug 12, 2026Initial extraction.