forked from unimatrix/web
code: persist Codex key editions without reissuing rights
This commit is contained in:
parent
6ab50e5b57
commit
21af4ed8ed
1 changed files with 188 additions and 90 deletions
37
docs/design/CODEX-KEY-EDITIONS.md
Normal file
37
docs/design/CODEX-KEY-EDITIONS.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Codex key edition migration
|
||||
|
||||
Code batch: shared organisation-code parser, persistent edition records and
|
||||
backward-compatible organisation-key presentation. CLAN, COM and POL share one
|
||||
format implementation. Kit/upgrade-token migration and staff issuance are later
|
||||
adapters; their existing working formats remain unchanged in this batch.
|
||||
|
||||
Format: TYPE-STAGE-VERSION-SEASON-SECRET. The 192-bit secret is retained in six
|
||||
8-character groups. The stage is ALPHA/BETA/LIVE, version uses the four-part
|
||||
release number, season uses S01-style IDs. Human-readable metadata is not proof
|
||||
of ownership. Redemption validates the edition against its server record.
|
||||
|
||||
Existing encrypted secrets, hash identities, owners, expiry, revocation and usage
|
||||
are retained. A new codex_instance_editions table backfills existing records once
|
||||
as an explicitly marked legacy baseline. Later deployments or seasons never
|
||||
rewrite earlier edition rows. Original rows are not reissued or duplicated.
|
||||
|
||||
New issues read the active release configured through the existing menu manager;
|
||||
CODEX_RELEASE_STAGE, CODEX_RELEASE_VERSION and CODEX_SEASON_ID can supply explicit
|
||||
server configuration. Default season is S01. Resolving release metadata happens
|
||||
before entering the write transaction to avoid exhausting the database pool.
|
||||
|
||||
Old copied codes still redeem against the same record. New formatted codes also
|
||||
resolve to that same record, but altered version/season text is rejected. Both
|
||||
forms share the same atomic consume state, preventing a second entitlement.
|
||||
Private register responses include edition data, remain account scoped and do
|
||||
not reveal used/revoked/expired secrets. No encryption or signing key is exposed
|
||||
or rotated by this migration.
|
||||
|
||||
Additional code fix: public Heir and council example portraits render for vacant
|
||||
roles in Keyed/Royal clans too. Genuine appointments still take precedence. No
|
||||
appointment, membership, political power or staff rank changes occur.
|
||||
|
||||
Validation covers baseline preservation, new-season issuance, malformed inputs,
|
||||
wrong editions, foreign ownership, duplicate use and transaction rollback. Live
|
||||
GUL data was checked with only the renderer replaced locally: actual Ruler kept,
|
||||
vacant Heir and both council examples displayed.
|
||||
Loading…
Reference in a new issue

Staff