Skip to content

check-i18n-bundles reports a stale-dist prerequisite failure as a content verdict ("1 bundle problem(s)") #7681

Description

@huangyiirene

Symptom

The check-i18n-bundles gate reports a stale-dist prerequisite failure as a content verdict — check-i18n-bundles: 1 bundle problem(s) / extract failed … — instead of naming the unmet prerequisite the way its sibling check-i18n-coverage does. In the QA run, packages/spec/dist predated commit 06be54ec (#7285, which added authorisesIrreversibleAction), so platform-objects' extract threw "The requested module '@objectstack/spec/system' does not provide an export named 'authorisesIrreversibleAction'". The coverage gate handled the same cause well — it refused to judge the ratchet ("Nothing was compared… the baseline was left exactly as committed", the designed #6033/#5862 honesty) — but the bundles gate graded it as content.

Root cause

Located, and verified still present on origin/main as of this filing. In scripts/check-i18n-bundles.mjs, the only prerequisite classifier is looksLikeMissingCliCommand() (scripts/cli-build-prerequisite.mjs), which matches oclif's Error: command … not found — an unbuilt/half-built CLI — only. A stale dependency dist that makes extraction throw a module-export mismatch does not match that signature, so the prerequisite branch (reportPrerequisiteNotMet) never fires. Execution falls to the in-loop failure path: collectDriftedBundles(stdout) finds no drift lines (the extract blew up before producing any), so it lands in the else branch that does broken.push(${pkg}: extract failed — …), and the final verdict prints check-i18n-bundles: ${broken.length + drifted.length} bundle problem(s). That is a content verdict for a prerequisite failure — the same "bundle/extract" wording (#5217 comment header) that misdirects the reader to the i18n configs.

Fix shape. The bundles gate should recognize the stale-dist / module-export-mismatch prerequisite and name it the way its sibling coverage gate does — a hard failure that states it checked nothing — rather than counting it as a bundle problem.

Stale-premise note. The packages/spec/dist staleness in the run was a checkout artifact, not the bug. The bug is the mislabel, and the mislabel path (elsebroken.push('extract failed')"N bundle problem(s)") is present on origin/main. #5217 (closed) added the prerequisite classifier for the unbuilt-CLI case; it does not cover this stale-dependency-dist / missing-export case.

Reproduction

With packages/spec/dist older than a commit that adds a new @objectstack/spec/system export, run node scripts/check-i18n-bundles.mjs. It prints 1 bundle problem(s) / extract failed …, while node scripts/check-i18n-coverage.mjs on the same tree refuses to judge ("Nothing was compared…").

Source

Extracted from the QA run #7640 (framework 92f26f7, console 09987b680).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions