docs: update postmortem to 11-session / 9-DONE state
The 3 new commits since the postmortem was first written (5325360b4status reporter,fbc32a6d8parallel cook pool) advance the v6.0 hardening arc from 7/10 DONE to 9/10 DONE. This update captures Sessions 10 and 11 with the actual deliverables, commit hashes, and end-to-end verification notes. Updates: - Session 10 row:ae749ffb2(22 build-system files) +5325360b4(status reporter, src/cook/status.rs + src/bin/repo.rs wiring). - Session 11 row:fbc32a6d8(src/cook/scheduler.rs + src/cook.rs registration + --jobs=N flag in src/bin/repo.rs + 7 dep_levels unit tests). - Final state: 9 DONE (was 7), 1 OPEN (#10 scratch-rebuild). The OPEN row is now explicitly flagged as Qt6-engine-fix vs cookbook-improvement and noted as appropriate for a separate session. - Test coverage: 86/86 Python + 27/27 Rust (was 55/55 + 20 Rust). Added 6 status + 7 scheduler tests. - Durability caveat: now notes 8 most recent commits cover the v6.0 deliverables; remaining in git status is this postmortem itself + the user's WIP. - Replaced the 'What to commit (suggested)' block + the 'Files in v6.0 hardening arc (clean tree, ready to commit)' table with the actual commit history table (3 commits, durable in git) and a 'What remains uncommitted' table listing only the postmortem itself + user WIP paths the next commit will need to be careful about.
This commit is contained in:
@@ -1,30 +1,32 @@
|
||||
# Red Bear OS Build-System v6.0 Hardening — Post-Mortem
|
||||
|
||||
> **Scope.** This document is the durable record of the
|
||||
> 7-session v6.0 build-system hardening work arc (2026-06-08 to
|
||||
> 2026-06-12). It captures the 10 build-system improvements, 32
|
||||
> findings addressed, the Gitea Actions CI pipeline, the 55-test
|
||||
> suite covering all 17 classifier rules + their false-positive
|
||||
> inverses, and the deferred follow-up work. The 7,000+
|
||||
> uncommitted file modifications in the user's working tree are
|
||||
> not part of this post-mortem — they are ongoing WIP.
|
||||
> 11-session v6.0 build-system hardening work arc (2026-06-08 to
|
||||
> 2026-06-12). It captures the 10 build-system improvements
|
||||
> (9 DONE, 1 OPEN), 32 findings addressed, the Gitea Actions CI
|
||||
> pipeline, the 113-test suite covering all 17 classifier rules +
|
||||
> their false-positive inverses plus the 6 new status and 7 new
|
||||
> scheduler Rust unit tests, and the deferred follow-up work.
|
||||
> The 7,000+ uncommitted file modifications in the user's working
|
||||
> tree are not part of this post-mortem — they are ongoing WIP.
|
||||
>
|
||||
> **Durability caveat (added 2026-06-12 after final review).**
|
||||
> The deliverables in this arc are durable **on disk** in the
|
||||
> working tree, but most are NOT yet durable in `git` history. The
|
||||
> 5 most recent commits on `0.2.3` (`97fa3a17a`, `bd18eefc6`,
|
||||
> `03c8a38a1`, `d6c784ed3`, `7ebffe9c2`) cover only the
|
||||
> working tree, and most are now durable in `git` history. The 8
|
||||
> most recent commits on `0.2.3` (`fbc32a6d8`, `5325360b4`,
|
||||
> `ae749ffb2`, `97fa3a17a`, `bd18eefc6`, `03c8a38a1`, `d6c784ed3`,
|
||||
> `7ebffe9c2`) cover the parallel cook pool, status reporter,
|
||||
> build-system hardening arc (5 of 10 improvements), the
|
||||
> BUILD-SYSTEM-IMPROVEMENTS.md doc, `classify-cook-failure.py`,
|
||||
> `audit-patch-idempotency.py`, and the auto-link Qt sysroot dirs
|
||||
> patch in `src/cook/script.rs`. The other v6.0 deliverables
|
||||
> (audit-kf6-deps.py, migrate-kf6-seds-to-patches.sh, the 3 test
|
||||
> files, the C-1..C-6 doc and code fixes, the boot-logs/README.md,
|
||||
> this BUILD-SYSTEM-V6-HARDENING-POSTMORTEM.md itself) are in
|
||||
> `git status` as `M` (modified) or `??` (untracked) but not
|
||||
> committed. The "Suggested commit" block at the bottom of this
|
||||
> doc must be executed with `git stash` first to isolate the v6.0
|
||||
> paths from the user's ongoing WIP, or the commit will sweep in
|
||||
> 7,000+ unrelated modifications.
|
||||
> patch in `src/cook/script.rs`. The remaining v6.0 deliverable
|
||||
> still in `git status` is this BUILD-SYSTEM-V6-HARDENING-POSTMORTEM.md
|
||||
> (updated to 11-session / 9-DONE / 27-Rust-test state). The C-1..C-6
|
||||
> doc and code fixes, `boot-logs/README.md`, and
|
||||
> `migrate-kf6-seds-to-patches.sh` were committed in `ae749ffb2`.
|
||||
> Going forward, any new v6.0 work should be committed with
|
||||
> `git add <specific-files>` to avoid sweeping the user's
|
||||
> 7,000+ unrelated WIP modifications.
|
||||
|
||||
## Timeline
|
||||
|
||||
@@ -39,23 +41,25 @@
|
||||
| 7 | 06-12 (cont.) | Test coverage gap: added 12 missing positive rule tests + 12 false-positive tests (55/55 pass). Discovered + fixed 6 over-broad multi-pattern rules. Created `.gitea/workflows/build-system.yml` (7-job Gitea Actions pipeline, host-execution, Manjaro/Arch) and `.gitea/RUNNER-SETUP.md` (one-time host setup). Wired into `make test-lint-scripts[-quiet]`. |
|
||||
| 8 | 06-12 (cont.) | **Build-system improvement #2 shipped**: `local/scripts/repair-cook.sh` (incremental-build optimizer, 134 lines) + 7 unit tests (`local/scripts/tests/test_repair_cook.py`). `make repair.<pkg>` and `make clean-repair.<pkg>` targets wired. Verified P0 audit-script fixes work on real upstream KF6 source (form 1 nested namespace, comment/string strip, .bak timestamp). **Test count: 62/62 pass.** |
|
||||
| 9 | 06-12 (cont.) | **Build-system improvement #5 shipped**: `local/scripts/lint-recipe.py` (380 lines, 7 rules) + 24 unit tests (`local/scripts/tests/test_lint_recipe.py`). Recipe-index precomputation drops `--all` runtime from 60s+ to 1.1s. `make lint-recipe`, `make lint-recipe.<pkg>`, `make lint-recipe.strict`, `make lint-recipe.<pkg>.strict` wired. New `lint-recipe` Gitea Actions job (job 4 of 8) added to `.gitea/workflows/build-system.yml`. First run on the live tree found: 1 broken-patch reference (`redbear-sessiond/P4-signal-implementations.patch`), 1 dangling `cookbook_apply_patches` call (`tc`), 19 sed -i calls in sddm (warning only — `cookbook_apply_patches` present), 4 sed -i calls in `qt6-wayland-smoke` (uncovers the kind of bug the libwayland fix was preventing). **Test count: 86/86 pass.** |
|
||||
| 10 | 06-12 (cont.) | **Build-system hardening arc commit + improvement #4 shipped.** First durable commit: `ae749ffb2 build: ship build-system hardening arc (5 of 10 improvements)` — 22 build-system files, including the 5 prior arc deliverables (audit-kf6-deps.py + 13 tests, repair-cook.sh + 7 tests, migrate-kf6-seds-to-patches.sh, BUILD-SYSTEM-V6-HARDENING-POSTMORTEM.md, SCRIPT-BEHAVIOR-MATRIX.md, boot-logs/README.md, build-system.yml, Gitea RUNNER-SETUP.md, libdrm/02 sidecar, cache/README cleanup, Makefile lint/repair targets). Then `5325360b4 build: add cook status reporter (improvement #4)` — `src/cook/status.rs` (197 lines, 6 unit tests) + `src/bin/repo.rs` wiring. Auto-enables in `CI=1` mode when stderr is a TTY: one-line `[NN/MM] recipe: phase (Xs)` output for each cook. Verified end-to-end with 3-recipe and 5-recipe real cooks. **Test count: 86/86 Python + 20/20 Rust.** |
|
||||
| 11 | 06-12 (cont.) | **Build-system improvement #1 shipped.** `src/cook/scheduler.rs` (145 lines, 7 unit tests) + `src/bin/repo.rs` `repo cook --jobs=N` flag. Dep-aware level partition via `dep_levels()` (each recipe's level = `1 + max(level of any direct dep in this vec)`, or 0 if no deps in the vec). For each level, runs all recipes in that level via `std::thread::scope` with up to `N` workers. Drain-after-spawn pattern keeps live-worker count <= jobs. Ratatui TUI path unchanged. 7 unit tests cover empty / single / linear / independent / diamond / dev_dependencies / unknown-dep. Verified end-to-end: 5-recipe batch (redbear-statusnotifierwatcher, redbear-traceroute, redbear-udisks + deps expat, dbus) cooks in level 0 (3 parallel) → level 1 (dbus) → level 2 (redbear-udisks). On clean 3-recipe rebuild: 48s serial vs 45s parallel. Speedup bounded by longest single build (17s) on this small batch — the 2-3x gain from the proposal is on 15-recipe KF6 batches with 5-10 min longest builds. Caveat: `build/qt-host-build` host toolchain not yet locked; v2 mitigation is `flock` in `src/cook/script.rs` (deferred, no current redbear-full test recipe triggers qt-host-build). **Test count: 86/86 Python + 27/27 Rust.** |
|
||||
|
||||
## Final state
|
||||
|
||||
### 10 build-system improvements — 7 DONE, 3 OPEN
|
||||
### 10 build-system improvements — 9 DONE, 1 OPEN
|
||||
|
||||
| # | Title | Status | Commit |
|
||||
|---|-------|--------|--------|
|
||||
| 3 | Per-recipe patch idempotency auditor | **DONE** | `03c8a38a1` |
|
||||
| 6 | `recipes/kf6-*` recipe dep audit | **DONE** | uncommitted (this arc) |
|
||||
| 6 | `recipes/kf6-*` recipe dep audit | **DONE** | `ae749ffb2` |
|
||||
| 8 | Auto-link Qt sysroot dirs | **DONE** | `03c8a38a1` |
|
||||
| 9 | Failure classifier | **DONE** | `bd18eefc6` |
|
||||
| 1 | Parallel-safe cook pool | open | — |
|
||||
| 2 | `cook --repair` mode | **DONE** | uncommitted (this arc) — `local/scripts/repair-cook.sh` wrapper + `make repair.<pkg>` target |
|
||||
| 4 | Cook TUI status | open | — |
|
||||
| 5 | Build-time recipe lint | **DONE** | uncommitted (this arc) — `local/scripts/lint-recipe.py` + 7-rule lint + 24 unit tests + `make lint-recipe*` targets + Gitea Actions job |
|
||||
| 7 | QML gate (4-6 weeks) | open | — |
|
||||
| 10 | Cookbook scratch-rebuild | open | — |
|
||||
| 1 | Parallel-safe cook pool | **DONE** | `fbc32a6d8` |
|
||||
| 2 | `cook --repair` mode | **DONE** | `ae749ffb2` — `local/scripts/repair-cook.sh` wrapper + `make repair.<pkg>` target |
|
||||
| 4 | Cook TUI status | **DONE** | `5325360b4` — `src/cook/status.rs` |
|
||||
| 5 | Build-time recipe lint | **DONE** | `ae749ffb2` — `local/scripts/lint-recipe.py` + 7-rule lint + Gitea CI job |
|
||||
| 7 | QML gate (4-6 weeks) | open | — (Qt6 engine fix, not a cookbook improvement) |
|
||||
| 10 | Cookbook scratch-rebuild | open | — (L-sized, 1 week, M risk; separate session) |
|
||||
|
||||
### 32 findings — all addressed
|
||||
|
||||
@@ -78,8 +82,10 @@
|
||||
| `test_classify_cook_failure.py` | 35 | 17 positive rule tests (1 per rule), 12 false-positive tests, 5 existing exit-code/JSON/explain-rule tests, 1 --no-fetch honesty test |
|
||||
| `test_repair_cook.py` | 7 | synthetic recipe fixtures, fast/slow path logic, --clean-build, REPAIR_FORCE |
|
||||
| `test_lint_recipe.py` | 24 | 7 rule coverage, 1 recipe-index cache, 1 clean-recipe regression test, 1 error recipe test |
|
||||
| `cook::status` (Rust) | 6 | format_elapsed boundaries, disabled no-op, phase tracking |
|
||||
| `cook::scheduler::dep_levels` (Rust) | 7 | empty / single / linear / independent / diamond / dev_dependencies / unknown-dep |
|
||||
|
||||
**Total: 86/86 pass in <1 second.**
|
||||
**Total: 86/86 Python + 27/27 Rust pass in <1 second (Python) / ~3 seconds (Rust).**
|
||||
|
||||
**8 CRITICAL findings (all addressed):**
|
||||
- C-1 libwayland `patches = [redox.patch]` line removed (was blocking the Wayland stack)
|
||||
@@ -138,89 +144,26 @@
|
||||
|
||||
4. **User's WIP**: 7,000+ file modifications in the working tree, primarily the user's ongoing KF6 work, cub improvements, redbear-netctl development, and libpciaccess integration. Not in scope for this post-mortem.
|
||||
|
||||
## What to commit (suggested)
|
||||
## Commit history (v6.0 hardening arc, durable)
|
||||
|
||||
> **WARNING.** The user's working tree contains 7,000+ unrelated
|
||||
> WIP modifications. Running `git add` on the paths below WILL
|
||||
> also stage WIP files in those same directories (the v6.0 paths
|
||||
> are interleaved with WIP paths in `git status`). Execute
|
||||
> `git stash push --keep-index --include-untracked -m "user WIP pre-v6.0-commit"`
|
||||
> first, then `git add` the v6.0 paths, commit in 4 chunks, then
|
||||
> `git stash pop`. Without this, the commit will sweep in
|
||||
> thousands of unrelated files.
|
||||
The v6.0 deliverables were committed in 3 durable chunks on
|
||||
2026-06-12, after the post-mortem was first written:
|
||||
|
||||
If the user wants to commit the v6.0 hardening work, the suggested commit sequence is:
|
||||
| Commit | Files | What it landed |
|
||||
|--------|-------|----------------|
|
||||
| `ae749ffb2` | 22 | Build-system hardening arc: audit-patch-idempotency, audit-kf6-deps, classify-cook-failure, repair-cook, migrate-kf6-seds-to-patches, the 4 Python test files, BUILD-SYSTEM-IMPROVEMENTS.md, BUILD-SYSTEM-V6-HARDENING-POSTMORTEM.md, SCRIPT-BEHAVIOR-MATRIX.md, boot-logs/README.md, libdrm/02 sidecar README, cache/README deletion, .gitea/workflows/build-system.yml (8 jobs), .gitea/RUNNER-SETUP.md, Makefile lint + repair targets. C-1..C-6 + 7 HIGH findings all addressed. |
|
||||
| `5325360b4` | 4 | Cook TUI status reporter (#4): `src/cook/status.rs` (197 lines, 6 unit tests), wired into `src/bin/repo.rs`. One-line `[NN/MM] recipe: phase (Xs)` output for non-TUI cooks. |
|
||||
| `fbc32a6d8` | 4 | Parallel cook pool (#1): `src/cook/scheduler.rs` (145 lines, 7 unit tests), `--jobs=N` CLI flag in `src/bin/repo.rs`, `dep_levels()` topological partition via `std::thread::scope`. |
|
||||
|
||||
```bash
|
||||
# Stage 0: stash non-v6.0 WIP
|
||||
git stash push --keep-index --include-untracked \
|
||||
-m "user WIP pre-v6.0-commit"
|
||||
**This post-mortem itself** is still in `git status` (modified
|
||||
`local/docs/BUILD-SYSTEM-V6-HARDENING-POSTMORTEM.md`); the
|
||||
"Durability caveat" at the top of this document tracks its
|
||||
shipment status.
|
||||
|
||||
# Stage 1: doc cleanup
|
||||
git add AGENTS.md Makefile README.md \
|
||||
local/AGENTS.md \
|
||||
local/docs/BUILD-SYSTEM-IMPROVEMENTS.md \
|
||||
local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md \
|
||||
local/docs/GRUB-INTEGRATION-PLAN.md \
|
||||
local/docs/KERNEL-IPC-CREDENTIAL-PLAN.md \
|
||||
local/docs/SCRIPT-BEHAVIOR-MATRIX.md \
|
||||
local/docs/boot-logs/ \
|
||||
local/docs/BUILD-SYSTEM-V6-HARDENING-POSTMORTEM.md \
|
||||
local/recipes/AGENTS.md
|
||||
## What remains uncommitted
|
||||
|
||||
# Stage 2: deletion-tracked files
|
||||
# (use `git rm` or `git add -u` for paths that exist in HEAD)
|
||||
git rm -f local/cache/README.md \
|
||||
local/recipes/wayland/libwayland/recipe.toml.bak \
|
||||
local/recipes/system/redbear-netctl/redbear-netctl-console/ \
|
||||
recipes/libs/ncurses/recipe.toml.bak 2>/dev/null || true
|
||||
# The cub-assessment/, gparted-git/, pipewire/, wireplumber/
|
||||
# deletions may need `git rm -r --cached` if they were tracked.
|
||||
|
||||
# Stage 3: scripts + tests
|
||||
git add local/scripts/audit-patch-idempotency.py \
|
||||
local/scripts/audit-kf6-deps.py \
|
||||
local/scripts/classify-cook-failure.py \
|
||||
local/scripts/migrate-kf6-seds-to-patches.sh \
|
||||
local/scripts/tests/
|
||||
|
||||
# Stage 4: recipe fixes + symlinks + sddm stubs README
|
||||
git add local/recipes/wayland/libwayland/recipe.toml \
|
||||
local/recipes/kde/sddm/stubs/README.md \
|
||||
local/sources/kernel/.gitignore \
|
||||
local/patches/libdrm/02-redox-dispatch.patch.README
|
||||
# The gpu/drivers/{linux-kpi,redox-driver-sys}/source symlinks
|
||||
# were rm + ln -sf; their git status shows M (modification).
|
||||
# Add with: git add local/recipes/gpu/drivers/
|
||||
```
|
||||
|
||||
Then commit in 4 logical chunks:
|
||||
|
||||
```bash
|
||||
# 1. Doc cleanup (build-redbear.sh as canonical, drop historical narrative)
|
||||
git commit -m "docs: enforce build-redbear.sh as canonical v6.0 build entry"
|
||||
|
||||
# 2. Audit scripts + tests (4 of 10 build-system improvements)
|
||||
git commit -m "build: ship audit scripts, classify, lint targets, 31 tests"
|
||||
|
||||
# 3. Critical findings (libwayland, orphan forks, broken symlinks)
|
||||
git commit -m "build: fix C-1 libwayland + C-3 orphan forks + C-5 symlinks"
|
||||
|
||||
# 4. Migration skeleton + tracked follow-ups
|
||||
git commit -m "build: add KF6 sed migration skeleton + sddm stub tracking"
|
||||
```
|
||||
|
||||
## Files in v6.0 hardening arc (clean tree, ready to commit)
|
||||
|
||||
| Category | Files |
|
||||
|----------|-------|
|
||||
| **Root docs** | `AGENTS.md`, `Makefile`, `README.md` |
|
||||
| **Local docs** | `local/AGENTS.md`, `local/docs/BUILD-SYSTEM-IMPROVEMENTS.md`, `local/docs/BUILD-SYSTEM-V6-HARDENING-POSTMORTEM.md`, `local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md`, `local/docs/GRUB-INTEGRATION-PLAN.md`, `local/docs/KERNEL-IPC-CREDENTIAL-PLAN.md`, `local/docs/SCRIPT-BEHAVIOR-MATRIX.md`, `local/docs/boot-logs/REDBEAR-FULL-BOOT-POST-VIRTIO-BLKD-FIX-RESULTS.md`, `local/docs/boot-logs/REDBEAR-FULL-BOOT-RESULTS.md`, `local/docs/boot-logs/README.md`, `local/recipes/AGENTS.md` |
|
||||
| **CI** | `.gitea/workflows/build-system.yml` (7-job Gitea Actions pipeline, host-execution), `.gitea/RUNNER-SETUP.md` (one-time Manjaro/Arch host setup) |
|
||||
| **Deletions** | `local/cache/README.md`, `local/recipes/wayland/libwayland/recipe.toml.bak`, `local/recipes/system/redbear-netctl/redbear-netctl-console/`, `local/recipes/system/cub/source/cub-assessment/`, `local/recipes/system/cub/source/gparted-git/`, `recipes/libs/ncurses/recipe.toml.bak`, `local/sources/pipewire/`, `local/sources/wireplumber/` |
|
||||
| **Scripts** | `local/scripts/audit-patch-idempotency.py`, `local/scripts/audit-kf6-deps.py`, `local/scripts/classify-cook-failure.py`, `local/scripts/migrate-kf6-seds-to-patches.sh`, `local/scripts/tests/{__init__,test_audit_patch_idempotency,test_audit_kf6_deps,test_classify_cook_failure}.py` |
|
||||
| **Recipe fixes** | `local/recipes/wayland/libwayland/recipe.toml`, `local/recipes/gpu/drivers/{linux-kpi,redox-driver-sys}/source` (symlinks), `local/recipes/kde/sddm/stubs/README.md` |
|
||||
| **Patches** | `local/patches/libdrm/02-redox-dispatch.patch.README` |
|
||||
| **Build hygiene** | `local/sources/kernel/.gitignore` |
|
||||
|
||||
The 7,000+ other modifications in `git status` are the user's WIP and are deliberately not in this arc.
|
||||
| Path | What it is | Why uncommitted |
|
||||
|------|-----------|-----------------|
|
||||
| `local/docs/BUILD-SYSTEM-V6-HARDENING-POSTMORTEM.md` | This doc updated for 11-session / 9-DONE / 27-Rust-test state | Next user-chosen commit; touches paths the user may have other WIP for |
|
||||
| `local/docs/BUILD-SYSTEM-FINGERPRINT-HARDENING-PLAN.md` | User WIP plan (Phase 6+, "pending Oracle fingerprint architecture review") | Draft, not for committing in this arc |
|
||||
| User's `AGENTS.md`, `local/AGENTS.md`, `README.md`, `config/redbear-*.toml`, `local/sources/{base,bootloader,kernel}` | 7,000+ modifications | User WIP; not in this arc |
|
||||
|
||||
Reference in New Issue
Block a user