Repository navigation
Rename the CLI to @unicitylabs/proof-cli - #8
Conversation
npm requires a package's `repository` to match, case-sensitively, the repository it publishes with provenance from, so a manifest naming `proof-cli` cannot publish from a repository still named `timestamp-cli`. The repository rename is now step 1 of the migration rather than the last step, which also makes the manifest URLs true at every point in the sequence. A new trusted-publisher configuration has to complete its first successful publish within two days or it expires permanently, so the release step records that window and the configuration step says not to do it until the release is ready. The binding is to the repository's immutable identity, which survives a rename, so the step that re-pointed it afterwards is gone. Restricting token publishing is a separate opt-in and is now listed as one. The plan's help assertion no longer writes the old name into a test file: two later steps grep the tree for that string and expect it absent, so the assertion would have failed checks the plan itself specifies. It asserts the whole usage line instead, and the `--out` default text — which top-level help never carried — gets its own assertion against `keygen --help`.
The spec and the plan both listed only the two name fields in package-lock.json, but the `""` package entry mirrors the manifest and carries a `bin` map, which kept the old binary name after the rename. `npm ci` does not repair it, so nothing in the sequence would have caught it before a future lockfile regeneration.
The README's H1 is `# Unicity Timestamp CLI`, which is title case and space-separated, so the line-ranged substitutions did not touch it and the verification grep -- built from the same two patterns -- could not see it. Both checks now also look for the title-case form, and the README edit renames the title. The check is deliberately not a case-insensitive search for `timestamp`: the README uses the English word throughout, for round timestamps and for what a timestamp attests, and none of that is being renamed.
The post-merge section was titled "Operator steps after merge" with a preamble saying the steps need registry or organisation credentials and are not part of the code change, but the list opens with renaming the GitHub repository (which precedes the merge) and merging the branch itself (which is the code change). Retitled to "Operator steps" and reworded the preamble to hold for the whole list. Both docs also narrowed npm's repository-match rule to provenance publishes specifically; npm documents the exact-match requirement for trusted publishing generally, so the qualifier is dropped in the plan and the spec. The plan's suite-run step said "the one new keygen test" where two were added (naming the default key file after the command, and in its --help), and its expected failure for the help assertion described a toContain substring check when the assertion is now a toEqual on the whole usage line; both are corrected to match. The README's tagline under the new "Unicity Proof CLI" heading still read "Timestamping service on Unicity network," unlike the renamed package description and CLI help text. Replaced with "Proof-of-existence service on the Unicity network," leaving the rest of the line, the frozen wire-format sections, and every other use of "timestamp" as a common noun untouched. The e2e help-and-version test asserted the usage line against a hardcoded command name, so nothing cross-checked it against the manifest that actually installs the binary. It now reads the expected name from package.json's `bin` entry, the same way the version assertions already read the version from the manifest, so a rename that only touches `bin` can no longer slip past the suite. Both docs also claimed the trusted-publisher binding "survives a later rename." npm's documentation only says the first successful publish binds it to the repository's immutable identity; it does not say what a later rename requires. Softened both to say the binding is to that identity rather than to the name, that npm doesn't document the later case, and that the ordering in this plan makes it moot. Added a risk-table row for the window between merging and the bootstrap publish, during which the README's install command 404s because the package doesn't exist on npm yet; the mitigation is running the bootstrap publish immediately after merging.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6c9fc5dc2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 4. Configure the new package's trusted publisher: repository | ||
| `unicitynetwork/proof-cli`, workflow `npm.yml`, environment `npm-publish`. |
There was a problem hiding this comment.
Enable direct publishing for the new trusted publisher
For trusted-publisher configurations created after September 3, 2026, npm defaults to staged publishing and requires explicitly enabling direct npm publish access, as described in the npm trusted-publisher documentation. The migration instructions only specify repository, workflow, and environment, while .github/workflows/npm.yml uses direct npm publish; following this runbook therefore leaves the 0.2.0 release unauthorized and may let the new configuration expire after two days. Add “Allow npm publish” to this step and the mirrored plan/workflow prerequisite.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed and fixed in 5b0a121.
The documentation says exactly this: "Configurations created after Sep 03, 2026
are automatically set to allow npm stage publish, and you can choose whether
to also permit direct publishing with npm publish." Today is past that date,
and the publish step runs npm publish --access public --tag … directly, so a
configuration created from the defaults would refuse the release.
The second-order consequence is the worse one, and you named it: the refusal
would be spent inside the two-day window that a new configuration has to
complete its first successful publish in, and an expired configuration cannot be
edited — only recreated. So the failure is not "retry after ticking a box", it
is "recreate the configuration and start the window again".
Fixed in three places rather than one, because a releaser may read any of them:
migration step 4 in the spec, its mirror in the plan, and the prerequisite
comment at the top of npm.yml, which is the one someone actually has open when
they run the workflow. The spec's risks table records the default as its own row.
Worth noting this is the second half of a finding a human reviewer raised on the
spec PR: that the step configured the publisher "without enabling direct
npm publish or noting the two-day window". I verified and fixed the window and
never came back to the first clause. Two independent reviews landing on the same
gap is the useful signal here.
I did not switch the workflow to staged publishing with a promotion step. That
is a real alternative and arguably the direction npm is pushing, but it changes
how releases work rather than how this package is named, so it belongs in its own
change rather than inside a rename.
npm's "Allowed actions" defaults a trusted-publisher configuration created after 3 September 2026 to `npm stage publish` only, and the release workflow publishes directly with `npm publish`. A configuration left on the default refuses the release, and because the configuration has to complete its first successful publish within two days or expire permanently, the refusal would also spend that window on a publish that cannot succeed. The migration step, its mirror in the plan and the workflow's own prerequisite comment now all say to permit direct publishing, and the risks table records the default.
Renames the package to
@unicitylabs/proof-cliand the binary tounicity-proof, perdocs/specs/2026-10-14-rename-to-proof-cli.md.The version stays 0.1.2. The release workflow owns the bump to 0.2.0, and the
first publish under the new name is manual because npm's trusted publishing
cannot create a package name the publisher does not already own.
TIMESTAMP_TAGis unchanged, and now says why it can never change. The tokentype is its SHA-256, the burn predicate's reason bytes are its UTF-8, and it is
the domain tag inside the payload signature, so renaming it would give every
later stamp a different token type, recipient and signature domain, and nothing
already certified would verify. The README's
### Token file formatand### Deferred decisionssections describe those same bytes and are untouched;the rename is confined to lines 1-214.
Internal vocabulary keeps the format's name: the
TIMESTAMP_*constants,TimestampPayload,TimestampClientand the file names identify the format,which is not what is being renamed.
Two things change for users: the binary name, and the default key file
keygenwrites when given no
--out, nowunicity-proof.key. Subcommands, flags andevery
UNICITY_*variable are unchanged.The spec and the plan are corrected here too, because executing them surfaced
three errors. The migration order now puts the repository rename first: npm
requires a package's
repositoryto match, case-sensitively, the repository itpublishes from, so a manifest naming
proof-clicould not have published from arepository still named
timestamp-cli. A new trusted-publisher configurationmust also complete its first successful publish within two days or it expires
and can no longer be used or edited, which the release step now records. And the
rename inventory had omitted the
binmap inside the lockfile's root packageentry, which
npm cidoes not repair.Verified: both committed fixtures, certified before the rename, verify
OKunder the new binary;
printf 'unicity-timestamp' | sha256sumstill matches thepinned token type;
npm pack --dry-runreports@unicitylabs/proof-cliat0.1.2 with the
unicity-proofbin entry; 142 tests pass with lint andtsc --noEmitclean.