Skip to content

Assign algorithm identifiers locally before merge - #101

Open
domguinard wants to merge 4 commits into
c2pa-org:mainfrom
domguinard:automate-identifier-allocation
Open

domguinard wants to merge 4 commits into
c2pa-org:mainfrom
domguinard:automate-identifier-allocation

Conversation

@domguinard

@domguinard domguinard commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Contributors currently have to guess numeric identifiers, which can collide between simultaneous submissions. New entries may now omit identifier; after review, a maintainer runs python3 .github/scripts/registry.py --assign --base-ref origin/main, commits the assigned IDs to the same PR, and merges after validation. The command assigns consecutive IDs above the target list's maximum, replaces new entries' provisional IDs, preserves existing identity fields, and validates the result before writing.

validate-json accepts ID-less new entries. The separate publish-ready check requires complete, unique IDs. Both checks reject duplicate algorithm names and changes to published identity fields. The public schema remains strict. Maintainers fetch and integrate the current target branch before assigning IDs and process registrations sequentially; if another registration merges first, update the branch and rerun assignment. IDs remain provisional until merged.

This uses a local command and read-only CI. There is no allocation bot, privileged workflow, label trigger, reservation ledger, or second registration PR. The README documents the contributor and maintainer steps.

Validation

  • All 12 unit and CLI integration tests pass, including missing IDs, duplicate IDs/names, identity protection, repeat assignment, concurrent-registration reassignment, exhaustion, stale-base rejection, and no writes on invalid results.
  • The changed workflow passes actionlint 1.7.12.
  • The latest published list passes strict validation. A read-only assignment rehearsal preserves all 79 published entries and assigns the next ID, 81, successfully.
  • Updated this branch with current main; the PR does not modify the published list or public schema.

Setup after merge

Require both validate-json and publish-ready, with branches required to be up to date before merging. Keep normal human review requirements. No bot credentials, labels, state branch, or write-enabled workflow settings are needed. Repository protection settings are documented, not changed by this PR.

@domguinard domguinard changed the title Automatically allocate algorithm identifiers after maintainer review Assign algorithm identifiers locally before merge Nov 16, 2026
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