From fc91dc1076d31ee14e199cad948feec05ca457c2 Mon Sep 17 00:00:00 2001 From: ngqile Date: Thu, 26 Nov 2026 16:37:29 +0800 Subject: [PATCH] docs: mark local stack change tasks complete Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM --- openspec/changes/add-repo-foundation-local-stack/tasks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openspec/changes/add-repo-foundation-local-stack/tasks.md b/openspec/changes/add-repo-foundation-local-stack/tasks.md index b726acc..39bc82b 100644 --- a/openspec/changes/add-repo-foundation-local-stack/tasks.md +++ b/openspec/changes/add-repo-foundation-local-stack/tasks.md @@ -24,12 +24,12 @@ Run serially: every group touches build files or shared config. - [x] 4.1 Ask the user for the dump, giving them this exact command: `mysqldump --no-data --routines --triggers --skip-add-drop-table --databases service-system service-counter service-member service-log service-email > 01-schema.sql`, plus a data dump of an allow-list of reference tables. Build the allow-list from the services-system entities: role, module, system_property, location_hierarchy and the other lookup tables, each checked for personal data before it is listed. Put the files in `local/seed/`. Verify: grep the files for `INSERT INTO \`(member|user|event_attendance|orders)` and it is empty. - [x] 4.2 Write `03-colite.sql`: one company row and one admin user with the Administrator role, a bcrypt hash of the documented dev password, and the column set matching the dumped `user` table. Verify: after `docker compose down -v && local/up.sh`, `SELECT count(*) FROM \`service-system\`.user` returns 1. The admin can log in through `POST /auth/...` via the gateway (endpoint confirmed from services-auth) and gets a token. Result: `POST /auth/authenticate` through the gateway (`api-key` header) returns a JWT for `admin` / `colite-dev-admin`. A wrong password returns 200 with an empty body, which is existing Tastefully behaviour. MySQL runs with `--log-bin-trust-function-creators=1 --innodb-strict-mode=OFF` to load the dumped schema, and its healthcheck uses TCP so services wait for seeding to finish. -- [ ] 4.3 Write `local/README.md`: prerequisites (JDK 21, Maven, Docker, registry login), build/up, reset (`docker compose -f local/docker-compose.yml down -v`), the dev login, and how to rebuild one service and attach a debugger inside the stack. (This replaces the planned "run one service from an IDE": services address each other by container name, so a service outside Docker cannot join the stack.) Verify: a second developer follows it on a clean clone without help. If no second developer is available, re-run the documented commands verbatim on a fresh clone in a scratch dir. +- [x] 4.3 Write `local/README.md`: prerequisites (JDK 21, Maven, Docker, registry login), build/up, reset (`docker compose -f local/docker-compose.yml down -v`), the dev login, and how to rebuild one service and attach a debugger inside the stack. (This replaces the planned "run one service from an IDE": services address each other by container name, so a service outside Docker cannot join the stack.) Verify: a second developer follows it on a clean clone without help. If no second developer is available, re-run the documented commands verbatim on a fresh clone in a scratch dir. ## 5. Smoke check - [x] 5.1 Add `local/smoke.sh` (design decision 8). Verify on a healthy stack: exit 0 and prints `200`. Then `docker compose stop service-counter`: exit non-zero, with the failing URL printed. -- [ ] 5.2 Integration: from a fresh clone in a scratch directory, run `mvn -T 1C verify`, `local/up.sh` and `local/smoke.sh`. Verify: all three succeed and `docker compose ps` shows every service running. Paste the outputs into the PR description. +- [x] 5.2 Integration: from a fresh clone in a scratch directory, run `mvn -T 1C verify`, `local/up.sh` and `local/smoke.sh`. Verify: all three succeed and `docker compose ps` shows every service running. Paste the outputs into the PR description. ## Workflow follow-up