Skip to content

Commit 050ab4e

Browse files
committed
feat: complete Registry evidence lifecycle
1 parent e66cb39 commit 050ab4e

20 files changed

Lines changed: 1535 additions & 102 deletions

‎CHANGELOG.md‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
## Unreleased
44

5+
- Complete the Registry's generalized artifact and chain-evidence path. Rust,
6+
C, JavaScript, and other CKB artifacts now keep explicit source, build,
7+
deployment, TCB, and copy-only identities instead of being presented as
8+
CellScript dependencies. Reproducible profiles require two to sixteen
9+
distinct builder reports bound to the signed environment, source, recipe,
10+
executable, build log, and predecessor evidence before verification becomes
11+
`verified`; deployment is rejected until that evidence exists. Add
12+
`cellc artifact reproduction-evidence`, wallet-ready mainnet commitment
13+
transaction intents, fixed Registry Type/attestor Lock configuration,
14+
Type-Script-indexed `CSREGv1` scans, and scheduled lifecycle reconciliation
15+
that demotes spent attestations or stale deployment Cells without deleting
16+
historical evidence. The chain path is implemented but remains
17+
operationally disabled until the canonical mainnet Registry Type Script,
18+
CellDep, and attestor Lock are deployed and configured.
519
- Harden the unified artifact Registry boundary: default discovery now hides
620
pending/rejected releases and paginates by package coordinate; deployment
721
records and admin recovery must match the immutable CKB `hash_type` and
@@ -45,7 +59,11 @@
4559
now uses the corresponding official Nervos wallet-directory SVG rather than
4660
an autogenerated letter mark or a runtime favicon. The chooser header no
4761
longer reserves space for a hidden back control, so its title, explanatory
48-
text, and wallet list share one left alignment edge.
62+
text, and wallet list share one left alignment edge. Submit now asks for the
63+
artifact kind and source language independently, and Manage groups publish,
64+
inspection, reproduction, deployment, commitment, and availability as
65+
isolated task flows; hidden task fields can no longer leak into the selected
66+
workflow.
4967
- Deploy the public Registry production slice at
5068
`api.registry.cellscript.dev` and `registry.cellscript.dev`: Postgres 17 is
5169
the authoritative write store, the Node 22 adapter persists source snapshots

‎docs/CELLSCRIPT_REGISTRY_PHASE1.md‎

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
admission, verification, discovery, deployment-evidence, CLI, and website
55
surfaces described here are checked in on the current release line.
66

7+
The source-package production slice is deployed. Generic artifact,
8+
reproduction, deployment, and chain-index code is implemented, but a public
9+
`on_chain_attested` claim additionally requires operators to deploy and pin the
10+
canonical mainnet Registry Type Script, its CellDep, and the attestor Lock.
11+
Until all three identities are configured, commitment construction fails
12+
closed and scheduled chain reconciliation remains disabled.
13+
714
The Registry indexes CKB ecosystem artifacts. A coordinate is
815
`namespace/name`; a release adds an immutable version. The coordinate does not
916
imply that the object is a CellScript dependency, executable, deployed Script,
@@ -60,6 +67,10 @@ binary may be verified but have no deployment concept. A CKB executable may be
6067
verified and still undeployed. A previously chain-verified release may later be
6168
deprecated without rewriting its evidence.
6269

70+
`on_chain_attested` is a current-state claim, not a permanent badge. Scheduled
71+
maintenance returns a spent commitment to `deployed` and a stale deployment to
72+
`verified_build`, while retaining every accepted evidence record for audit.
73+
6374
## Artifact Identity
6475

6576
The Registry separates four questions:
@@ -209,6 +220,40 @@ reproducible build is marked `evidence_required` until
209220
appropriate build evidence exists; merely uploading output bytes does not prove
210221
reproducibility.
211222

