Repository navigation
feat(aws): SSM receipt row — materialization, store, and observation coverage (#1835) - #1882
Merged
Merged
Conversation
…ype — widen the declaration type
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
Fifth leg of the effect-receipts epic #1703: the first lexicon materialization row. An effect receipt becomes an
AWS::SSM::Parameter— plainString, at/chant-receipts/<stack>/<env>/<effect>— readable withaws ssm get-parameterand read-only IAM, no chant binary.Materialization row (
lexicons/aws/src/effect-receipt-row.ts)EffectReceipt(name, { effect, flavor, inputs })— core's factory signature and semantics (core: EffectReceipt factory + recognition marker + resolution split #1831), landing in the aws partition so the build routes it to the aws serializer. Carries theEFFECT_RECEIPT_MARKER, entityTypeAWS::SSM::Parameter, andprops.Typepinned to the literal"String"— the concrete half of lint: receipt guards — leaf rule, plain store, secrets by pointer, baseline refusal #1833's COR023 guard (aSecureStringfixture fails it; the factory's row passes, covered by tests).receiptParameterName(stack, env, effect)— the single source of the path identity, derived from the same ownership-block fields that stamp markers (epic decision 4). Segments are validated; the serializer row, the store, and the observation leg all call it.SerializeContext.receipts(lifecycle: plan renders effect-will-fire; generic apply never writes a receipt #1832 withholds them from the apply-bound entity set) underMetadata["chant:effect-receipts"]— neverResources, the section appliers write and prune from.Valueis the synthesis-time expectation for a static receipt, a placeholder note for reference-input receipts (never a digest over placeholders, decision 5). Ownership tags are stamped on the row. No ownership, or ownership without env, is an error — the env segment is explicit, never guessed.ReceiptStoreover SSM (lexicons/aws/src/receipt-store.ts)awsReceiptStore(options?)implements core's ops: effect() step builder, effects: gated on ApplyOp, WatchOp stale reporting #1834 seam over the SSM JSON API using the lexicon's own read transport conventions: SigV4 when credentials resolve, and the one endpoint-override rule (aws: read-client doesn't treat AWS_ENDPOINT_URL as an endpoint override; cedar's AVP client does #1694 —endpointoption, elseAWS_ENDPOINT_URL_SSM, elseAWS_ENDPOINT_URL), so Floci lanes work by construction.read= GetParameter (absent →undefined);write= PutParameter, plainString: first write creates with the ownership tags, a later write retries withOverwrite: trueand no tags (SSM refuses both in one call).CHANT_ENV(whatchant run --envsets) and the project'sownershipblock. Nothing resolving errors loudly.receiptActivities(awsReceiptStore())→receiptRead/receiptWrite/receiptStaleness, resolved by name through the activity registry exactly likeensureSecret(feat(k8s): generated-once secret materialization and the retained prune outcome (#1830) #1876's k8s wiring).Observation coverage
describeResourcesgains a receipt leg: a receipt is never a stack member, so the stack read would report it confirmed-absent even while the parameter exists. The leg reads each receipt's rendered path back from the build output's Metadata block and asks GetParameter directly — present maps the stored value ontoattributes.value(core'sRECEIPT_VALUE_ATTRIBUTEfallback shape),ParameterNotFoundstays a real absence, and a failed read reportsunobserved, never a wrong answer. Merged into every return path, including the stack-missing and stack-read-failed branches.Example
examples/local-op-quickstartgainslocal-aws-migrate— the local-aws Floci loop plus a gated one-shot schema seed insideeffect(schemaSeeded, [gate(...), shell(...)]), with the receipt declared inops/receipts.tsandownership: { stack, env }in the config.chant build opsrenders the row at/chant-receipts/local-op-quickstart/local/demo-schema-seed; the README documents the--temporalrun and the plainaws ssm get-parameterread.Testing
npx vitest run lexicons/aws/src— 1541 passed (includes the new row/store/observation suites: path identity, plain String, tags, env-missing error, endpoint override, absent → undefined, String+Overwrite write, barrel wiring, SecureString vs COR023)npm run build -w @intentius/chant-lexicon-awscleannpx vitest run packages/core— 4582 passednpx tsc --noEmit -p packages/core/tsconfig.jsonclean;just lintcleannpx tsx scripts/check-lexicons.ts— no untracked tier-1 failuresnpx vitest run examples/examples.test.ts— 253+ passed, with new shape assertions for the gated migration op; the example's ownnpm run build/npm run lintcleanCloses #1835