Repository navigation
feat(#756): discharge records no AWS response renders, through a third inventory - #1337
Merged
Merged
Conversation
…d inventory Some records declare a bookkeeping field but never reach an AWS response at all, so no raw-bytes test can say anything about them: a test that an unrelated response omits their members would pass whatever they held, #1304's vacuous assertion applied to a whole record. scripts/wire-bookkeeping-internal.txt records each as a reviewed decision: a kind (request, state or substrate) and an anchor naming the decoder, the reader or the /v1 route that keeps it off every AWS response. check-wire-bookkeeping refuses a line whose type has no baseline entry, whose kind is unknown, whose record the projected file also claims, or whose anchor no longer occurs in a non-test file, and subtracts the rest from still-reachable. Six records, read reader by reader: accountRegionOpt (read only by loadRegionOpt; responses render its Status), accountRegionRequest (decoded by regionInput), orgPendingAccountOutcome (stored and read by pendingCreateOutcome; the response renders the published CreateAccountStatus), Event (rendered by the debug export; Cost Explorer only aggregates it), debugEventSummary (/v1/debug/events) and SESv2CapturedEmail (/v1/emails). Five records that looked internal are not, and stay in the baseline for a projected test: STSSessionCredentials (xmlCreds), CFNStackState (cfnStackItem), CFNChangeSet (CreationTime in DescribeChangeSet and ListChangeSets), and the two stream cursors base64-encoded into ShardIterator. 319 declared, 219 projected, 9 internal, 91 still reachable. #756 stays open.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
scttfrdmn
added a commit
that referenced
this pull request
Oct 3, 2026
…e zero still-reachable the floor (#1367) These are the five records #1337 set aside as reaching an AWS body only through a projection or a token, and each one was confirmed to: - STSSessionCredentials' AccountId reaches none of AssumeRole, GetSessionToken or a session-signed GetCallerIdentity, which publishes the account as Account (emulator/sts_wire_test.go). - CFNStackState and CFNChangeSet reach no response. emulator/cfn_wire_test.go reads the members back first, the account and Region being omitempty, and walks every routed stack and change-set operation. - DynamoDBStreamCursor and kinesisIterator reach a body only base64-encoded in the opaque ShardIterator/NextShardIterator, which is faithful. Each test decodes the token first, requiring the account and Region inside it, and fails the day the cursor is rendered as an object. check-wire-bookkeeping goes from 300 projected across 129 records to 310 across 134, and from 10 still reachable to 0. It now fails on any record that neither file discharges, so zero is the floor and a new record cannot enter the baseline by --write alone. Writing the CloudFormation test found that stack and change-set state keys carry no account or Region; that is #1366. Part of #756. Its acceptance criteria are reviewed on the issue after merge.
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.
This adds the third inventory we agreed on for #756. It discharges records that no AWS response
renders, where no raw-bytes test can say anything useful.
Why a third file
A line in
wire-bookkeeping-projected.txtcites a test that walks every response answering therecord. A record that no AWS response answers has no such response. A test that some unrelated
response omits its members would pass whatever the record held, which is #1304's vacuous assertion
applied to a whole record. So these lines are reviewed decisions, not proofs, and the file says
so in its header.
scripts/wire-bookkeeping-internal.txtColumns are
file struct-type kind anchor, with three kinds:requeststatesubstrate/v1endpoints, where the account and Region are the pointWhat the check enforces
check-wire-bookkeepingrefuses a line:it does not;
emulator/. A renamed reader or aremoved route sends the line back for review.
Negative controls (each run, then restored)
seed/v1/mailsEventXSNSTopicadded (already projected)The six records, read reader by reader
accountRegionOptloadRegionOpt; responses render itsStatus.UpdatedAtis documented "nothing reads it back"accountRegionRequestregionInputorgPendingAccountOutcomependingCreateOutcome; the response renders the publishedCreateAccountStatusEventdebugEventSummaryGET /v1/debug/eventsSESv2CapturedEmailGET /v1/emails;SendEmailanswers onlyMessageIdA correction to my own earlier claim
On #756 I listed the "substrate's own surface" subset as including
cfn_deployer's records,STSSessionCredentialsand both stream cursors. Reading their renderers showed all five reachAWS responses:
STSSessionCredentialsis rendered throughxmlCredsbyAssumeRoleandGetSessionToken.CFNStackStateis rendered throughcfnStackItembyDescribeStacks. ItsCreatedAtfeeds thepublished
CreationTime.CFNChangeSet'sCreatedAtfeedsCreationTimeinDescribeChangeSetandListChangeSets.DynamoDBStreamCursorandkinesisIteratorare base64-encoded into theShardIteratorthatGetShardIterator/GetRecordsanswer.They stay in the baseline and will each be projected with a raw-bytes test. For the cursors that
test is not vacuous: it fails the day a cursor is rendered as an object rather than a token. The
file's header names all five as examples of what does not belong in it, and the script's header
paragraph that described two of these records as "staying in the baseline" is rewritten to point at
the new file.
The figure
Also
wire-bookkeepingjob now says it asserts three files.shellcheckis clean. The anchor search usesgrep -r --include/--exclude, which behaves thesame on BSD and GNU grep.
Verification
All of these pass:
make lint: 0 issues.make test: race,-count=1.docs-reference-check docs-versions version-check discarded-unmarshal-check wire-bookkeeping-check operation-catalog-check operation-docs-check.#756 stays open (91 lines).