Repository navigation
fix(#856): the long tail of draw sites — SSM, RAM, Backup and Bedrock - #1290
Merged
Merged
Conversation
Four generators across four unrelated services move onto IDMint, and 2 draw sites remain on crypto/rand: randomHex and IDMint's own seedless fallback. Three of the four keep the rendering their crypto/rand version produced, because their pages publish no pattern to follow (#671). Bedrock's does not: jobArn is published as model-invocation-job/[a-z0-9]{12}, which excludes the hyphen and fixes the length at twelve, so the UUID substrate minted satisfied neither the ARN pattern nor jobIdentifier. The no-byte-changes rule protects a rendering the model permits and cannot protect one the model forbids. CreateBackupPlan is the only draw site in the tree that mints twice in one request, which gives this tier the ordinal assertion tier 6 had to do without. Refs #856.
6 tasks done
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Tier 7 of #856, and the last of the service families: the long tail — SSM Run Command, RAM, AWS
Backup and Bedrock batch inference. Four generators, four unrelated services, and the tier where the
two rules the earlier tiers balanced finally point in opposite directions.
Three of the four keep the exact rendering their
crypto/randversion produced, because their pagespublish no pattern to follow (#671): an SSM
CommandId(published as a fixed length of 36, whichthe UUID shape already met), the identifier inside a RAM
resourceShareArn, and AWS Backup'sBackupPlanId,VersionIdandSelectionId. Bedrock's does not — see Provenance.Backup brings back the ordinal test tier 6 had to do without:
CreateBackupPlanis the only drawsite in the tree that mints twice in one request, and
UpdateBackupPlanmints a third value thathas to differ from both. A mint ignoring its ordinal would report a plan as its own version.
After this tier, 2 draw sites remain on
crypto/rand:randomHex, whose one caller is theCloudFormation deployer, and
IDMint's own seedless fallback, which goes when the deployer threads arequest ID through. That is tier 8, and it is what lets the fallback be deleted.
Provenance
A Bedrock batch-inference job ID changes shape, and the published model is why.
jobArnispublished as
arn:aws:bedrock:{region}:{account}:model-invocation-job/[a-z0-9]{12}andjobIdentifieras that ARN or a bare[a-z0-9]{12}— an alphabet that excludes the hyphen and alength fixed at twelve. The 36-character UUID substrate minted satisfied neither, so a consumer
validating the ARN it was handed was validating against a value AWS would never issue. #856's rule is
not to change the bytes a caller sees, but that rule protects a rendering the model permits; it
cannot protect one the model forbids. (
GetModelInvocationJob's own sample request showsBATCHJOB1234, which the pattern beside it would reject. The pattern is the model.)An AWS Backup plan ARN's case is observed, not published. AWS's sample is
arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50— an uppercaseUUID where substrate renders lowercase.
BackupPlanIdpublishes no pattern and no length, so this isread off the example. It is recorded beside the existing
backup-planvs.plansegment gap(#1181) rather than folded in here, because it is a rendering question and not one about where the
bytes come from.
Compatibility
A Bedrock batch-inference job ID is no longer a UUID. A test that pins the literal shape of a
jobArn— 36 characters, hyphens,[0-9a-f]— will see twelve characters of[a-z0-9]instead. Atest that round-trips the value substrate hands it, or matches it against the published pattern, is
unaffected and was previously failing the pattern. Nothing else in this PR changes a rendering.
Every identifier this tier moves is addressed by a later call, so a stream recorded before this
change and replayed after it will mint different values — as it would for any tier of #856. Recorded
streams are not portable across a tier; that is what the tiering is for.
Verification
make lint,make test(race), andmake docs-reference-check docs-versions version-check discarded-unmarshal-check wire-bookkeeping-checkwith the ratchet reporting 330. Non-vacuity: withgenerateBackupUUIDalone reverted to a seedless mint, the tier's replay produces 14 differencesand 3 refused reads out of a 10-request stream — a selection is stored under its plan ID, so a
re-minted plan strands the selection as well.
Refs #856.