Starting point and release scope
Compiled and exercised
OpenBao v2.7.3 with Go 1.27.4. The stock Go SDK and CLI exercised the native reference and the deployed upstream HTTP handler, ACLs, KV v2 and Transit.
Verified on Cloudflare
Two SQLite Durable Objects restarted with new boot IDs. Each tenant recovered its original KV versions and Transit ciphertext. Both engines returned the expected error when Wasm was disabled.
First live migration
Llavero staging, with its existing ForgeGraph CLI, authorization and deployment reads. Hardware recovery, client parity, clean traces, runtime uptake and a lossless rollback rehearsal precede the move.
The in-memory test remains a compiler regression check. The durable service runs one Wasm instance per tenant with a software Shamir seal and private service bindings. The live harness checks the uploaded version, runs the clients and confirms deletion of the generated Worker. The port uses no external OpenBao service. The source pin is 0439ef5812538733afb277b4445a54706edc1db7. Upstream revision · Workers limits
Which existing components carry forward
- Custody. The TypeScript vault already stores encrypted versions in private SQLite Durable Objects, wraps tenant keys and records audit events. Reuse tenant mappings, legacy readers and recovery inventory. New migrated records enter the upstream barrier through its logical API.
- Agents and rotation. Scoped MCP grants, intake, policy digests, rotation checkpoints, per-destination writes and receipts exist. Tighten the responses that expose a claim or free-form detail, and bind private redemption and uptake to the intended recipient.
- Phone and browser. The mobile app pairs a device and signs owner decisions with a key loaded from Expo SecureStore. Browser Run and Workers AI already have adapters and fixture tests. Native third-party RP credentials, deployed cloud bindings and a verified remote sign-in each need their own implementation evidence.
- ForgeGraph. Existing code resolves stage scope and overlays developer values. The current Llavero destination writes into ForgeGraph. Migrate internal readers and writers behind a private store adapter so delivery lands in the authoritative vault once.
Goals and release boundaries
OpenBao owns the tenant’s token checks, ACLs, barrier, mounts, KV versions and Transit key rings. A dedicated custody Worker routes requests to a private SQLite Durable Object for each tenant. Llavero’s existing web Worker and D1 own consent, account mappings, approvals, rotation state and receipts. Only identifiers and policy metadata cross that control boundary. ForgeGraph retains workspace, stage and deployment authorization. Each migrated value has one authoritative writer.
Existing OpenBao clients may receive values over their authenticated value API. The strict MCP caller sees references, approved actions and receipts. A protected local helper can consume a value for an enrolled executable under an isolated identity. A privileged operator, a compromised authorized recipient or an independently instrumented value client has access beyond the managed trace guarantee.
The first OpenBao profile covers named KV v2 and Transit clients. Additional engines, cloud-vendor KMS protocols and per-operation hardware cryptography need a named consumer and a separate test. BizPulse production custody, Preflight signing material and existing personal exports each retain their own migration decision. System design · Credential-service roadmap
Build order and ownership
Start the durable Worker alongside three independent jobs. Inventory real clients and ForgeGraph callers, exercise both hardware candidates with dummy material, and define the protected exchange and mobile enrollment contracts. The cloud restart proof and hardware recovery are the two long dependencies for a production stage. A provider-specific browser demonstration can ship on its own schedule.
Editable dependency diagram
flowchart TB
build["Local upstream Wasm fixture"] --> durable["External client and durable restart"]
durable --> parity["Named-client parity and cloud limits"]
hardware["Hardware selection and restore"] --> release["One ForgeGraph production stage"]
parity --> rehearsal["ForgeGraph shadow and rollback rehearsal"]
inventory["ForgeGraph caller inventory"] --> rehearsal
rehearsal --> release
traces["Trace tests on each enabled path"] --> release
exchange["Strict exchange and protected helper"] --> complete["Full credential workflow"]
factors["Mobile factors and reviewed cloud playbook"] --> rotation["Rotation and workload uptake"]
rotation --> complete
exchange --> rotation
release --> complete| Release decision | Evidence required to proceed | Accountable roles |
|---|---|---|
| Expose a fixture value endpoint | External CLI and SDK, SQLite transaction tests, recovery after a verified new boot, disabled-Wasm control, synthetic identities and an inspected trace boundary. | Llavero runtime and security |
| Move one production stage | Deployed core proof, named-client conformance, measured resource limits and service objectives, selected hardware and independent restore, privacy tests for every enabled route, exhaustive ForgeGraph rehearsal and installation owner’s stage selection. | ForgeGraph stage owner, Llavero custody operator and recovery officers |
| Release the full agent workflow | Strict send/use/receive for a workload and the pinned helper, iOS and Android factor evidence, supported cloud continuation or documented owner handoff, private browser execution, runtime uptake, overlap and retirement. | Agent, mobile, browser and provider integration owners |
Owners below are engineering roles. Each table row is a reviewable change under LLAV-35. File paths are relative to Llavero unless labeled ForgeGraph. New denotes a proposed file or directory. Commands under “add” become available when that work lands.
1. Serve upstream OpenBao from a durable tenant
Llavero runtime owns the Wasm and HTTP bridge. Custody owns storage, initialization and audit. Start from tools/openbao-worker/. Keep the single-event fixture runnable as a regression test during service development. The service and its bindings run in tools/openbao-worker/service.
| Task | Files | Verification | Status |
|---|---|---|---|
| 1.1 · Reproduce the upstream core. Pin the commit, patch, Go glue, initial memory image and packaged module hashes. | tools/openbao-worker/{build.mjs,pack.mjs,main.go,fixture.go}, openbao-worker.patch | pnpm openbao:test checks the image, runs workerd without egress and compares the modules with Wrangler’s dry-run output. | Local pass |
| 1.2 · Add a service target. Register the Go HTTP handler for the lifetime of one tenant instance. Keep callbacks, memory, cancellation and keys bound to that instance. Start both profiles from the same source pin. | tools/openbao-worker/service/{main.go,http.go,tenant.js,gateway.js} and the conformance disconnect test | An external SDK reaches upstream health and a protected path through Fetch. Concurrent requests to two objects yield independent responses. A cancelled request releases callbacks. A missing Wasm handler fails the request. | Live fixture pass |
| 1.3 · Persist the physical backend. Implement the pinned Go interfaces against the object’s SQLite storage. Store opaque physical entries and fence every commit. One backend per object. | tools/openbao-worker/service/{physical.go,storage.js,wrangler.jsonc} and upstream physical conformance suites | Run upstream backend, hierarchy and transaction exercises against the actual adapter. Race same-version CAS writes. Interrupt a transaction before commit. Exactly one eligible write wins and no partial write survives. | Upstream suites pass |
| 1.4 · Boot sealed and reopen. Fence first initialization, install scoped policies, revoke the bootstrap token and reconcile on wake. A failed unseal leaves the existing tenant sealed. Apply absolute deadlines on access. | New tools/openbao-worker/service/{seal.go,audit.go}, apps/custody-worker/src/lifecycle.ts · retain the existing Llavero vault class | Race two initializers, restart during setup, try an incorrect fixture key, repeat an expiry alarm and revoke a warm handle. Historical records survive. Privileged routes are private, and audit failures deny release. | Fixture recovery verified · audit and expiry pending |
| 1.5 · Prove the complete request on Workers. Deploy the exact service artifact to an isolated fixture account. Route only enrolled tenant endpoints. Use the same clients against native and Wasm. | tools/openbao-worker/conformance/{clients.go,process.go,bindings.mjs,cloud.mjs} | The restart scenario below passes locally and on Cloudflare. Record deployment/version, module digest, two boot IDs, resource measurements, allowed and denied outcomes. Repeat with Wasm invocation disabled. | Live workflow verified · capacity tests pending |
Live Cloudflare fixture · 24 November 2026
Wrangler deployed a 53,596,166-byte artifact to the owner-selected account without a public route. The stock v2.7.3 CLI and Go SDK reached the upstream Go handler over private service bindings. Two tenants initialized independent barriers, exercised KV v2 and Transit, reopened sealed after eviction and recovered their pre-eviction data. Scoped and cross-tenant denials, bootstrap-token revocation and the disabled-Wasm control passed. Cloudflare returned its missing-Worker error on readback after cleanup.
- Worker version
529d6083-b330-40bc-8fea-b15a900cde07- Upstream revision
0439ef5812538733afb277b4445a54706edc1db7- Packaged Wasm SHA-256
b15788fa4322b36f4047a65358dc5cdb4b2e203fde9fdca909c30efe3406c1ac- Build manifest SHA-256
19deadcdbb722adc96750f01d68d057915e6cf41f2e623ded0a35cc9918287b5
| Historical KV reads | Samples | p50 | p95 | p99 |
|---|---|---|---|---|
| Alpha | 25 | 334 ms | 1,537 ms | 2,110 ms |
| Beta | 25 | 615 ms | 1,222 ms | 1,241 ms |
Two concurrent clients completed 3.29 historical reads per second through Wrangler’s remote binding relay. Latencies include the relay and network. The nearest-rank p99 is the slowest of 25 reads per tenant. Unsealing as the first call to another fresh instance took 2,670 ms. Wasm linear memory after that call was 44,040,192 bytes (42 MiB). CPU, total isolate memory, subrequest counts, production-scale payloads and end-to-end trace coverage remain open measurements.
Eviction evidence
The operator verified the same object ID before and after each reset. Alpha’s boot ID changed from 79964af0-b4bc-4a41-8da5-ce30a4adf03f to ab808f1d-305a-4d02-8ef7-7e810f5f3c21. Beta changed from f21f921f-1bcf-4693-b737-14a15a3bb6cd to f11a9355-37e9-43e5-a7cf-9bf2f86308a2. The clients used their previously issued tokens to read historical values and decrypt original ciphertext. Software Shamir shares were generated solely for the fixture.
Independent repeat with the same artifact
Worker version 3d59d70e-b399-4ccb-9313-446437d823f5 passed the same client, eviction, negative-control and deletion checks. Alpha’s boot ID changed from 8d7571a0-b3cd-4df8-bbd4-37c1e35fbf79 to 7b8b280e-a8cd-410c-8a64-c65d487036f1. Beta changed from 82f9b164-18db-4cbd-8a90-5ace23b5ce69 to c188eb19-2079-41ab-80d4-74bfe4153827. The issuing tenant retained its original object ID in both cases.
Over another 25 reads per tenant, alpha’s p50, p95 and p99 were 274, 880 and 1,045 ms. Beta’s were 478, 1,198 and 1,365 ms. The two clients completed 3.65 reads per second. Cold unseal took 853 ms. Wasm linear memory afterward was 44,564,480 bytes (42.5 MiB). Two runs characterize this fixture and relay. Production recovery and latency objectives require a representative workload and hardware-backed unseal.
Earlier attempts stopped on a deployment authorization error or a private-binding probe. The harness now waits for the fixture’s own denial and fails immediately if a probe receives success. Deployment, provisioning and secret writes are never retried by that readiness check. Cleanup was confirmed for the interrupted attempts.
On 25 November 2026, a local rebuild integrating Llavero main at 84d860e2962f reproduced the published service manifest and every packaged file digest. The native reference, local workerd and private Miniflare binding suites passed on that tree.
On the same day, the operator queried Cloudflare GraphQL Analytics for the two deployed script names over the full UTC day of the runs. Both workersInvocationsAdaptive and durableObjectsInvocationsAdaptiveGroups returned empty result sets. CPU quantiles and subrequest totals are therefore unavailable for these deployments. The next capacity run needs observable samples from the gateway and tenant before it can qualify those limits.
The first external-client acceptance test
- Run a separate stock
baoprocess and the pinned Go SDK against the fixture endpoint. An operator-only harness initializes and unseals a fresh tenant, mountsfixture-kvandfixture-transit, and issues scoped test tokens. The harness holds all generated inputs and client output in private memory or private pipes. Record operation names and outcomes. - Write version 1 with create-only CAS, then version 2 conditional on version 1. Read version 1 and latest. Encrypt a random fixture with Transit, retain the ciphertext at the fixture client, rotate the Transit key and verify rewrap. Check anonymous denial, a scoped write denial and isolation from a second tenant with identical mount and path names.
- End the instance while retaining its original storage. In local workerd restart the process over the same durable directory. In the disposable deployment use a supported replacement or eviction and attest a different object boot ID against the same object ID and state. A warm request, a redeploy without proof of a new object boot, or a replay of the fixture setup cannot satisfy the test.
- Use the previously issued client identity where its TTL allows. Read the original KV version and decrypt the original ciphertext. Fail unseal with the wrong key and then recover correctly. Reject stale CAS. With unchanged routing and storage, disable the Wasm entry and confirm both engines fail. Deny egress to external OpenBao servers for the entire proof.
HTTP, storage and isolation contracts
Use an enrolled endpoint-to-tenant mapping derived server-side. Pass method, escaped path, query, permitted headers, bounded bytes and cancellation to upstream net/http. Return status, protocol headers and bytes. Exercise native LIST, list query, mount discovery, repeated parameters and typed upstream errors through the real edge. Check how Workers normalizes paths and methods. Private bootstrap, debug and fixture controls have a separate identity and ingress.
Give each tenant a separate Go instance and memory. The build may share its immutable module. Replace the fixture’s global completion flag and global I/O patch with instance-owned dispatch and bounded, non-logging host I/O. Confirm a Go host callback yields the JS event loop for asynchronous work and completes in the owning request or alarm context. Release pending calls on cancellation or eviction.
Implement Put/Get/Delete/List/ListPage, BeginReadOnlyTx/BeginTx and Commit/Rollback. Match upstream immediate-child, directory, ordering, exclusive cursor and limit behavior. Support stable transaction reads and read-your-writes, including lists and deletions. A possible implementation versions rows by generation, pins a read generation and buffers bounded mutations. Validate the generation and apply changes in one synchronous object-storage transaction. Reject writes through a read-only handle, invalidate completed handles and reclaim old generations only when no reader needs them. Never await a network or hardware call inside a SQL transaction.
// Compile against the pinned upstream interfaces in the proposed Go adapter.
var _ physical.TransactionalBackend = (*objectBackend)(nil)
var _ physical.Transaction = (*objectTx)(nil)
Run physical.ExerciseBackend, ExerciseBackend_ListPrefix and ExerciseTransactionalBackend where supported by the build profile. Add page-boundary, rollback, duplicate initialization and eviction cases in the Worker harness. Pinned transactions · SQLite Durable Objects
Cloud acceptance. Record compatibility date, account limits, raw bundle bytes, upload/startup result, cold first request including unseal, warm p50/p95/p99, CPU, subrequests, throughput and memory pressure under concurrent tenants. Distinguish Wasm linear memory, JS buffers and platform resource-limit outcomes. Where total memory is unobservable on the deployed service, use instrumented workerd measurements and cloud load tests and document the gap. A local dry run qualifies only the local artifact.
2. Qualify the existing OpenBao clients
Llavero compatibility lead and each consuming team. Start the inventory and native reference now. Run the differential suite after 1.5. ForgeGraph uses its own API and has its own contract in section 7.
| Task | Files | Verification | Status |
|---|---|---|---|
| 2.1 · Name each client. Capture exact binary or SDK version, mounts, auth method, renewal model, capabilities, payload limits, key types and operations. Start with the unmodified CLI and upstream Go SDK as reference clients. | New tools/openbao-worker/conformance/profiles/ with metadata-only manifests and golden expectations | Reproduce the named workflow against native OpenBao using generated data. Record normalized status, headers, JSON types and errors with documented exclusions for time and randomness. | CLI and Go SDK verified · consumer inventory open |
| 2.2 · Prove KV and Transit parity. KV discovery, CAS, list, delete, undelete, destroy and metadata. Transit encrypt, decrypt, rotate, rewrap and minimum versions. Add sign/verify or data-key operations for clients that use them. | tools/openbao-worker/conformance/{clients.go,matrix.go,native.go} | Run the same clients, configuration and fixture matrix on both servers. Match failures, auth/renew/revoke, response shape, nested JSON and historical behavior for each advertised operation. Reject ungranted keys and mounts. | Named fixture workflows verified |
| 2.3 · Preserve existing cryptographic history. Inventory versioned KV data, disabled/exportable Transit keys, ciphertext provenance and verification keys for each existing store moving to Llavero. | New tools/openbao-worker/conformance/history.go and migration maps private to the owning installation | Prove old ciphertext decrypts and old signatures verify after cutover and rollback. Where keys cannot transfer, retain their authorized legacy decrypt/verify path under an explicit migration window. Block that client’s cutover until its path is proven. | Per client |
The v2.7.3 CLI and Go SDK list through GET ?list=true. The fixture independently sends a literal LIST. Stock native OpenBao accepted it, the pinned workerd HTTP listener returned 501 and the private Node relay returned 400. Inventory raw-verb clients separately before a cutover.
Use distinct mounts or a collision-free origin mapping for old and new Transit keys. The ciphertext prefix alone cannot select an authority. A standard KV read returns the entire document, so only place fields with the same read policy together. Keep provider factor keys, personal namespaces and bootstrap credentials outside client mounts. KV v2 API · Transit API
3. Select a hardware root and recover an installation
Custody owns the seal adapter. The installation owner holds the off-host checkpoint and the first recovery approval. Lead dev holds the independently controlled second approval. Both operate the installation restore drill. Evaluate a managed hardware authority and owner-operated hardware behind the same private boundary.
| Task | Files | Verification | Status |
|---|---|---|---|
| 3.1 · Define root custody. Implement upstream auto-seal wrapping with authenticated install, tenant, purpose, format and immutable root version. Authenticate the Worker to the private authority. Limit bootstrap, wrap, unwrap, rewrap and recovery roles independently. | apps/web/src/server/llavero/{crypto,vault-core}.ts for legacy records · tools/openbao-worker/service/{root-authority.js,seal.go} for the Worker binding and upstream seal adapter | A fixture authority rejects wrong context, tenant, key version and workload. Sealing invalidates warm handles. Every protected use requires current authorization, durable audit and authority availability. Losing any one denies use. | Deployed fixture verified |
| 3.2 · Compare the two candidates. Establish hardware provenance, non-exportability, workload identity bootstrap, wrapping algorithms, quotas, regional placement, audit export, operator access and ongoing cost. | New tools/openbao-worker/hardware/ for a common driver and redacted results · packages/cli/src/commands/{install,root-key}.ts | Use the same workload mix on each candidate. Report p50/p95/p99, throughput, error rate, cold-unseal storms, loss of a device/region, failover time, unit cost and recovery dependencies. Select only after the operator sets objectives. | Both hardware fixtures verified · production selection open |
| 3.3 · Rehearse backup, rotation and recovery. Restore ciphertext, D1 metadata, audit checkpoints and independent hardware recovery authority. Migrate existing envelope versions through their original reader. Keep track of tombstones and revocations. | packages/cli/src/commands/{backup,root-key}.ts, packages/api/src/llavero/rewrap-pages.test.ts, apps/web/src/server/llavero/__tests__/rewrap.test.ts · new quarantine/restore harness in tools/openbao-worker/hardware/ | From an isolated restore, open historical live data with authorized hardware, deny destroyed versions and revoked identities, reconcile pending effects and verify a signed external checkpoint. Simulate loss of the primary device and credentials. Exercise an old-root-to-new-root rewrap and return to service within measured RTO/RPO. | Two-Mac backup and checkpoint fixture passed · officer ceremony open |
Hardware recovery fixture · 27 November 2026
Upstream OpenBao v2.7.3 ran in local workerd with its auto-seal and private root-authority binding. The software control, two physical Macs and a managed Google Cloud HSM key passed the named KV and Transit history checks. The bundle manifest was c9ffc01ecbb82d49847e1e10b0d8db961399cbe3c850368bd7635bd37cbc0632.
The first Mac kept two Secure Enclave P-256 keys. The gateway refused warm access during an outage, after workload revocation and when SQLite could no longer record admissions. Denying recovery-envelope rewrap left the authorized old version usable. With a rewrap grant, upstream rewrote both persisted envelopes. A cold restore opened KV version 1, decrypted the original Transit ciphertext and accepted the original recovery share before and after the gateway retired the old version. The fixture revoked every root token it generated.
The second Mac stored a private, device-bound key handle and a quiesced SQLite backup prepared under its public-key fingerprint. The test discarded the primary handles and gateway, removed the local prepared copy and opened a fresh connection to the recovery device. The new authority refused the primary-only store. A fresh workerd instance reopened the backup retrieved from the second Mac and verified the historical data and officer share. The test controller retained the officer share and scoped client credentials during the drill. Production still needs an independently operated ceremony and an installation-wide restore that includes D1 and external audit checkpoints.
Across 25 operations on the primary Mac, wrap p50/p95/p99 were 7.25/11.42/12.48 ms and unwrap p50/p95/p99 were 11.55/19.59/21.43 ms. Measurements include the local Swift process. Secure Enclave protects the static P-256 key agreement, and the gateway performs HKDF and AES-GCM. Unattended access requires a first unlock after boot. Worker-to-hardware network latency, failover objectives and concurrent load still need measurement.
A disposable Google Cloud project in us-central1 supplied two versions of one symmetric key. Cloud KMS reported HSM protection, the expected algorithm and the exact resource for each. The managed run passed the same OpenBao history, warm denial and officer-share checks after rotation. Across 25 samples the managed driver took 769/1,425/1,552 ms to wrap and 715/1,437/1,492 ms to unwrap at p50/p95/p99. Each operation included a new gcloud subprocess and a remote RPC. The local numbers above include a Swift subprocess. These measurements characterize the fixture drivers.
On the first managed run, initialization returned 500. A separate instrumented run reached rotation and then denied a historical read with 503. A software run on the same busy host also denied a read. The full managed retry passed with the original 10-second authority deadline. These results leave capacity and availability under load open. A revocation drill also observed a successful decrypt immediately after the provider reported DESTROY_SCHEDULED. A repeat observed three consecutive provider denials over 14 seconds while version 2 continued to decrypt. Enforce revocation at the gateway and verify it in the data path before declaring it effective.
Both managed key versions were verified in DESTROY_SCHEDULED with destruction scheduled for 28 November 2026 UTC. Google confirmed the dedicated trial project entered DELETE_REQUESTED. Both candidates remain eligible for production evaluation.
Private hardware from a deployed Worker · 27 November 2026
Cloudflare Worker version adc7ca70-d235-44fc-8377-6eb9001661d1 ran the upstream auto-seal fixture from bundle 6be15e70961adcd10e6d5908cf36ca9a3c4d596b8597d0abf5c3efba367ab8df (53,668,979 bytes). Workers VPC connected over Cloudflare Tunnel to a loopback gateway on the Secure Enclave host. The Worker authenticated with an installation-scoped secret. The value and operator entrypoints each required their own credential. The second tenant presented its valid value credential and the gateway refused its unenrolled object. Workers VPC roles
The drill confirmed warm denial after revocation, audit failure and loss of the loopback listener. The original Durable Object booted again over the same SQLite state. It recovered KV version 1, the original Transit ciphertext and the officer share after rewrapping both envelopes and retiring the old key at the gateway. The drill took about 53 seconds end to end. The stock CLI and Go SDK also passed the local service matrix for the same bundle. Cloudflare confirmed deletion of the temporary Workers, VPC service, tunnel and deployment credential. The first upload returned error 10196 until the deployment identity received Connectivity Directory Bind. Cloudflare error reference
Renewable workload identity · 28 November 2026 (Detroit)
Worker version 6038ceb3-83e7-4e83-9013-4b7129486f2f used the private VPC route to the Secure Enclave gateway. Its 53,671,422-byte bundle had manifest SHA-256 06098e74a2d3789180ece4970e2efdd121a9d03531cb640817b6a052a3244ee8. The gateway recorded one enrollment followed by a renewal authenticated with the live lease. The drill shortened the initial lease to 15 seconds to trigger rotation. Its successor had the standard ten-minute lifetime.
After root rotation and eviction, the Worker recovered KV version 1, the original Transit ciphertext and the original recovery share. After workload revocation, the gateway recorded both the rejected lease on a warm read and the rejected enrollment after another eviction. The exercise took 42.1 seconds after the private bindings were ready. Cloudflare confirmed the disposable Worker, VPC service and deployment credential were absent and the tunnel was deleted. LLAV-42
The deployed lease drill kept the gateway running during Worker eviction. The following local drill reopened the gateway itself.
Authority restart and quarantine restore · 28 November 2026
A fresh Node process opened the retained SQLite ledger and a new Swift driver opened the single surviving, device-bound Secure Enclave handle. The process wrapped and unwrapped generated material and refused to reactivate the retired version. Local workerd recovered the original KV version, Transit ciphertext and recovery share on the pinned 06098e74a2d3 bundle. Revocation survived another reopen and a fresh tenant boot.
The two-Mac drill retained the fixture checkpoint on the recovery host. A snapshot predating revocation failed verification. In a joined two-Mac trial, the independent recipient recovered the original first-boot ledger, both primary root retirements, lease history, prior Transit ciphertext, KV history and the original officer share. Quarantine verified the schema, ordered audit chain and policy state against the retained head and distinct owner and Lead dev fixture signatures. An interrupted activation can resume on its winning target. A competing snapshot and a longer, diverged journal were both rejected. Recovery drill. Tests cover competing copies, wrong signers, a changed grant state and an interrupted hardware call whose bytes could never be released. Off-host retention and signatures in this drill used generated data under one test operator. Installation acceptance still requires independently held keys, retention controls, a fenced primary, the D1 restore and the two officers’ actual ceremony.
Use software seals only for synthetic fixtures. For production, check that neither current custody nor a recoverable backup has a usable software wrap of the active key hierarchy. Provision a fresh hierarchy if an old wrap would defeat that property. Preserve upstream barrier and seal formats. The hardware root protects unseal material. A warm authorized Worker holds operational key material, so the trust inventory must include its code, deployment authority and memory.
Keep bootstrap tokens and recovery shares inside an operator-controlled ceremony, revoke bootstrap access after scoped policies exist, and test hardware-only recovery in a separate installation. Owner-operated hardware needs an authenticated, available gateway and device-loss recovery. Managed hardware needs verified hardware backing, account/region-loss recovery and an independent path for its operators. OpenBao seal lifecycle
4. Let agents send and receive through protected recipients
Agent API and security own the contract. Custody owns redemption. Endpoint engineering owns the local helper. Reuse the existing MCP grants and immutable approvals. Today’s lease can return a claim and the general CLI can inject into an arbitrary child environment. Introduce a distinct versioned strict profile for enrolled principals.
| Task | Files | Verification | Status |
|---|---|---|---|
| 4.1 · Intake and privileged use. An agent opens a request by reference. An owner or enrolled producer sends bytes on a private authenticated channel. An approved server-side operation binds account, version, field, action and destination. | packages/domain/src/credentials/{models,api}.ts, packages/api/src/llavero/{mcp-tools,mcp-guard,owner-input,operations}.ts | Test MCP discovery, response, errors, progress and owner-input cards. The strict principal cannot call legacy claim, file/export or direct-value tools. Replaying every transcript-visible identifier from an unrelated principal grants nothing. | Opt-in intake and delivery proposal tested on Workerd |
| 4.2 · Deliver to an enrolled workload. Send a recipient-bound claim or encrypted envelope over its private channel. Verify possession of its registered key and reserve redemption once at the authoritative object. Return safe status and a receipt. | packages/api/src/llavero/{standin,custody,delivery-policy}.ts, apps/web/src/server/llavero/vault-do.ts, packages/destinations/src/port.ts · new strict exchange tests alongside mcp-tools.test.ts | Wrong tenant, field, recipient, expired nonce, second consumer and revoked grant are denied. Race revocation with release. A lost response returns the recorded receipt or a reconciliation state. No second release is implicit. | Workerd recipient fixture verified · Implementation and checks |
| 4.3 · Deliver locally to one pinned executable. Enroll a helper under an isolated OS identity or VM. Pin its image/executable, libraries, arguments, version, permitted destinations and output schema. Enroll from an owner-controlled session. | New apps/credential-helper/ including its launcher and OS isolation harness. Reuse recipient enrollment and signed-job verification from apps/executor/src/{keys,receipt}.ts where applicable | A dummy executable emits the marker on both streams and attempts writes and child execution. The agent sees only a fixed receipt and cannot read process input, output, files, environment or descendants. Reject a changed binary, argument schema or recipient. Test timeout and crash cleanup. | macOS fixture tested · endpoint enrollment pending · Helper and isolation tests |
| 4.4 · Validate every trace surface. Project fixed fields before serialization, including upstream audit and panic handling. Disable sensitive capture at each actual sink. Classify export and authenticated value APIs under their own contracts. | packages/{telemetry,logging,monitoring}/, apps/executor/src/log.ts, packages/api/src/llavero/mcp-tools.ts · new test/credential-traces/ | Inject unique fixture markers and claims, run success, denial, cancellation, trap and provider-echo cases, and inspect the actual sinks listed in section 8. Missing evidence leaves that route in fixture status. | Local OpenBao diagnostics verified · other sinks open |
What crosses the MCP boundary
Agent requests carry a reference, reviewed operation, desired field/version and enrolled recipient ID. The server derives the actor, tenant, scope and current policy. An exact approval binds those fields, expiry, nonce, policy epoch and operation digest. Owner-only links require independent authentication. Delivery tokens, signed redemption URLs, factors, values, arbitrary provider text and plaintext fingerprints stay outside MCP.
{"state":"delivered","requestId":"req_demo","receiptId":"receipt_demo"}
The authenticated producer receives a custody receipt. The authenticated consumer supplies a separate delivery receipt. Only the workload can confirm uptake. OAuth delegation, owner approval and each of these events have distinct issuers, scopes and timestamps.
Local helper acceptance boundary
The protected process receives private input over a descriptor or OS credential facility. It starts in a read-only, known working directory with a clean environment, no agent-controlled paths or terminal, restricted egress, a closed descriptor set and disabled crash dumps. The supervisor owns all child output and emits an allowlisted result. Pin any scripts and dependencies together with their runtime. Refuse arbitrary shell commands, environment overrides and caller-selected output paths. Enforce revocation and a job deadline through the entire process tree.
The Apple Silicon macOS fixture passed a generated field from the signed recipient channel to a pinned executable. Its tests check output suppression, changed pins, timeout, process loss and repeat delivery. The endpoint owner still needs to enroll a separately controlled service account or VM and verify the actual agent’s access on that host. macOS fixture and owner runbook
Verify isolation against the actual agent account, including filesystem access, debugger privileges and access to logs, reports and IPC. If that account can administer the helper, mark the host ineligible for strict local delivery and use an enrolled isolated workload. Ordinary CLI export remains available only to its authorized value clients.
5. Connect the mobile authenticator and Cloudflare browser
Mobile owns iOS and Android. Identity owns per-account enrollment. Browser runtime owns the Cloudflare session, observation contract and provider playbook. Build the phone and browser fixtures independently, then prove a single supported provider workflow end to end.
| Task | Files | Verification | Status |
|---|---|---|---|
| 5.1 · Enroll a factor per provider account. Record custody class, RP/account, credential ID or seed slot, actor, permitted playbook, lifecycle and revocation epoch. Default to phone-held. Fresh owner consent is required for each vault-held automation account. Account enrollment and stale-run checks | packages/api/src/llavero/{provider-identity,stepup-store,passkeys}.ts, packages/stepup/src/{identity,factor,held-seed}.ts, packages/db/src/schema.ts and expand/contract migrations | Exercise offline phone, explicit automation, removal and re-enrollment. An ordinary account cannot silently switch to vault custody. Owner WebAuthn sign-in, phone approval key and provider passkey prove separate things. | Account enrollment and revocation verified |
| 5.2 · Add native phone-held factors. Implement iOS AuthenticationServices credential-provider extension and Android Credential Manager provider service. Generate/store device-bound credentials natively where supported. Enroll TOTP seeds privately, generate on-device, and encrypt just the current code to the enrolled executor. | apps/mobile/{app.config.ts,src/lib/}, packages/stepup/src/{contract,executor-wire,totp}.ts · new apps/mobile/modules/provider-factors/ and native build config/plugin for each platform | On both physical platforms, test a dummy RP registration/assertion, user verification, wrong RP/challenge, lost device, biometric denial, code expiry/skew and replay. Inspect push, app snapshot, clipboard, backup and analytics. Seed and provider private key stay behind the native boundary. | After 5.1 |
| 5.3 · Bind Workers AI and Browser Run. Deploy the existing adapters to a disposable environment. Restrict observation and action IDs to the reviewed playbook. Enter sensitive steps in private execution and return only an operation outcome. | packages/browser-runtime/src/{cloudflare,workers-ai,runtime,playbook,in-page}.ts, apps/web/{wrangler.jsonc,src/server/runtime.ts}, providers/<provider>/{playbook.json,SKILL.md} | Check actual Browser Run and AI bindings per environment, recording off, restricted session/debug access, AI Gateway logging and caching off. Verify prompts, responses and all observable artifacts with dummy inputs. Unknown pages, unexpected destinations and uncertain state pause the run. | Ready for fixtures |
| 5.4 · Complete one provider sign-in. Prefer a documented OAuth/device authorization or provider-bound continuation. For an attended RP ceremony on the phone, only resume the cloud job when the provider confirms the same account and transaction. | packages/stepup/src/{service,approval}.ts, apps/mobile/src/app/request/[id].tsx, apps/executor/src/{session,runner}.ts and the selected provider playbook | Demonstrate a bound continuation on real devices or complete the action in an owner-only provider session and record that outcome. For an unsupported remote flow return owner-required. Test cancellation, phone offline and an unrelated browser session. | After 5.1–5.3 |
A phone-held passkey answers a genuine, origin-bound RP challenge through an OS-supported ceremony. A wake-only push carries an opaque request ID. It cannot link an ordinary phone passkey to an unrelated cloud browser. For TOTP, bind the approval and encrypted code to the recipient key, request, run and remaining validity. TOTP codes themselves are transferable during their validity window. Device loss requires recovery at the provider or a second enrolled authenticator. A vault-held automation enrollment still respects the provider’s consent and user-verification requirements.
While a playbook is active, the model receives only enumerated page states and permitted next actions. Route credential entry, authenticated cookies, assertions, response bodies and reveal steps directly through the private executor. Restrict provider origins and redirects at the network boundary, verify the actual account before issue, dispose the session on all terminal paths and review the provider’s terms before enrollment. Prefer an official API or OAuth grant when supported. Browser recording · AI Gateway logging · Workers AI data use
Build and run mobile CI through Preflight. Use a leased Simlock device for simulator UI tests, then separately collect physical-device evidence for native key protection and cross-device behavior. Apple credential provider · Android credential provider · TOTP
6. Rotate once and prove the workload switched
Credential orchestration owns the state machine. Provider owners define issuance and retirement. Destination owners produce authenticated uptake evidence. Exercise the existing fixture provider while hardware and mobile development proceed.
| Task | Files | Verification | Status |
|---|---|---|---|
| 6.1 · Fence each external effect. Persist intent before issue, vault commit, each delivery and retirement. Bind approval to exact version, field, account, targets, overlap and policy revision. Revalidate after every wait. | packages/rotation/src/{machine,runner,policy}.ts, packages/api/src/llavero/{issuance,rotation}.ts, packages/destinations/src/deliver-each.ts | Lose a reply immediately after each effect, duplicate a scheduled event, revoke while paused and fail one of two destinations. A retry reconciles the prior effect. Uncertain issuance never automatically creates a second credential. | Generated-data effect and retry tests passed |
| 6.2 · Establish uptake and retirement. Bind a receipt to deployment/revision, recipient, exact version set, probe and policy. Wait through overlap before the authorized provider retire operation. Keep the predecessor usable while a dependency is unresolved. | packages/api/src/llavero/{rotation,operations}.ts, packages/rotation/src/runner.ts and the ForgeGraph deployment attestation from section 7 | A store write and generic green health check cannot advance retirement. Inspect a new-revision success, mixed-version fleet, rollback, failed probe and a provider with no overlap. Record delivery, uptake and retirement separately. | Serving-version checks merged · staging uptake open |
For a provider that invalidates the predecessor immediately, require an explicitly approved downtime or recovery procedure before issuance. Keep provider credential retirement, passkey/TOTP re-enrollment, Transit key rotation, barrier rotation and hardware-root rewrap as distinct operations with distinct permissions and recovery tests.
7. Replace the ForgeGraph stage secrets store
ForgeGraph owns public routes, caller authorization, stage routing, sink sync and deployment uptake. Llavero owns the private custody endpoint, its independent scope checks and receipts. The migration unit is one explicitly selected stage with its shared and developer scopes. Begin the consumer inventory and legacy contract fixtures before a Worker endpoint is available.
| Task | Files | Verification | Status |
|---|---|---|---|
| 7.1 · Characterize existing callers. Pin the shipping Go CLI, API and UI. Capture stable IDs, descriptions, ordering, authorization, errors, sync aliases, development overlays and deployment bundle behavior. | ForgeGraph agent/cmd/fg/commands/secret*.go, packages/api/src/lib/secret-store.ts, packages/db/src/schema/secret.ts and the callers below | Run the real CLI with private fixture stdin and captured output. Test set, list, get, check, pull, rotate, sync and remove. Include shared and two developers, another workspace, a node with no assignment and the authorized deployment case. | Stock CLI and runner contract verified · remaining callers open |
| 7.2 · Introduce one store interface. Route reads and mutations through a stage-selected implementation. Keep the existing scope and overlay helpers. Make the legacy implementation the initial writer. Route protected Llavero bindings internally to prevent destination recursion. | ForgeGraph packages/api/src/lib/secret-store.ts, new sibling stage-secret-store.ts, apps/web/src/lib/secret-sinks.ts · Llavero packages/destinations/src/adapters/forgegraph.ts | Run the 7.1 caller contracts through the legacy adapter. Restrict value-column access to that adapter and its private migration job, including ORM aliases and raw SQL. A store write causes one mutation and no implicit deploy or delivery loop. | Shared workload scopes verified · remaining callers open |
| 7.3 · Establish private identity and shadow. Authenticate ForgeGraph as a workload, bind its stage mapping on both services, and scope upstream tokens to a dedicated KV v2 mount. Backfill inside a private job and reconcile changes at a known high-water mark. | ForgeGraph new packages/api/src/lib/llavero-stage-store.ts and resumable migration job · Llavero packages/api/src/llavero/{custody,registry}.ts and custody Worker ingress | Run the same 7.1 caller contracts against the real Worker adapter. Compare effective values and scope metadata inside the job. Publish counts and mismatch categories. Exercise concurrent changes, deletes, interrupted copy and lost replies. Production shadow copies require the hardware and recovery gates. | Generated Postgres-to-Worker baseline verified |
| 7.4 · Switch the only writer. Drain/fence mutations, reconcile to the fence, then CAS the per-stage routing epoch. Reject pre-fence clients and old writers. Disable legacy value reads for the migrated stage. Rebuild one fixture deployment from its pinned version set. | ForgeGraph stage routing, apps/web/src/app/api/{fg/deploy,agent/secrets}/route.ts, apps/web/src/lib/{auto-deploy,cf-reconcile}.ts and deployment receipt storage | Exactly one writer succeeds across the flip. An incomplete required bundle prevents a new deploy. The active revision stays available. The assigned workload supplies independent uptake evidence. Other stages and unrelated nodes retain their existing permissions. | Writer fence verified with generated data · live uptake pending |
| 7.5 · Roll back after new writes. Fence the new writer, transfer acknowledged post-flip puts, overrides, renames/deletes and sink results through the private bridge. Reconcile the old store, reverse the epoch and exercise redeploy. | ForgeGraph migration job and apps/web/src/lib/{stage-teardown,secret-sinks}.ts · Llavero immutable version map, tombstones and operation receipts | Prove zero lost acknowledged mutations, no resurrected or cross-developer values and zero unexpected sink writes. Include a partial sync and an unavailable backend. Stop with the last known writer fenced if reconciliation cannot complete. | Local rollback and partial sink replay verified · deployed rollback pending |
ForgeGraph callers that determine whether the migration is complete
ForgeGraph’s source-built CLI passed set, list, get, check, pull, rotate, sync and removal against the actual REST handlers with a disposable PostgreSQL-compatible database. Tests distinguished two developers, an unrelated workspace and a partial sink failure. The assigned runner could claim a queued job only after its complete shared bundle was readable. The private baseline then copied generated shared and developer entries into the pinned OpenBao Worker. It compared a second copy, denied a sibling stage, reconciled a lost acknowledgement at its exact historical KV version and replayed a pinned update and tombstone into the isolated source. The real CLI still needs to run against the enrolled adapter. The stage owner still needs a pinned deployment and a hardware-backed rollback target. CLI and runner contract · OpenBao shadow rehearsal
ForgeGraph’s registry fallback now selects the latest canonical shared row in the repository’s workspace. Canary setup, managed-resource lookups and CI apply the shared scope and app/stage mapping. A generated-data regression verified that a newer private or unrelated entry with the same name could not supply the shared credential. Shared caller changes
The migration rehearsal installed a row trigger in a disposable PostgreSQL 16.16 cluster. Two connections competed for one stage epoch. The previous writer lost direct value access, a sibling stage stayed writable, and the enrolled bundle reader used committed KV versions. After a generated shared update, a developer deletion and an interrupted rename, a fresh bridge reconciled the exact KV mutations. It kept the legacy writer fenced during a backend outage and while a declared sink outcome was unknown. Reverse replay retained the entry ID, description, acknowledged value and both recorded sink outcomes. The enrolled HTTP bundle reader returned the complete shared set, excluded a developer override and reported unavailability when the private binding was removed. The rehearsal used generated values in an isolated database and Worker. Native PostgreSQL and HTTP rehearsal
The follow-up rehearsal covered entries changed or removed between the preliminary copy and the fence, two legacy rows that exchanged names, and delayed vault writes. The assigned node exercised its HTTP route with a stage-bound PostgreSQL login and a read-only shared KV token. Losing its private routing configuration during deletion made the stage unavailable. A recorded destination failure survived rollback. A later delivery still needs authorization and a new receipt. Shadow reconciliation and scoped reader
The refreshed inventory at ForgeGraph 2a78c0f8a54d found 29 application files accessing the stage-secret table, including the traffic aliases. Regenerate it at the selected cutover revision, including imported aliases, raw queries and new callers. The current secret-store.ts supplies scope resolution and developer overlays. It does not yet own persistence.
| Caller family | ForgeGraph source entry points | Required fixture |
|---|---|---|
| CLI, UI and authorized value export | apps/web/src/app/api/fg/secrets/, packages/api/src/routers/secret.ts, agent/cmd/fg/commands/ | Development owner override takes precedence over shared. Another developer’s override stays private. Preserve IDs, metadata, optional aliases and per-sink receipts. |
| Deploy, node reads, verification and traffic | apps/web/src/app/api/{fg/deploy,agent/secrets,agent/verification/claim}/route.ts, apps/web/src/lib/auto-deploy.ts, packages/api/src/lib/{traffic-canary-secrets,traffic-lifecycle}.ts | Check stage/node or active deployment assignment, shared-only deploy selection, canary/verification claims, version-pinned uptake and incomplete bundle handling. |
| CI and provisioning | packages/api/src/ci-control/shadow/secrets.ts, packages/api/src/lib/registry/{provision-ci-token,resolve-ci-registry}.ts, apps/web/src/app/api/fg/forgejo-token/rotate/route.ts | Provision, resolve, rotate and retry under the scoped workload identity. Check Forgejo sync separately from primary custody. |
| Managed resources | apps/web/src/app/api/fg/{databases,redis,r2}/, apps/web/src/lib/r2-lifecycle-store.ts, packages/api/src/routers/{database,gcp,resources,services}.ts | Cover database assignment/heal/rotate and Redis/R2 creation or teardown. Preserve generated values and mutation ordering through retry. |
| Reconciliation and deletion | apps/web/src/lib/{cf-reconcile,stage-teardown}.ts, packages/api/src/lib/delete-app.ts, packages/api/src/routers/{app,traffic}.ts | Reconcile a Worker binding, remove a stage/app, propagate tombstones and refuse stale jobs. After restore, removed values and grants stay inaccessible. |
Data mapping, concurrency and rollback
Map immutable workspace/app/stage ID, scope, scope key and encoded secret name to one document on a private, adapter-owned mount. Bind the stable ForgeGraph row ID, source revision or mutation sequence, target KV version and receipt. Preserve descriptions, ordering and alias behavior in ForgeGraph metadata. A historical version the source never retained must remain explicitly unavailable.
Maintain an ordered, durable mutation journal or use a bounded write freeze during backfill. Persist intent before each remote effect and guard source updates with the active epoch. If a KV write succeeds but its reply is lost, reconcile its private mutation marker and CAS version before allowing the next mutation for the entry. Acknowledgment requires durable authoritative state. Enqueue sink retries separately. Shadow comparison uses an ephemeral keyed digest or in-process equality and exports counts only.
Pre-flip abort leaves the legacy authority serving. Post-flip rollback requires the reverse replay and a verified effective set before changing authority. For a production rollback, the previous stack must still meet the hardware-root policy for any material it would regain. Rehearse a hardware-backed legacy adapter/restore target or keep the hardware-backed service authoritative and roll back the ForgeGraph application release independently. If no custody-compliant reverse path exists, the production flip stays closed. Expire old material and covered backups only after the agreed window and a verified restore.
8. Verify, release and operate
The installation owner selected Llavero staging as the first live rehearsal target. A production stage requires a later owner decision. The platform operator owns readiness and on-call response. Security owns evidence for the specific enabled surfaces. Each evidence record carries the source and Worker version, fixture namespace, test time, covered paths, observed outcomes and reviewer role.
| Task | Files | Verification | Status |
|---|---|---|---|
| 8.1 · Enforce the build and release contract. Reproduce by SHA, retain upstream notices, review the platform patch and track upstream fixes. Keep fixture, service and negative-control artifacts distinguishable. Exercise a storage-compatible upgrade and restore. | tools/openbao-worker/{build.mjs,openbao-worker.patch,README.md}, .github/workflows/ci.yml, dedicated custody Worker deployment config | Match deployed manifest, module digests, engine profile and Wrangler version. Pass the named clients before and after an upgrade. Verify a rollback against already-written data. A quota or compatibility failure leaves the affected stage on its current authority. | After 1.5, 2.2 |
| 8.2 · Validate evidence and limits. Capture metadata-only audit intents durably before sensitive effects, then outcomes. Export signed chain heads to independent retention-controlled storage. Set numerical latency, availability, recovery and cost objectives with operators. | apps/web/src/server/llavero/audit.ts, packages/api/src/llavero/chain.ts, new test/credential-traces/ and operational runbooks under docs/llavero/ | Reconcile audit heads, detect stale restoration and verify UIs, tracing vendors and runtime capture. Run the actual payload/concurrency mix and a proposed 2× observed-peak load. Exercise hardware outage, tenant contention, capacity exhaustion and restoration. | Staging objectives set · qualification open |
| 8.3 · Release one stage, then expand. Record scope, owners, route epoch, active version, on-call, rollback window, backup retention and acceptance results. Observe one deploy and an approved rotation on the stage before retiring old material. | docs/llavero/{architecture,security,extraction}.md, Llavero and ForgeGraph release records, scoped deployment and uptake receipts | Cutover rehearsal, compliant rollback, hardware restore and route-specific trace matrix all pass. Alert on failed seal/unwrap, missing audit, incomplete bundles, stale rotations and uptake gaps. Advance one stage at a time after owners verify results. | Llavero staging selected · cutover pending |
First live target and recovery roles · 28 November 2026
The owner selected the Llavero staging app and its llavero-web-staging Worker. ForgeGraph metadata identified app 956dc9b8-c067-43b1-aa3d-1a65574ab005, stage 4172947a-b95a-47cc-b327-175c77fb5f09 and target f155e995-a308-48dd-8dbe-31a507eb8f84. The stage held 12 shared entries. The existing ForgeGraph writer was serving the stage when it was selected. Its deployment of b16b8a0afc4f is a web release receipt.
The installation owner is the first recovery officer and off-host audit checkpoint custodian. Lead dev is the second recovery officer. The offline ceremony prepares a role-bound payload and verifies two detached approvals against the independently pinned public recipients and the current retained checkpoint. Both officers still need to enroll their independent public keys, review the retained checkpoint and complete the timed installation drill. Officer runbook
Llavero staging service objectives
These operating targets apply to the first live cutover of llavero-web-staging. Measure from the authorized ForgeGraph caller across the private binding, including admission, audit, hardware access and OpenBao. Use generated markers for every probe. Retain timestamps, counts, versions and outcomes only.
| Objective | Staging target | How to verify it |
|---|---|---|
| Availability | 99.5% over a rolling 30 days, an allowance of 216 unavailable minutes. | Each minute an enrolled probe reads and compares a pinned value and commits a generated KV write with readback. A missing probe, wrong result, timeout or unavailable audit counts as a bad minute. Include maintenance. Expected policy denials have their own control probe. |
| Warm latency | p95 ≤2 s and p99 ≤4 s for each enabled operation class. | Time KV reads, acknowledged writes, Transit operations and complete shared bundle reads independently from the caller. Exercise the selected stage’s payload sizes and twice its observed peak concurrency. Count timeouts as failures. |
| Cold latency | p95 ≤5 s and p99 ≤10 s for the first protected request after eviction. | Verify a fresh boot ID and include hardware admission, unseal and the requested operation. Report sample counts with nearest-rank percentiles. |
| Recovery time and data loss | RTO ≤60 min. RPO zero for acknowledged changes. | Start at the first failed authorized probe or injected outage, whichever occurs first. Stop when a fresh workload can read a historical version, decrypt, commit a new version, verify the off-host audit head and demonstrate that previous revocations and tombstones still apply. Include officer response time. Acknowledged secret writes, deletes, grants, revocations and writer-epoch changes must all survive. |
| Rollback | Keep a usable rollback path for 7 days after the writer switches. Restore service within 15 min of the rollback decision. | Fence the current writer, reconcile every acknowledged post-switch mutation and partial sink outcome, then verify a pinned deployment. Keep the prior writer fenced and retain compatible readers. Recovery to an older application release may continue using the hardware-backed vault. |
| Backup and checkpoint retention | One encrypted restore point daily, retained for 30 days. | Keep the matching signed checkpoints, wrapping-key access and replay journal in an independent failure domain for the full restore window. Before acknowledging a mutation, retain enough encrypted state and ordered journal information off-host to replay it between snapshots. A signed hash alone cannot reconstruct a missing change. Restore in quarantine and exercise revocation and deletion before serving traffic. |
The two deployed software-seal trials observed per-tenant warm-read p95 values of 0.880–1.537 s and cold unseal of 0.853–2.670 s. Each warm series had 25 reads. Use the same stage traffic mix for both hardware candidates, include failure and restore trials, and attach their measured results to the release record. The rolling availability measure begins with monitored service. The pre-switch load and restore trials supply the initial qualification evidence. Worker measurements · Hardware trials
Two local software-authority trials each completed 400 warm KV/Transit operations and 25 cold reads with zero errors. On the repeat, the highest warm p99 was 2.179 s for a write with readback. The cold p95/p99 was 2.170/2.482 s. Both series used generated sizes and concurrency. The complete shared bundle was unmeasured in these timing runs. The qualification report marked overall latency incomplete. Caller measurements
Evidence needed for the live staging switch
On 29 November, local workerd ran the generated KV and Transit profile twice with a physical Secure Enclave. Each run completed 400 warm operations and 25 cold reads with zero failures. The highest warm p99 was below 159 ms and cold p95/p99 on the repeat was 0.891/2.413 s. These measurements cover local KV and Transit with two callers. The hardware decision still needs the complete shared bundle over the deployed caller path at measured staging load, the managed candidate, and an independently timed restore. Caller measurements and reproduction
At 06:25 UTC on 29 November the shared bundle contained 17 values, totalling 1,003 bytes. The local assigned-node HTTP rehearsal generated data at those sizes. Across 100 requests with two callers, sequential reads took 3.199 s at p95 and 7.908 s at p99. Two runs with four pinned reads per group measured 2.258/4.474 s and 0.996/1.340 s. A third measured 1.207/1.860 s. All four restored the 17-field bundle after a new write.
With asynchronous hardware calls and elapsed-time deadlines, 98 of 100 requests verified at 0.724 bundles/s. The successful responses took 7.912 s at p95 and 12.609 s at p99. Rollback took 2.077 s. A fresh run with cancellation propagated to the hardware process and all outstanding work drained verified 100 of 100 at 4.772 bundles/s, with p95/p99 of 0.613/0.729 s and rollback in 0.450 s. Both runs used a shared Mac and an exploratory concurrency of two. The deployed load, second candidate and independent restore remain open. Full measurements and reproduction
| Decision | Evidence still needed |
|---|---|
| Choose the hardware | Shared payload sizes have been measured. Collect stage-specific operation frequencies and whole-request concurrency from the deploy, assigned-node and verification callers. Service-wide route counts and deployment overlap cannot establish this peak. Exercise both enrolled candidates over the private deployed route at the measured load and twice its peak. Record latency, errors, failure behavior and cost. Hardware qualification runbook |
| Accept recovery and retention | Time the full installation restore with the owner and Lead dev, including D1, the encrypted vault, replay of every acknowledged change and the independently retained checkpoint. Verify the retained daily backups and replay journal cover 30 days. Exercise the hardware-backed rollback within 15 minutes and keep it usable for seven days. Recovery and retention targets |
| Switch the writer | Verify each enabled caller on the stage-selected adapter, including the shipping CLI. Verify the trace sinks for the enabled routes and the pinned deployment’s receipt from its running workload. Record the routing epoch, hardware decision, restore and rollback evidence before activating the stage. Then monitor the one-minute probes and observe one deployment and one approved rotation. Caller inventory and rollback rehearsal |
Verification commands and evidence
Run from the Llavero root with the Node version in .nvmrc and pnpm from package.json. Use generated data only. The local and cloud service checks require the pinned stock bao executable. Cloud conformance also requires the selected account ID and an authenticated Wrangler deployment identity.
# Available now
pnpm install --frozen-lockfile
pnpm openbao:test
pnpm openbao:test:authority
pnpm check:fast
pnpm test:standards
pnpm test:workers --concurrency=1
pnpm --filter @llavero/web build
pnpm knip
pnpm --filter @llavero/browser-runtime --filter @llavero/stepup --filter @llavero/rotation test
pnpm --filter @llavero/expo test
# Durable service and reference clients
pnpm openbao:test:service # External client, persisted local workerd, verified new boot
pnpm openbao:test:cloud # Disposable Worker, restart, negative control, resource results
# Existing ForgeGraph CLI tests, from ForgeGraph/agent
go test ./cmd/fg/commands -run Secret
# Mobile farm, after resolving the registered application ID
preflight apps list
preflight build --app <registered-app-id> --platform ios --kind simulator_test --ci --wait
preflight build --app <registered-app-id> --platform android --kind simulator_test --ci --wait
Trace evidence required for each enabled path
Generate a fresh value, claim, factor and correlation marker for each test inside the private harness. Inspect MCP tool inputs/results/errors/progress, model requests, shell and child outputs, OTLP, Sentry, PostHog, Worker tail/logpush, upstream audit, queue/dead-letter records, Gateway logs/cache, browser recording/console/network, notifications, mobile crash reporting, backups and helper-accessible files. Inspect raw, encoded and split representations in a private scanner. Export sink coverage, counts and outcome codes only.
Exercise success, provider echo, denial, timeout, cancellation, partial delivery, panic and restart. Verify both absence of markers and that forbidden capture was disabled at source. For an externally operated service, record the actual account settings, retention terms and who can inspect it. A route with an unverified sink cannot advertise strict delivery. Check that an agent with the entire transcript cannot recover or redirect the credential.
Operational response
- Root unavailable or audit fails. Stop new protected operations, including warm-core use. Keep the current deployment running, alert designated operators and rehearse authenticated recovery. Report affected scope and durations.
- Uncertain provider or sink effect. Fence competing jobs, query by the saved provider operation ID and reconcile the exact version. Resume once the evidence resolves the ambiguity. A destination that cannot confirm receipt remains pending.
- Trace marker detected. Disable the affected release path, restrict access to the captured artifact, follow retention and incident policy and rotate any affected credential. Re-run the canary on all connected sinks before re-enabling.
- Restore or emergency rollback. Restore in quarantine, verify external audit checkpoints, hardware, tombstones, grants and writer epochs. Reconcile in-flight mutations and external effects, then route one tested stage at a time.
Risks and mitigations
| Failure that changes the release | Detection and response |
|---|---|
| Go/Wasm fits the upload but exhausts the isolate at cold start or under two tenants. | Run cold and concurrent deployed trials early, including memory image restoration, real payloads and HSM latency. Profile retained bytes and narrow supported features if necessary. Re-run native equivalence after every port change. |
| Lease expiry, timers or transactions assume a long-lived server. | Persist deadlines and epochs and check absolute expiry on use. Deliver duplicate alarms and interrupt storage at commit boundaries. Reject a stale or partially recovered object. |
| A consumer bypasses the stage interface, or rollback restores a stale value. | Deny legacy value access in the switched fixture, exercise all caller families and reverse-replay every acknowledged post-flip mutation. A mismatch blocks the change of writer. |
| A provider cannot bind the phone and remote browser, or the local OS cannot isolate its helper. | Qualify each provider and host separately. Keep unsupported flows owner-assisted or route to a separately enrolled workload with an inspectable trace boundary. |
| A future port or hardware change breaks client history or recovery. | Retain the release manifest, verify historical vectors and tested restore media, rehearse upgrades, and maintain an operator for upstream security releases, patch rebases and hardware lifecycle. |
Open decisions and when they matter
| Decision | Owner and evidence | Needed by |
|---|---|---|
| Exact client binaries, auth methods, key types and old ciphertext origins | Each OpenBao consumer supplies versions and operations, without values. Compatibility lead records and runs one fixture per supported profile. | Advertising compatibility or moving that client |
| Hardware authority, operators and region-loss recovery | Installation owner and recovery officers compare both candidates using the same loss, latency, authorization and cost trials. | Any production copy, including shadow |
| Production objectives and provider overlap | The owner delegated the Llavero staging targets. The on-call operator records the traffic mix and tests both candidates. A future production stage and each provider overlap require their own operating decision. | Respective production release or provider rotation |
| Host OS for the protected helper and provider account for the mobile/browser pilot | Endpoint owner proves local privilege separation. Provider owner supplies documented continuation and test-account eligibility, or selects the owner-handoff path. | Respective staging pilots |
| Deployed quotas, instrumentation access and cloud feature bindings | Cloud operator records target account limits, compatibility date, allowed egress, Browser Run/AI availability, observable metrics and retention settings. | Cloud Worker proof and strict browser release |
Track these work packages against Llavero backlog item LLAV-35. Search for existing work before breaking out a package. Llavero owns the runtime and credential components. ForgeGraph owns the changes in its repository. Each review records scope, owners, dependencies and the acceptance evidence from the relevant row.