223+
## Accepting Reproduction Evidence
224+
225+
The Registry never executes an arbitrary publisher build recipe in its API
226+
process. Independent builders execute the signed recipe in the declared
227+
environment and emit bounded reports:
228+
229+
```json
230+
{
231+
"schema": "cellscript-reproduction-report-v1",
232+
"builder_id": "builder-a",
233+
"environment": "<exact signed environment>",
234+
"source_hash": "<CKB Blake2b-256>",
235+
"build_recipe_hash": "<CKB Blake2b-256>",
236+
"artifact_hash": "<CKB Blake2b-256>",
237+
"build_log_hash": "<CKB Blake2b-256>",
238+
"generated_at": "2026-08-02T00:00:00Z"
239+
}
240+
```
241+
242+
Create the operator promotion payload locally:
243+
244+
```bash
245+
cellc artifact reproduction-evidence acme/vault-lock@1.0.0 \
246+
--report reports/builder-a.json \
247+
--report reports/builder-b.json \
248+
--output reproduced-build-promotion.json
249+
```
250+
251+
The CLI and API require two to sixteen distinct builder IDs and exact matches
252+
for the signed environment, source, recipe, and executable. The promotion also
253+
references the accepted `verified_build` evidence. A reproducible artifact
254+
stays `evidence_required`, and deployment admission fails, until
255+
`reproduced_build` evidence is accepted.
256+
212257
## Consuming Other Artifacts
213258

214259
Generic artifacts never pass through `cellc install`. Use the explicit
@@ -219,6 +264,7 @@ cellc artifact fetch acme/vault-lock@1.0.0 --output vault-lock.bundle.json
219264
cellc artifact verify --bundle vault-lock.bundle.json --receipt vault-lock.bundle.json.receipt.json
220265
cellc artifact pin acme/vault-lock@1.0.0 --output Artifacts.lock --accept-hash-bound
221266
cellc artifact copy acme/starter@1.0.0 --destination ./new-project --accept-hash-bound
267+
cellc artifact reproduction-evidence acme/vault-lock@1.0.0 --report builder-a.json --report builder-b.json --output reproduced-build-promotion.json
222268
cellc artifact record-deployment acme/vault-lock@1.0.0 --code-hash <hash> --hash-type data1 --dep-type code --tx-hash <tx_hash> --index 0 --capability-key-id <key_id>
223269
cellc artifact cell-dep acme/vault-lock@1.0.0 --output CellDep.json --accept-hash-bound --rpc-url https://mainnet.ckb.dev/rpc
224270
cellc artifact set-availability acme/vault-lock@1.0.0 --status yanked --reason "security advisory" --capability-key-id <key_id>
@@ -246,11 +292,22 @@ It signs a short-lived, nonce-protected capability payload; publishers may set
246292
`active`, `deprecated`, or `yanked`, while administrative quarantine remains a
247293
separate privileged action.
248294

249-
`commitment` produces the canonical `cellscript-registry-commitment-v1`
250-
payload, CKB Blake2b commitment, and compact `CSREGv1 || hash` Cell data. The
251-
Registry accepts an on-chain attestation only after reading that live mainnet
252-
Cell and matching its exact data, attestor Lock hash, and Registry Type Script
253-
hash used for chain indexing.
295+
`commitment` verifies the Registry response against the locally fetched signed
296+
release, then writes the canonical `cellscript-registry-commitment-v1` payload,
297+
CKB Blake2b commitment, compact `CSREGv1 || hash` Cell data, fixed Registry
298+
Type/Lock hashes, and a wallet-ready mainnet transaction intent. The wallet,
299+
not the Registry or CLI, completes capacity, inputs, change, fee, witnesses,
300+
signatures, and broadcast.
301+
302+
The Registry accepts an on-chain attestation only after reading the live
303+
mainnet Cell and matching its exact data, configured attestor Lock, and
304+
configured Registry Type Script. Scheduled maintenance uses an exact Type
305+
Script indexer query plus the `CSREGv1` prefix to discover commitments and
306+
reconcile their live lifecycle.
307+
308+
This contract indexes code/artifact evidence; it does not take ownership of
309+
application business Cells. Business state remains governed by the
310+
application's own Lock/Type Scripts, schemas, and replacement transactions.
254311

255312
## Publisher Authorisation
256313

