Check whether this card's code meets the acceptance criteria
日本語の概要は準備中です。原文の説明を表示しています。
Check upgrade safety for a Tamanu upgrade that spans many versions: verify that every intermediate hotfix is included in the target version, and surface the new configuration/settings, data migrations, and FHIR rematerialisation impact the upgrade brings. Use when the user wants to check an upgrade from one Tamanu version to another (e.g. "check hotfixes from v2.31 to v2.47"), confirm no intermediate hotfix was dropped, or understand what config, migrations, and FHIR rework a multi-version jump requires. Handles Tamanu's train-release model (release/X.YY branches vs vX.YY.Z patch tags) and the cherry-pick model where the same logical fix has different SHAs on different branches. Purely git-based — no live database or Canopy access needed. Not for cutting a release (see release-cutoff-checks) or deciding which tests to run (see scope-tamanu-release-tests).
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Given a "from" version and a "to" version for a Tamanu upgrade — often several minor versions apart
(e.g. v2.31 -> v2.47) — verify the upgrade is safe and report what it entails. You are working
inside a clone of the Tamanu repo, so read the history directly with git. Three checks: hotfixes,
configuration/data requirements, and migrations/FHIR impact.
Tamanu uses a train-release model. Each minor version is cut from main as a long-lived branch
release/X.YY (e.g. release/2.31, release/2.47). Patch releases (vX.YY.Z) are tags/commits on
that branch. Hotfixes are commits landed on a release branch after its initial release (exclude
version-bump commits). If an intermediate branch was merged to main before the target branch was
created, its hotfixes are already inherited by the target.
NEVER compare by SHA — hotfixes are cherry-picked, so the same fix has a different SHA on every branch. ALWAYS match by commit message subject (the first line). A hotfix counts as included if a commit with an equivalent subject exists in the target branch. Search far enough back (at least 50-100 commits) — cherry-picks are not always recent. Filter out version-bump and dependency-update commits before comparing; they never need to be carried forward.
Verify all hotfixes are included in the target version. You must check every release branch from
the current version's branch up to the target — not just the two endpoints, and including the
from-branch itself. Hotfixes landed on the from-branch after the deployed from-version may never
have been forward-merged to main, so they can be silently missing from the target. Upgrading
v2.31 -> v2.47 means checking release/2.31 (the from-branch), release/2.32, 2.33, ... 2.46
for hotfixes that might be missing from the target.
For each of these release branches:
main before the target
branch was created. For the from-branch, use the deployed from-version tag instead (its hotfixes
are the commits landed after that patch release).Output: a brief summary line (All included / N missing from M branches). Only list the missing
hotfixes, each with its branch and commit message.
List what new configuration and data the upgrade requires, in four categories:
removed lists of
packages/central-server/app/ai/promptProtocolLedger.json present in the target but not the
source (when the source predates the ledger, every entry in the target counts). List each with its
context, token, and reason. A deployment that overrides that context's prompt in settings needs its
prompt checked, since it may still refer to the removed token.For each category, list the items with a one-line description; if a category has none, say "None". Be concise.
Report data-migration requirements and FHIR rematerialisation impact between the versions.
Data migration subcommands — list any subcommands that must be run
(e.g. npm run --workspace @tamanu/central-server start migrateVitals).
Long-running migrations — flag migrations that will be slow because they touch every (or
most) rows in large tables (encounters, notes, patients, sync_lookup,
sync_session_data, etc.). Slow patterns:
NOT NULL column with a default (rewrites the whole table)UPDATE with no WHERE, or a broad WHEREFHIR rematerialisation impact — do not investigate the FHIR system; apply these rules directly. Tamanu uses database triggers on upstream tables to queue FHIR rematerialisation jobs; large-scale rematerialisation happens when a migration or reference-data change affects many rows in those upstream tables. Flag these patterns in migration diffs:
a. Reference-data changes — INSERT/UPDATE/DELETE on reference_data for these types:
drug -> rematerialises FhirImmunization and FhirMedicationRequest. Highest impact.labTestPriority -> rematerialises FhirServiceRequestbodySite, specimenType -> rematerialises FhirSpecimenvillage -> rematerialises FhirPatient (light impact)b. Bulk upstream-table changes — migrations that UPDATE/DELETE many rows in:
patients, encounters -> FhirPatient, FhirEncounteradministered_vaccines -> FhirImmunizationlab_requests, lab_tests, imaging_requests -> FhirServiceRequestpharmacy_orders, prescriptions -> FhirMedicationRequestc. FHIR builder code changes — changes to
packages/database/src/utils/fhir/*/getValues.ts require manual rematerialisation.
For each category, list items found; if none, say "None". If nothing triggers FHIR work, say "No FHIR rematerialisation impact". Be concise.
The Tamanu commit history is authoritative. This skill encodes a method, not a fixed answer — branch names, table names, and the FHIR trigger rules can change over time. If the repo disagrees with this skill, the repo wins. Never decide a hotfix is present or missing from memory of a past release — always read the actual history, and match by subject, never by SHA.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Check whether this card's code meets the acceptance criteria
日本語の概要は準備中です。原文の説明を表示しています。
Summarise the unit and e2e tests a branch/PR adds, run only those, and produce a paste-ready report (e.g. for a Linear card). Use when asked to 'summarise added tests', 'run the new tests', 'what tests did this PR add', or to prove a card's test coverage.
日本語の概要は準備中です。原文の説明を表示しています。
Run a quick UX/UI workshop using ASCII-art sketches
日本語の概要は準備中です。原文の説明を表示しています。
Write automated tests for unticked scenarios in this card's test cases
日本語の概要は準備中です。原文の説明を表示しています。
Review code changes on this card for likely bugs, regressions, and missed edges
日本語の概要は準備中です。原文の説明を表示しています。
Maintain a support docs pack — dedup, length budgets, and no splintering — and land changes as a reviewed pull request. Use when a support thread, or a hand-off from Support assist, surfaces a new resolution, a correction to an existing one, or a deployment quirk worth recording. Not for ordinary code changes.
日本語の概要は準備中です。原文の説明を表示しています。