From your laptop to production

One main flowchart; click a double-bordered step (↘) for its detail chart.

Verified against .husky/*, scripts/check-changeset.mjs, scripts/boundaries/allowlists.ts, .github/workflows/*.yml, src/app/_calculator-qa-host/** on feat/TCD-qa-page, 2026-11-17.

Main flow

Your manual steps are green; everything after the merge runs on its own.

Main flow: from code edit to productionTop-down lifecycle. Engineer edits code. Decision: breaking change? Yes: follow the major path, then rejoin. git commit. Decision: pre-commit hooks pass? No: fix and commit again. Yes: run npm run changeset:summary, edit and commit it. git push. Decision: pre-push gates pass? No: fix and push again. Yes: open a PR to main. Decision: PR checks green? No: fix and push again. Yes: code owner review and merge. Semantic Release tags vX.Y.Z and publishes a GitHub Release. On success, Publish Packages versions and publishes the packages. The published release also builds the image and pushes it to ECR, then deploys QA, where you can check the QA page. Decision: QA smoke pass? No: prod is blocked, fix forward with a new PR. Yes: decision: prerelease? Yes: stops at QA. No: deploy prod with no approval, smoke prod (reports only; rollback is a manual deploy.yml run), live in production.Diagram keyStart / endDecisionAutomatic (hook, CI, bot)Manual engineer stepBlocked / fix requiredOptional / skipped / noteClick for detail ↘NOYESYESNOYESNOYESNOrelease publishedon successNOYESYESNOEngineer edits codeBreaking change?Major path ↘git commitPre-commit hookspass? ↘Fix, commit againnpm run changeset:summaryedit + commit it ↘git pushPre-push gatespass? ↘Fix, push againOpen PR to mainPR checksgreen? ↘Code owner review+ mergeSemantic Releasetag vX.Y.Z ↘Build image, push ECRPublish packagesPackages publishedDeploy QACheck the QA page ↘QA smokepass?Prod blocked:fix forward (new PR)Prerelease?Stops at QADeploy prod (no approval)Smoke prod (reports only)Rollback: rundeploy.yml manuallyLive in production

One detail chart shows at a time, below. Each has a link back here. Tables and exact messages: Reference.

On a narrow screen, scroll each chart sideways.

← back to main flow

Pre-commit

.husky/pre-commit runs npm run type-check then npm run check; .husky/commit-msg runs commitlint. Team convention: feat: or fix: only.

Pre-commit detailCode edited. Decision: props changed? Yes: update qa-manifest.ts, then rejoin. git commit. The pre-commit hook runs npm run type-check. Decision: types and qa-manifests ok? No: fix types or manifest controls. Then npm run check runs Biome. Decision: Biome clean? No: fix format or lint. Then the commit-msg hook runs commitlint. Decision: conventional message? No: reword as feat: or fix:. Every fix loops back to git commit. Otherwise the commit is created.Diagram keyStart / endDecisionAutomatic (hook, CI, bot)Manual engineer stepBlocked / fix requiredOptional / skipped / noteClick for detail ↘YESNONOYESNOYESNOYEScommit againCode editedProps changed?Update qa-manifest.tsgit commitpre-commit:npm run type-checkTypes + qa-manifestsok?Fix types ormanifest controlspre-commit:npm run check (Biome)Biome clean?Fix format / lintcommit-msg:commitlintConventionalmessage?Reword: feat: / fix:Commit created

details: gate matrix · skip a step · manifest controls

← back to main flow

Changeset summary

scripts/changeset-summary.mjs calls writeSummaries in scripts/check-changeset.mjs. Commit first: it reads origin/main...HEAD. Never npx changeset.

Changeset summary detailChange committed. Run npm run changeset:summary. Decision: publishable calculator affected? No: nothing to write. Decision: does a changeset in the diff already cover it? No: create .changeset/<dir>-summary.md with bump patch. The command adds missing sections, the signals line and the fingerprint. Set the bump: patch, minor or major. Decision: major? Yes: retire the current major. Write the three sections: what changed, behavior impact, consumer action needed. Decision: signals fired? Yes: name each signal under behavior impact, or write none plus a justification line. Commit the changeset. Decision: more commits before push? Yes: re-run the command, which keeps your text. No: ready to push.Diagram keyStart / endDecisionAutomatic (hook, CI, bot)Manual engineer stepBlocked / fix requiredOptional / skipped / noteClick for detail ↘NOYESNOYESYESNOYESNONOYESChange committednpm run changeset:summaryPublishable calculatoraffected?Nothing to writeChangeset in diffcovers it?Create <dir>-summary.md(bump: patch)Add missing sections,signals: line, fingerprintSet bump: patch,minor or majormajor?Retire current major ↘Write the 3 sectionswhat changedbehavior impactconsumer action neededSignals fired?calculation, timing,bff/network,tracking, propsName each signal, ornone + justification:Commit the changesetMore commitsbefore push?Ready to push

details: summary gate messages · summary file template

  • Signals: calculation (src/utils/ or calculat*), timing (debounce, throttle, setTimeout, setInterval, *_MS), bff/network (src/client.ts, /shared/api/), tracking (track*), props (exported *Props).
  • Fingerprint: <!-- summary-fingerprint: @bankrate/<dir>@<sha256> --> over the source files the branch changes in the package and its workspace deps, so merging main keeps it fresh; checked on pre-push and in CI.
  • A calculator-internal change needs a summary for every dependent publishable calculator.

← back to main flow

Pre-push gates

.husky/pre-push, in order. The five changeset gates (code order) print every failure at once, then the hook stops. --no-verify skips the hook; CI runs the same gates and tests.

Pre-push gates detailgit push runs the pre-push hook. First scripts/check-changeset.mjs runs five gates and prints every failure at once: only released packages named in a changeset (else drop calculator-internal); a major retires the current major (else add the vN alias and frozen manifest); the superseded contracts alias is present (else add it to devDependencies); the summary is complete with a fresh fingerprint (else re-run the summary); a changeset is present (else run changeset:summary and set the bump). Then vitest runs seven guard tests: boundary-rules, shadow-boundary, qa-manifest, contract-compat, bff-compat, boolean-defaults, ledger-usage. If any fail, fix the code or allowlist an intended BFF break. Then the @smoke e2e tests run; if they fail, fix and run npm run test:e2e. Every fix loops back to push again. Otherwise the push reaches GitHub.Diagram keyStart / endDecisionAutomatic (hook, CI, bot)Manual engineer stepBlocked / fix requiredOptional / skipped / noteClick for detail ↘passpasspasspasspassfailfailfailfailfailNOYESNOYESpush againgit pushcheck-changeset.mjs(5 gates, all reported)Only releasedpackages named?Drop calculator-internalfrom that changesetMajor retirescurrent major?Add vN alias +frozen manifest ↘Superseded contractsalias present?Add contracts aliasto devDependenciesSummary complete,fingerprint fresh?Re-run summary,finish it ↘Changeset present?Run changeset:summary,set the bumpvitest: 7 guard testsboundary-rulesshadow-boundaryqa-manifestcontract-compatbff-compatboolean-defaultsledger-usageAll 7 pass?Fix, or allowlist anintended BFF break ↘npm run test:e2e:smoke@smoke e2epass?Fix; npm run test:e2ePush reaches GitHub

details: gate matrix · skip a step (exact messages)

Exact gate titles
✗ A changeset names both an ignored and a released package.
✗ A major changeset must retire the current major for the QA version switcher.
✗ A contracts changeset must keep the superseded version under the BFF compat check.
✗ A changeset summary is incomplete or stale.
✗ This PR changes package source but adds no changeset.

✓ Changeset present for <N> changed package file(s).

← back to main flow

Breaking change (major)

N is the major in the package's current package.json. Alias and frozen manifest: major-retirement gate; Host import: qa-manifest.test.ts. Both run on pre-push and in CI.

Breaking change (major) detailBreaking package change. Set the changeset bump to major. N is the current major in package.json. Decision: alias @bankrate-qa/<dir>-vN added? No: add it to the root devDependencies. Decision: manifests/vN.ts frozen? No: freeze the current qa-manifest as manifests/vN.ts. Both are checked by the major-retirement gate. Decision: Host imports manifests/vN? No: import it and add playgroundVersion(N); checked by the qa-manifest test. Pre-push and CI gates pass. On the QA page the current entry shows as vN+1, unreleased major. Merge and publish release vN+1.0.0. The version switcher lists vN with its version and date, and the old major renders against today's BFF.Diagram keyStart / endDecisionAutomatic (hook, CI, bot)Manual engineer stepBlocked / fix requiredOptional / skipped / noteClick for detail ↘NOYESNOYESNOYESBreaking package changeChangeset bump: majorAlias @bankrate-qa/<dir>-vN added?Add it to rootdevDependenciesmanifests/vN.tsfrozen?Freeze qa-manifestas manifests/vN.tsHost importsmanifests/vN?Import it, addplaygroundVersion(N)Pre-push + CI gates passQA: current shows vN+1,unreleased majorMerge + publish:vN+1.0.0 releasedSwitcher listsvN, x.y.z (date)Old major rendersvs today's BFF ↘

details: major-retirement row · protections

← back to main flow

BFF compatibility

src/lib/__tests__/bff-compat.test.ts checks every @bankrate-qa/calculator-contracts-* alias (1.0.0 to 7.0.0) against today's BFF, request and response. Entries live in bffCompatAllowlist (scripts/boundaries/allowlists.ts).

BFF compatibility detailA BFF route or contracts change. bff-compat.test.ts runs on pre-push and in CI. It compares the 15 published contracts versions with today's BFF types, request and response. Decision: unacknowledged break? No: skip ahead. Yes: decision: intended? No: fix the BFF to keep the old shape and re-run. Yes: add a bffCompatAllowlist entry with a reason; reviewers see it in the PR diff. Decision: stale allowlist entry? Yes: remove the entry and re-run. No: gen-prop-docs writes bff-compat JSON; the QA page shows an info alert on affected old versions. The break is known and visible.Diagram keyStart / endDecisionAutomatic (hook, CI, bot)Manual engineer stepBlocked / fix requiredOptional / skipped / noteClick for detail ↘YESNONOYESYESNOre-runBFF or contracts changebff-compat.test.ts(pre-push + CI)15 published contractsvs today's BFF typesUnacknowledgedbreak?Intended?Fix the BFF:keep the old shapeAdd bffCompatAllowlistentry + reasonReviewers see itin the PR diffStale allowlistentry?Remove the entrygen-prop-docs writesbff-compat JSONQA: info alert onaffected old versions ↘Break known + visible

details: acknowledged breaks · protections

Failure messages
<route> (contracts <x.y.z>, <direction>): `<field>` <detail>; if intended, add '<field>: <detail>' to the breaks of a bffCompatAllowlist entry in scripts/boundaries/allowlists.ts
<route> (contracts <entry>, <direction>): '<field>: <detail>': acknowledged break no longer exists; remove it from the entry
<route>: add it to routes, or to notApplicable with a reason

QA info alert: known BFF incompatibility (contracts <entry>, <direction>): `<fields>` — <reason>

← back to main flow

PR checks + Wiz

.github/workflows/pr-checks.yml. Wiz scans the PR image when image paths change.

PR checks detailPR opened or updated. Resolve changed packages, failing open to run everything. Always run: Commit Lint, Changeset required, No prerelease artifacts, Lint and Test with coverage, Type Check and App Build, Terraform plan. Decision: packages affected? Yes: verify package artifacts and clean-room install. Decision: E2E affected? Yes: E2E tests in 3 shards. Decision: same-repo PR? No: the Docker job is skipped. Yes: decision: image paths changed? Yes: Docker build without push, then Wiz image scan. No: the job is green without building. Decision: all checks green? No: fix and push again. Yes: code owner review by trusted-content-delivery, then merge to main.Diagram keyStart / endDecisionAutomatic (hook, CI, bot)Manual engineer stepBlocked / fix requiredOptional / skipped / noteClick for detail ↘YESNOYESNONOYESYESNONOYESPR opened or updatedResolve changed packages(fails open: run all)Always:Commit LintChangeset requiredNo prerelease artifactsLint and Test (+ coverage)Type Check and App BuildTerraform planPackagesaffected?Verify artifacts +clean-room installE2E affected?E2E tests, 3 shardsSame-repo PR?Docker job skipped(fork PR)Image pathschanged?Dockerfile, .dockerignore,package.json, lockfile,next.config.ts, .nvmrc,newrelic.cjs, pr-checks.ymlDocker build (no push)Wiz image scanAll checksgreen?Fix, push againCode owner review(trusted-content-delivery)Merge to main ↘

details: gate matrix · skip a step

← back to main flow

Release and deploy

release.yml → publish-packages.yml (on Semantic Release success) and build-and-push.yml (on release: published), which calls deploy.yml and smoke.yml. No "Version Packages" PR; prod needs no approval.

Release and deploy detailMerge to main. Semantic Release (release.yml) creates the vX.Y.Z tag and GitHub Release. Two workflows follow. Publish Packages (workflow_run): decision: Semantic Release succeeded? No: publish skipped. Yes: decision: pending changesets? Yes: npm run version:pkg, commit the bumps with [skip ci] and push. Then npm run publish:pkg to GitHub Packages, push package tags, notify the update bot: packages published. Build, Push, and Deploy (release published): build the image and push vX.Y.Z to ECR, plus latest unless prerelease. Deploy QA with deploy.yml, smoke test QA with @smoke against calculators.qa.bankrate.com. Decision: QA smoke pass? No: prod blocked, fix forward. Yes: decision: prerelease? Yes: stops at QA. No: deploy prod with no approval, smoke prod (reports only), live in production. Rollback is a manual deploy.yml run with an earlier image_tag.Diagram keyStart / endDecisionAutomatic (hook, CI, bot)Manual engineer stepBlocked / fix requiredOptional / skipped / noteClick for detail ↘workflow_runrelease: publishedNOYESYESNONOYESYESNOMerge to mainSemantic Release:vX.Y.Z tag + GitHub ReleaseSemantic Releasesucceeded?Publish skippedPendingchangesets?npm run version:pkgCommit bumps[skip ci], pushnpm run publish:pkg(GitHub Packages)Push package tagsNotify update botPackages publishedBuild image, push ECRvX.Y.Z (+ latest)Deploy QA (deploy.yml) ↘Smoke QA: @smoke vscalculators.qaQA smokepass?Prod blocked:fix forwardPrerelease?Stops at QADeploy prod(no approval)Smoke prod(reports only)Rollback: deploy.yml,earlier image_tagLive in production

details: release facts · commands

← back to main flow

QA page

localhost:3000 locally, calculators.qa.bankrate.com after deploy. Banners: src/app/_calculator-qa-host/playground/CalculatorPlayground.tsx.

QA page detail: how a change appearsOpen the catalog at /. Search with ?q= or pick category filters. Open a calculator route. Toggle props in the panel; state goes to the URL. Decision: unknown param or value? Yes: a warning alert, using the default. Pick a version in the switcher. Decision: current version? Yes: workspace source renders and the package shows its own errors; best-rate-guarantee opts into the host banner. No: the old major @bankrate-qa/<dir>-vN renders against today's BFF. Decision: acknowledged break? Yes: info alert, known BFF incompatibility. Decision: fails against today's BFF? Yes: host banner, BFF compatibility failure (vN). Paths rejoin. Decision: render crash? Yes: host banner from the error boundary. Open Changes. Decision: upgrade to current? Yes: upgrade view with ?upgradeFrom=, showing the props diff, consumer actions and release notes. No: release notes of the selected major.Diagram keyStart / endDecisionAutomatic (hook, CI, bot)Manual engineer stepBlocked / fix requiredOptional / skipped / noteClick for detail ↘YESNOYESNOYESNOYESNOYESNONOYESOpen the catalog /Search ?q= or pick&category= filtersOpen a calculator/<route>Toggle props in thepanel (state in URL)Unknown paramor value?Warning alert(uses the default)Pick a versionin the switcherCurrent version?Workspace source;package shows own errorsbest-rate-guarantee:host bannerRender @bankrate-qa/<dir>-vNAcknowledgedbreak?Info alert: knownBFF incompatibilityFails vstoday's BFF?Host banner: BFFcompat failure (vN)Render crash?Host banner viaerror boundaryOpen ChangesUpgrade tocurrent?Release notes ofthe selected majorUpgrade view:?upgradeFrom=Props diff, actions,release notes

details: QA page messages · QA page data · manifest controls

Annotated screenshots

Catalog page titled Bankrate Calculators with a search box, category toggle buttons Mortgage, Loans, Savings, Retirement, Insurance, Debt, Planning, and a grid of calculator tiles each showing a category tag, title, description and a version such as v6.1.0.
  1. 1Search title or description: ?q=
  2. 2Categories: one &category= each
  3. 3Workspace package.json version, not latest published

Catalog /. No match: "No calculators match these filters."

Mortgage Calculator QA page at desktop width. A left sidebar shows @bankrate/mortgage-calculator, a v6.1.0 badge, a Changelog link, a Version select reading v6 — 6.1.0 (workspace source), a collapsed Changes section, and switches for showRateOffers and enableScenarioTools with descriptions. The calculator renders on the right.
  1. 1Package, version, Changelog (anchored to the release)
  2. 2Version select: vN — x.y.z (workspace source) first
  3. 3Changes: releases of the selected major
  4. 4One control per boolean / preset, JSDoc text; 7 host props hidden
  5. 5State is in the URL: only non-defaults, one history entry per change

/mortgage at 1440px. Panel docks at 86rem (97rem for the wide rebrand page); narrower windows get a floating Props button and a left sheet.

Mortgage Refinance Calculator QA page opened with ?showRateOffers=false. The Version select reads v4 — 3.3.0 (workspace source, unreleased major) and a warning above the calculator says showRateOffers was removed in 4.0.0. The sidebar lists showIntentQuestion and showConversionCard switches, lenderMatchCtaUrl marked docs only, and a Read by the package itself section.
  1. 1Pending major changeset: shown as v4, "unreleased major"
  2. 2Old URL param flagged: "removed in 4.0.0"
  3. 3docs prop: read-only
  4. 4packageParams: name = value or (unset)

/mortgage-refinance?showRateOffers=false

All warning texts: QA page messages.

Home Affordability Calculator QA page with the version select on v2 — 2.0.3 (2026-09-14). An error banner reads: Error: BFF compatibility failure (v2): Cannot read properties of undefined (reading 'principal'). No calculator is rendered.
  1. 1Frozen major vN — x.y.z (date): sets ?version=N, renders @bankrate-qa/<dir>-vN
  2. 2Old major vs today's BFF: BFF compatibility failure (vN): …
  3. 3Changes offers Upgrade to current

/home-affordability?version=2: the published 2.0.3 crashes against the current BFF. An acknowledged break now also adds an info alert, known BFF incompatibility (contracts …) (BFF compatibility); not in this screenshot.

← back to main flow

Reference

Tables behind the charts. Exact messages are in each row's message.

Gate matrix: which check runs where

Checks by stage
Checkpre-commitpre-pushPR CIrelease
Commit message (commitlint)
Type-check: manifests, preset unions
Biome
ESLint
Changeset present / mixed / major retirement
Contracts version alias
Summary complete + fingerprint
qa-manifest (exists, Host imports frozen)
FE/BFF boundaries
Shadow boundary
Boolean defaults
Ledger usage
Contract compat (request fixtures)
BFF compatibility
All other unit tests + coverage
App build
E2E
No prerelease artifacts
Package artifacts + clean-room
Docker build + Wiz scan
Terraform plan (speculative)
QA smoke before prod
Prod smoke

runs and blocks · partial or conditional: pre-push runs @smoke only, CI the affected shards; package and Docker jobs are scoped / path-filtered (Docker: same-repo PRs only); prod smoke reports only. Pre-commit includes commit-msg.

What happens if you skip a step

A failing hook step stops the commit or push; all changeset failures print at once. --no-verify skips the hook; CI runs the same gates and guard tests. Pass: ✓ Changeset present for <N> changed package file(s).

Gates, results and fixes
GateRunsResultFix
Commit messagecommit-msg, CIblocks commitConventional type; team uses feat: / fix: only
message
⧗   input: wip: x
✖   type must be one of [feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert] [type-enum]

⧗   input: bad message
✖   subject may not be empty [subject-empty]
✖   type may not be empty [type-empty]
Manifest driftpre-commit, CIblocks commitAdd / remove the prop's control in qa-manifest.ts
message
Property '<prop>' is missing in type '{ … }' but required in type 'PropControls<Props>'.
Object literal may only specify known properties, but '<prop>' does not exist in type 'PropControls<Props>'.
Preset missing a union memberpre-commit, CIblocks commitAdd an option for every member (a plain string prop accepts any keys)
message
Property '"<member>"' is missing in type '{ … }' but required in type 'Record<…, PresetOption<…>>'.
Format / lintBiome: pre-commit, CI; ESLint: CIblocksnpm run lint:fix
Mixed ignored changesetpre-push, CIblocks pushDrop calculator-internal from it, or split it out
message
✗ A changeset names both an ignored and a released package.

  .changeset/<file>
    ignored:  @bankrate/calculator-internal
    released: <names>

`changeset version` refuses to version a mixed changeset, so this one would block
every publish run once it is on main. Drop the ignored package, whose version is
never published anyway, or move it into a changeset of its own.
Major without retirementpre-push, CIblocks pushAdd the vN alias + frozen manifest (chart)
message
✗ A major changeset must retire the current major for the QA version switcher.

  @bankrate-qa/<dir>-v<N>
  src/app/<route>/manifests/v<N>.ts

Add the missing alias to the root package.json devDependencies and the frozen manifest.
Missing contracts aliaspre-push, CIblocks pushAdd the printed alias (current contracts version) to root devDependencies
message
✗ A contracts changeset must keep the superseded version under the BFF compat check.

  "@bankrate-qa/calculator-contracts-<x.y.z>": "npm:@bankrate/calculator-contracts@<x.y.z>"

Add this line to the root package.json devDependencies so the BFF compat check covers the version being superseded.
Summary incomplete / stalepre-push, CIblocks pushRe-run npm run changeset:summary, finish the text, commit
message
✗ A changeset summary is incomplete or stale.

  .changeset/<file>: missing or empty `## <section>`
  .changeset/<file>: replace the TODO(changeset-summary) placeholder text
  .changeset/<file>: missing summary fingerprint for @bankrate/<dir>
  .changeset/<file>: stale summary fingerprint for @bankrate/<dir>
  .changeset/<file>: `## behavior impact` does not mention the "<signal>" signal
  .changeset/<file>: impact is `none` while signals fired; add a `justification:` line

Re-run `npm run changeset:summary`, then fill in each section and name every signal
category under `## behavior impact`.
Missing changesetpre-push, CIblocks pushnpm run changeset:summary, set the bump, commit
message
✗ This PR changes package source but adds no changeset.

  <up to 20 changed package files, then "…and N more">

Commit your change, then run `npm run changeset:summary` and set the bump in the generated file.
Missing qa-manifest.tspre-push, CIblocks pushCreate the route's manifest
message
qa manifests > <route> has a qa-manifest.ts
Host skips a frozen manifestpre-push, CIblocks pushImport ./manifests/vN in <Name>Host.tsx and add it to versions
message
qa manifests > <route> host imports every frozen manifest
<Host>.tsx must import ./manifests/v<N>
FE/BFF boundariespre-push, CIblocks pushShared shapes go to calculator-contracts; exceptions only in scripts/boundaries/allowlists.ts
message
strict FE/BFF boundaries > prevents BFF source from importing FE packages, UI libraries or QA manifests
  <file> imports <specifier>
(one of 20 boundary rules; each names the offending file)
Shadow boundarypre-push, CIblocks pushRender <Component>Inner inside CalculatorShadowBoundary
message
shadow boundary isolation > <dir> public component > mounts inside the shadow boundary with inlined CSS
shadow boundary isolation > <dir> public component > wires the gen:css build step in package.json
shadow boundary isolation > lists every calculator package directory in CALCULATOR_PACKAGES
shadow boundary isolation > roots theme tokens on :host so they resolve inside a shadow tree
shadow boundary isolation > keeps the shared CalculatorShadowBoundary as the isolation primitive
Boolean defaultspre-push, CIblocks pushDefault false, rename, or fix the allowlist / manifest
message
new boolean props must default to false
remove stale booleanTrueDefaultAllowlist entries
set defaultValue: true on the qa-manifest control
use a show*, enable* or allow* name defaulting to false
Ledger usagepre-push, CIblocks pushUse the Ledger component; classes at the call site
message
ledger usage > does not wrap an element just to add classes
ledger usage > uses Ledger components instead of native elements
ledger usage > does not override Ledger Button's own states
ledger usage > compiles exactly the imported Ledger components through ledger-sources.css
ledger usage > keeps local ui files to reasoned Ledger overrides
ledger usage > keeps shared class strings in calculatorLook only
ledger usage > calculatorLook strings are long (4+ classes) and repeated (3+ uses)
Contract compatibilitypre-push, CIblocks pushKeep BFF request schemas accepting old majors' recorded requests
message
contract compatibility > v<N> <fixture>
  v<N> <fixture>: <path>: <zod message>
  v<N> <fixture>: no schema mapped for <slug>
BFF compatibilitypre-push, CIblocks pushFix the BFF, or acknowledge in bffCompatAllowlist (entries)
message
bff backward compatibility with published contracts > <route> (contracts <x.y.z>, <direction>)
  <route> (contracts <x.y.z>, <direction>): `<field>` removed; if intended, add '<field>: <detail>' to the breaks of a bffCompatAllowlist entry in scripts/boundaries/allowlists.ts
  <route> (contracts <x.y.z>, <direction>): `<field>` incompatible: <old> ← <new>; if intended, add …

bff backward compatibility with published contracts > every bffCompatAllowlist entry matches a current break
  <route> (contracts <entry>, <direction>): '<field>: <detail>': acknowledged break no longer exists; remove it from the entry

bff backward compatibility with published contracts > checks every route handler or says why it does not apply
  <route>: add it to routes, or to notApplicable with a reason
Other unit testsCIblocks mergenpm test (CI runs it with coverage)
App buildCIblocks mergenpm run build
E2Epre-push (@smoke), CIblocksnpm run test:e2e
Prerelease artifactsCIblocks mergeFollow the printed discard steps
message
✗ Prerelease (RC) artifacts must not merge to main:

  .changeset/pre.json exists — the repo is still in prerelease mode. Run `npx changeset pre exit`.
  <name> is at prerelease version <x.y.z-rc.N> — discard the -rc bump.

(followed by numbered discard steps)
Package artifactsCI (affected packages)blocks mergenpm run verify:pkg / npm run test:clean-room
Docker build + WizCI (image paths)blocks mergeFix the Dockerfile or the flagged dependency
QA smokereleasestops prodFix forward with a new PR

Backward-compatibility protections

Consumers stay on old majors, and old majors keep calling today's BFF.

What each protection catches and misses
ProtectionCatchesMisses
Manifest type-checkevery prop and preset union member has a QA controlbehavior changes
Frozen manifests (39)every retired major renders in the switcher; Host must import each onea missing versions entry (only an unused-import lint)
Version switcherold major rendered live against today's BFF, with a banner on failuremanual: someone has to open it
Contract fixturesold majors' recorded requests vs today's zod schemasrecorded by hand (record-contract-fixtures.mjs)
Change summariesgated sections + signals; rolled up in the upgrade viewonly as accurate as written
BFF compatibilitycontracts 1.0.0–7.0.0 types vs today's BFF, request and response; acknowledged breaks visible in the PR diff and a QA alerttypes only, not live upstream data

Acknowledged BFF breaks (6)

bffCompatAllowlist in scripts/boundaries/allowlists.ts; each entry lists its exact breaks (<field>: <detail>), so a different break on the same field fails again, and a reason, shown in the QA info alert. Failure text: BFF compatibility row.

Acknowledged BFF compatibility breaks
RouteContractsDirectionFieldsQA alert on
/cd/api<7.0.0responsenationalRate, chartDatav2, v3
/home-affordability/api<6.0.0responserecommendedPaymentBreakdown, maxPaymentBreakdownv2
/mortgage-refinance/api<2.1.0requestclosingCosts, propertyValue, remainingBalancenone
/mortgage-refinance/api<2.1.0responsecurrentLoanTermLabel, currentRate, newLoanAmount, newRate, paymentDeltanone
/mortgage-refinance/api2.1.0responseloanToValue, newLoanAmountnone
/savings/api<3.0.0responseyearlyDatanone

Manifest controls: one per prop

qa-manifest.ts lists every prop, checked by satisfies QaManifest<Props>; a broken dependsOn rule shows as a warning with its reason. Best Rate Guarantee: open is host-owned React state in the Host.

Control kinds
KindPanelRule
booleanSwitchdefaultValue, else false
presetSelectnamed options; the first key is the default; type-check requires every union member
hosthiddenwiring the host owns: bffBaseUrl, client, onError…
docsread-only, "docs only" badgenot toggleable, e.g. CTA URLs
  • Booleans default to false and are named show* / enable* / allow*; hide* / disable* are banned.
  • booleanTrueDefaultAllowlist (manifest must say defaultValue: true): mortgage-calculator showRateOffers, enableScenarioTools; mortgage-refinance-calculator showIntentQuestion, showConversionCard; mortgage-calculator-rebrand showIntentQuestion, showConversionCard, showLenderMatchCta, enableScenarioTools.

QA page messages

Alerts and labels on the QA page
WhenShown asText
Unknown URL paramwarning<param> was removed in <N>.0.0 · <param> was added in <N>.0.0 · <param> is not a prop of this version
Unknown value (or ?version=)warning<value> is not a value of <prop> here; using the default
Broken dependsOn rulewarningprop name as title, the rule's reason as text
Old major with an acknowledged breakinfoknown BFF incompatibility (contracts <entry>, <direction>): `<fields>` — <reason>
Old major errors or crasheshost bannerBFF compatibility failure (v<N>): <message>
Current version errorspackagethe package shows its own errors; best-rate-guarantee sets hostErrorBanner (host banner, raw message)
Pending major changesetlabel + noticeselect: vN — x.y.z (workspace source, unreleased major); Changes: Unreleased: a pending major changeset will publish <N>.0.0.
Catalog: no matchtextNo calculators match these filters.
  • Upgrade view (?upgradeFrom=): props diff, every non-none consumer action, then the remaining release notes, newest first; empty ?upgradeFrom= uses the selected release.

Where the QA page gets its data

scripts/gen-prop-docs.mjs, on predev, prebuild and prepare; output under src/app/_calculator-qa-host/.

Generated QA data
SourceGenerated fileUsed for
packages/<dir>/src *Props JSDocplayground/prop-docs.generated.jsonpanel control text
packages/<dir>/package.json versionpackage-versions.generated.jsoncatalog tiles, version label
.changeset/*.md pending majorspending-majors.generated.json"unreleased major", Changes notice
packages/<dir>/CHANGELOG.mdchangelogs/<dir>.generated.jsonChanges list, upgrade view
bffCompatAllowlist + each alias's contracts dependencybff-compat.generated.jsonknown BFF incompatibility alert

Release facts

  • Publish waits for Semantic Release: semantic-release exits 0 without releasing when its branch is behind the remote, so a version commit landing first would silently skip the tag, image and deploy.
  • Publish runs only when Semantic Release concluded success (or on a manual dispatch from main); every step is idempotent and re-runnable.
  • ECR gets vX.Y.Z, plus latest unless prerelease. deploy-prod requires prerelease == false and no - in the tag.
  • Rollback: Actions → Deploy to ECS → Run workflow (deploy.yml from main) with an earlier image_tag.
Generated .changeset/<dir>-summary.md
---
'@bankrate/mortgage-calculator': patch   ← patch | minor | major
---

## what changed

TODO(changeset-summary): replace with the what changed.

## behavior impact

signals: props, timing          ← written by the command

TODO(changeset-summary): replace with the behavior impact.

## consumer action needed

TODO(changeset-summary): replace with the consumer action needed.

<!-- summary-fingerprint: @bankrate/mortgage-calculator@<sha256> -->

Commands

Commands
CommandWhat it does
npm installprepare: gen:css, gen:prop-docs, husky (outside CI)
npm run devQA pages + BFF on localhost:3000
npm run changeset:summaryCreate / update summaries; optional -- <baseRef> (default origin/main)
npm run changeset:checkThe five changeset gates, as on pre-push
npm run type-checktsc --noEmit, includes manifests
npm run check / npm run lintBiome / Biome + ESLint (lint:fix writes fixes)
npm test / npm run test:coverageVitest / with coverage (CI)
npm test -- src/lib/__tests__/boundary-rules.test.tsBoundary rules only
npm test -- packages/__tests__/ledger-usage.test.tsLedger rules only
npm test -- src/lib/__tests__/bff-compat.test.tsBFF compatibility only
npm run test:e2e / npm run test:e2e:smokePlaywright, full / @smoke
npm run gen:prop-docsProp docs, versions, pending majors, changelogs, BFF compat JSON (also on predev / prebuild)
npm run build / npm run build:pkgNext app / all packages
npm run verify:pkg, npm run test:clean-roomPackage artifact + clean-install checks
node scripts/check-no-prerelease.mjsPrerelease gate
npx next build && npx next start -p 3900, then node scripts/record-contract-fixtures.mjsRecord request fixtures (port defaults to 3900)

Where things live

File locations
PathWhat
packages/<dir>/srcpackage source
src/app/<route>/page.tsx, <Name>Host.tsxserver entry (BFF URL, geo); CalculatorPlayground + versions
src/app/<route>/qa-manifest.ts, manifests/vN.tscurrent and frozen manifests
src/app/<route>/api, _server, _server/__fixtures__BFF; contract fixtures
src/app/_calculator-qa-host/catalog, shell, playground, generated JSON
.changeset/, scripts/check-changeset.mjs, scripts/changeset-summary.mjschangesets (config.json ignores calculator-internal) and their gates
scripts/boundaries/allowlists.tsbffCompatAllowlist, booleanTrueDefaultAllowlist, other exceptions
src/lib/__tests__/, packages/__tests__/the 7 pre-push guard tests (and the rest)
.husky/commit-msg, pre-commit, pre-push
.github/workflows/pr-checks, release, publish-packages, build-and-push, deploy, smoke, coverage
docs/RELEASING.md, docs/releasing/change-summaries.mdpolicy and summary format