Skip to content

docs: define scoped sequential resource IDs - #762

Open
behinddwalls wants to merge 2 commits into
mainfrom
preetam/id-uri-rfc
Open

behinddwalls wants to merge 2 commits into
mainfrom
preetam/id-uri-rfc

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Why?

Slash-delimited resource IDs repeat queue and resource-kind context that stores, APIs, and messages already carry separately, while making a single ID span multiple browser path segments.

What?

Define counter-generated resource IDs as positive numeric values scoped by owner domain, queue, and resource kind. Persist durable counter high-water marks, store numeric IDs directly under queue-leading keys, keep queue and kind out of the ID, and reserve prefixes such as request.42 for presentation only.

Test Plan

✅ make fmt

✅ make lint-binary lint-license lint-message-id lint-queue-shard

✅ git diff --check

## Summary

### Why?

Slash-delimited resource IDs repeat queue and resource-kind context that stores, APIs, and messages already carry separately, while making a single ID span multiple browser path segments.

### What?

Define counter-generated resource IDs as positive numeric values scoped by owner domain, queue, and resource kind. Persist durable counter high-water marks, store numeric IDs directly under queue-leading keys, keep queue and kind out of the ID, and reserve prefixes such as `request.42` for presentation only.

## Test Plan

✅ `make fmt`

✅ `make lint-binary lint-license lint-message-id lint-queue-shard`

✅ `git diff --check`
@behinddwalls
behinddwalls marked this pull request as ready for review September 30, 2026 22:09
@behinddwalls
behinddwalls requested review from a team and sbalabanov as code owners September 30, 2026 22:09

Do not embed scope into the ID. Forms such as `demo-queue/42`, `demo-queue/batch/7`, `request.42`, and ARN-like resource names are not stored or accepted as IDs.

## Counter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we expect any entity type to be covered here? For example, we have BuildID (

type BuildID struct {
) which is an opaque string assigned by the build runner. We may want to consider whether int64 + counter are a required part of this contract, or optional for use in the entities that don't otherwise have another source for unique identifiers.

This branch has not been deployed

No deployments
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.

2 participants