Skip to content

Rename the CLI to @unicitylabs/proof-cli - #8

Merged
MastaP merged 11 commits into
mainfrom
rename/proof-cli
Oct 14, 2026
Merged

MastaP merged 11 commits into
mainfrom
rename/proof-cli

Conversation

@MastaP

@MastaP MastaP commented Oct 14, 2026

Copy link
Copy Markdown
Member

Renames the package to @unicitylabs/proof-cli and the binary to
unicity-proof, per docs/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_TAG is unchanged, and now says why it can never change. The token
type 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 format and
### Deferred decisions sections 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, TimestampClient and 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 keygen
writes when given no --out, now unicity-proof.key. Subcommands, flags and
every 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 repository to match, case-sensitively, the repository it
publishes from, so a manifest naming proof-cli could not have published from a
repository still named timestamp-cli. A new trusted-publisher configuration
must 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 bin map inside the lockfile's root package
entry, which npm ci does not repair.

Verified: both committed fixtures, certified before the rename, verify OK
under the new binary; printf 'unicity-timestamp' | sha256sum still matches the
pinned token type; npm pack --dry-run reports @unicitylabs/proof-cli at
0.1.2 with the unicity-proof bin entry; 142 tests pass with lint and
tsc --noEmit clean.

MastaP added 10 commits October 14, 2026 15:52
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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T16:27:44.079982Z e6c9fc5 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +137 to +138
4. Configure the new package's trusted publisher: repository
`unicitynetwork/proof-cli`, workflow `npm.yml`, environment `npm-publish`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@MastaP
MastaP merged commit ea60220 into main Oct 14, 2026
2 checks passed
@MastaP
MastaP deleted the rename/proof-cli branch October 14, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant