Skip to content

Preserve and validate explicit share_code to prevent registry collisions #117

Description

@k1412

Problem

The registry generator falls back to the first four package-name characters when meta.json has no explicit share_code. The current global registry already contains these case-insensitive collisions:

  • card: 4 apps
  • noir: 3 apps
  • void: 2 apps
  • zero: 2 apps

The device AppStore resolves a submitted share code by iterating the catalog and accepting the first matching entry, so duplicate codes are ambiguous.

An app cannot reliably prevent the fallback through app-builder.json today:

  • czdev publish copies an allow-list of Store fields that omits share_code.
  • process-web-submission.yml has the same omission when extracting app-builder.json.
  • The documented schema does not list store.share_code.

Concrete reproduction: #116 needs an explicit zsdr in meta.json; the current official generator preview preserves it, but the value had to be inserted outside the normal czdev transformation.

Suggested fix

  1. Preserve a validated store.share_code in both czdev publish and web submission metadata extraction.
  2. Document the field and a normalized format (for example 4–8 lowercase ASCII letters/digits).
  3. Validate uniqueness case-insensitively against the base registry during submission/index generation.
  4. Reject duplicates or derive a deterministic unique fallback instead of silently publishing an ambiguous code.
  5. Add a registry-generation test covering collisions and explicit codes.

The draft package remains blocked from merge on physical hardware P0 for unrelated release-quality reasons; this issue is specifically about Store metadata integrity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions