transform-deploy-test
Skill329 starsChanged 6 days agoMIT-0View on GitHub
Use when deploy-testing the --headless or --govcloud template transforms (make transform-deploy-test-*).
In this repository42 other files it gives its agents.
- .claude/rules/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-modelSkill
- agent-capability-reviewSkill
- api-rbac-testSkill
- backend-lambdaSkill
- code-reviewSkill
- create-hf-dataset-prSkill
- curate-security-resultsSkill
- cut-release-changelogSkill
- dependabot-prsSkill
- documentationSkill
- extraction-pipelineSkill
- fix-single-issueSkill
- frontend-uiSkill
- full-test-batterySkill
- infrastructureSkill
- live-auth-checksSkill
- live-eval-and-costSkill
- prepare-changelogSkill
- prep-develop-for-releaseSkill
- product-demoSkill
- pr-review-ciSkill
- pr-reviewSkill
- releaseSkill
- release-validationSkill
- remove-classification-flat-keysSkill
- repo-quality-reviewSkill
- run-benchmarksSkill
- run-stack-testsSkill
- srt-security-scanSkill
- sync-pii-anonymizerSkill
- testing-qaSkill
- test-upgradeSkill
- ui-i18nSkill
- update-solution-profileSkill
- ux-test-ciSkill
- ux-testSkill
- ux-test-stories-ciSkill
- ux-test-storiesSkill
- work-the-backlog-hazardsSkill
- work-the-backlogSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this when the user wants to prove a template transform actually deploys — e.g.
- Very specific: line 52
Always AWS_PROFILE=default — see CLAUDE.md.
- Very specific: line 97
Run in a commercial account, govcloud proves the CloudFront-free / API-Gateway-hosted template deploys and processes documents.
- Very specific: line 106
Never report a green commercial govcloud run as "GovCloud works".
- Distinctive: line 119
Run the target, streaming output (it is long — run in the background and poll).
- Very specific: line 135
Check for a surviving reference to something the transform removed (the SuppressAdminInvite class).
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Deploy-test the --headless / --govcloud template transforms
Use this when the user wants to prove a template transform actually deploys —
e.g. "test the headless deploy", "does --govcloud still work", "deploy-test the
transforms", "verify headless end to end", or before cutting a release that
touched template_transform.py, template.yaml, or the nested pattern template.
This is the only test tier that deploys a transformed template and puts a real document through it.
Why this exists (read before reporting a result)
The transforms had three coverage tiers before this, none of which can prove a transformed template deploys:
| Tier | Catches | Misses |
Offline unit tests (lib/idp_sdk/tests/unit/) | dangling refs, cfn-lint errors, GovCloud-illegal resource types | anything that only fails at resource-creation time |
ValidateTemplate on the packaged template (#684, integration tier) | malformed template, unresolved references | same |
Deploy-variant probes (make stacktest-*) | parameter combinations on the standard template | the transforms entirely |
That last row is the trap: the jobsapi probe was once named "headless", but it
tests the additive EnableJobsApi parameter, not the transform. Leftover
-headless stack names in the reaper fixtures come from that old name.
Three real defects landed in this gap — templates valid, transforms successful, failure only once CloudFormation started creating resources:
- #676 —
BDAOCRProjectcreated unconditionally; GovCloud BDA rejects it, root stack rolls back. - #677 — the
--govcloudtransform removed the chat Function URL but left its LWA-dependent handler; 403 onlambda:GetLayerVersionafter ~15 resources. SuppressAdminInvite— a condition referencing the removedAdminEmailparameter broke every--headlessdeploy for six weeks.
The targets
| Target | What it does |
make transform-deploy-test-list | List variants + caveats |
make transform-deploy-test-headless | Deploy a real --headless stack, assert no UI, process a sample doc, tear down |
make transform-deploy-test-govcloud | Deploy a real --govcloud stack, assert no CloudFront/Lambda-URL/LWA handler + UI retained, process a sample doc, tear down |
make transform-deploy-test-all | Both, sequentially |
Variables: REGION=, ADMIN_EMAIL=, STACK_NAME= (validate an existing stack;
no deploy, no teardown), KEEP=1 (leave the stack up), SKIP_DOC_TEST=1
(structural only), JSON_OUT=path. The script also takes
--with-knowledge-base — see the cost section below for why it is off by default.
Always AWS_PROFILE=default — see CLAUDE.md. Confirm the account first:
AWS_PROFILE=default aws sts get-caller-identity.
What it runs
The documented user path, not a reconstruction:
idp-cli deploy --headless --from-code . --wait
idp-cli deploy --govcloud --from-code . --waitSo publish → transform → deploy is all under test, and the CLI handles the
per-variant parameter differences itself — notably that the headless template has
no AdminEmail parameter, and passing one is a CloudFormation
ValidationError.
Cost and duration — tell the user before starting
Each run is a full publish + deploy: SAM build (Docker images, UI bundle) then a complete IDP stack, then teardown. Budget 1–2 hours per variant, and real spend for that window — Bedrock/Textract calls for the sample document plus every resource in the stack.
The dominant avoidable cost is the Bedrock Knowledge Base.
DocumentKnowledgeBase defaults to BEDROCK_KNOWLEDGE_BASE (Create), and the
--govcloud transform forces KnowledgeBaseVectorStore=OPENSEARCH_SERVERLESS —
so a naive run stands up an OpenSearch Serverless collection: minimum-OCU
billing, and the slowest resource in the stack to both create and delete. It has
nothing to do with what a template transform does, so the runner disables the
Knowledge Base by default on --govcloud. Pass --with-knowledge-base (or
KEEP=1 plus a manual deploy) only when you specifically want full fidelity, and
say so in the report — a run without it has not exercised the KB path.
--headless is unaffected: the transform removes the Knowledge Base outright.
Note that both of these parameters are absent from the headless template, so the
runner only ever sends them for --govcloud — passing one to a headless deploy
would be a CloudFormation ValidationError, the same class of mistake as
AdminEmail.
SKIP_DOC_TEST=1 cuts the document-processing time but proves much less; say
which mode was used.
⚠️ The caveat you MUST include when reporting a govcloud result
Run in a commercial account, govcloud proves the CloudFront-free /
API-Gateway-hosted template deploys and processes documents. It does not
prove GovCloud behaviour — partition-correct ARNs, GovCloud model availability,
and the BDA project rejection are all invisible outside us-gov-*. Two of the
three defects above would not have been caught by a commercial run.
For a real GovCloud run: make transform-deploy-test-govcloud REGION=us-gov-west-1
against a GovCloud account. The script is built to run there unchanged.
Never report a green commercial govcloud run as "GovCloud works".
Not wired into CI
Deliberately on-demand (same reasoning as stacktest-*: a ~1h deploy per run,
and these transforms rarely change). The validators and result dicts already
match the probe framework's shape, so wiring in later means calling run_variant
from codebuild_deployment.main or adding a transform-aware PROBE_VARIANTS
row — see the note in scripts/sdlc/transform_deploy_test.py.
How to run and report
- Confirm the account and region, and tell the user the expected duration.
- Run the target, streaming output (it is long — run in the background and poll).
- Report from the printed
TRANSFORM DEPLOY TEST RESULTStable:- PASS/FAIL per variant, the stack name, and every
✓check that ran; - on failure:
failure_type(deployvstest) and the error. Adeployfailure means CloudFormation refused or rolled back — the captured CF events name the root cause; - whether the sample document actually processed, or was skipped via
SKIP_DOC_TEST(a structural-only pass proves much less — say so); - the
govcloudcaveat above, unless the region wasus-gov-*.
- PASS/FAIL per variant, the stack name, and every
- Confirm teardown. The script always tears down unless
KEEP=1; if it was interrupted, check for a leftoveridp-*-headless/idp-*-govcloudstack and its-iamcompanion, and delete both.
Interpreting failures
deployonheadless→ the transform produced undeployable CloudFormation. Check for a surviving reference to something the transform removed (theSuppressAdminInviteclass). The offline gates inlib/idp_sdk/tests/unit/test_template_transform.pyshould have caught it — if they didn't, add the case there too, because that gate is free and this one costs an hour.deployongovcloud→ same, plus the GovCloud-only classes if the region wasus-gov-*(partition ARNs, model availability, BDA project shape).test→ the stack deployed but a promise was broken: UI resources survived--headless, CloudFront/LWA survived--govcloud, the processing core was stripped, or the document did not process. The error names which.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

