agentleFS
aws-solutions-library-samplesaws-solutions-library-samples/accelerated-intelligent-document-processing-on-aws/.claude/skills/release-validation/SKILL.md

release-validation

Skill329 starsChanged 6 days agoMIT-0View on GitHub

Use for 'validate the <version> release': run every live tier and the offline battery against a published release and write the release-validation report.

  • Commits and pushes

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 4 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user says something like "validate the 0.6.8 release", "run the full release validation", "run all the release …

    line 8
  2. Very specific:

    The solution profile is part of the release: Before the battery, confirm make solution-profile-check reports the release rules ON and …

    line 63
  3. Very specific:

    Every AWS call from here on is AWS_PROFILE=default.

    line 78
  4. Distinctive:

    Tell the user the budget: before the first deploy: the full battery stands up and tears down roughly eight stacks and took most of a …

    line 102
  5. Very specific:

    Confirm the release is not about to be superseded: Check open PRs for a fix against the artifact under test (gh pr list --search "is:open …

    line 110
  6. Distinctive:

    Every row is mandatory. A tier you cannot run is reported as NOT RUN with the reason, never dropped from the table.

    line 118
  7. Distinctive:

    Only if that VPC is missing do you stop and ask.

    line 190
  8. Very specific:

    Write the verdict as a model-selection section in config-guidance.md §5: a table with one row per selectable model (cost tier, accuracy, …

    line 318
  9. Very specific:

    F4 — regenerate the docs: After F1–F3, every file in docs/benchmarking/ is brought to v<VERSION>:

    line 329
  10. Very specific:

    Run the same flows again in French (Canada), switching the language as ux-test.md says ("Reviewing in French (Canada)", the switch …

    line 363
  11. Very specific:

    Run them on the same account and region as the reference stack, after tier E so the stack is at v<VERSION>.

    line 393
  12. Very specific:

    When a v<VERSION> stack exists: make security-results against it, then the tier-G UX review on the same stack (it needs nothing else …

    line 575
  13. Very specific:

    Never report a failure count without saying whether the environment was correctly installed, never call a failure pre-existing without …

    line 676

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Release Validation — the whole battery for a published release, in one request

Use this skill when the user says something like "validate the 0.6.8 release", "run the full release validation", "run all the release regression, security and benchmark tests", "run everything against the release — functional, upgrade, govcloud, headless, benchmarks, security", or "is the release good?". It is the umbrella over every per-tier skill in this directory: it fixes the tier list, the order, the stacks, the four deliverables that come out, and the PRs that carry them.

The user gives one sentence. You run every tier below, write the four deliverables, open the PRs, and report back in the shape under Reporting. Do not ask which tiers to run — the tier list is the deliverable. Ask only for the two things you genuinely cannot infer (see Inputs), and only if they are not already in the request.

The tiers, and what each is the only source of. A release is validated when every tier has a row in the record — including any that could not run, with the reason.

TierThe only thing it proves
AOffline gates — SRT, make test, lint, typecheck, dep-audit, build, coveragethe tree is self-consistent and packages cleanly
BSecurity — SRT + RBAC static + RBAC dynamic + ZAP, curatedauthorization and the deployed API surface
CDeploy variants — hosting global/private, WAF, Jobs API, tenant isolation, sellerthe template deploys in each shipped configuration, and TenantIsolationMode=Strict keeps tenants apart
DTemplate transforms — --headless, --govcloudthe transformed templates deploy and process a document
EIn-place upgrade PREV → VERSIONthe customer upgrade path, and what it changed in extracted values
FBenchmarks — release A/B, then the guidance refreshwhether this release regressed, and what a customer should configure
GBrowser UX reviewwhether a person can complete the web-UI flows
HLibrary integration testsidp_common against real AWS rather than moto
ITerraform property paritya Terraform deployment of the release stores what a CloudFormation deployment of it stores
JMigration from genai-idp-terraforma deployment of the separate upstream Terraform implementation moves onto this release's module in place, keeping its data, users and passwords
KIn-place Terraform upgrade PREV → VERSIONthe Terraform customer's upgrade path: pointing an existing deployment at this release's module replaces no bucket, table, user pool or key, and loses no data

What "validated" means here. docs/release-validation/README.md defines the tier list and the record format; docs/release-validation/v0.6.6.md is the worked example to copy. The artifact under test is the published template idp-main_<VERSION>.yaml, not a local build — every stack is created from that object except the two transform tiers, which must publish from source to apply the transform. Check the template's Description says (v<VERSION>) before you start.

This skill validates a release; it does not publish one. The publish procedure — scripts/aws-release.sh, the four public buckets, the mutable vs version-pinned keys, and the failure/recovery paths — is in docs/release-runbook.md. If the artifact under test does not exist yet, that runbook is what produces it.

Inputs

InputWhere it comes from
VERSIONthe repo VERSION file; must match the newest ## [x.y.z] in CHANGELOG.md
PREVthe previous published release — the next ## [x.y.z] heading down in CHANGELOG.md. Not a .dev/.rc
Template URLsgrep -nE "idp-main_<VERSION>\.yaml" CHANGELOG.md — never hand-type them
REGIONus-west-2 unless told otherwise (the deploy-target memory / test-upgrade.md)
ADMIN_EMAILgit config user.email unless the user gave one
Live stack for the security tieran existing stack already at v<VERSION> if one exists (check Description via describe-stacks); else the benchmark stack once it is up

Nothing else needs asking. VPC wiring, the seller region, and the benchmark stack are all decided below.

The solution profile is part of the release. Before the battery, confirm make solution-profile-check reports the release rules ON and passing (the profile was reviewed with update-solution-profile), and after the GitHub Release exists, that gh release view v<VERSION> --json assets lists solution-profile-genai-idp-accelerator-<VERSION>.tar.gz and its .sha256. Record both in the validation record.

Preflight — ten minutes that save a day

  1. Credentials and account. Stale env creds shadow the profile, so unset them in the same command:
    unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN AWS_SECURITY_TOKEN AWS_CREDENTIAL_EXPIRATION
    AWS_PROFILE=default aws sts get-caller-identity      # must be the deployment account
    Every AWS call from here on is AWS_PROFILE=default. unset does not persist between Bash tool calls — prefix each call that fails with it.
  2. Python environment. source .venv/bin/activate (or lib/idp_common_pkg/.venv) and export PYTHONPATH=$PWD/lib/idp_common_pkg. A sibling idp2/idp3 checkout is commonly installed editable — a bare python tests the WRONG tree. Install the test extras before believing any failure (full-test-battery.md gotcha 1).
  3. Run SRT before you build — and run setup first. CI=1 python scripts/srt/setup.py && make srt-scan. make srt-scan alone merges into whatever gitignored .srt/issues.json is already there; if that state predates suppressions committed to scripts/srt/issues.json, the scan re-opens them and the gate reads red (v0.6.8: 10 false open HIGH). make srt-setup copies the committed register in — but without CI=1 it prompts for an AWS profile, and interrupting that prompt deletes SRT's config and scanner venv. Scanning a tree with .aws-sam/ output is fine (those hits are labelled LOCAL-ONLY), but scan first, publish.py second.
  4. Confirm the published artifact. curl -sI <TO_URL> returns 200, and its Description line contains (v<VERSION>).
  5. Check IAM role headroom — it is the binding constraint on parallelism. aws iam get-account-summary --query 'SummaryMap.[Roles,RolesQuota]'. Each IDP stack creates ~121 roles (158 with every feature on); budget ~160 per in-flight stack. At v0.6.8 the account sat at 1,740/2,000 and five concurrent deploys failed two tiers on RolesPerAccount. The quota (L-FE177D64) is adjustable and a request to 3,000 was auto-approved in minutes — request it up front if headroom is under two stacks' worth. Note the standing stacks in other regions too: roles are global.
  6. Tell the user the budget before the first deploy: the full battery stands up and tears down roughly eight stacks and took most of a working day for v0.6.6 and about seven hours for v0.6.8, with real Bedrock/Textract spend on the benchmark side (corefast is 19 cells × 3 repeats × 3 docs per side, ~$32 a side). Tiers A–E and G fit in that first day; tier F2/F3 is a second day on its own — 3,455 runs and $2,114 at v0.6.8 — so give the run count and rough cost from run_matrix.py --estimate over every planned suite before launching any of it, and name what you would cut first if the answer is too expensive.
  7. Confirm the release is not about to be superseded. Check open PRs for a fix against the artifact under test (gh pr list --search "is:open label:bug", and read the [Unreleased] CHANGELOG section). A defect serious enough to warrant a patch release makes the expensive half of tier F throwaway work — better to know before spending two days than after. See the warning under Outputs.

The tiers

Every row is mandatory. A tier you cannot run is reported as NOT RUN with the reason, never dropped from the table. Long-running commands go detached (setsid nohup … > scratch/<tier>.log 2>&1 &) and are polled — the tool kills background children when memory is tight, and a killed deploy leaves a stack up.

A. Offline (no AWS) — run first, in parallel with the first deploy

TierCommandPassPer-tier skill
SRTmake srt-scan (BEFORE publish)0 open/reopened HIGH in tracked sourcesrt-security-scan.md
Unit + integration suitesmake testall test roots green — Expected standing failures: 0, and the accepted-failure table in full-test-battery.md is empty. That table is authoritative; scripts/tests/test_standing_failure_baseline.py fails if this number disagrees with itfull-test-battery.md
Lintmake lint-cicdexit 0—
Dependency auditmake dep-auditnothing at or above HIGH—
Type checkmake typecheckcompare totals against develop's baseline (4 errors / 51 warnings on 2026-09-11); file placement shifts with the installed deps. Report the delta, not the raw countfull-test-battery.md
Build + packagepublish.py … --clean-build in a clean env (env -i HOME=$HOME PATH=/usr/local/bin:/usr/bin:/bin AWS_PROFILE=default bash -lc '…')template validation + cfn-lint clean on all packaged templatesfull-test-battery.md
Agent capability auditfollow agent-capability-review.md (one subagent per manifest entry; reads code only, writes only under scratch/)every entry in scripts/tests/agent_capabilities.yaml re-verified against the code, and the diff against the manifest is empty or each line of it is a manifest edit in this release's validation PR. The release record carries the counts only (entries checked; verified, inferred and unverified; diff lines), never the findings' textagent-capability-review.md
Test coveragemake coverage-all then make check-coverage-debtevery measurable tree measured, and the ratchet green. Record the per-tree table in the release record and diff it against PREV's — a tree that lost coverage is a finding even when the ratchet's 1% tolerance absorbs itfull-test-battery.md
Translation coveragemake ui-i18n-coveragefr-CA lists nothing missing or stale; if it does, the catch-up before the cut did not happen, which the record states as a finding. The figure itself belongs in the release's CHANGELOG section, not in the recordprepare-changelog.md, ui-i18n.md

The build is needed anyway: the transform tiers publish from source, and the self-deploy stack-tests take its idp-main.yaml URL as TEMPLATE_URL.

⚠️ Measure coverage, do not report make coverage-summary. That target prints the figures recorded in scripts/coverage_debt.json, which is a ratchet baseline — a floor written when the debt was last paid down, not a measurement of the release in front of you. make coverage-all is what measures every tree in the registry; make coverage-table COVERAGE_ARGS=--tree=NAME prints one tree from the last run without re-measuring. Quoting the recorded number as the release's coverage is the same class of error as quoting filesAnalyzed from memory, and it cannot fail visibly — the baseline is always self-consistent.

The coverage subsystem is newer than most of this battery (#1160, 2026-09-22, in the 0.6.10 cycle) and it carries no CHANGELOG entry, so it is easy to miss that it exists at all: a registry of measurable trees, a per-file ratchet with a 1% tolerance, and make check-coverage-debt failing when a file loses coverage or a new module arrives unratcheted. make test does not produce a coverage report, so without this row a release ships with no coverage figure measured at all — which is what happened up to and including v0.6.10, where idp_sdk sat at a recorded 36.61% over 51 files, the lowest of them and the one worth watching in the record.

B. Security (against a live stack at v<VERSION>)

make security-results STACK_NAME=<stack> REGION=<region>     # SRT + RBAC static + RBAC dynamic + ZAP, then curates

Writes security/test-results/<VERSION>/ (MANIFEST + four reports). Pass SKIP_SRT=1 and let it curate the tier-A scan already in .srt/issues.json — the wrapper calls make srt-scan without make srt-setup, so run on a stale .srt/ it would stamp the false-red from preflight step 3 into the snapshot. Review the redactions before committing. Gate values to compare against security/test-results/<PREV>/: SRT open/reopened HIGH, RBAC static fail/warn, RBAC dynamic check count and hard fails, ZAP High/Medium. Any movement from PREV is a finding, up or down. Skill: curate-security-results.md; per-test triage in api-rbac-test.md and run-stack-tests.md.

C. Deploy variants (each self-deploys from the published template, validates, tears down)

URL=<published idp-main_<VERSION>.yaml>
make stacktest-hosting-global  TEMPLATE_URL=$URL REGION=<region> ADMIN_EMAIL=<email>
make stacktest-waf             TEMPLATE_URL=$URL REGION=<region> ADMIN_EMAIL=<email>
make stacktest-hosting-private TEMPLATE_URL=$URL REGION=<region> ADMIN_EMAIL=<email> VPC_ID=… SUBNET_IDS=… LAMBDA_SG_ID=… APIGW_VPCE_ID=…
make stacktest-jobsapi         TEMPLATE_URL=$URL REGION=<region> ADMIN_EMAIL=<email> VPC_ID=… SUBNET_IDS=… LAMBDA_SG_ID=… APIGW_VPCE_ID=…
make stacktest-tenancy         TEMPLATE_URL=$URL REGION=<region> ADMIN_EMAIL=<email>
make stacktest-seller                                    # REGION deliberately UNSET — see below
  • VPC wiring. Reuse the account's purpose-built stack-test VPC: the one whose security group is named idp-stacktest-vpce-sg, with two private subnets and an execute-api interface endpoint. Discover it with the describe-* calls in run-stack-tests.md and state in the record which VPC was used (redacted). Only if that VPC is missing do you stop and ask; never create one unasked.
  • Tenant isolation records its tally. stacktest-tenancy deploys a TenantIsolationMode=Strict stack and runs the verify-tenant-isolation harness; write its <passed>/<total> into the record, and treat a row count that moved from PREV as a finding to explain, as for the RBAC check count. It creates two IAM roles and an access point stack of its own and removes them; after an interrupted run, check for leftover idp-tiv-uploader-* roles.
  • Seller: REGION is still left unset, but no longer to dodge a bug. stacktest.sh now forwards --region to dynamic_activation_test.py, with a comment naming the hazard, so the three refusal assertions can no longer pass vacuously on API Gateway's own SigV4 403 outside us-east-1; and teardown now sweeps /aws/apigateway/idp-seller-entitlement-citest-activation itself, so the pre-run and post-run manual deletes are gone. Both were open through v0.6.9 and both were verified fixed at v0.6.10. us-east-1 remains the default because that is where the synthetic product registry lives. What the tier still does not cover: the positive path — a token issued and verified — needs --entitled-profile, and teardown leaves a KMS key pending deletion on a 7-day window that keeps billing.
  • Concurrency. At most two stack deploys in flight at once, and never more than the IAM role headroom allows (preflight step 5). Six at once is what burst the account's control planes (Logs create-consistency, CodeBuild role-trust propagation, IAM CreatePolicy rate) and produced failures unrelated to the code — the reason these left CI. With the quota raised, v0.6.8 ran three at once without incident; the role count, not the rate limits, was what actually bit.
  • After the VPC tiers, sweep orphaned ENIs (describe-network-interfaces --filters Name=status,Values=available in that VPC; delete the ones whose description names a deleted idp-* stack). They accumulate silently and will eventually block a VPC/SG delete.

Skill: run-stack-tests.md.

D. Template transforms — the only tier that deploys a transformed template

make transform-deploy-test-all REGION=<region> ADMIN_EMAIL=<email>     # --headless then --govcloud, real document each

Both run idp-cli deploy --headless|--govcloud --from-code . --wait, process samples/lending_package.pdf, and tear down. Report every ✓ check and whether the document actually processed (never SKIP_DOC_TEST=1 for a release record).

⚠️ The --govcloud result is a commercial-partition result. It proves the CloudFront-free, API-Gateway-hosted template deploys and processes documents. It proves nothing about partition ARNs, GovCloud model availability or the BDA project rejection (#676/#677 were invisible to a commercial run). The record must carry this caveat verbatim and list "real GovCloud" under What was NOT validated, unless the run was REGION=us-gov-west-1 with GovCloud credentials. Also state that the Knowledge Base was disabled in the --govcloud run (runner default) unless --with-knowledge-base was passed.

Skill: transform-deploy-test.md.

E. In-place upgrade PREV → VERSION

The customer path, on a fresh throwaway stack (IDPUpg<PREV><VERSION>): deploy the published PREV template → process lending_package.pdf → update-stack to the published VERSION template with UsePreviousValue=true on every parameter → process the same document → diff the outputs. Record: parameter-set diff (added / removed / newly required), UPDATE_COMPLETE with no rollback, Description now (v<VERSION>), and the per-section field / null / value-difference counts (the v0.6.6 record's table). Tail the UpdateDefaultConfig Lambda during the update; it is where upgrades deadlock. Pull the S3 outputs before teardown — an UPDATE_COMPLETE that silently broke extraction is still a regression, and you cannot prove otherwise once the bucket is gone.

Skill: test-upgrade.md (including rollback-deadlock recovery).

Tiers K and J below ask this question of a Terraform customer, and unlike this tier both are scripted end to end: K is the same upgrade (an existing deployment of the module pointed at this release's), and J is the move from the separate awslabs/genai-idp-terraform implementation onto the module.

F. Benchmarks — the release A/B and the full documentation refresh

Tier F has two halves and both are mandatory. F1 answers "did this release regress?" and F2 answers "what should a customer configure on this release?" — the second is the one that was skipped at v0.6.8, leaving config-guidance.md headed Release: v0.6.7 and the newly selectable premium models with no published measurement at all. The deliverable is every document under docs/benchmarking/ regenerated from data measured on the published build, not just the A/B entry.

Everything in F runs on the reference stack at v<VERSION> (the upgraded stack from tier E). Run run_matrix.py --estimate for every suite first, add them up, and tell the user the run count and rough cost before launching — F2 is the expensive part of the whole battery (v0.6.7's refresh was 20+ suites). Do not trim the list to save money without saying so in the record; a trimmed refresh is reported as a trimmed refresh.

F1 — release A/B PREV → VERSION. Same published templates, byte-identical configs, only the code version differs. corefast, repeats: 3, --native-upload, both sides; aggregate.py --compare against the PREV summary; --figures-compare; promote baseline.json. Reuse the upgrade stack from tier E for the NEW side; run PREV on that stack before update-stack, or on a sibling stack created from the same PREV template (say which, and read wall-time deltas accordingly). Because the configs are built from the current repo's defaults, a fix that ships as default config (prompt text, a default knob) is on both sides and cancels out — state that explicitly and point at the prerelease comparison for the combined effect.

  • If docs/benchmarking/releases/v<VERSION>.md already exists as a prerelease audit, do not add a sibling file. Re-run against the published template and rewrite it as the release entry, keeping the prerelease measurements as a clearly labelled section. One file per release, never overwritten by a later release.
  • Results → benchmarks/results/v<VERSION>/corefast/; figures → images/benchmark-v<VERSION>-*.png; a row at the top of releases/README.md.

F2 — guidance-paper refresh on the published build. These are the suites the paper's sections are computed from; each result set goes under benchmarks/results/v<VERSION>/<suite>[__<override>]/ per RETENTION.md:

Paper sectionSuite(s)What it establishes
§2 configuration matrixcoresynth (19 cells × 7 synthetic docs)the cross-config grid: OCR × mode × assessment, plus the §2b feature-option arms (enforcement, forcing, schema restatement, section splitting)
§2 real-world accuracycore (= coresynth + the RealKIE and OCR-benchmark reference corpora) — run core instead of coresynth when budget allows, it is a superset; also detection-real-corpora and forcing-real-corpus if those studies are citedlabelled-corpus accuracy, not just synthetic exact-GT
§2.1 / §6 standing hazardsintconf, advverify (--set extraction_model=sonnet5)the two silent list-loss hazards, with repeats — the paper must say whether each is still open
§3 scalingscaling (simple vs advanced across 100→3,200 rows) — expect simple-mode cells above the single-response limit to fail; that is the findingwhere each mode's completeness cliff sits on this release
§4 cost level and variancecost (n≥5, same 400-row doc), at the control model and --set extraction_model=sonnet5 (the shipped default)cost mean ± CV per cell, so the guide can say "budget as a range"
§7 knob sectionsthe feature A/B suites whose knob changed in this release (enforcement, forcing, splitcost, boundary*, multiinstance, sizerab, …) — read the CHANGELOG and re-measure every knob it touchedone-knob deltas on identical code

F3 — model coverage: premium and lightweight, with a when-to-use verdict. The models a customer can select must each have a measured row in the guide, and the guide must say, from the data, when the cheap end is enough and when the premium end earns its price. Three pieces:

PieceRunsOutput in the guide
extraction-model sweep — coresynth --set extraction_model=<m> for every value in the matrix's sweeps.extraction_model axis (today nova_lite, nova_pro, sonnet5, sonnet5_1m, opus5, opus55, astra; Sonnet 4.6 is the control). Read the axis, do not trust this list: it is a convenience copy and the count beside it is what makes a stale copy invisible — the sweep would simply run one model short. A model that cannot run the agentic path (the Nova models — #895) never finishes coresynth; run simplegrid --set extraction_model=<m> for it instead and say so in the table7 × 133 (or 63)a model table: recall, cell accuracy, typed accuracy, cost/doc, wall, mean confidence and % below 0.9 — same grid, same docs, so rows are comparable
premium head-to-head — astravalue (Sonnet 5 vs GPT-6 Astra vs global. Astra, simple + advanced, 4 docs 3–26 pages, 5 repeats) and astracap (the 66-page ceiling, 25-page-shard arms)100 + 12"Is a ~4× model worth it?" — answered as a ratio (accuracy gained per dollar) per document size, including the capacity band where only the 1M-context model completes in one request
classification / confidence model sweeps — coresynth --set classification_model=<m> and --set confidence_model=<m> over their axes (nova_2_lite, sonnet5, haiku45; nova_lite, nova_2_lite, sonnet5)3–4 × 133 eachwhich lightweight model is enough for classification and the confidence pass, and what upgrading it buys

Write the verdict as a model-selection section in config-guidance.md §5: a table with one row per selectable model (cost tier, accuracy, completeness at each document size, cost/doc, latency, context ceiling in pages) and a short recommendation per document profile — small forms, ≤100-row statements, 400–800-row statements, 1,000+-row / 25+-page packets — naming the cheapest model that is at ceiling accuracy for that profile and the point at which a premium model is the only one that completes. If a premium model does not beat the default at ceiling, the guide says so; the suite is built to be able to say "no". Every claim carries n, the spread, and cells_compared (a null column scores 1.000 — see benchmark-metric-blindspots).

F4 — regenerate the docs. After F1–F3, every file in docs/benchmarking/ is brought to v<VERSION>:

  • config-guidance.md — header (Release, Stack, Pricing sha), §1–§7 re-cited from benchmarks/results/v<VERSION>/…, the new §5 model-selection section, and Appendix A listing the exact directory behind every section. A section whose data was not re-measured keeps its old numbers and says so in its first sentence.
  • index.md — the suite table and the "Which models are actually measured" table (flip ❌/"added" to ✅ with the run date; a model still unmeasured stays ❌ with why).
  • releases/v<VERSION>.md + releases/README.md (F1).
  • classification-confidence.md, prompt-caching.md, feature-multi-instance.md, and any other paper in the folder whose numbers came from a knob F2 re-measured.
  • Figures: aggregate.py --figures / --figures-compare; copy what you cite to images/benchmark-v<VERSION>-<name>.png.

Skill: run-benchmarks.md (procedure, cross-version config compatibility, retention, honesty rules). Read benchmarks/matrices/METHODOLOGY.md before writing a number.

G. UX review in a browser (on the tier-B stack, after it is healthy)

The one tier a script cannot stand in for: whether a person can complete the web-UI flows on this build, and how it feels doing so.

make ux-test STACK_NAME=<the v<VERSION> stack> REGION=<region>   # throwaway Cognito user + session

Then drive scripts/ux_flows.yaml in the debug Chrome per ux-test.md. Scope for a release record: flow 1 (sign-in → upload → results) always, plus every flow whose UI changed this release — read the release's CHANGELOG.md section for src/ui/ changes and say which flows you chose. Report functional pass/fail per flow and the ranked usability findings; a flow that is blocked because the feature is only on an unmerged branch is blocked, not broken, and the record must say which.

Run the same flows again in French (Canada), switching the language as ux-test.md says ("Reviewing in French (Canada)", the switch signin.set_locale makes), and report what only the French shows. make ai-ux-translation-review STACK=<the stack> LOCALE=fr-CA adds an unattended, look-only review of every screen a URL reaches, on Bedrock within its MAX_USD cap (see the i18n README's "Reviewing translated screens").

Optionally record it (scripts/ux_recorder.py start … mark … stop, then render) — useful when a finding is easier to show than to describe. The session directory stays in gitignored scratch/ux-recordings/: its mp4 shows real documents from a live stack, and its click log labels clicks with text from the page (Privacy in ux-test.md), so none of it is ever committed or attached to a PR, and render's click table stays out of the record. Link nothing; describe the finding in the record and keep the video for the team channel.

Skill: ux-test.md.

H. Library integration tests (against the reference stack)

The suites marked @pytest.mark.integration are excluded from make test and from GitHub CI, and GitLab runs them in a job of its own with AWS credentials (integration_tests). So a release validated with tier A alone has never run them against the artifact under test — they are the only tier that exercises idp_common against real Bedrock, Textract, S3 and DynamoDB rather than moto.

cd lib/idp_common_pkg && make test-integration      # needs AWS; point it at the reference stack's region
cd lib/idp_cli_pkg   && python -m pytest -v -m integration

Run them on the same account and region as the reference stack, after tier E so the stack is at v<VERSION>. Record the count and every failure. Two things to get right:

  • Pin PYTHONPATH to this checkout (make does it via PYTHONHERMETIC; a bare pytest does not) or the run measures whichever tree site-packages points at. See the note under A run measures the checkout you started it from in CLAUDE.md.
  • A test that skips for a missing resource is not a pass. Count skips separately and say what was skipped; an integration suite that silently degrades to zero executed assertions is the failure mode this tier exists to avoid.

Skill: testing-qa.md for the markers and fixtures.

I. Terraform property parity (two deployments of VERSION, same parameters)

Deploy the release twice in the same account and Region with the same parameters: once with CloudFormation (the tier-B stack will do if its parameters are recorded) and once with idp-cli deploy --terraform --stack-name <tf name> from the published module. Then:

make terraform-parity CFN_STACK=<cfn name> TF_STACK=<tf name> REGION=<region>

It reads every resource of both, main and nested stacks (the Terraform side through its label stack's resource directory), through Cloud Control and, for functions, the Lambda API, and diffs them with the names that necessarily differ normalised away. Pass: exit 0, which means no unexplained difference, no resource on one side only, and no stale entry in terraform/tools/parity_baseline.json. A difference is a finding to fix in the translator; add a baseline entry only for a difference that is the same configuration stored differently, one entry per type and property path, with the reason. Record in the release record the compared count, the explained and unexplained counts, and the types Cloud Control could not read (listed, not compared). Tear both deployments down afterwards (idp-cli delete --terraform for the Terraform one). It is read-only; the deploys are what cost money.

J. Migration from genai-idp-terraform (in place, onto the release module)

The Terraform counterpart of tier E, for customers of the separate awslabs/genai-idp-terraform implementation: docs/terraform-migration.md, run by a script rather than by hand. It needs the release's module zip URL, which idp-cli publish --terraform prints (for a published release, the versioned idp-terraform-<VERSION>.zip the release's idp-terraform-latest.json pointer names), and two unused names:

make stacktest-terraform-migration OLD_NAME=gitfN NEW_NAME=gitfnewN \
    TERRAFORM_MODULE_URL=<module zip url> REGION=<region> \
    WORK_DIR=<a directory outside /tmp> TERRAFORM_BIN=<terraform 1.7+>

The driver (scripts/sdlc/terraform_migration_test.py) clones upstream at the tag and commit it pins, deploys examples/unified-processor as OLD_NAME, seeds it (lending_package.pdf and a W-2 processed, an Admin and a scoped Author with random passwords and @example.com emails, one configuration edit through the API, a baseline and a test set), turns the agent-jobs table's old time-to-live off (the guide's hazard; DynamoDB accepts that only about an hour after upstream enabled it, and the module's setting only about an hour after that; the passing run took 166 minutes, 76 of them those two waits), snapshots every kept bucket and table once the frozen old deployment has stopped writing, and runs each phase of idp-cli terraform migrate-from-genai-idp-terraform in the guide's order with --apply, including restore-config. It then verifies, destroys the old deployment through its own Terraform after check-destroy passes, checks the adopted resources survived that, and destroys the new deployment with idp-cli delete --terraform, sweeping what either retained by name. A failed phase still tears down (KEEP=1 or STOP_AFTER=<phase> keep the deployments; RESUME=1 continues from WORK_DIR, never past a failed verify).

Pass: exit 0 and result.json status PASS, which means every phase passed, the snapshot compare found no lost or changed object or item beyond the named changes the migration makes (the two configuration counters fix-config removes, the profiles restore-config restores, the configuration rows every deploy rewrites, and the attributes the module's index backfill adds to tracking rows), both users signed in to the new app client by SRP with their old passwords and kept their scope, the new document ran on the new state machine and not the old, and the leftover check found nothing. Record the per-phase table from summary.txt (status and minutes), the adoption plan's import / add / change / destroy counts from the migrate-apply row, and any finding. Check the IAM role count against the quota first: the two deployments hold several hundred roles between them for the length of the run. On GitLab it also runs on the weekly Terraform-migration schedule, while that schedule is active; see scripts/sdlc/docs/CI_TEST_COVERAGE.md.

K. In-place Terraform upgrade PREV → VERSION (one deployment, two modules)

The Terraform counterpart of tier E, and the tier a Terraform customer feels at every release: they already run PREV and they point the module at VERSION. Tier I compares two fresh deployments and says nothing about that path.

make stacktest-terraform-upgrade STACK_NAME=tfupN ADMIN_EMAIL=<you>@example.com \
    FROM_MODULE_URL=<PREV module zip url> TO_MODULE_URL=<VERSION module zip url> \
    REGION=<region> WORK_DIR=<a directory outside /tmp> TERRAFORM_BIN=<terraform 1.7+>

Both URLs are the versioned idp-terraform-<version>.zip objects each release publishes beside its templates; the previous release's is the one its idp-terraform-latest.json pointer named before this release moved it. The driver (scripts/sdlc/terraform_upgrade_test.py) deploys FROM_MODULE_URL with idp-cli deploy --terraform, seeds it the way tier J seeds upstream (two sample documents processed, an Admin and a scoped Author with random passwords and @example.com emails, one configuration edit through the API in a profile of the test's own, tfup-edited, a baseline and a test set), snapshots every bucket and table once the deployment has stopped writing, then runs idp-cli deploy --terraform again against TO_MODULE_URL — with neither --parameters nor --admin-email, so the remembered parameters are exercised, and never with --terraform-allow-replace-stateful, so a plan the deploy guard refuses fails the run and names the addresses. It then destroys the deployment and sweeps what it retained. A failed phase still tears down (KEEP=1 or STOP_AFTER=<phase> keep it; RESUME=1 continues from WORK_DIR).

Pass: exit 0 and result.json status PASS, which means the upgrade applied, every bucket, table, user pool and key still has the physical identity it had before (matched by name, so a resource a moved block relocated passes and a replaced one does not), the snapshot compare found no lost or changed object or item beyond the rewrites an upgrade makes by design (each a named rule in the driver's UPGRADE_REWRITES and upgrade_item_change: the per-run custom-resource records, the label template, the configuration library and sample copies, the web UI entry page, and the configuration rows every deploy rewrites, default among them, which an upgrade re-saves from the preset as a new revision) and the attributes the index backfill adds, both users signed in with their old passwords and kept their scope, the configuration edit in tfup-edited survived, the label stack's description names VERSION, and a document uploaded after the upgrade reached COMPLETED on the deployment's own state machine. Record the per-phase table from summary.txt, the upgrade plan's add / change / destroy counts, and any finding.

⚠️ A refusal is a release finding, not a test defect. The guard refuses a plan that would delete or replace a data-holding or retained resource, and that is exactly what a customer upgrading would hit, so report the addresses and what the release did to them rather than re-running with the override. One measured shape: turning a feature's parameter back off deletes the resources that feature created, which CloudFormation would also do — the finding is then the parameter, not the module.

Operating a multi-hour run — what actually goes wrong

The tiers above are the easy part. A full battery is two days of wall clock with hundreds of AWS-bound runs in flight, and every serious problem in the last two passes was in running it, not in the tests. Five rules, each of which cost a pass to learn.

  1. Assume the host will restart, and make progress resumable. A 0.6.10 pass lost 11 hours to a host patch reboot that killed six benchmark lanes mid-suite; the session's scheduled wake-ups died with them, so nothing reported the loss. Keep a state file naming every suite and its planned run count, and on every check compare launched against planned per suite — runmap.json records suite, overrides and the launched list, so a killed lane is detectable from the tree alone. A lane that died looks exactly like a lane that is merely slow if you only watch for errors.
  2. Never score while anything is still running. aggregate.py happily scores a partial run and writes a summary that looks complete. One premature score_all left seven grids on disk with 117 of 133 rows and no marker saying so. Score after the last lane exits, and re-score everything at the end rather than trusting what is already there.
  3. Name lane logs by the axis, not the override value. coresynth with extraction_model=sonnet5, classification_model=sonnet5 and confidence_model=sonnet5 are three different measurements whose value is the same string; a log slug built from the value alone sends all three to one file and three concurrent writers destroy it. Use the <axis>-<value> slug make_configs.py already uses for its config files, which is also what RETENTION.md requires for the scored directory.
  4. Check git rev-parse --abbrev-ref HEAD before attributing any offline result, and prefer a worktree. Several assistant sessions may share this checkout; during the 0.6.10 pass another session moved it onto a feature branch mid-run, so the tree the gates had measured was no longer the tree on disk. Record the commit each gate ran at, never "the current tree", and do the writing in git worktree add so a PR cannot pick up another session's uncommitted work. Stage named paths; never git add -A here.
  5. Do a failure census before writing a single guidance number. Count non-COMPLETED rows across every scored set, then attribute each group before drawing any conclusion. In the 0.6.10 pass the raw rate was 4.1%, of which nearly half were a pre-existing study's sets where failure is the measured outcome, three were scaling's by-design simple-mode cliff, and the rest traced to one product defect — three different meanings that a single percentage hides.

Long drivers go detached (setsid nohup … > scratch/<tier>.log 2>&1 &) with PYTHONUNBUFFERED=1, because the tool kills background children under memory pressure and run_stacktest.py/run_matrix.py buffer stdout when redirected — the verdict appears only at exit. Track progress from CloudFormation and runmap.json, not the log.

Ordering across two days

  1. Preflight → make srt-scan → start publish.py --clean-build detached.
  2. While it builds: make test, make lint-cicd, make dep-audit, make typecheck, and make coverage-all + make check-coverage-debt (the coverage sweep measures every tree and is the slowest of the offline gates — start it early and leave it).
  3. Deploy the upgrade PREV stack (long) and the transform headless run, two in flight.
  4. When a v<VERSION> stack exists: make security-results against it, then the tier-G UX review on the same stack (it needs nothing else deployed, and the browser session is cheap to hold open while the stack-tests run).
  5. Stack-tests two at a time; seller last (different region, no VPC).
  6. Upgrade stack: baseline doc → update-stack → post doc → keep it as the benchmark stack.
  7. Benchmark F1 both sides (the PREV side must run before the upgrade — schedule it between the baseline document and update-stack, or use a second stack).
  8. Benchmark F2 + F3 on the v<VERSION> reference stack. At v0.6.8 this was 3,455 runs and $2,114 over 13.6 hours with up to nine suites in flight at --max-inflight 4 each (a lane script per queue; 0 Bedrock throttling failures). Run the two core suites and the premium grids first — they are the long poles — and expect the Nova grids to stall on agentic cells (#895): stop them and use simplegrid. Score with aggregate.py as each run ends (a run dir that already exists from a prerelease must be re-scored, not skipped), and pull the S3 outputs you cite before teardown. This is the long pole: budget a second day for it and say so up front.
  9. Tier H on the reference stack while F2/F3 runs — the integration suites are quick and need the same stack, so they cost nothing extra in wall clock.
  10. Failure census (see Operating a multi-hour run, rule 5) — attribute every non-COMPLETED row before any number from it reaches a document.
  11. Aggregate, compare, figures; regenerate every docs/benchmarking/ file (F4); write the four deliverables; sweep orphaned ENIs in the stack-test VPC; tear down all but one reference stack at v<VERSION> (say which one you left up and why).

Outputs — four deliverables, two PRs

DeliverablePathNotes
Release validation recorddocs/release-validation/v<VERSION>.md + a new row at the top of docs/release-validation/README.mdcopy the previous record's structure: Verdict → Results per tier group → Findings (ordered by how much they matter) → What was NOT validated → Reproduce. Every tier A–I gets a row, including the ones that were NOT RUN, with the reason
Security resultssecurity/test-results/<VERSION>/produced by make security-results; eyeball redactions. Compare all four gate values against <PREV>'s snapshot — movement in either direction is a finding
Test coverage reportthe Test coverage section of the validation record, plus scripts/coverage_debt.json if the ratchet movedthe measured per-tree table (tree · files · coverage), its delta against PREV's record, the lowest-covered tree named explicitly, and whether make check-coverage-debt passed. Measured with make coverage-all — never the recorded baseline
Benchmark results and the config guidedocs/benchmarking/releases/v<VERSION>.md + README row (F1); docs/benchmarking/config-guidance.md re-headed to v<VERSION> with the model-selection section, index.md model table, and every other paper in the folder whose data was re-measured (F2–F4); benchmarks/results/v<VERSION>/<suite>/… for every suite run; baseline.json; cited imagessee tier F. A PR that carries only the A/B entry is an incomplete tier F and the record must say so

A tier with no deliverable row is a tier nobody will notice was skipped. Coverage was absent from this list until v0.6.11 and so was never measured for any release, despite the subsystem existing and a ratchet gate being wired into both CIs.

⚠️ If the release is superseded mid-pass, write no records for it. A published idp-main_<VERSION>.yaml is immutable — docs/release-runbook.md: "There is no 'unpublish' … treat it as an immutable historical artifact". So a defect found during validation is fixed in a patch release, never by re-cutting the version under test, and the battery then re-runs against the new published artifact. When that happens, stop the expensive tiers immediately rather than finishing them: guidance measured on a build that is about to be superseded is superseded with it. Keep the measurements in gitignored scratch/ with a carry-forward list, delete the untracked result and snapshot directories, and revert any baseline.json promotion — a promoted baseline whose release has no record leaves the next release's --compare diffing against a grid nothing documents.

Redaction applies to the validation record too: account ids, VPC/subnet/SG/VPCE ids, API hostnames, pool ids, stack physical ids and local paths become <ACCOUNT_ID>, <VPC_ID>, <API_HOST>, …. Raw logs stay in gitignored scratch/.

PRs. Branch from github/develop (not main, not origin — origin is GitLab; push with git push github <branch> and verify the PR's headRefOid matches your commit, see the idp1-remotes-origin-is-gitlab memory). Two PRs, both targeting develop:

  1. docs/release-validation-v<VERSION> — the validation record (including its test-coverage and integration-test sections), its README row, and security/test-results/<VERSION>/.
  2. docs/benchmark-v<VERSION> — the release A/B entry and README row, the refreshed config-guidance.md and index.md (and any other regenerated paper), every benchmarks/results/v<VERSION>/<suite>/ set, baseline.json, images.

Split so the benchmark can be discussed without holding the security snapshot. Do not merge; do not touch CHANGELOG.md (the release is already cut). Commit messages and PR bodies end with the attribution lines the session provides.

Reporting (the chat summary)

The user is context-switching and may read only the final message. Give the context first, then the verdict, in prose, per the writing-style memory:

  1. One paragraph: what was validated (version, template URL, account/region, stacks), how long it took, what was left up.
  2. The per-tier table: tier · gate · one-line result · vs PREV.
  3. Concerning or surprising results, each written out in full — what was measured, what is inferred, what is unverified. Always cover, even if the answer is "none":
    • any tier that failed, was NOT RUN, or passed vacuously (the seller-403 class — a pass that never reached the code under test);
    • any security gate count that moved from PREV, either direction;
    • any benchmark cell where recall, cell_accuracy or calibration separation fell past the --compare thresholds, with cells_compared shown, and any cost movement beyond the cell's own spread on unchanged documents;
    • anything the upgrade changed in extracted values;
    • the open behaviour decisions the prerelease audit left (for 0.6.8: simple-mode truncation above ~400 rows now that over-splitting is fixed);
    • the model-selection verdict from F3 in two sentences: which lightweight model is at ceiling for the common profiles, and whether the premium models earned their price on any profile — with the ratio, not just the sign;
    • which docs/benchmarking/ files were regenerated and which still carry data from an earlier release, by name;
    • the measured per-tree coverage table and its movement from PREV, naming any tree that lost coverage even where the ratchet's tolerance absorbed it, and naming the lowest-covered tree explicitly rather than reporting only an average — an average across the trees hides a tree in the thirties;
    • surprising improvements too — v0.6.6 found a defect open since v0.6.0 had quietly closed, which was the most useful line in that record.
  4. Findings in test/tooling code, marked as such, separately from product findings.
  5. Links to the two PRs.

Never report a failure count without saying whether the environment was correctly installed, never call a failure pre-existing without reproducing it on develop with the test extras, and never write "GovCloud works" from a commercial run.

Standing issues to recognise, not rediscover (delete when fixed)

  • make coverage-summary is a baseline, not a measurement (see tier A). It prints scripts/coverage_debt.json, which is a ratchet floor and always self-consistent, so quoting it as the release's coverage cannot fail visibly.
  • make srt-scan without setup re-opens suppressed findings (2026-09-12): always CI=1 python scripts/srt/setup.py first; see preflight step 3. Same gap inside scripts/security/run_security_tests.sh.
  • scripts/tests/test_iam_privilege_escalation.py scans scratch/ (2026-09-12): a stale git worktree under scratch/ fails make test on templates already exempt under their real paths. git worktree list and remove them before believing it.
  • Detached processes print late. run_stacktest.py and run_matrix.py buffer stdout when redirected to a file — the verdict appears only at exit. Launch them with PYTHONUNBUFFERED=1, and track progress from CloudFormation (list-stacks) and results/run-*/runmap.json rather than the log.
  • Benchmark docs are the deliverable, not a by-product. At v0.6.8 tier F ran the A/B only; config-guidance.md stayed headed v0.6.7 and the astravalue / astracap suites that #850 added had never been run. F2–F4 above exist so that cannot recur; if budget forces a trim, the record names each un-refreshed paper.
  • make typecheck whole-repo baseline is non-zero by design (CI checks changed files only): compare totals to develop, do not report the raw number as a failure.
  • make security-results first-run Cognito race (UserNotFoundException): the test tears its users down; just re-run.
  • idp-cli config-upload migrates configs — the benchmark harness bypasses it with --native-upload for this reason; never round-trip configs through the CLI during the A/B.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.