Skip to content

K2GO-567 feat(ci): pre-build test belt that gates the rootfs bake - #757

Merged
luisguzman-adfa merged 5 commits into
mainfrom
feat/K2GO-567-prebuild-test-belt
Nov 12, 2026
Merged

luisguzman-adfa merged 5 commits into
mainfrom
feat/K2GO-567-prebuild-test-belt

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What changes

  • tools/rootfs-builder/tests/ (by area/feature) + run-contract-tests.sh: a home for native pre-build tests.
  • .github/workflows/prebuild-tests.yml: independent workflow (pull_request + workflow_dispatch + workflow_call) that runs the dash-node tests and the contract tests with our upstream patches applied. bake-rootfs.yml gets a prebuild-tests job and the bake needs it, so tests run first and gate the bake.
  • tests/maps/fqr/test_fqr_contract.py: contract-pin on the REAL upstream tile-extract.py (markers *.fqr / meta.json / bbox / extract / delete).
  • static/dashboard/sockets/maps.fqr-behavior.test.ts: behavior test that an existing .fqr region is listed by dash-node.

Why

  • Upstream changed the maps FQR format with no notice and broke the feature; we found out on-device. These tests fail fast before a bake ships the break: the contract test catches upstream drift, the behavior test catches our code regressing. On failure GitHub emails the actor and the bake does not run.

Verifications

  • Contract test: passes on current upstream (new .fqr), fails on an old-format stub (verified locally).
  • Behavior test: fails without K2GO-566 (listFqrRegions absent), passes with it (verified locally).
  • Both workflow YAMLs parse. This PR's CI is EXPECTED RED until K2GO-566 merges (the behavior test needs it): merge 566 first, then update this branch and it goes green.

Notes

  • Depends on K2GO-566 (merge it first).
  • The contract test is string-based: importing the real script is not viable natively (it imports requests/xmltodict/a local fqr.py and does os.chdir at module load).

Add tools/rootfs-builder/tests/ (by area/feature) and an independent prebuild-tests.yml that runs the dash-node tests plus contract tests against the real + patched upstream artifacts, then gates the bake (bake-rootfs.yml needs it, runs first). First test: the maps FQR contract (tests/maps/fqr), which fails fast if upstream drops the .fqr/meta.json{bbox} layout the in-app list and delete depend on.
…GO-566)

A second, independent belt test: an existing <name>.fqr region must be listed by dash-node (listFqrRegions) so it can be managed and deleted. Fails without K2GO-566 (listFqrRegions absent, the in-app list was empty), passes with it. Independent of the upstream contract test: that checks upstream's format, this checks our code consumes it.
workflow_dispatch only shows in the UI for workflows on the default branch, so add a pull_request trigger. The belt then runs automatically on every PR to main (and still gates the bake via workflow_call).
…e bake gate

A workflow_dispatch boolean run_prebuild_tests (default true) lets a bake bypass the pre-build belt when needed; by default the belt still runs first and gates. The bake job uses always() + result checks so toggling the belt off skips it WITHOUT auto-skipping the bake, while a belt FAILURE still blocks the bake.
@luisguzman-adfa
luisguzman-adfa merged commit b2bfe8b into main Nov 12, 2026
5 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the feat/K2GO-567-prebuild-test-belt branch November 12, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant