feat(licence): the licensed-identity row on aikey status and aikey doctor - #27
Open
damonleelcx wants to merge 3 commits into
Open
feat(licence): the licensed-identity row on aikey status and aikey doctor#27damonleelcx wants to merge 3 commits into
aikey status and aikey doctor#27damonleelcx wants to merge 3 commits into
Conversation
🔴 AUTHORSHIP: the code in this commit was written in a prior session on 2026-08-14 and left uncommitted and unformatted in the working tree. This session applied `rustfmt` to it (proven whitespace-only: the token stream ignoring whitespace is byte-identical before and after) and verified it — `cargo fmt --check` clean, full suite 2600+ tests, 0 failures. Nothing about its behaviour was designed or changed here. It is committed rather than left dirty because release.sh's Step 2 `fmt-check` fence refuses the tree, and a package built for a paying customer must come from a committed tree — otherwise the customer runs bits that exist in no commit and nobody can reproduce. macOS "stop" used to be `launchctl kill TERM`, which signals the process but leaves the job loaded, so KeepAlive respawned it seconds later while we printed "stop succeeded" over the top. The check asks launchd's own job state rather than /healthz, because a healthz probe cannot tell "stopped" from "restarting" — the PyInstaller binary needs ~20s to self-extract before it binds. Guarded `#[cfg(target_os = "macos")]`; Linux and Windows paths are untouched. Bugfix: workflow/CI/bugfix/20260814-trust-local-stop-does-not-stop-macos.md (that doc is still untracked in the workflow repo — it belongs with this change)
… doctor` 需求变更 2026-08-18 makes the CLI two of the four surfaces that must render the licensed identity byte-identically. license_identity.rs is the one renderer for all of them; no surface composes its own string. 🔴 The resting state is SILENT. An open-source Personal user runs `aikey status` with no licence for the life of the install, so a warning there would train everyone to ignore warnings — taking the error-state warning with it. Only the error state warns. 404 from the identity route is the unlicensed answer (design D9: a Personal control plane mounts no such route), and every other failure — 500, unreachable, 200 with no company name — is the error row. Collapsing those would report a Production server whose control plane is down as an unlicensed Personal install, which is the most expensive way to be wrong here. All three are asserted, and a new cross-language fence in aikey-license-core/crossrepo now compares the mapping against the TypeScript client. 16/16 in license_identity. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
release.sh Step 2 runs `cargo fmt --check`, so unformatted source stops the whole cut. No behaviour change; the cross-language identity fence in aikey-license-core still passes, which is the point of matching on the declaration rather than on a line's exact shape. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
src/license_identity.rs— the CLI half of 需求变更 2026-08-18, which makesaikey statusandaikey doctortwo of the four surfaces that must render the licensed identity byte-identically.Design notes
aikey-license-core/crossrepocompares against the Go authority and the TypeScript client.aikey statuswith no licence for the life of the install, so a warning there would train everyone to ignore warnings — taking the error-state warning with it. Only the error state warns./v1/license/identityat all. Every other failure — 500, unreachable, 200 with no company name — is the error row. Collapsing those would report a Production server whose control plane is down as an unlicensed Personal install, which is the most expensive way to be wrong here.Verification
license_identityTestAnAbsentLicensingRouteIsTheUnlicensedAnswerInEveryLanguage, in aikey-license-core) compares this 404 mapping against the TypeScript client. Both arms drilled red — flipping either language's arm to the error state fails it — then restored.cargo fmt --checkclean (the release gate runs it).Note for the reviewer
This branch also carries one commit that is not part of this work and was simply unpushed on
develop-v1.0.5locally:b7f4464 fix(trust-local): verify macOS stop actually stayed stoppedRelated: aikeylabs/aikey-license-core#4, aikeylabs/aikey-control-master#36