@@ -311,6 +368,8 @@ that every artifact is installable.
311368
only between characters.
312369
- A source dependency resolver rejects every non-CellScript profile.
313370
- A CKB deployment requires prior verified-build evidence.
371+
- A reproducible CKB deployment additionally requires accepted
372+
`reproduced_build` evidence.
314373
- Deployment evidence must match the published executable hash and a live
315374
mainnet Cell.
316375
- Quarantined releases are not returned by public detail or evidence routes.
@@ -319,6 +378,8 @@ that every artifact is installable.
319378
other mirror failures are audited and retried by verification sync, so an
320379
uncommitted release or deployment is never advertised as current.
321380
- State transitions append evidence; they do not mutate hash identity.
381+
- An unconfigured or partially configured Registry Type/Lock Script set cannot
382+
produce a wallet transaction intent or current attestation.
322383

323384
## Validation
324385

‎docs/releases/CELLSCRIPT_0_23_RELEASE_NOTES.md‎

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
**Status**: Development release notes for `nightly-0.23`; not a stable release
44
certificate.
55

6-
**Updated**: 2026-08-01.
6+
**Updated**: 2026-08-02.
77

88
CellScript 0.23 makes its source semantics and compatibility axes explicit.
99
Edition 2026 is the first and only CellScript source-semantics epoch. The
@@ -13,8 +13,10 @@ canonical location:
1313

1414
This document records completed 0.23 work. The public Registry infrastructure,
1515
read/write domains, website, CLI read authority, and automatic compiler-backed
16-
evidence chain are deployed; the first publisher-owned JoyID publication and
17-
clean-machine install remain the final Registry adoption checkpoint. Broader
16+
source-package evidence chain are deployed. General artifact, reproduction,
17+
deployment, and commitment support is implemented in-tree, while canonical
18+
Registry Script deployment, the first real non-CellScript mainnet attestation,
19+
and publisher-owned clean-machine adoption remain checkpoints. Broader
1820
RGB++/Fiber evidence and the Off-Chain Session Runtime profile remain roadmap
1921
work.
2022

@@ -30,6 +32,9 @@ work.
3032
| Registry operations | `api.registry.cellscript.dev` and `registry.cellscript.dev` run as an isolated self-hosted Postgres/Node/object-volume/read-only-nginx stack behind trusted TLS. |
3133
| Registry retry safety | Pre-admission failures release only the failed request's nonce and retry reservation; accepted metadata commits transactionally, and readiness covers the actual managed object prefixes. |
3234
| Registry verification | Publish transactionally queues a leased, bounded real-compiler verification job; verified evidence/status commit atomically before crash-safe static-index convergence, and default search stays hidden until the baseline passes. |
35+
| Registry artifact profiles | CellScript dependencies, CKB executables, runtime verifiers, reproducible binaries, and copy-only templates share discovery but retain different resolver, TCB, deployment, and copy contracts. |
36+
| Registry reproducibility | Reproducible profiles stay `evidence_required` until independent builder reports bind the signed environment, source, recipe, executable, and build logs. |
37+
| Registry chain evidence | Mainnet deployment records are RPC-checked; configured Registry Type/Lock Scripts produce wallet transaction intents and a bounded Type-Script indexer reconciles live commitments without erasing history. |
3338
| Production HTTP boundary | API/static JSON responses use HSTS, deny-all content policy, anti-framing, no-sniff, and restrictive browser permissions; the website ships a reproducible read-only nginx deployment with health checks and bounded logs/temp storage. |
3439
| Registry install policy | Explicit unverified/quarantined install acknowledgements persist per dependency, so lock refresh and subsequent builds retain the same auditable risk choice. |
3540
| Tooling | CLI, LSP, WASM, website bindings, examples, and package tooling use the same edition contract. |
@@ -163,6 +168,41 @@ This removes the previous cross-process nondeterminism caused by serializing
163168
`HashMap` fields directly and gives the publisher and isolated verifier one
164169
stable identity.
165170

