docs(roadmap): v10 — Phase B complete (canonical docker-prep + sync tooling)
- All B-tasks complete except B4 (husky hook) and B7-4 (AGENTS.md updates) - Canonical home landed at common-plat@a418a23e - Both pilots synced; end-to-end verified on clock + peakpulse - 3 bonus capabilities documented (--check, portable sed, .gitkeep preservation) - \xc2\xa710 execution step 12 marked done with commit refs
This commit is contained in:
parent
8de72351de
commit
11c185e772
@ -1,6 +1,6 @@
|
||||
# Docker Build Optimization Roadmap
|
||||
|
||||
> **Status:** Draft v9 (Phase A complete on pilots; Phase E1/E2/E5 — `docker-doctor.sh` linter landed) · **Owner:** Platform DevOps · **Created:** 2026-05-27 · **Revised:** 2026-05-27
|
||||
> **Status:** Draft v10 (Phases A + B + E1/E2/E5 complete on pilots; Phase D awaiting approval) · **Owner:** Platform DevOps · **Created:** 2026-05-27 · **Revised:** 2026-05-27
|
||||
>
|
||||
> Pilot Docker-build correctness + speed fixes on `learning_ai_clock` (web + backend)
|
||||
> and `learning_ai_peakpulse` (backend), then capture the playbook here for
|
||||
@ -388,9 +388,9 @@ time DOCKER_BUILDKIT=1 docker compose build backend
|
||||
compounds linearly with time and the `.npmrc` template precedent proves the
|
||||
pattern is cheap.
|
||||
|
||||
- [ ] **B1.** Add `--dry-run` flag — list packs/rewrites, no side effects
|
||||
- [ ] **B2.** Idempotency guard — refuse to run if any `*.bak` exists unless `--force`
|
||||
- [ ] **B3.** Ensure `.docker-deps/` and `*.bak` are in `.gitignore` of every pilot repo
|
||||
- [x] **B1.** `--dry-run` flag (`common-plat@a418a23e`).
|
||||
- [x] **B2.** Idempotency guard via `*.bak` detection + `--force` override (`common-plat@a418a23e`).
|
||||
- [x] **B3.** `.docker-deps/` and `*.bak` in `.gitignore` on both pilots (clock + peakpulse). Verified by `docker-doctor.sh`.
|
||||
- [ ] **B4.** Pre-commit hook (husky) — block commits containing rewritten `package.json`, staged tarballs, OR `.bak` files:
|
||||
```bash
|
||||
# .husky/pre-commit
|
||||
@ -403,14 +403,17 @@ pattern is cheap.
|
||||
exit 1
|
||||
fi
|
||||
```
|
||||
- [ ] **B5.** Auto-restore on script error via `trap restore_on_error EXIT` (unless `--keep` passed)
|
||||
- [ ] **B6.** Update script header comment per § 7.4 template
|
||||
- [ ] **B7. CANONICAL HOME (was deferred — now in Phase B proper).**
|
||||
- [ ] **B7-1.** Move script to `learning_ai_common_plat/scripts/docker-prep.template.sh`
|
||||
- [ ] **B7-2.** Add `learning_ai_common_plat/scripts/sync-docker-prep.sh` to copy template into all product repos (mirrors `sync-npmrc.sh`)
|
||||
- [ ] **B7-3.** Add `learning_ai_common_plat/scripts/check-docker-prep-drift.sh` for CI (mirrors `check-npmrc-drift.sh`)
|
||||
- [ ] **B7-4.** Update every repo's `AGENTS.md` with the "NEVER edit `docker-prep.sh` directly" warning + template link
|
||||
- [ ] **B8.** Add `--strip-overrides` option that removes `pnpm.overrides` block after build — safety net in case `--restore` is forgotten
|
||||
- [x] **B5.** Auto-restore on script error via `trap cleanup_on_error EXIT` + `--keep` opt-out (`common-plat@a418a23e`).
|
||||
- [x] **B6.** Standardized header + usage block per § 7.4 template (`common-plat@a418a23e`).
|
||||
- [x] **B7. CANONICAL HOME landed.**
|
||||
- [x] **B7-1.** Canonical at `learning_ai_common_plat/scripts/docker-prep.template.sh` + 2 helpers `_docker-prep-inject.js`, `_docker-prep-strip.js` (`common-plat@a418a23e`).
|
||||
- [x] **B7-2.** `learning_ai_common_plat/scripts/sync-docker-prep.sh` syncs all 3 files (mirrors `sync-npmrc.sh`).
|
||||
- [x] **B7-3.** `learning_ai_common_plat/scripts/check-docker-prep-drift.sh` for CI (mirrors `check-npmrc-drift.sh`).
|
||||
- [ ] **B7-4.** Update every repo's `AGENTS.md` with "NEVER edit `docker-prep.sh` directly" warning + template link — *deferred to Phase D rollout*.
|
||||
- [x] **B8.** `--strip-overrides` option removes `pnpm.overrides` block as a safety net (`common-plat@a418a23e`).
|
||||
- [x] **B+.** `--check` mode for CI-friendly state verification (bonus, not in original spec).
|
||||
- [x] **B+.** Portable `sed -i` (BSD on macOS, GNU on Linux).
|
||||
- [x] **B+.** Preserve `.docker-deps/.gitkeep` on clear (fixes earlier regression where `--restore` deleted the tracked file).
|
||||
|
||||
---
|
||||
|
||||
@ -803,8 +806,13 @@ Checks implemented by `docker-doctor.sh`:
|
||||
(`common-plat@130883a7`) + per-repo wrappers (`clock@aa5202fe7`,
|
||||
`peakpulse@af207b7`) + SKILLS doc. Verified PASS on both pilots, FAIL with
|
||||
6 specific findings on un-migrated control (`learning_ai_notes`).
|
||||
12. **⚳ Phase B** — harden `docker-prep.sh` on clock, then promote to canonical
|
||||
home in common-plat (B7) and sync to peakpulse.
|
||||
12. **✅ Phase B** — `docker-prep.sh` hardened + promoted to canonical home in
|
||||
common-plat (`common-plat@a418a23e`). Synced to both pilots
|
||||
(`clock@27034d90f`, `peakpulse@563a45e`). All Phase B checklist items
|
||||
landed except B4 (husky pre-commit hook) and B7-4 (per-repo AGENTS.md
|
||||
warnings — deferred to Phase D rollout). Verified end-to-end on both
|
||||
pilots: dry-run → pack → check (fail) → idempotency guard → restore →
|
||||
`git status` clean.
|
||||
13. **⚳ Phase E3/E4/E6** — wire `docker-doctor` into CI (E3) + pre-commit (E4) +
|
||||
`make doctor` target (E6). Deferred to after Phase B so `docker-prep.sh`
|
||||
artifacts are caught by the same linter pass.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user