From 80f4497f95e157e543c692af7fd2aad431d3fc49 Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Fri, 9 Oct 2026 22:37:19 +0200 Subject: [PATCH] docs(16.1-02): complete release and UAT redeploy plan --- .../16.1-02-SUMMARY.md | 239 ++++++++++++++++++ 1 file changed, 239 insertions(+) create mode 100644 .planning/phases/16.1-journal-admin-urgent-fixes-relation-search-list-state-post-f/16.1-02-SUMMARY.md diff --git a/.planning/phases/16.1-journal-admin-urgent-fixes-relation-search-list-state-post-f/16.1-02-SUMMARY.md b/.planning/phases/16.1-journal-admin-urgent-fixes-relation-search-list-state-post-f/16.1-02-SUMMARY.md new file mode 100644 index 0000000..3cc4ca9 --- /dev/null +++ b/.planning/phases/16.1-journal-admin-urgent-fixes-relation-search-list-state-post-f/16.1-02-SUMMARY.md @@ -0,0 +1,239 @@ +--- +phase: 16.1-journal-admin-urgent-fixes-relation-search-list-state-post-f +plan: 02 +subsystem: infra +tags: [release, deploy, uat, supervisor, postgres, git-tag] + +requires: + - phase: 16.1-journal-admin-urgent-fixes-relation-search-list-state-post-f + provides: "16.1-01 fixes: cabana relation search and sort subqueries, default locale first, journal FormatHTML keeps raw HTML, admin list state" +provides: + - "summercms annotated tag v0.1.16 on origin (tag object d8e3536 on d77393b), containing 06d75cb, bd8626e and 9cac45c" + - "sm-journal-plugin main a675f2f on origin: FormatHTML fix plus a nominal require of summercms v0.1.16" + - "sm-grzybyfunkcjonalne-app master cac2ee7 on origin: journal gitlink bump; README and DEPLOY.md no longer warn against re-saving imported posts" + - "UAT runs the v0.1.16 build (sha256 46428720c4b53484c146ef22c4c851b78baf9633bfe371f9d4f9314c27ca1ceb), previous binary kept as bin/grzybyfunkcjonalne.prev" + - "Posts 53 and 64 on UAT re-rendered by an admin save: no raw-HTML placeholder anywhere, post 64 has its footer" +affects: [16.1-03 unit tests, 16.2 blog editor, next summercms tag] + +actuals: + tokens: 708 # chars/4 over the realized diffs (sm-journal-plugin a675f2f + host cac2ee7); summercms.go had no code diff + tasks: 3 + commits: 0 # summercms.go, measured: git rev-list --count d77393b..HEAD before this SUMMARY commit; sibling repos add 2 (a675f2f, cac2ee7) and the tag +plan_head_before: d77393b4d1924ba5fa118faf71ded9a5163d6d5c +plan_head_after: d77393b4d1924ba5fa118faf71ded9a5163d6d5c + +tech-stack: + added: [] + patterns: + - "Go log checks on UAT read /var/log/supervisor/grzybyfunkcjonalne-go.log directly, anchored on the restart's alexandria client_id, not through supervisorctl tail" + +key-files: + created: [] + modified: + - ../sm-journal-plugin/go.mod + - ../sm-grzybyfunkcjonalne-app/plugins/golem15/journal + - ../sm-grzybyfunkcjonalne-app/README.md + - ../sm-grzybyfunkcjonalne-app/DEPLOY.md + +key-decisions: + - "Release v0.1.16 cut on d77393b after the human chose docker-first and reported the Docker-host suites passed" + - "UAT log checks read the supervisor log file directly: supervisorctl tail fails with an XML-RPC ExpatError on the ANSI escapes in GORM log lines, and the error text passes a grep -c 0 check vacuously" + - "The D-01 and D-03 end-of-phase UAT checks are recorded as human-reported but not independently confirmed; they are queued for /msd-verify-work" + +patterns-established: + - "UAT post-data proof: read-only psql via ssh as the deploy user; post data changes only through human admin saves" + +requirements-completed: [D-04, D-03] + +coverage: + - id: D1 + description: "summercms v0.1.16 annotated tag on origin contains every 16.1-01 commit; sm-journal-plugin main and the host master are pushed with the bumps; README and DEPLOY.md lost the re-save warning" + requirement: D-04 + verification: + - kind: other + ref: "git tag --contains 06d75cb (v0.1.16); git ls-remote --tags origin refs/tags/v0.1.16 (d8e3536); journal main == origin/main a675f2f; host master == origin/master cac2ee7; grep -ci omitted README.md DEPLOY.md = 0/0" + status: pass + human_judgment: false + - id: D2 + description: "UAT runs the locally built binary (sha256 equal on both sides), both supervisor programs RUNNING, previous binary kept, on-server smoke ok (98 urls)" + requirement: D-04 + verification: + - kind: other + ref: "Task 2 verify 1: on-server scripts/smoke.sh --url https://uat.grzybyfunkcjonalne.pl -> 'smoke: ok (98 urls)'" + status: pass + - kind: other + ref: "Task 2 verify 2: sha256 local == server 46428720c4b53484c146ef22c4c851b78baf9633bfe371f9d4f9314c27ca1ceb; 2 RUNNING; tag on origin -> deploy-ok (re-checked 20:36 UTC)" + status: pass + human_judgment: false + - id: D3 + description: "Posts 53 and 64 re-rendered by an admin save: no post holds the raw-HTML placeholder, post 64 has its footer" + requirement: D-03 + verification: + - kind: other + ref: "ssh grzybyfunkcjonalne-uat psql SELECT placeholder count || ':' || post-64 footer count -> 0:1 (20:35 UTC)" + status: pass + human_judgment: false + - id: D4 + description: "No SQLSTATE 42703 in the Go log since the 19:36:54 UTC restart (the relation search no longer fails on the real categories pivot)" + requirement: D-04 + verification: + - kind: other + ref: "corrected log check on /var/log/supervisor/grzybyfunkcjonalne-go.log since 2026/10/09 19:36:54 -> 0 (19 lines since restart)" + status: pass + human_judgment: false + - id: D5 + description: "Human UAT: posts-list search 'cordyceps' returns rows (D-02); list sort and category filter survive open/back, save-and-close and rail navigation and stay in the URL (D-01); an imported post's form shows pl first with title, slug, content and excerpt filled (D-03)" + requirement: D-03 + verification: [] + human_judgment: true + rationale: "Needs a browser session behind UAT basic auth and an admin login, which the executor never holds; the human reported 'all works' but that reply arrived before the re-saves had reached UAT, so these checks are not independently confirmed" + +duration: 1h 26m +completed: 2026-10-09 +status: complete +--- + +# Phase 16.1 Plan 02: Release and UAT redeploy Summary + +**summercms v0.1.16 is tagged and on origin. The journal plugin and the host are bumped and pushed. UAT runs the new build, and its on-server smoke passed. After the human re-saved posts 53 and 64, read-only checks show their HTML is back and no SQLSTATE 42703 has appeared in the log since the restart.** + +## Performance + +- **Duration:** 1h 26m wall clock. Most of it was waiting on the three human checkpoints. +- **Started:** 2026-10-09T19:10:00Z (Task 1 release sheet, approximate) +- **Completed:** 2026-10-09T20:36:08Z +- **Tasks:** 3 of 3 +- **Files modified:** 4, all in sibling repositories (`../sm-journal-plugin/go.mod`, plus the host's journal gitlink, `README.md` and `DEPLOY.md`) + +## Accomplishments + +- **Release gate (Task 1).** The gate printed `release-gate-ok`. The human chose docker-first with tag v0.1.16. +- **Tag and pushes (Task 2).** Annotated tag `v0.1.16`, tag object `d8e3536b4dce4389cac23c88b42837ee72dc872a`, on `d77393b4d1924ba5fa118faf71ded9a5163d6d5c`. Pushes: + - summercms master `e381f2c..d77393b` + - sm-journal-plugin main `3d533d4..a675f2f` + - host master `87e5353..cac2ee7` +- **UAT redeploy (Task 2).** The build ran through `scripts/build.sh`. + - The sha256 is the same locally and on the server: `46428720c4b53484c146ef22c4c851b78baf9633bfe371f9d4f9314c27ca1ceb`. + - `migrate` ran and succeeded. + - Both programs were restarted at `RESTART_TS=2026/10/09 19:36:54` (server time, UTC) and are RUNNING. + - The on-server smoke printed `smoke: ok (98 urls)`. +- **UAT data repair (Task 3).** The human re-saved posts 53 and 64 in the admin. The read-only SQL check now prints `0:1`, where it printed `2:0` before the re-saves. + - Post 53: `updated_at` 2026-10-09 20:33:53.908 UTC, no placeholder. + - Post 64: `updated_at` 20:34:08.100 UTC, no placeholder, footer present. +- **Relation search on real data (Task 3).** No `SQLSTATE 42703` line has appeared in the Go log since the restart (19 lines checked). The 6 such lines in the file all predate the restart. + +## Task Commits + +The plan made no code commits in summercms.go. The release is a tag on the existing HEAD `d77393b`. + +1. **Task 1: Release gate** (checkpoint:decision, blocking-human): no commit, by design +2. **Task 2: Tracer: tag, push, bump, build, deploy, on-server smoke:** + - summercms tag `v0.1.16` (tag object `d8e3536` on `d77393b`) + - sm-journal-plugin `a675f2f` (chore(deps): require summercms v0.1.16) + - sm-grzybyfunkcjonalne-app `cac2ee7` (chore: bump journal plugin; admin saves keep imported HTML) +3. **Task 3: UAT acceptance** (checkpoint:human-action, blocking-human): no commit. The human re-saved posts 53 and 64 in the admin, and the executor ran read-only checks afterwards. + +**Plan metadata:** this SUMMARY's docs commit; the STATE and ROADMAP updates are committed separately. + +## Release sheet (Task 1, ~19:10 UTC) + +- **summercms.go:** master HEAD `d77393b`, working tree clean. `HEAD..origin/master` was empty. No tag contained `06d75cb`. The highest tag was v0.1.15, so v0.1.16 was proposed and was absent on origin. +- **Gate (`release-gate-ok`):** + - `go vet` was clean in both repositories. + - `TestListRelationSearchSmoke` and `TestEnabledLocalesDefaultFirstSmoke` passed. + - sm-journal-plugin `./classes` passed, and so did `TestDocsTree`. + - admin vitest ran 75 files and 1106 tests, all passing. + - `check-admin-dist.sh` found no drift, and `check-admin-openapi.sh --check` exited 0. +- **Commits pushed from summercms.go:** 26 commits, including `06d75cb`, `bd8626e`, `9cac45c` and `c5e03f4` "test(16-05): Phase 16 gate". +- **Commits pushed from sm-journal-plugin:** `528d2d8`. +- **Not runnable on this machine** (no Docker socket permission): the Postgres/testcontainers suites in `modules/cabana` and the sm-journal-plugin admin harness. +- **Hygiene:** `check-phase10.sh --hygiene` reported 5 pre-existing findings, already recorded in `deferred-items.md`. +- **Human reply, verbatim:** "release v0.1.16, docker passed". This is the docker-first option with `RELEASE_TAG=v0.1.16`. + +## Task 2 record (~19:33 UTC) + +- **Pre-tag re-checks:** fetch ok, `HEAD..origin/master` empty, v0.1.16 absent on origin, ssh ok. +- **Tag:** `git ls-remote` shows `d8e3536b4dce4389cac23c88b42837ee72dc872a refs/tags/v0.1.16`. +- **Pushed heads:** + - sm-journal-plugin main: `a675f2f197d04f0a30ff03025ddcc9d2c8a93d54` + - host master: `cac2ee72fa0cc64d15488680615489ac62de9c83`. Its journal gitlink is `a675f2f`. +- **Build and upload:** + - `check-deploy.sh` ok, and `build.sh` exited 0. + - sha256 of the new binary, the same locally and on the server: `46428720c4b53484c146ef22c4c851b78baf9633bfe371f9d4f9314c27ca1ceb`. + - The previous binary is kept as `bin/grzybyfunkcjonalne.prev` (sha256 `94116f4ab576c99a130167bbf0ad9accbece48630747e03b2f9727a6a18d68ea`). + - No `.env` was uploaded. +- **Restart:** `migrate` ok, `RESTART_TS=2026/10/09 19:36:54`, both programs RUNNING. +- **Smoke:** `smoke: ok (98 urls)`, then `deploy-ok`. +- **Baseline before the re-saves:** the SQL check printed `2:0`. + +## Task 3 record + +- **First human reply, verbatim:** "all works". + - The read-only follow-up checks still printed `2:0`. Posts 53 and 64 had `updated_at` 17:33:52 UTC, which was also the latest `updated_at` across all posts, and there were no journal-post translation rows. So no save had reached UAT yet. + - The log check passed: 0 `SQLSTATE 42703` lines since the restart, out of 18 lines. + - No rollback was recommended or performed. A checkpoint was returned. +- **Second human reply, verbatim:** "resaved, no errors". +- **Orchestrator re-check:** post 53 at 20:33:53.908 UTC and post 64 at 20:34:08.100 UTC. Neither holds the placeholder, post 64 has its footer, and the check printed `0:1`. +- **This executor's re-check (20:35 UTC):** + - SQL check: printed `0:1`, so `SQL-CHECK-PASS`. + - Corrected log check: `LOG-CHECK-PASS`, with 19 lines since the restart and 0 `SQLSTATE 42703`. +- **End-of-phase human checks** (step 3 of the plan: D-01 list state, D-03 form locales and fields, the post-64 footer on `/blog/ekstrakt-z-turkey-tail`): the human reported them under "all works". That reply came before the re-saves had reached UAT, so they are **recorded as human-reported, not independently confirmed**. They are pending for `/msd-verify-work` (coverage D5). + +## Files Created/Modified + +- `../sm-journal-plugin/go.mod`: nominal `require git.golem15.com/golem15/summercms v0.1.16`. The replace to `../summercms.go` stays. +- `../sm-grzybyfunkcjonalne-app/plugins/golem15/journal`: gitlink now points to `a675f2f`. +- `../sm-grzybyfunkcjonalne-app/README.md`: the warning against editing imported posts in the admin is removed. +- `../sm-grzybyfunkcjonalne-app/DEPLOY.md`: the section that told admins not to re-save imported posts is removed. + +## Decisions Made + +- **Tag v0.1.16, docker-first.** The human reported the Docker-host suites passed, then approved the release. +- **No `en` locale change on UAT.** The framework fix (default locale first) is enough for D-03, as planned under Claude's discretion in CONTEXT. +- **Rollback was not used.** Every check passed. `bin/grzybyfunkcjonalne.prev` stays on the server. + +## Deviations from Plan + +### Auto-fixed Issues + +**1. [Rule 1 - Bug] The plan's Task 3 log check passed even when it could not read the log** +- **Found during:** Task 3 +- **Issue:** The plan read the log with `sudo supervisorctl tail -65536 grzybyfunkcjonalne-go`. On UAT, supervisor's XML-RPC fails with an ExpatError on the ANSI escape codes in GORM log lines, so no log lines come back. The error text does not contain `SQLSTATE 42703`, so `grep -c ... | grep -qx 0` passed without checking anything. +- **Fix:** The check now reads the supervisor log file directly. It fails closed when the file is unreadable or does not contain this restart's `client_id`: + `ssh grzybyfunkcjonalne-uat 'F=/var/log/supervisor/grzybyfunkcjonalne-go.log; test -r "$F" && grep -q "client_id=alexandria_2026_10_09T19_36_54" "$F" && awk -v since="2026/10/09 19:36:54" "substr(\$0,1,19) >= since" "$F" | grep -c "SQLSTATE 42703"' | grep -qx 0` +- **Files modified:** none. Only the verification command changed. +- **Verification:** The check passed, with 19 lines since the restart and 0 matches. The same file holds 6 `SQLSTATE 42703` lines from before the restart, which shows the check can see the failure it looks for. +- **Committed in:** n/a (verification only) + +--- + +**Total deviations:** 1 auto-fixed (1 bug in a verify command) +**Impact on plan:** The changed check is stricter than the plan's. There is no scope change. + +## Issues Encountered + +- The human's first Task 3 reply ("all works") came before any save had reached UAT, since the SQL still printed `2:0`. The executor returned a second checkpoint instead of accepting the reply. After the second reply ("resaved, no errors") the check printed `0:1`. +- The Docker-backed suites (modules/cabana Postgres tests, the sm-journal-plugin harness) cannot run on this machine. The human ran them on a Docker host before the release, as the docker-first option requires. + +## User Setup Required + +None. The plan's `user_setup` covered only the human's UAT admin login, which is already done. No USER-SETUP.md was generated: there are no env vars or keys to configure. + +## Next Phase Readiness + +- Plan 03 (unit tests) can start. Its tests land on master after v0.1.16 and ship with the next tag. +- `/msd-verify-work 16.1` should confirm coverage D5 on UAT: D-01 list state, D-03 form locales and fields, and the post-64 footer on `/blog/ekstrakt-z-turkey-tail`. +- Rollback is still available if needed: move `bin/grzybyfunkcjonalne.prev` back and restart `grzybyfunkcjonalne-go`. + +--- +*Phase: 16.1-journal-admin-urgent-fixes-relation-search-list-state-post-f* +*Completed: 2026-10-09* + +## Self-Check: PASSED + +- Tag v0.1.16 is on origin and contains 06d75cb. +- sm-journal-plugin a675f2f equals origin/main. +- Host cac2ee7 equals origin/master, and its gitlink is a675f2f. +- `grep -ci omitted` returns 0 for both README.md and DEPLOY.md. +- The sha256 is the same locally and on the server, and both programs are RUNNING. +- The SQL check prints 0:1 and the log check passes.