Three independent defects mean a green Unit Tests job on vuer_oss proves less than it appears: one shared suite registers no tests at all, and two others flake non-deterministically in CI. All three are on devel, so they affect every partner branch. Found while validating the CIB devel update (FKITDEV-9197); none were changed on the partner branch, deliberately.
For Agents
- Nothing here is CIB-specific and nothing here is merge-caused. Do not classify any of it as damage from a devel update, and do not fix it on a partner branch.
- Two of the three live in the same file,
test/tests/unit/translations.test.js.- Fixing #1 will convert 42 currently-invisible findings into hard failures on CIB alone. It has to be a deliberate upstream change.
- The
vuer_osstwin of portal-css-jest-runs-zero-tests — same lesson, different mechanism.
1. translations.test.js registers ZERO tests — the entire check is dead code
test/tests/unit/translations.test.js:181:
it.each(testSummary.entries(), (file, error) => { if (error) throw new Error(error) })it.each(table) returns a function, which must then be invoked with (name, fn). Here the callback is passed as each()’s second argument and the returned function is discarded. No test is ever registered.
The suite computes its findings, then throws them away
Every
wrongKeys/missingLanguageresult the suite works out is silently discarded — for every partner, because the file is devel’s. The suite’s only registered tests are itsit.skip(...)calls, so it contributes 0 passing tests.
Verified two ways, not assumed:
- Directly in node — the
each()return value is a function, and nothing calls it. - From CI output on a passing run:
Test Suites: 2 skipped, 345 passed, 345 of 347 total Tests: 147 skipped, 10 todo, 3515 passed, 3672 total
A probe replicating the suite’s own logic found 42 findings on the CIB branch that CI cannot see — mostly flow_task_name / flow_task_instructions / flow_input_option returning undefined across customization/flow/cib-*.flow.trans.js.
Fixing the
it.eachis a breaking change, not a cleanupRepairing the invocation turns those 42 findings into hard failures on CIB, and an unknown number on every other partner. It must be a deliberate upstream change with the fallout budgeted — never a drive-by alongside the [[#2-the-scan-relative-path-bug-is-actively-flaky|
scan()fix]] below, and never on a partner branch.
"Translations green" ≠ "translations checked"
FKITDEV-9197’s fix
acaa597d83(registering the portalinfoText/helpText/placeholderarg maps) is real — it stopped the suite throwing at import, which is what made the CIB branch’s Unit Tests job runnable. It did not make the suite validate anything, because the suite validates nothing for anyone. Say this plainly wherever the fix is cited, or someone will read the green job as coverage.
2. The scan() relative-path bug is ACTIVELY FLAKY — not merely latent
Line 28 defines the base path absolutely:
const cwd = path.join(__dirname, '../../../')That absolute cwd is used for require and for reading the map. But includedDirectories entries are handed to scan() as relative paths and reach fs.existsSync(startPath) at line 77. Suite loading therefore depends on process.cwd() at module-evaluation time.
It is firing in production CI
Same commit, same nightly “Checks for Long-lived branches” workflow (cron * 20 * * *), branch customization/mbh, 2026-08-11:
| Run | Time | Result |
|---|---|---|
| 31531810832 | 20:13 | passed |
| 31533215070 | 20:29 | failed — Directory not found: client/features |
| 31536624080 | 21:10 | passed |
Both runners (runnerd-techteamer-node-ci-1 and -2) produce both outcomes, so this is not one bad machine. client/features is real and git-tracked (215 files). It also failed the NÚSZ devel-update PR (run 31485303651) while barion (31475164402) and generali (31489547911) passed. Does not reproduce on macOS.
Root cause of the
cwdperturbation is UNPROVENThere is no
process.chdirin repo code. The only one reachable in the dependency tree isnode_modules/cross-spawn/lib/util/resolveCommand.js:18, which chdirs tooptions.cwdbeforewhich.syncand restores in afinally— a plausible leak window, not a demonstrated cause. Recorded as a lead, not a conclusion.
History
devel bfd1311aab (sonar code smells, PR #8000) changed line 28 from process.cwd() to the __dirname form. That fixed the require half and left scan() relative. The flake therefore both predates and survives that commit.
The obvious one-liner BREAKS the suite
path.join(cwd, startPath)alone is the wrong fix — and it fails silently
scan()builds its results fromstartPath(path.join(startPath, entries[i])), so absolute input makes every returnedtranslationFileabsolute. Three downstream consumers key off relative paths and all three break quietly:
Consumer With an absolute path require(path.join(cwd, abs))bogus doubled path excludedFiles.includes(abs)false ⇒ exclusions stop working argMap[abs]undefined⇒ every arg map silently lostThe trap underneath the trap:
path.joinconcatenates, it does not resolve a leading/in a later segment. That ispath.resolve.
The minimal correct fix scans absolutely and converts the returns back to relative:
scan(path.join(cwd, startPath), ['.trans.js', 'translations.js']).map((f) => path.relative(cwd, f))3. A second, independent flake — pdf.test.js byte comparison
server/util/pdf.test.js › printImage › place sample PNG image does a byte-for-byte PDF comparison and drifted by 3 bytes of stream length.
- Failed on the first CI run after the CIB push.
- Passes on the parent commit, and 3/3 locally.
- Cannot be reached by the CIB change:
translations.map.jsonis read by exactly one file,translations.test.js:73. - Re-running the job with no content change went green.
vuer_oss's "Unit Tests green" was not first-attemptWorth recording as method rather than trivia. Two distinct flakes are now known in this suite, so a single red run is not evidence of a regression — and, symmetrically, a single green run is not evidence of its absence.
What this means for validating a devel update
Do not treat a green
testjob onvuer_ossas proofOne suite silently registers nothing; two others flake non-deterministically. Concretely:
- Never cite
translations.test.jsas coverage. It has none. Its green is structural.- Re-run before calling a red run a regression — and note that a re-run turning green tells you it was a flake, not that your change is fine.
- Classify against a base-commit worktree (Phase 2.2) and run suspect suites isolated and repeatedly, which is exactly what distinguishes these three from real breakage.
This is the same conclusion portal-css-jest-runs-zero-tests reaches for
portal_css, arrived at by a different route: on these repos the test gate is weaker evidence than its green suggests, and knowing which suites carry signal is part of the job.
Related
- FKITDEV-9197 — the CIB devel update during which all three were found; §16 has the round-specific framing and the
acaa597d83interaction. - portal-css-jest-runs-zero-tests — the sibling: a
testjob green because it executed nothing. Same lesson, different mechanism, different repo. - devel-update-and-release-flow — Phase 2 validation; where “classify against a true baseline” and “run suspect suites isolated and repeatedly” live.
- customization-branch-ci-pipeline-inheritance — the trap that switches this
testjob on for a partner branch in the first place. - facekom-test-tiers — which tiers of testing exist and what each is worth.
- SLACOFI-14 — the other
vuer_ossjest environment constraint (needs Node >= 24.9). - tech-debt · vuer_oss · breakage-risks