Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/research/searxng-signed-release-qualification-assessment.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,33 @@ which diffs the script's actual required arguments against the
workflow's invocation rather than hardcoding a fixed flag list (so a
future fourth component gets the same protection automatically).

**Finding 6 (2026-08-22, found live during the real hardware pass) —
`sovereign-ab-data`'s own `customize90-sovereign-ab` never enabled
llama.cpp's, SearXNG's, or the Conversation Service's units at all.**
This is exactly the class of bug `AbDataParityWithProductionTests`'s own
docstring already warns about: this script is a hand-maintained parallel
copy of `customize90-sovereign`'s enable-units list, not derived from it,
and diverged again. A real `build_base_os_candidate=true` build, signed
and staged/tried/committed against `sovereign.local`, correctly shipped
all seven of the new unit files onto the device (`systemctl
list-unit-files` showed them present) — but `systemctl status` showed
every one of them `disabled`. Confirmed this does **not** block the
appliance-update half of this qualification pass: `activate_release`'s
`stop_appliance`/`start_appliance` only cycle
`sovereign-local-access`/`nginx`/`sovereign-console`/`sovereign-pihole`,
and image import already runs uniformly across all three components via
`IMAGE_COMPONENTS` regardless of unit-enablement state — but it does mean
llama-server/SearXNG never actually start on a freshly-committed device
without a manual `systemctl enable`. Fixed by adding the seven missing
`enable-units` calls to `customize90-sovereign-ab`, and by generalizing
`AbDataParityWithProductionTests`'s single hardcoded spot-check list into
`test_ab_enable_list_is_a_superset_of_the_production_image_s`, which
diffs the two scripts' actual `enable-units` calls against each other
instead of trusting a second hand-maintained list with the identical
failure mode. This is the second time this exact AB-script-diverged-from-production
bug class has been found only by real hardware (see this file's own
`AbDataParityWithProductionTests` docstring for the first).

## Recommendation

Treat this as sufficient prep work for now; do not attempt the CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ set -eu
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-pihole-artifact.service
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-pihole-import.service
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-pihole.service
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-llama-artifact.service
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-llama-import.service
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-llama-server.service
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-searxng-artifact.service
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-searxng-import.service
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-searxng.service
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-conversation.service
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-console.service
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-console-auth.service
"$BDEBSTRAP_HOOKS/enable-units" "$1" sovereign-console-check-trigger.path
Expand Down
26 changes: 26 additions & 0 deletions tests/test_ab_data_image.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import re
import subprocess
import unittest
from pathlib import Path
Expand Down Expand Up @@ -50,6 +51,31 @@ def test_enables_every_appliance_service_not_just_machine_id_sync(self):
):
self.assertIn(unit, content)

def test_ab_enable_list_is_a_superset_of_the_production_image_s(self):
# This exact script previously diverged from customize90-sovereign's
# own enable-units list by hand and silently dropped units (see
# this class's docstring). llama.cpp's, SearXNG's, and the
# Conversation Service's own units were the latest instance --
# found only by running a real base-OS update against real
# hardware: `systemctl list-unit-files` showed all seven units
# present (the base-OS update correctly shipped the unit files)
# but disabled, since this script never enabled them. A hardcoded
# sample list in a test has the same "forgot to update it" failure
# mode as the script itself, so this diffs the two scripts' real
# enable-units calls directly instead.
plain = (
ROOT / "image-builder/sovereign/image/sovereign-data/bdebstrap/customize90-sovereign"
).read_text()
ab = (IMAGE_DIR / "bdebstrap/customize90-sovereign-ab").read_text()
plain_units = set(re.findall(r'enable-units"\s+"\$1"\s+(\S+)', plain))
ab_units = set(re.findall(r'enable-units"\s+"\$1"\s+(\S+)', ab))
self.assertTrue(plain_units, "regex found no enable-units calls in the production script")
missing = plain_units - ab_units
self.assertEqual(
set(), missing,
f"units enabled in the plain image but not the AB one: {sorted(missing)}",
)


class AbDataIdentityPersistenceTests(unittest.TestCase):
# Root is read-only at runtime. /home persists via a plain bind
Expand Down
Loading