Files
RedBear-OS/local/docs
vasilito 0080fac138 cub: add assessment plan + 12-PKGBUILD integration test harness (v6.0 2026)
The cub AUR→RBPKGBUILD→recipe.toml conversion pipeline (located at
local/recipes/system/cub/source/) was assessed end-to-end against
12 representative real-world PKGBUILDs:

  - libevdev (simple meson)
  - fd-find (cargo)
  - libpciaccess 0.18.1 (meson)
  - fmt (cmake)
  - wlroots-git (git source, complex deps)
  - libpciaccess 0.19 (extra/-style, meson + ninja)
  - ffmpeg (configure + options)
  - mesa 24.3 (git+url + multi-source + pkgver())
  - gzip (configure + git source + check)
  - zlib (simple C, configure)
  - openssl (pkgbase split package)
  - glib2 (complex deps, real-world)

The assessment found 8 critical bugs that would prevent cub from
producing working Red Bear recipes for any real Arch package. 7 of
the 8 bugs were fixed in the previous commit (7c5b1f36e); the 8th
(custom-template recipes lack DYNAMIC_INIT and cookbook_apply_patches
boilerplate) is deferred as a cookbook-integration concern.

This commit adds two artifacts of the assessment:

  1. local/docs/cub-assessment-and-improvement-plan.md (508 lines,
     ~28KB): the complete assessment document. Sections:
       - Executive summary (architecture decision + 8-bug verdict)
       - What cub does well (10+ working cases)
       - The 8 bugs (location, severity, root cause, fix)
       - Test methodology
       - Test cases by category (A: conversion success, B: dep mapping,
         C: source URL, D: build template, E: edge cases, F: validation)
       - Forward improvement plan (16 items in 4 tiers)
       - Appendix A: cub architecture map (CLI + 17 modules)
       - Appendix B: RBPKGBUILD format spec
       - Appendix C: Generated recipe format vs. real Red Bear recipe

  2. local/recipes/system/cub/source/cub-assessment/:
     a 12-PKGBUILD integration test harness. A standalone binary that
     exercises the conversion pipeline on each PKGBUILD and reports
     status, warnings, action_items, recipe validity (TOML), and the
     first 30 lines of the generated recipe. Used to verify the bug
     fixes in 7c5b1f36e — all 12 cases convert successfully
     post-fix, including the previously-erroring mesa 24.3 (which
     now produces a valid recipe with a multi-source warning).

The test harness lives next to the cub source (cub-assessment/) and
has its own Cargo.toml with [workspace] empty so it doesn't join the
cub workspace. Build/run with:

  cd local/recipes/system/cub/source
  cargo run --manifest-path cub-assessment/Cargo.toml

The harness is intended for use by future cub maintainers to catch
regressions. It's not wired into CI yet — that would be a separate
task.
2026-06-10 10:01:44 +03:00
..