171+
## General Artifact And Chain Evidence Closure
172+
173+
The public model no longer equates Registry discovery with `cellc install`.
174+
Each release declares an artifact kind, profile, source language, and
175+
consumption mode. Only `cellscript_source` plus `dependency` enters the package
176+
resolver. A CKB executable is consumed through explicit artifact verification,
177+
pinning, deployment, and CellDep commands; a runtime verifier is a declared TCB
178+
input; and a template is copied without becoming an implicit dependency.
179+
180+
Reproducibility is now an evidence transition rather than a manifest adjective.
181+
`cellc artifact reproduction-evidence` verifies two to sixteen reports from
182+
distinct builder IDs. Every report must use
183+
`cellscript-reproduction-report-v1` and match the signed environment, source
184+
hash, build-recipe hash, executable hash, build-log hash, and timestamp. The
185+
Registry binds the promotion to the accepted `verified_build` evidence. Until
186+
that promotion succeeds, a reproducible executable remains
187+
`evidence_required` and cannot acquire deployment evidence.
188+
189+
For an RPC-verified mainnet deployment, the commitment endpoint computes the
190+
canonical `cellscript-registry-commitment-v1` payload and compact
191+
`CSREGv1 || commitment_hash` Cell data. When operators configure the canonical
192+
Registry Type Script, its CellDep, and the attestor Lock, the endpoint also
193+
returns a mainnet-only wallet transaction intent. A compatible wallet supplies
194+
capacity, inputs, change, fee, witnesses, signatures, and broadcast. Scheduled
195+
maintenance scans exact Type Script matches through the CKB indexer and
196+
reconciles current state: a matching live Cell promotes the release to
197+
`on_chain_attested`; a spent attestation falls back to `deployed`; and a stale
198+
deployment falls back to `verified_build`. Evidence remains append-only.
199+
200+
This is an implementation boundary, not a claim that the canonical mainnet
201+
Registry Script has already been deployed. Production chain attestation stays
202+
disabled until those three Script identities are deployed and configured, and
203+
the first real non-CellScript mainnet artifact is still an adoption/evidence
204+
checkpoint.
205+
166206
## CLI, LSP, WASM, And Website
167207

168208
- Package commands read Edition 2026 from `Cell.toml`.
@@ -176,6 +216,10 @@ stable identity.
176216
compatibility-profile hash, and use the checked-in fixture only as an
177217
explicitly labelled read-only mirror during API failure. The Coming Soon
178218
surface is removed.
219+
- Submit separates artifact kind from source language instead of hard-coding
220+
Rust. Manage exposes isolated reproduction, mainnet deployment, and
221+
commitment command builders alongside publish, inspect, and availability;
222+
task-specific fields disappear when the task changes.
179223
- `cellc auth namespace claim` and the submit page's **Claim namespace** action
180224
expose the namespace-ownership admission step required before a package's
181225
first public publish. Capability registration no longer appears to imply a

‎docs/wiki/Tutorial-04-Packages-and-CLI-Workflow.md‎

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -333,26 +333,24 @@ model:
333333
- deployment identity answers which CKB Cell, CellDep, or runtime artifact is
334334
being used.
335335

336-
Registry discovery can be broad. It may index CellScript source packages,
336+
Registry discovery is broad. It indexes CellScript source packages,
337337
runtime verifiers, deployed CKB artifacts, reproducible artifacts, and even
338338
external CKB tooling artifacts such as bootstrapper outputs. Resolver profiles
339339
must stay narrower: an object can be discovered without being installable by
340340
`cellc add`.
341341

342-
That means registry resolution is stricter than discovery. Current `cellc`
343-
registry dependencies are CellScript source-package dependencies. Future
344-
profile-aware resolver paths should accept only objects that can be checked
345-
fail-closed:
342+
That means registry resolution is stricter than discovery. `cellc add` and
343+
`cellc install` accept only the `cellscript_source` + `dependency` contract.
344+
Other profiles use explicit `cellc artifact` commands and fail closed on
345+
unknown fields, identities, roles, or lifecycle state:
346346

