Repository navigation
test(e2e): stop pinning the profile version, and run the two upgrade tests - #426
Conversation
…tests `subos_profile_upgrade_test.sh` and `subos_shell_level_test.sh` both grep for `# xlings-profile-version: 9`. The profiles moved to 10 (see core/xself/profile_resources.cppm), so both have been failing — and neither is listed in run_all.sh, so nothing noticed. Read the expected marker out of profile_resources.cppm instead. What these tests are for is "the emitted profile carries the marker the source declares"; the number it happens to be today is not part of that, and pinning it is what let them rot. Register both. `subos_profile_upgrade_test.sh` is literally the profile-upgrade test and it has never run in CI. Found while evaluating the 0.4.69 -> 2026.7.27.3 upgrade path. 18 of the 73 e2e scripts are referenced from neither run_all.sh nor project_e2e_test.sh nor any workflow; 16 were run locally and 14 pass unchanged. Whether to wire up the other 14 is a separate call about CI time, so the list is in an issue rather than in this commit.
From the e2e job on main:
=== E2E-30: custom_index_artifact_test.sh ===
[test] SKIP: no xlings binary (build first)
PASS: E2E-30 (custom_index_artifact_test.sh, 7ms)
`custom_index_artifact_test.sh` and `index_artifact_update_test.sh` each
rolled their own binary discovery — `find "$PROJECT_DIR/build" -path
'*debug*' -name xlings` — with a SKIP and exit 0 when nothing matched.
It lied in both directions:
* run_all.sh passes no argument to E2E-30, and CI builds into target/
via mcpp, never build/. So the find matched nothing, the test
skipped, and run_all recorded a pass. The custom index artifact
feature (#377/#379, shipped 0.4.68) has had no CI coverage at all
while appearing to have it.
* Standalone on a dev box the find DID match — a three-week-old debug
build — so the test failed against behaviour that had since changed,
which reads as a product bug and is not one.
Both now use find_xlings_bin: newest build under target/, with the
version-mismatch warning. Its comment already records the cost of
getting this wrong once. And "no binary" is now a failure, not a skip —
a test that cannot find what it tests has not tested it.
Both pass with real assertions. index_artifact_update_test.sh was also
unregistered, so it is now E2E-41.
|
Pushed a second commit — same family, worse instance. From the e2e job on main: 7ms, zero assertions, recorded as a pass. The custom-index-artifact feature (#377/#379, shipped in 0.4.68) has had no CI coverage at all while appearing to have it. Both XLINGS_BIN="$(find "$PROJECT_DIR/build" -path '*debug*' -name xlings ...)"
[[ -x "$XLINGS_BIN" ]] || { echo "[test] SKIP: no xlings binary"; exit 0; }It lied in both directions:
Both now use And "no binary" is now a failure, not a skip. A test that cannot find the thing it tests has not tested it.
Worth noting the shape, since it is the third instance today: |
The bug
subos_profile_upgrade_test.shandsubos_shell_level_test.shboth assert:grep -q "^# xlings-profile-version: 9" .../xlings-profile.shThe profiles are at 10 (
src/core/xself/profile_resources.cppm). Both tests have been failing — and neither is listed inrun_all.sh, so nothing noticed. Confirmed against the released 2026.7.27.3 binary as well, so it is not a recent break.The fix
Read the marker out of the source of truth:
The property under test is "the emitted profile carries the marker the source declares". What the number is today is not part of that, and pinning it is exactly what let these rot.
Both pass after the change. Both are now registered (E2E-39, E2E-40) —
subos_profile_upgrade_test.shis the profile-upgrade test and has never run in CI.Context, handed over rather than acted on
Found while evaluating the 0.4.69 → 2026.7.27.3 upgrade path. 18 of the 73
tests/e2e/*_test.share referenced from neitherrun_all.sh, norproject_e2e_test.sh, nor any workflow. I ran 16 of them locally against this build:install_idempotentshim_linksubos_eventsxpkg_snapshot_removeupdate_packagesubos_xpkg_use_cmdconfig_install_no_implicit_dirproject_data_routingsubos_xpkg_installsubos_xpkg_keepersubos_xpkg_forkbuild_xim_index_artifactshim_alias_recursionrpath_verifysubos_profile_upgradesubos_shell_levelindex_artifact_update—failed to set index repo origin, possibly environmentalwindows_quick_install_resource_probe— Windows onlyWiring up the other 14 would add ~40% to the e2e job. One local pass is weak evidence of CI stability, so that is a deliberate call about CI time rather than something to slip into this PR. Filed separately.