Skip to content

feat(site): preview wallet-native spend controls - #3

Merged
Aznatkoiny merged 9 commits into
mainfrom
feat/employer-skill-ledger
Aug 4, 2026
Merged

feat(site): preview wallet-native spend controls#3
Aznatkoiny merged 9 commits into
mainfrom
feat/employer-skill-ledger

Conversation

@Aznatkoiny

@Aznatkoiny Aznatkoiny commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Why

The protocol is being reframed around the Wielder as a wallet: an AI Agent can request economic action, but a customer-hosted Wallet Kernel controls what may be approved, retried, signed, and reconciled. The public site needed to explain that direction without presenting an offline browser fixture as live wallet or on-chain evidence.

What changed

  • Reframed the homepage as a pre-release preview of wallet-native Agent spending controls.
  • Added a deterministic offline sandbox covering policy load, automatic allow, default-deny rejection, exact approval, deliberate exact retry, and an unsigned terminal projection.
  • Bound the approval preview to the request hash, challenge/quote, seller, resource, exact amount, wallet, policy version, and expiry.
  • Preserved /proof as a clearly labeled static historical archive and removed the legacy hosted payment endpoint/client from the website.
  • Added release-gated copy that distinguishes planned signed receipts and on-chain settlement from what has actually been run.
  • Added a pinned Node 22 website workflow and updated the lockfile to patched dependency versions.

Verification

  • Node 22.22.0: website tests 24/24, ESLint, TypeScript, and production build passed; Next generated 6/6 static pages.
  • Browser E2E: policy -> 0.08 simulated allow -> 0.01 unknown-seller deny -> 0.60 exact approval -> deliberate retry -> unsigned projection. Simulated charged total was 0.68 test USDC with 4.32 remaining from 5.00.
  • /proof returned HTTP 200 as a retired static archive; browser console had 0 errors and 0 warnings.
  • Dependency audit reported 0 vulnerabilities.
  • Offline regression coverage also passed for prototype (23/23), clone economics (97/97 unit and 106/106 E2E), internal Invocation awards (86/86), registry ranking (12/12), marketing claims (2/2), and available Hugging Face fixture/static/Python checks.
  • Tracked secret scan passed across 405 files; protected CONTEXT.md, docs/PRD.md, and docs/adr/ remain unchanged.

Release gate

This PR remains a draft. No private key, wallet funding, real funds, mainnet action, live provider call, deployment, or new on-chain settlement was performed. Customer demand, funded-wallet deployment, live Wallet Kernel settlement, and the pinned Linux deployment remain unvalidated. Full post-merge Phase 0 and Pi Wielder runs still require their lockfile dependencies in an unrestricted local terminal.

@Aznatkoiny Aznatkoiny changed the title feat: add employer skill attribution product feat(site): add employer skill attribution product Jul 26, 2026
@Aznatkoiny Aznatkoiny changed the title feat(site): add employer skill attribution product feat(site): preview wallet-native spend controls Aug 3, 2026
Aznatkoiny and others added 6 commits August 2, 2026 23:19
The acceptance policy set approvalTtlMs to 1.5s. Approval expiry is anchored
at the PolicyDecision that blocked the payment (loadAuthority reads
policy_decisions.decided_at, not the operator's approval), so that TTL was the
entire budget for the approval-survives-restart exercise: stop the control
process, relaunch it, read the operator overview, approve, and retry.

That path costs ~0.33s on a dev machine, leaving 1.2s of headroom, so the test
passed locally. On a GitHub runner it exceeds 1.5s, the authority expires
mid-flight, and the retry is denied with APPROVAL_EXPIRED. The recorded facts
were [409, true, 200, 403, 0] -- blocked, survived the restart, approved, then
403 with no signature. Forcing the TTL to 300ms locally reproduces those facts
exactly.

Raise the TTL to 10s. The exercise now tolerates 5s of injected delay in the
restart window, ~16x its real cost. denial-and-expiry-never-sign sleeps out the
TTL, so this adds ~10s per acceptance run; expiry cannot be forced early because
expireLoaded rejects an early sweep with APPROVAL_NOT_DUE.

Verified: verify:spend-control 18/18, evidence:offline and evidence:verify
valid with matching manifest, verify:no-secrets 406 files, prototype 23/23.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9ADgrvWTdekXX5NQFeook
The previous commit widened approvalTtlMs to 10s, which lengthens the
denial-and-expiry-never-sign sleep and pushed the whole acceptance run to ~31s
on a CI runner -- past CHILD_DEADLINE_MS=30s. The model and seller children
start once and must survive the entire run, so the deadline SIGTERMed them
mid-acceptance and the run failed at whatever step was in flight: CI died at
bootstrap-replacement with AGENT_ENROLLMENT_BOUND (session close never
completed, leaving the revoked binding open); locally, emulating CI pace with
an ~80ms per-request delay reproduced both that failure and a 503
payment_unresolved on the replacement request.

Direct confirmation: instrumenting the deadline timer showed "CHILD_DEADLINE
fired: killing model/seller" on every failing run and never on passing runs.

Raise the deadline to 60s: ~2x the observed slow-CI duration, and the same
relative headroom the 30s deadline gave before the TTL widening. Verified 3/3
green at emulated CI pace (31.5s runs, zero deadline fires) plus a harder
120ms-per-request stress (36.4s, green), then the unmodified suite.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9ADgrvWTdekXX5NQFeook
@Aznatkoiny
Aznatkoiny marked this pull request as ready for review August 4, 2026 17:55
@Aznatkoiny
Aznatkoiny merged commit cf7d68a into main Aug 4, 2026
4 checks passed
@Aznatkoiny
Aznatkoiny deleted the feat/employer-skill-ledger branch August 4, 2026 17:56
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.

1 participant