347-
| Kind | Current `cellc add` | Future profile boundary |
347+
| Kind | `cellc add` | Current explicit boundary |
348348
| --- | --- | --- |
349-
| `source_package` / library | yes | Source and API identity must be pinned and reproducible. |
350-
| `runtime_verifier` / `spawn-verifier` | no, unless wrapped as a CellScript package today | TCB object; requires verifier ID, ABI, artifact identity, build profile, security status, and production deployment pins when used in production. |
351-
| `deployable_contract` | no, unless it is a CellScript source package today | Must expose build/audit/deployment identity, not just source text. |
352-
| `deployed_artifact_record` | no | Must bind network, OutPoint, dep type, code/data hash, and status. |
353-
| `reproducible_artifact` | no | Must bind source hash, build profile hash, artifact hash, and compatibility profile. |
354-
| `protocol_profile_library` | only if it is a real CellScript package today | Must be a real package with checkable source/schema/API semantics. |
355-
| `template`, `cookbook`, `protocol_skeleton`, scaffold | no | Copy-only starting material; after copying, it becomes local project code. |
349+
| `source_library` / `profile_library` | yes | Compiler-backed source and API identity are pinned in `Cell.lock`. |
350+
| `runtime_verifier` | no | `artifact fetch`, `verify`, and `pin`; verifier ID, IPC ABI, artifact, build, security, and production CellDep remain explicit TCB facts. |
351+
| `deployable_contract` | no | `artifact fetch`, `verify`, `pin`, `record-deployment`, and `cell-dep` bind build and live mainnet deployment identity. |
352+
| `reproducible_binary` | no | `artifact reproduction-evidence` binds independent builders to source, recipe, environment, executable, and logs before verified use. |
353+
| `template` | no | `artifact copy` authenticates a bounded file map, rejects traversal and overwrite, and then leaves local project source. |
356354

357355
The rule is intentionally blunt:
358356

@@ -373,9 +371,8 @@ hashes, build profile, TCB/security status, and any production CellDep pins.
373371
A NovaSeal starter project, by contrast, is not dependency-safe merely because
374372
it contains useful `.cell` code. If users are expected to copy it and edit terms,
375373
authorities, manifests, or deployment pins, it belongs in a cookbook or template
376-
flow, not in dependency resolution. The current `cellc` CLI does not ship a
377-
template or cookbook-copy command; copy starter material with repository tooling
378-
or a future scaffold command, then treat the result as local project source.
374+
flow, not in dependency resolution. Use `cellc artifact copy`, then treat the
375+
authenticated result as local project source.
379376

380377
It should not be installed with:
381378

@@ -403,20 +400,26 @@ cellc info --json
403400
Use `info` when you want a quick view of the package boundary before building or
404401
debugging dependency resolution.
405402

406-
## Experimental Commands
403+
## Registry Commands
407404

408405
Registry source-package installation and registry-backed `update` are supported
409-
for the CellScript source-package profile. The public registry policy is:
410-
`cellc auth capability create --principal-id <principal_id> --scope
411-
publish:namespace/package --expires 90d` authorises a JoyID-rooted publisher
412-
capability, then `cellc publish` writes a real registry entry. The
413-
`principal_id` is derived from the connected JoyID signer, not from a display
414-
address. The same metadata can still be
406+
for the CellScript source-package profile. `cellc auth capability create
407+
--principal-type <joyid_ckb|ckb_secp256k1> --principal-id <principal_id> --scope
408+
publish:namespace/package --expires 90d` creates the wallet payload for a
409+
scoped publisher capability, then `cellc publish` writes a real Registry entry.
410+
The `principal_id` is cryptographically derived from the signer, not from a
411+
display label. The same metadata can still be
415412
mirrored with `cellc publish --offline` to `registry.json` and Git tags for
416413
audit, local fixtures, and offline fallback. `cellc registry add` manages discovery/claim metadata rather than
417-
ordinary version publication. `run`, `repl`, cryptographic audit-signature
418-
verification, and non-CellScript artifact profiles remain future-facing or
419-
fail-closed.
414+
ordinary version publication.
415+
416+
Non-CellScript profiles publish with `Artifact.toml` and
417+
`cellc publish --artifact-manifest Artifact.toml`. Consumers use the explicit
418+
`cellc artifact fetch`, `verify`, `pin`, `copy`, `reproduction-evidence`,
419+
`record-deployment`, `cell-dep`, `commitment`, and `set-availability` commands;
420+
none silently turns an executable, TCB object, or template into a source
421+
dependency. `run`, `repl`, and cryptographic audit-signature verification
422+
retain their separate documented assurance boundaries.
420423

421424
## Next
422425

0 commit comments

Comments
 (0)