feat(ids): use queue-scoped decimal resource IDs - #770
Open
behinddwalls wants to merge 4 commits into
Open
behinddwalls wants to merge 4 commits into
behinddwalls wants to merge 4 commits into
Conversation
behinddwalls
added this pull request to stack #771
October 2, 2026 20:48
behinddwalls
marked this pull request as ready for review
October 2, 2026 22:15
## Summary ### Why? Queue-prefixed resource IDs contain URL separators and duplicate scope already carried by the queue, route, and typed field. Resource IDs should remain flexible string contracts rather than forcing Go, protobuf, or SQL resource fields to integer types. ### What? - Store canonical positive decimal strings such as "42" for SubmitQueue request IDs, SubmitQueue batch IDs, and Stovepipe request IDs while keeping resource and reference fields as strings and VARCHAR columns. - Persist counter high-water marks by owner domain, queue, and resource kind; wire Stovepipe to the durable MySQL counter so allocation survives restarts and remains isolated across domains. - Validate direct resource-ID inputs, compare decimal strings numerically where allocation order matters, and update queue contracts, documentation, fixtures, and generated bindings without changing provider IDs, URIs, hashes, or derived event IDs. ## Test Plan - ✅ make build - ✅ make test (127 targets passed) - ✅ make fmt, make gazelle, make mocks, and make tidy; repeated runs were byte-for-byte stable - ✅ make lint-binary lint-license lint-message-id lint-queue-shard - ✅ git diff --check -⚠️ Docker-backed integration and end-to-end tests were not run because the Docker daemon socket is unavailable.
## Summary ### Why? Queue-prefixed resource IDs contain URL separators and duplicate scope already carried by the queue, route, and typed field. Resource IDs should remain flexible string contracts rather than forcing Go, protobuf, or SQL resource fields to integer types. ### What? - Store canonical positive decimal strings such as "42" for SubmitQueue request IDs, SubmitQueue batch IDs, and Stovepipe request IDs while keeping resource and reference fields as strings and VARCHAR columns. - Persist counter high-water marks by owner domain, queue, and resource kind; wire Stovepipe to the durable MySQL counter so allocation survives restarts and remains isolated across domains. - Validate direct resource-ID inputs, compare decimal strings numerically where allocation order matters, and update queue contracts, documentation, fixtures, and generated bindings without changing provider IDs, URIs, hashes, or derived event IDs. - Address the verified autoreview findings: scope Stovepipe test queries by queue/tenant and topic, use non-colliding decimal gateway fixtures, fail fast on unexpected request-summary RPC errors, repair stale storage assertions, and cover independent queues reusing the same ID. ## Test Plan - ✅ make build - ✅ make test (127 targets passed) - ✅ make check-gazelle, make check-mocks, make check-tidy, and make lint - ✅ git diff --check - ✅ Fresh Docker run of all 9 integration targets, Runway e2e, and Stovepipe e2e, including the cross-queue ID regression. -⚠️ The complete 12-target integration/e2e run has 11 passing targets. SubmitQueue real-Git e2e still fails because Git rejects the mounted /srv/git/sandbox.git repository as having dubious ownership in this macOS container environment; the non-Git SubmitQueue e2e suite passes. -⚠️ aifx verify could not complete its checks: coverage requires a monorepo .arcconfig, the UReview API failed, and the generic Go lint verifier exited without reporting issues. Repository-native checks above passed.
## Summary ### Why? Queue-prefixed resource IDs contain URL separators and duplicate scope already carried by the queue, route, and typed field. Resource IDs should remain flexible string contracts rather than forcing Go, protobuf, or SQL resource fields to integer types. ### What? - Store canonical positive decimal strings such as "42" for SubmitQueue request IDs, SubmitQueue batch IDs, and Stovepipe request IDs while keeping resource and reference fields as strings and VARCHAR columns. - Keep the existing counter schema and (queue, domain) key unchanged; domain stores the resource type (request or batch). SubmitQueue and Stovepipe have separate storage backends, so no ownerDomain dimension is introduced. Stovepipe uses the durable MySQL counter. - Put the shared formatting, validation, and numeric comparison helpers in platform/base/id. Use resourceType consistently in Go contracts, mocks, tests, and docs without renaming the existing SQL domain column. - Validate direct resource-ID inputs and retain the queue-scoped test fixes and cross-queue ID regression coverage from the prior review pass. Provider IDs, URIs, hashes, and derived event IDs keep their contracts. ## Test Plan - ✅ make build - ✅ make test (127 targets passed) - ✅ make check-gazelle, make check-mocks, make check-tidy, and make lint - ✅ git diff --check - ✅ git diff --quiet 343875c -- ':(glob)**/schema/*.sql' (no schema differences from the RFC branch) - ✅ Fresh Docker tests: MySQL counter integration, SubmitQueue gateway integration, Stovepipe integration, and Stovepipe e2e (4/4 targets passed). -⚠️ The prior full Docker run passed all 9 integration targets and Runway/Stovepipe e2e; SubmitQueue real-Git e2e remains blocked by the mounted sandbox repository's dubious-ownership check. That unrelated Git configuration was not changed or rerun in this comment pass. -⚠️ The prior aifx verify run could not complete its monorepo coverage, generic Go lint, and UReview API checks; repository-native checks above passed.
## Summary ### Why? Queue-prefixed resource IDs contain URL separators and duplicate scope already carried by the queue, route, and typed field. Resource IDs should remain flexible string contracts rather than forcing Go, protobuf, or SQL resource fields to integer types. ### What? - Store canonical positive decimal strings such as "42" for SubmitQueue request IDs, SubmitQueue batch IDs, and Stovepipe request IDs while keeping resource and reference fields as strings and VARCHAR columns. - Keep the existing counter schema and (queue, domain) key unchanged; domain names the sequence (request or batch), not an application. SubmitQueue and Stovepipe have separate storage backends, so no ownerDomain dimension is introduced. Stovepipe uses the durable MySQL counter. - Put the shared formatting, validation, and numeric comparison helpers in platform/base/id. Keep domain naming consistent across the counter contract, implementation, callers, mocks, tests, and docs. - Validate direct resource-ID inputs and retain the queue-scoped test fixes and cross-queue ID regression coverage from the prior review pass. Provider IDs, URIs, hashes, and derived event IDs keep their contracts. ## Test Plan - ✅ make build - ✅ make test (127 targets passed) - ✅ make check-gazelle, make check-mocks, make check-tidy, and make lint - ✅ git diff --check - ✅ git diff --quiet 343875c -- ':(glob)**/schema/*.sql' (no schema differences from the RFC branch) - ✅ Fresh MySQL counter integration run with test-result caching disabled. - ✅ The preceding comment pass also ran SubmitQueue gateway integration, Stovepipe integration, and Stovepipe e2e successfully (4/4 targets including the counter suite). -⚠️ The prior full Docker run passed all 9 integration targets and Runway/Stovepipe e2e; SubmitQueue real-Git e2e remains blocked by the mounted sandbox repository's dubious-ownership check. That unrelated Git configuration was not changed or rerun for this naming-only update. -⚠️ aifx verify could not complete its monorepo coverage, generic Go lint, and UReview API checks; repository-native checks above passed.
behinddwalls
force-pushed
the
preetam/numeric-resource-ids
branch
from
October 2, 2026 22:41
7bb69d3 to
fedc7f9
Compare
This branch has not been deployed
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.
Summary
Why?
Queue-prefixed resource IDs contain URL separators and duplicate scope already carried by the queue, route, and typed field. Resource IDs should remain flexible string contracts rather than forcing Go, protobuf, or SQL resource fields to integer types.
What?
Test Plan
5240af60), preserving the RFC → implementation stack and all six commits.Stack