Commit Graph

2 Commits

Author SHA1 Message Date
vasilito 62d929d62a phase 17: guarantee upstream+RB patches on every build
upgrade-forks.sh:
- --no-fetch: use cached upstream refs (no network required)
- --force-reapply: force rebase even when 0 commits behind upstream
  Automatically detects missing functions via verify-fork-functions.sh
  and triggers reapply when RB cherry-picks dropped upstream code.

verify-fork-functions.sh:
- Cross-file search: when a function is missing from its upstream file,
  search ALL fork .rs files for renamed/moved equivalents (→ MOVED)
- Per-fork exclusion list: .verify-fork-functions.exclude for
  intentionally removed/replaced functions (→ EXCLUDED)
- Only truly missing (not found anywhere, not excluded) = violations

build-preflight.sh:
- Updated fix suggestion to --no-fetch --force-reapply

Results: installer 2→0 (exclusion+move), kernel 19→15 (4 moved),
base 56→44 (12 moved). Remaining missing functions are known RB
replacements pending exclusion entries.
2026-07-12 16:40:31 +03:00
vasilito 2153bf5f6e build-system: add function-level fork verification + fix critical bugs
CRITICAL: Add verify-fork-functions.sh — detects silent upstream code loss
from bad merges that file-level verification cannot catch. This is the
verification that would have caught the kfdwrite drop bug.

Wire it into build-preflight.sh (pre-build gate) and upgrade-forks.sh
(post-upgrade gate with automatic rollback on failure).

Fix upgrade-forks.sh:
- Fetch failures now abort instead of being silently swallowed
- Backup branch names include fork name + PID to prevent collisions
- Post-upgrade verification runs verify-fork-functions.sh and rolls
  back if upstream functions are missing

Fix bump-fork.sh:
- Replace wrong 'git tag -e' with 'git rev-parse --verify refs/tags/'
- Clone failures now error explicitly instead of silent fallback
- Version sed uses proper regex escaping for + characters
- Atomic swap has rollback recovery if mv fails
- Instructions now mention fork-upstream-map.toml update

Fix sync-upstream.sh:
- Define PROJECT_ROOT before use (was crashing under set -u)

Fix build-preflight.sh:
- Add REDBEAR_SKIP_FUNCTION_CHECK gate for verify-fork-functions.sh

Kernel submodule pointer updated to 0.3.1 branch with kfdwrite restored.
2026-07-11 23:18:41 +03:00