Skip to content

test(#756): pin Secrets Manager's projection and record it - #1352

Merged
scttfrdmn merged 1 commit into
mainfrom
test/756-secretsmanager-wire-projections
Oct 3, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
test/756-secretsmanager-wire-projections

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

This is the fifth of ten PRs in #756's 3-line block. It is citation only: no production code
changes.

Secrets Manager is already projected

SecretState declares AccountID and Region, plus EverTagged as ever_tagged,omitempty. None of
them reaches a body:

  • DescribeSecret answers smDescribeSecretBody, which emits only the members the page publishes.
  • Every other operation answers a map of published members.

What the new test asserts

emulator/secretsmanager_wire_test.go drives all twelve routed operations with the shared
wireAssertNoMemberJSON. It reads AccountID/Region back, then tags the secret and reads
ever_tagged: true back before walking any response (#938, #1304).

RotateSecret is sent a ClientRequestToken and a RotationLambdaARN. An SDK fills in the token
itself, and a secret with no rotation configured needs the function named. Substrate correctly
refuses a raw request without them.

Negative controls (each run, then restored; secretsmanager_plugin.go verified diff-free)

  1. Region added to smDescribeSecretBody fails exactly DescribeSecret.
  2. The tag write removed fails at the ever_tagged read-back.

The ratchet

before: 319 declared, 255 projected across 106 records, 9 internal across 6 records, 55 still reachable
after:  319 declared, 258 projected across 107 records, 9 internal across 6 records, 52 still reachable

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.

SecretState declares AccountID, Region and ever_tagged, and none reaches a
response: DescribeSecret answers smDescribeSecretBody, which emits published
members only, and every other operation answers a map of published members.

emulator/secretsmanager_wire_test.go drives all twelve routed operations,
tagging the secret and reading ever_tagged back before walking any response.

check-wire-bookkeeping goes from 255 projected across 106 records to 258 across
107, and from 55 still reachable to 52.

#756 stays open.
@codecov

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 5d695cd into main Oct 3, 2026
18 checks passed
@scttfrdmn
scttfrdmn deleted the test/756-secretsmanager-wire-projections branch October 3, 2026 03:50
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