build(check): the images' resolution replayed as the deploy builds them, before any push
All checks were successful
CI / check (push) Successful in 45m37s
CI / deploy (push) Successful in 5m23s

Only the deploy builds the images, on the server, after every check
has passed, so an image that pub refuses cost a push each time (twice
on 4 Nov 2026). A step of tool/check.dart, right after the packages,
replays each Dockerfile's build stage up to its `dart pub get` from
the working tree's files in an empty folder, with Dart alone at the
image's version (downloaded once into ~/.cache/halkyon-check/, its
SHA-256 checked), offline, in an environment holding nothing of the
machine's Dart or Flutter: `dart run` from Flutter sets DART_ROOT,
through which pub found Flutter and accepted what the image refuses.

Checked on both failed deploys' states, which fail it as they did,
and on the fix, which passes. --images-only runs it alone, in
seconds. The list of images, dartImages, moves into
tool/src/images.dart, and a test keeps every Dockerfile building with
Dart on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-04 13:24:47 +01:00
commit 1ba532d6ef
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -4,15 +4,12 @@ import 'package:path/path.dart' as p;
import 'package:test/test.dart';
import 'package:yaml/yaml.dart';
/// The images CI's checks never build: the deploy does, on the server, and
/// a package missing from one failed it there (26 Oct 2026, `halkyon_core`
/// kept out by `.dockerignore`, `halkyon_llm` never copied).
const _dockerfiles = [
'apps/learn/halkyon_learn_server/Dockerfile',
'apps/learn/halkyon_learn_curator/Dockerfile',
'apps/train/halkyon_train_server/Dockerfile',
'apps/todo/halkyon_todo_server/Dockerfile',
];
import '../../tool/src/images.dart';
// The images CI's checks never build: the deploy does, on the server, and
// a package missing from one failed it there (26 Oct 2026, `halkyon_core`
// kept out by `.dockerignore`, `halkyon_llm` never copied). Their list is
// `dartImages`, whose resolution tool/check.dart replays.
/// The sidecars' images, which copy single files of the repository's: kept
/// out of the build's context, they failed it (29 Oct 2026, Train's running
@ -72,7 +69,7 @@ Set<String> _ignored() => {
};
void main() {
for (final path in _dockerfiles) {
for (final path in dartImages) {
group(path, () {
final dockerfile = File(path).readAsStringSync();
final package = _members(dockerfile).first;