From 72c30ba7e0b2705161d95ac3ea87fecac2bb697d Mon Sep 17 00:00:00 2001 From: fy59 Date: Thu, 17 Sep 2026 17:01:15 +0200 Subject: [PATCH] fix(sync): package generation module closure --- CHANGELOG.md | 3 +++ docs/sync_rollout_readiness.md | 3 +++ tests/test_sync_deployment_tools.py | 11 +++++++++++ tools/package_sync_candidate.py | 2 ++ 4 files changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f90213f..12621b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,9 @@ - Made the Web sync button generate cryptographic UUIDv4 request IDs on the loopback HTTP hostname where `crypto.randomUUID()` is unavailable. +- Included the exercise-name and training-knowledge modules required by the + packaged generation worker, with an isolated runtime-import regression. + - Closed the native candidate warning gate with checked path and HTTP response bounds, strict GCC and Clang builds, full Clang ASan/UBSan validation, and a stable concurrent object-I/O MTP double. Rebuilt the desktop, current Android diff --git a/docs/sync_rollout_readiness.md b/docs/sync_rollout_readiness.md index 345c61c..9b1f402 100644 --- a/docs/sync_rollout_readiness.md +++ b/docs/sync_rollout_readiness.md @@ -28,6 +28,9 @@ the separately authorized rollout are complete. must not combine a packaged binary with helpers from a live checkout. Stable user-bin symlinks are supported: each launcher resolves the link to its physical bundle before locating `libexec` and `tools`. + Packaging validation imports the production orchestrator and peer worker + from the staged `tools` directory so their complete local module closure is + present before installation. 2. `assembleDebug` is development evidence only. Rollout requires the existing release signing identity, verification of its public certificate and a valid increasing `versionCode`. A bounded `TRAINLOG_ANDROID_VERSION_CODE` build diff --git a/tests/test_sync_deployment_tools.py b/tests/test_sync_deployment_tools.py index f7e3873..8d872d0 100644 --- a/tests/test_sync_deployment_tools.py +++ b/tests/test_sync_deployment_tools.py @@ -76,6 +76,17 @@ class DeploymentToolsTest(unittest.TestCase): ) self.assertEqual(linked.returncode, 0, linked.stderr) self.assertIn("trainlog 0.1.2", linked.stdout) + imported = subprocess.run( + [ + "python3", + "-c", + "import sync_peer_worker; import sync_orchestrator", + ], + cwd=output / "tools", + capture_output=True, + text=True, + ) + self.assertEqual(imported.returncode, 0, imported.stderr) self.assertTrue( any( row["path"] == "tools/trainlog_syncd.py" diff --git a/tools/package_sync_candidate.py b/tools/package_sync_candidate.py index 889fed5..1cf414b 100644 --- a/tools/package_sync_candidate.py +++ b/tools/package_sync_candidate.py @@ -17,6 +17,8 @@ RUNTIME_TOOLS = [ "sync_generation_exchange.py", "trainlog_sqlite.py", "validate_json.py", + "validate_training_knowledge.py", + "exercise_names.py", "import_mobile_export.py", "import_exercise_aliases.py", "import_equipment_definitions.py",