From a2d8a789e04530870374c01399754659827726ad Mon Sep 17 00:00:00 2001 From: "Seb H." <138793908+SebHenn@users.noreply.github.com> Date: Mon, 23 Nov 2026 17:57:51 +0100 Subject: [PATCH 1/3] M28, third part: the 1.0 checklist and a proposed support policy Documentation only. docs/release-1.0.md lists each 1.0 condition with how it is checked and where it stands, including what is not met. SUPPORT.md proposes which versions get security fixes, for the maintainer to confirm. Co-Authored-By: Claude Sonnet 5.5 Signed-off-by: Seb H. <138793908+SebHenn@users.noreply.github.com> --- CHANGELOG.md | 7 +++ README.md | 1 + SUPPORT.md | 52 +++++++++++++++++++ docs/handover.md | 3 +- docs/plan-m28-toward-1-0.md | 2 +- docs/release-1.0.md | 100 ++++++++++++++++++++++++++++++++++++ docs/roadmap.md | 7 +-- 7 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 SUPPORT.md create mode 100644 docs/release-1.0.md diff --git a/CHANGELOG.md b/CHANGELOG.md index d7b74bd..6bf6a18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ version may change things that need attention when updating, and these notes say ## Unreleased +### For people running an archive and for maintainers + +- **The 1.0 checklist** is written down in `docs/release-1.0.md`: each condition, how it is checked, and where it stands. Some are + not met yet and it says so (a group that has run it for a season, the upgrade from every earlier minor, a second person who + can approve a release). `SUPPORT.md` proposes which versions get security fixes and what is not supported; the maintainer has to + confirm it. Documentation only, nothing changes in the program. + ### For visitors and other programs - **A public item can be read by a program.** Each public item page now names `/items/{number}.json` as an alternate and carries diff --git a/README.md b/README.md index 1dba984..191720b 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ and password from `.env`. The health check is at http://localhost:8080/health. Report vulnerabilities as described in [SECURITY.md](SECURITY.md). - [Development](docs/development.md): working on the code, and how it fits together. - [Handing the project over](docs/handover.md): what a new maintainer needs to know. +- [The 1.0 checklist](docs/release-1.0.md) and [support](SUPPORT.md): what has to be true before 1.0, and where it stands. If this project ever stops, archives keep working: a running archive calls no service of this project, and exports, backups and the published images stay usable. See [what that means in practice](docs/handover.md#if-the-project-stops). diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..16ad15b --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,52 @@ +# Support + +> **Proposed, not yet confirmed.** Everything under "Proposed" is a default chosen to be something one maintainer can keep. +> Seb H. confirms or changes it before 1.0 (see [docs/release-1.0.md](docs/release-1.0.md)). Until then +> [SECURITY.md](SECURITY.md) is what holds. + +## Reporting a security problem + +Follow [SECURITY.md](SECURITY.md): GitHub's private vulnerability reporting, and the contact address in that file if you have +no GitHub account. Please do not report security problems in public issues. + +## Other problems and questions + +Open an issue in the repository, `SebHenn/commonage`. Never put an archive's material, a contributor's details or a password in +an issue: describe what you did and what happened, and say which version you run. A group's export, backup or `.env` +does not belong in a public place. + +## Proposed: which versions get security fixes + +| Version | Security fixes | For how long | +|---|---|---| +| The newest minor (today 0.5; after 1.0, the newest 1.x) | Yes: Commonage, and relevant fixes in .NET, libvips and the base images, as a rule within a week of a fix being available | As long as it is the newest | +| Any older minor | No | Update to the newest one | +| The last 0.x minor, once 1.0 is out | Proposed: security fixes only, for three months after 1.0 | Three months, then none | + +"Fix" means a bug-fix release of the newest minor (for example 0.5.1). Fixes are not made for older minors. This is the +rule already in SECURITY.md, with one added period for the move to 1.0. + +Updating is done with `scripts/update.sh`; see [docs/operations.md](docs/operations.md). Keep a backup before updating. +Updating to a newer minor before 1.0 may need attention; the notes in [CHANGELOG.md](CHANGELOG.md) say so. + +## Proposed: what is supported + +- Running the published image the way [docs/deployment.md](docs/deployment.md) describes, on x86 or ARM. +- The export, backup and restore described in [docs/operations.md](docs/operations.md). +- Updating by one release at a time, to the newest. + +## Proposed: what is not supported + +- Modified copies, or images built from a changed source. +- A server without HTTPS, or one that exposes the database or the files folder. +- A version that is not the newest minor (apart from the period above). +- Reading another system's export; only Commonage's own export is read. +- Recovering an archive without a backup. Commonage stores files in a folder and data in PostgreSQL; the backup is the group's job. +- Help with a group's own server, domain, mail or network. +- Response times. This is a project run by a volunteer: a security report gets an answer within a week, and other issues + when there is time. + +## If the project stops + +See "If the project stops" in [docs/handover.md](docs/handover.md): a running archive keeps running, and the export and backups are +open formats. diff --git a/docs/handover.md b/docs/handover.md index eee6adc..19f51af 100644 --- a/docs/handover.md +++ b/docs/handover.md @@ -19,7 +19,8 @@ should not. - **Dependency updates** arrive from Dependabot. Patches and minor updates that pass all checks merge themselves. Everything else needs someone to look. - **A release** is a tag: see "Releasing" in [development.md](development.md). The image is built for x86 and ARM, waits for - approval, and gets a signed attestation. + approval, and gets a signed attestation. Before 1.0, [release-1.0.md](release-1.0.md) lists what else has to be true; + a second person who can approve a release is one of its conditions, and is not met yet. - **Code scanning alerts** are in the repository's Security tab. Some are open on purpose; the reason is in each one. - **Where the project is going** is in [roadmap.md](roadmap.md), including what was decided against and why. diff --git a/docs/plan-m28-toward-1-0.md b/docs/plan-m28-toward-1-0.md index 835c92a..2c72404 100644 --- a/docs/plan-m28-toward-1-0.md +++ b/docs/plan-m28-toward-1-0.md @@ -1,6 +1,6 @@ # Plan for M28: toward 1.0 -Status: **plan, no code yet; decisions made (see "Decisions").** Three parts, in this order, each its own pull request. The plan goes to the `privacy-reviewer` agent +Status: **built in three parts; part 3 is `docs/release-1.0.md` and `SUPPORT.md`. Decisions made (see "Decisions").** Three parts, in this order, each its own pull request. The plan goes to the `privacy-reviewer` agent before part 1 starts, as M27 did, because part 1 brings material into the archive from outside and part 2 adds public addresses. ## What is wanted diff --git a/docs/release-1.0.md b/docs/release-1.0.md new file mode 100644 index 0000000..6a167ca --- /dev/null +++ b/docs/release-1.0.md @@ -0,0 +1,100 @@ +# The 1.0 checklist + +What has to be true before Commonage is called 1.0, how each condition is checked, and where it stands today. It is +written down so that it is checked, not remembered. The plan behind it is in +[plan-m28-toward-1-0.md](plan-m28-toward-1-0.md), part 3. + +Status written on 2026-11-23, on top of v0.5.0 with M28 parts 1 and 2 merged. **Not every condition is met, and this page says +which.** Nothing here changes how the program behaves. + +## What 1.0 means + +The version number does not wait for a group. 1.0 is tagged when every condition marked "machine" below is met and the +others are met or consciously accepted by the maintainer. A real group running it for a season (the first row) is a +condition for calling 1.0 **supported**, as decided in the plan (decision 4); until then the release notes say that no group has +yet run it for a season. + +Where a condition is checked by a machine, it is checked by a named test or script, so the claim can be run again. + +## The conditions + +| # | Condition | Checked by | Status | +|---|---|---|---| +| 1 | A real group has run it for a season | A written note from the group (their name only if they agree). Not something a test can show. | **Not met.** No group has reported yet (see the roadmap). Needed for "supported", not for the number. | +| 2 | The upgrade works from every 0.x minor | `scripts/test-update.sh` in CI (job in `ci.yml`, run on every pull request). | **Partly met, and not claimed as more.** See below. | +| 3 | Export and import round trip | `ExportImportTests` in `tests/Commonage.Tests`. | **Met, with the limits below.** | +| 4 | A support policy | [SUPPORT.md](../SUPPORT.md) and the "Which versions get fixes" section of [SECURITY.md](../SECURITY.md). | **Written, proposed, not yet confirmed by the maintainer.** | +| 5 | A second person can release | [handover.md](handover.md): a second reviewer of the `release` environment, or a written handover. | **Not met.** The handover is written; no second approver exists. | +| 6 | No open `LEAK` from the privacy review, and no known accepted limit missing from `security.md` | The last dated review, below, and [security.md](security.md). | **Reviews done for M28; a final review before the tag is still to do.** | +| 7 | Accessibility and translations | `AccessibilityTests` in `tests/Commonage.BrowserTests` (axe, every page; a new page must be added) and `TranslationTests` in `tests/Commonage.Tests`. | **Met by tests.** Real phones and screen readers have not been tested (see below). | + +### 2. The upgrade, in detail + +What `scripts/test-update.sh` really does: it takes the **newest earlier release that has a published image** (today v0.5.0), +starts it in the production setup with the demo content, tries an update to a deliberately broken image that fails after the +database was upgraded, checks that the old version, `.env`, checkout and database all come back, refuses an unknown +release, a wrong version and an update over changed files, then updates to the code in the pull request, and checks that +updating to the version it is already on changes nothing. + +What it does **not** do, so the condition stays open: + +- It tests one starting version, not each of 0.1, 0.2, 0.3, 0.4 and 0.5. An upgrade from an older minor runs through the + same migrations in order, but no machine has tried each. +- The archive in it holds the demo content, not a large or old one. +- The plan's idea of restoring a backup made by each earlier version is not built. + `scripts/test-backup-restore.sh` backs up and restores an archive made by the **current** code only. + +To meet the condition it needs either a matrix over the earlier minors in `ci.yml` (and old images that still start), or a +decision that the supported starting point is the newest minor and older ones are told to go through it, written in +`SUPPORT.md`. That is a decision for the maintainer. + +### 3. The round trip, in detail + +`ExportImportTests` reads an export of this app back as drafts, checks versions 4 to the current one, refuses other +versions and other files, drops a file with a wrong checksum, never looks up a name that climbs out of the folder, copes with an +entry that lies about its size and an `archive.json` that inflates, leaves out rejected, withdrawn and unconsented items, runs +twice without adding anything, and has a test that fails when the exporter gains a property the importer has no decision for. + +The limits are stated, not hidden: contributor details and consent are never carried over, so an export read back is not +identical to the source, and everything arrives as a draft. That is the decision in [security.md](security.md) and the +plan, not a gap. + +### 7. What no test can show + +The browser tests run in Chrome. They do not replace real phones, a screen reader in use, or a person with a slow +connection. [accessibility.md](accessibility.md) says what has and has not been checked; the usability test in +[usability-test.md](usability-test.md) has not been run with a group. + +## The privacy review + +The agent reviews are run with the `privacy-reviewer` agent against a base ref, as the project rules ask, and the last one before a +tag is dated here. A review looks for what Commonage cannot ship: showing the public something that is not published, leaking an +original file or a contributor's personal details, deleting at once, text that only works in one language, and the security +checks in [security.md](security.md). + +**Where the output is kept.** The dated summary on this page is the record: the date, what was reviewed, how many findings +of each kind were open, and what was done. The full text of a review is kept in the description of the pull request it +belongs to, and nowhere with contributor details or real archive material in it: reviews are done on code and on test +data, never on a real archive. A review that would need real material is not run; its findings are written from the code. +A finding is closed by a commit that says so, or is written into [security.md](security.md) as an accepted limit with its reason. + +### Review log + +| Date | What was reviewed | Result | Open `LEAK` | +|---|---|---|---| +| 2026-11 (M28) | The plan for M28 (before any code) | Fourteen gaps found and folded into the plan ("Changes after the review") | none open in the plan | +| 2026-11 (M28, part 1) | Reading Commonage's own export (the ZIP import): three reviews | Findings were fixed in the same pull request; the decisions on consent and on what arrives are in [security.md](security.md) | none known open; **to be confirmed by the maintainer** | +| 2026-11 (M28, part 2) | The public JSON and Dublin Core tags: one review | Same rules as the link preview; the cache and 404 behaviour are in [security.md](security.md) | none known open; **to be confirmed by the maintainer** | +| before the tag | A final review of the whole tree against `main` | **Not done yet** | open until done | + +The two "to be confirmed" rows are written from the milestone's own record and not from the review texts, which are not in this +repository. The maintainer should check them against the pull requests (#72 and #75) before the tag, and date the final review. + +## What the maintainer still has to decide or do + +1. Confirm or change the proposals in [SUPPORT.md](../SUPPORT.md). +2. Decide how condition 2 is met: an upgrade matrix in CI, or a stated starting point. +3. Add a second reviewer of the `release` environment, or someone who takes over (condition 5); see [handover.md](handover.md). +4. Run and date the final privacy review, and confirm the log above. +5. Find a group, and decide when "supported" is announced. +6. Check the README status line, which still says v0.4. diff --git a/docs/roadmap.md b/docs/roadmap.md index 7251a04..3741a99 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -183,7 +183,7 @@ real pace over M7 and M8 before promising dates. Each milestone is a minor relea | **M25 Oral histories** | 4 | A curator uploads an interview. Visitors play it with its transcript beside it, and the file carries no metadata. | | **M26 Description history** | 3 | A curator sees who changed which field and when, and restores an earlier description. | | **M27 Visibility levels** ✅ | 5 | An item can be public as a record without its media, or embargoed until a date. Every public query goes through `VisibleItems`. | -| **M28 Toward 1.0** | 3 | Commonage reads its own export, so archives can be merged. Dublin Core and a JSON alternate exist. A 1.0 checklist is met. | +| **M28 Toward 1.0** ✅ | 3 | Commonage reads its own export, so archives can be merged. Dublin Core and a JSON alternate exist. A 1.0 checklist is written ([release-1.0.md](release-1.0.md)); not all of it is met yet. | M22 to M28 were planned in November 2026, after M21, from the "Later" list. There are still no reports from groups or testers, so the order is a judgement again: documents are the largest gap between what groups hold and what the app takes, @@ -530,7 +530,7 @@ shows the years of its published items. M19 is complete. **M26 Description history** | 3 | A curator sees who changed which field and when, and restores an earlier description. | | **M27 Visibility levels** ✅ | 5 | An item can be public as a record without its media, or embargoed until a date. Every public query goes through `VisibleItems`. | -| **M28 Toward 1.0** | 3 | Commonage reads its own export, so archives can be merged. Dublin Core and a JSON alternate exist. A 1.0 checklist is met. | +| **M28 Toward 1.0** ✅ | 3 | Commonage reads its own export, so archives can be merged. Dublin Core and a JSON alternate exist. A 1.0 checklist is written ([release-1.0.md](release-1.0.md)); not all of it is met yet. | M22 to M28 were planned in November 2026, after M21, from the "Later" list. There are still no reports from groups or testers, so the order is a judgement again: documents are the largest gap between what groups hold and what the app takes, @@ -898,7 +898,8 @@ shows the years of its published items. M19 is complete. **M28 Toward 1.0** -- The plan is in [plan-m28-toward-1-0.md](plan-m28-toward-1-0.md). +- The plan is in [plan-m28-toward-1-0.md](plan-m28-toward-1-0.md). Built in three parts; the checklist and what is still unmet are in + [release-1.0.md](release-1.0.md), the proposed support policy in [SUPPORT.md](../SUPPORT.md). - Reading Commonage's own export (versions 4 and later) with the import's dry run. Dublin Core and `/items/{id}.json` as an alternate link. A 1.0 checklist: a real group running it, the upgrade tested from every 0.x minor version, a support policy, and a second release approver or a written handover. From 5cda68247263b3547482cab591f27e7233085014 Mon Sep 17 00:00:00 2001 From: "Seb H." <138793908+SebHenn@users.noreply.github.com> Date: Mon, 23 Nov 2026 18:02:55 +0100 Subject: [PATCH 2/3] M28, fourth part: support policy confirmed, update tested from every earlier minor SUPPORT.md: security fixes go to the newest minor only, confirmed by the maintainer on 2026-11-23; the extra period after 1.0 is removed. scripts/test-update.sh takes a minor, makes a backup with that release's own scripts and restores it into the new version at the end. A new CI job update-from runs it for 0.1 to 0.5 (fail-fast off); existing job names are unchanged. Co-Authored-By: Claude Sonnet 5.5 Signed-off-by: Seb H. <138793908+SebHenn@users.noreply.github.com> --- .github/workflows/ci.yml | 17 ++++++++++++++++ CHANGELOG.md | 9 +++++--- SUPPORT.md | 19 ++++++++--------- docs/development.md | 4 +++- docs/release-1.0.md | 44 ++++++++++++++++++++++------------------ scripts/test-update.sh | 34 +++++++++++++++++++++++++------ 6 files changed, 87 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b196dd1..e10533b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,6 +70,23 @@ jobs: # Starts the previous published release, tries an update that fails, then updates to this code. - run: sh scripts/test-update.sh + # The upgrade from each earlier minor, with a backup made by that version. A new job, so the name of "update" stays. + update-from: + name: update-from-${{ matrix.minor }} + runs-on: ubuntu-latest + timeout-minutes: 25 + strategy: + fail-fast: false + matrix: + # Each earlier 0.x minor. v0.1.0 never had a published image, so 0.1 means v0.1.1. Add a line for each new minor. + minor: ["0.1", "0.2", "0.3", "0.4", "0.5"] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + persist-credentials: false + - run: sh scripts/test-update.sh ${{ matrix.minor }} + secret-scan: runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bf6a18..fc544e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,12 @@ version may change things that need attention when updating, and these notes say ### For people running an archive and for maintainers - **The 1.0 checklist** is written down in `docs/release-1.0.md`: each condition, how it is checked, and where it stands. Some are - not met yet and it says so (a group that has run it for a season, the upgrade from every earlier minor, a second person who - can approve a release). `SUPPORT.md` proposes which versions get security fixes and what is not supported; the maintainer has to - confirm it. Documentation only, nothing changes in the program. + not met yet and it says so (a group that has run it for a season, a second person who + can approve a release). `SUPPORT.md` says which versions get security fixes and what is not supported: the newest minor only, as + the maintainer decided on 2026-11-23. The program itself does not change. +- **The update is tested from every earlier minor.** `scripts/test-update.sh` takes a minor (`scripts/test-update.sh 0.3`), + makes a backup with that release's own scripts and, after updating, restores that backup into the new version. A new CI job + `update-from` runs it for 0.1 to 0.5. It has not run in CI yet, so `docs/release-1.0.md` does not claim more than that. ### For visitors and other programs diff --git a/SUPPORT.md b/SUPPORT.md index 16ad15b..c925351 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -1,8 +1,8 @@ # Support -> **Proposed, not yet confirmed.** Everything under "Proposed" is a default chosen to be something one maintainer can keep. -> Seb H. confirms or changes it before 1.0 (see [docs/release-1.0.md](docs/release-1.0.md)). Until then -> [SECURITY.md](SECURITY.md) is what holds. +> **Confirmed by the maintainer, Seb H., on 2026-11-23.** Which versions get security fixes is decided. +> The rest of this page is written as defaults a single maintainer can keep. +> See [docs/release-1.0.md](docs/release-1.0.md). [SECURITY.md](SECURITY.md) says the same about fixes. ## Reporting a security problem @@ -15,31 +15,30 @@ Open an issue in the repository, `SebHenn/commonage`. Never put an archive's mat an issue: describe what you did and what happened, and say which version you run. A group's export, backup or `.env` does not belong in a public place. -## Proposed: which versions get security fixes +## Which versions get security fixes | Version | Security fixes | For how long | |---|---|---| | The newest minor (today 0.5; after 1.0, the newest 1.x) | Yes: Commonage, and relevant fixes in .NET, libvips and the base images, as a rule within a week of a fix being available | As long as it is the newest | | Any older minor | No | Update to the newest one | -| The last 0.x minor, once 1.0 is out | Proposed: security fixes only, for three months after 1.0 | Three months, then none | -"Fix" means a bug-fix release of the newest minor (for example 0.5.1). Fixes are not made for older minors. This is the -rule already in SECURITY.md, with one added period for the move to 1.0. +"Fix" means a bug-fix release of the newest minor (for example 0.5.1). Fixes are not made for older minors, and there is +no extra period after 1.0: someone on an older version updates through the newest minor. This is the rule in SECURITY.md. Updating is done with `scripts/update.sh`; see [docs/operations.md](docs/operations.md). Keep a backup before updating. Updating to a newer minor before 1.0 may need attention; the notes in [CHANGELOG.md](CHANGELOG.md) say so. -## Proposed: what is supported +## What is supported - Running the published image the way [docs/deployment.md](docs/deployment.md) describes, on x86 or ARM. - The export, backup and restore described in [docs/operations.md](docs/operations.md). - Updating by one release at a time, to the newest. -## Proposed: what is not supported +## What is not supported - Modified copies, or images built from a changed source. - A server without HTTPS, or one that exposes the database or the files folder. -- A version that is not the newest minor (apart from the period above). +- A version that is not the newest minor. - Reading another system's export; only Commonage's own export is read. - Recovering an archive without a backup. Commonage stores files in a folder and data in PostgreSQL; the backup is the group's job. - Help with a group's own server, domain, mail or network. diff --git a/docs/development.md b/docs/development.md index 04416bb..460ac5b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -244,7 +244,9 @@ Without JavaScript, `css/nojs.css` shows what would otherwise stay folded away. violation), tests each JavaScript behaviour, and does the main tasks with JavaScript switched off. Add new pages to `AccessibilityTests`, and a test for each new behaviour in `wwwroot/js`. - `scripts/test-backup-restore.sh` and `scripts/test-update.sh` run whole archives in Docker. The second needs ports 80 - and 443 free. + and 443 free. `scripts/test-update.sh 0.3` starts from the newest published 0.3.x (without an argument, from the newest earlier + release), also makes a backup with that release and restores it into the new version at the end. CI runs it for each earlier + minor in the `update-from` job. Before a release, also check by hand what automated tests cannot judge ([accessibility.md](accessibility.md#before-each-release)). diff --git a/docs/release-1.0.md b/docs/release-1.0.md index 6a167ca..bc61bf5 100644 --- a/docs/release-1.0.md +++ b/docs/release-1.0.md @@ -21,32 +21,36 @@ Where a condition is checked by a machine, it is checked by a named test or scri | # | Condition | Checked by | Status | |---|---|---|---| | 1 | A real group has run it for a season | A written note from the group (their name only if they agree). Not something a test can show. | **Not met.** No group has reported yet (see the roadmap). Needed for "supported", not for the number. | -| 2 | The upgrade works from every 0.x minor | `scripts/test-update.sh` in CI (job in `ci.yml`, run on every pull request). | **Partly met, and not claimed as more.** See below. | +| 2 | The upgrade works from every 0.x minor | `scripts/test-update.sh` in CI: job `update` (newest earlier release) and the matrix job `update-from` (each earlier minor), both in `ci.yml`, run on every pull request. | **Built, not yet run in CI.** The matrix covers every earlier minor with an image; see below. | | 3 | Export and import round trip | `ExportImportTests` in `tests/Commonage.Tests`. | **Met, with the limits below.** | -| 4 | A support policy | [SUPPORT.md](../SUPPORT.md) and the "Which versions get fixes" section of [SECURITY.md](../SECURITY.md). | **Written, proposed, not yet confirmed by the maintainer.** | +| 4 | A support policy | [SUPPORT.md](../SUPPORT.md) and the "Which versions get fixes" section of [SECURITY.md](../SECURITY.md). | **Met.** Confirmed by the maintainer (Seb H.) on 2026-11-23: security fixes go to the newest minor only; older versions update through it. | | 5 | A second person can release | [handover.md](handover.md): a second reviewer of the `release` environment, or a written handover. | **Not met.** The handover is written; no second approver exists. | | 6 | No open `LEAK` from the privacy review, and no known accepted limit missing from `security.md` | The last dated review, below, and [security.md](security.md). | **Reviews done for M28; a final review before the tag is still to do.** | | 7 | Accessibility and translations | `AccessibilityTests` in `tests/Commonage.BrowserTests` (axe, every page; a new page must be added) and `TranslationTests` in `tests/Commonage.Tests`. | **Met by tests.** Real phones and screen readers have not been tested (see below). | ### 2. The upgrade, in detail -What `scripts/test-update.sh` really does: it takes the **newest earlier release that has a published image** (today v0.5.0), -starts it in the production setup with the demo content, tries an update to a deliberately broken image that fails after the -database was upgraded, checks that the old version, `.env`, checkout and database all come back, refuses an unknown -release, a wrong version and an update over changed files, then updates to the code in the pull request, and checks that -updating to the version it is already on changes nothing. - -What it does **not** do, so the condition stays open: - -- It tests one starting version, not each of 0.1, 0.2, 0.3, 0.4 and 0.5. An upgrade from an older minor runs through the - same migrations in order, but no machine has tried each. +What `scripts/test-update.sh ` does: it takes the **newest release of that minor that has a published image**, starts it +in the production setup with the demo content, makes a backup with **that release's own** `scripts/backup.sh`, tries an update +to a deliberately broken image that fails after the database was upgraded, checks that the old version, `.env`, checkout and +database all come back, refuses an unknown release, a wrong version and an update over changed files, then updates to the +code in the pull request, checks that updating to the version it is already on changes nothing, and finally restores the old +release's backup into the new version (the app upgrades that database when it starts) and checks the content is back. + +Which minors are covered: the published images are 0.1.1, 0.2.0, 0.3.0, 0.4.0, 0.4.1 and 0.5.0 (checked against the registry's +tag list on 2026-11-23). v0.1.0 never had an image, so 0.1 is tested as v0.1.1. The `update-from` job in `ci.yml` runs one +matrix entry for each of 0.1 to 0.5 with `fail-fast: false`; the older `update` job still tests the newest earlier release. A +new minor needs a new line in the matrix. The `update-from-*` check names are new and are not required checks until the +maintainer makes them so. + +What is **not** shown, said plainly: + +- The matrix has not run in CI yet, and `scripts/test-update.sh` was **not run here** (Docker Desktop was not running, and it + is not started without asking). It passes `sh -n` and its release selection was checked against the tags only. Releases + 0.1 to 0.4 have not been tried by this script at all: an old release's own scripts or health check may need a small fix the + first time. Read the first CI run before ticking this condition. +- Only the newest patch of each minor is the starting point (0.4.0 is not tried separately from 0.4.1). - The archive in it holds the demo content, not a large or old one. -- The plan's idea of restoring a backup made by each earlier version is not built. - `scripts/test-backup-restore.sh` backs up and restores an archive made by the **current** code only. - -To meet the condition it needs either a matrix over the earlier minors in `ci.yml` (and old images that still start), or a -decision that the supported starting point is the newest minor and older ones are told to go through it, written in -`SUPPORT.md`. That is a decision for the maintainer. ### 3. The round trip, in detail @@ -92,8 +96,8 @@ repository. The maintainer should check them against the pull requests (#72 and ## What the maintainer still has to decide or do -1. Confirm or change the proposals in [SUPPORT.md](../SUPPORT.md). -2. Decide how condition 2 is met: an upgrade matrix in CI, or a stated starting point. +1. (Done on 2026-11-23: the support policy is confirmed, newest minor only.) +2. Read the first CI run of the `update-from` matrix, fix what it finds, and decide whether `update-from-*` become required checks. 3. Add a second reviewer of the `release` environment, or someone who takes over (condition 5); see [handover.md](handover.md). 4. Run and date the final privacy review, and confirm the log above. 5. Find a group, and decide when "supported" is announced. diff --git a/scripts/test-update.sh b/scripts/test-update.sh index ae95041..a822556 100755 --- a/scripts/test-update.sh +++ b/scripts/test-update.sh @@ -1,9 +1,12 @@ #!/bin/sh -# Tests updating a real archive: starts the previous published release in the production setup, tries an update that -# fails after upgrading the database, checks that everything went back, then updates to the current code. +# Tests updating a real archive: starts an earlier published release in the production setup, makes a backup with that +# release's own scripts, tries an update that fails after upgrading the database, checks that everything went back, +# updates to the current code, and finally restores the old release's backup into the new version. # -# scripts/test-update.sh +# scripts/test-update.sh from the newest earlier release that has a published image +# scripts/test-update.sh 0.3 from the newest 0.3.x release that has a published image # +# CI runs it for each earlier minor (job "update-from" in ci.yml), and from the newest one on every pull request. # Works on its own clone and as its own Compose project, so it never touches your archive, but it needs ports 80 and # 443 free. CI runs it on every pull request. set -eu @@ -15,9 +18,15 @@ cd "$repository" if command -v cygpath >/dev/null 2>&1; then repository=$(cygpath -m "$repository"); fi head=$(git rev-parse HEAD) -# The newest earlier release with a published image. A release just tagged may still be waiting for its approval. +minor=${1:-} +case "$minor" in + "" | [0-9]*.[0-9]*) ;; + *) echo "Usage: scripts/test-update.sh [minor, such as 0.3]" >&2; exit 2 ;; +esac +# The newest earlier release (of the given minor) with a published image. A release just tagged may still be waiting for +# its approval, and v0.1.0 never had an image. previous= -for tag in $(git tag --list 'v[0-9]*.[0-9]*.[0-9]*' --merged HEAD --sort=-v:refname); do +for tag in $(git tag --list "v${minor:-[0-9]*}.[0-9]*" --merged HEAD --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$'); do [ "$(git rev-parse "$tag^{commit}")" != "$head" ] || continue if docker pull --quiet "ghcr.io/sebhenn/commonage:${tag#v}" >/dev/null 2>&1; then previous=$tag @@ -25,7 +34,7 @@ for tag in $(git tag --list 'v[0-9]*.[0-9]*.[0-9]*' --merged HEAD --sort=-v:refn fi echo "$tag has no published image yet, so trying the release before it." done -[ -n "$previous" ] || { echo "FAILED: no earlier release with an image found. CI must fetch the tags." >&2; exit 1; } +[ -n "$previous" ] || { echo "FAILED: no earlier release ${minor:+of $minor }with an image found. CI must fetch the tags." >&2; exit 1; } echo "Testing the update from $previous to $head." work=$(mktemp -d) @@ -104,6 +113,11 @@ docker compose up -d --no-build >/dev/null 2>&1 wait_for_page migrations_before=$(migrations) +# The backup that release itself makes, with its own scripts. It is restored into the new version at the end. +echo "Making a backup with $previous..." +sh scripts/backup.sh "$work/old-backup" >/dev/null || fail "$previous could not make a backup" +old_backup=$(ls -dt "$work"/old-backup/commonage-* | head -n 1) + echo "Trying an update that fails after upgrading the database..." if sh scripts/update.sh 9.0.1 "$work/backups"; then fail "the update to a broken version reported success" @@ -134,9 +148,17 @@ readable=$(docker compose exec -T db psql --username=commonage --dbname=commonag "select count(*) from \"DataProtectionKeys\" where \"Xml\" like '%requiresEncryption=\"true\"%'" | tr -d '\r') [ "$readable" = 0 ] || fail "$readable login keys in the database are still readable without the key" curl -kfsS https://localhost/search | grep -q "Flood in Mill Street" || fail "the content did not survive the update" +migrations_current=$(migrations) [ "$(ls -d "$work"/backups/commonage-* | wc -l)" -ge 2 ] || fail "no backup was made" echo "Updating to the version it is already on changes nothing..." sh scripts/update.sh 9.0.0 "$work/backups" | grep -q "Already on" || fail "it did not notice the version is current" +echo "Restoring the backup made by $previous into the new version..." +sh scripts/restore.sh --yes "$old_backup" >/dev/null +wait_for_page +[ "$(running_image)" = "$image:9.0.0" ] || fail "the new image does not run after the restore, but $(running_image)" +[ "$(migrations)" = "$migrations_current" ] || fail "the database from the backup was not upgraded ($(migrations) migrations, the new version has $migrations_current)" +curl -kfsS https://localhost/search | grep -q "Flood in Mill Street" || fail "the content of the old backup did not come back" + echo "The update works." From 37b7b4a6b8aa2cc080adaf5b5103c98c2dfb9d3a Mon Sep 17 00:00:00 2001 From: "Seb H." <138793908+SebHenn@users.noreply.github.com> Date: Mon, 23 Nov 2026 18:04:58 +0100 Subject: [PATCH 3/3] M28, third part: tighten the update test argument and the matrix step after review Co-Authored-By: Claude Sonnet 5.5 Signed-off-by: Seb H. <138793908+SebHenn@users.noreply.github.com> --- .github/workflows/ci.yml | 4 +++- SUPPORT.md | 2 +- scripts/test-update.sh | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e10533b..88f404c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,9 @@ jobs: with: fetch-depth: 0 persist-credentials: false - - run: sh scripts/test-update.sh ${{ matrix.minor }} + - run: sh scripts/test-update.sh "$MINOR" + env: + MINOR: ${{ matrix.minor }} secret-scan: runs-on: ubuntu-latest diff --git a/SUPPORT.md b/SUPPORT.md index c925351..9f67e6a 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -32,7 +32,7 @@ Updating to a newer minor before 1.0 may need attention; the notes in [CHANGELOG - Running the published image the way [docs/deployment.md](docs/deployment.md) describes, on x86 or ARM. - The export, backup and restore described in [docs/operations.md](docs/operations.md). -- Updating by one release at a time, to the newest. +- Updating to the newest release. The update test jumps from each earlier minor straight to the current version, so that is the path that is tested. ## What is not supported diff --git a/scripts/test-update.sh b/scripts/test-update.sh index a822556..8250e59 100755 --- a/scripts/test-update.sh +++ b/scripts/test-update.sh @@ -20,7 +20,7 @@ if command -v cygpath >/dev/null 2>&1; then repository=$(cygpath -m "$repository head=$(git rev-parse HEAD) minor=${1:-} case "$minor" in - "" | [0-9]*.[0-9]*) ;; + "" | [0-9]*.[0-9]*) case "$minor" in *[!0-9.]*) echo "Usage: scripts/test-update.sh [minor, such as 0.3]" >&2; exit 2 ;; esac ;; *) echo "Usage: scripts/test-update.sh [minor, such as 0.3]" >&2; exit 2 ;; esac # The newest earlier release (of the given minor) with a published image. A release just tagged may still be waiting for @@ -116,7 +116,8 @@ migrations_before=$(migrations) # The backup that release itself makes, with its own scripts. It is restored into the new version at the end. echo "Making a backup with $previous..." sh scripts/backup.sh "$work/old-backup" >/dev/null || fail "$previous could not make a backup" -old_backup=$(ls -dt "$work"/old-backup/commonage-* | head -n 1) +old_backup=$(ls -dt "$work"/old-backup/commonage-* 2>/dev/null | head -n 1) +[ -n "$old_backup" ] || fail "$previous made no backup folder" echo "Trying an update that fails after upgrading the database..." if sh scripts/update.sh 9.0.1 "$work/backups"; then