Repository navigation
fix(scripts): report a stale workspace dist as a prerequisite, not a bundle problem (#7681) - #7718
Merged
Merged
Conversation
…bundle problem (#7681) `check-i18n-bundles` had exactly one prerequisite classifier — `looksLikeMissingCliCommand`, which matches oclif's "command … not found" and therefore sees an unbuilt CLI only. A stale *dependency* dist makes the extract throw a module-export mismatch instead, which matched nothing, fell through to the in-loop `else`, and printed as "check-i18n-bundles: 1 bundle problem(s) / extract failed …": one environment fact rendered as a content verdict about translation bundles nothing had compared, in the two words that send the reader to the i18n configs. Its sibling `check-i18n-coverage` met the identical cause in the same QA run and refused to judge (#6033/#5862). `looksLikeStaleWorkspaceDist` (in the shared `cli-build-prerequisite.mjs`, so the siblings can adopt it) classifies that class in two shapes — an export mismatch on a workspace specifier, and a `Cannot find module` reaching into a workspace package's `dist/` — and the gate now raises a hard PREREQUISITE NOT MET naming the package whose build output is at fault, prescribing a rebuild of that package rather than of the CLI. Deliberately narrow: a third party's export mismatch, CommonJS interop's differently-worded named-export error, a non-dist specifier, a genuine drift and an undeclared authoring key all keep the verdict they had. The self-test pins both directions (29 → 53 assertions). `reportPrerequisiteNotMet` also learned how many packages the loop had already attempted, because the in-loop nets can fire after other packages printed "in sync" — "nothing was checked" would then be false, so the message states what was and was not judged instead.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
huangyiirene
marked this pull request as ready for review
August 11, 2026 12:10
This was referenced Aug 11, 2026
akarma-synetal
pushed a commit
to akarma-synetal/framework
that referenced
this pull request
Aug 17, 2026
…re HTTP status (objectstack-ai#7412) (objectstack-ai#7777) `check-half-states.mjs`'s docblock claimed "unauthenticated works at 60 req/h". That is not a fact about this script's environment — three container classes have now been measured and no two agree, so the file stated as universal what is per-container. The docblock now says what live mode actually requires (a route to api.github.com from NODE, whose fetch ignores HTTPS_PROXY and so does not share curl/gh/MCP's path; plus either no token or one that really is a GitHub credential) and records all three measurements, including this change's own: `GITHUB_TOKEN` set to the agent proxy's 14-char `prox…` placeholder, which makes the token fallback strictly worse than sending nothing. Behaviourally, the script now PROBES before it sweeps, in the objectstack-ai#7718 shape: pure classifiers the self-test drives with the real observations, wording kept next to the code that knows what it did not check, and a PREREQUISITE NOT MET report that names which requirement is unmet, prescribes the one command that satisfies it, and states plainly that nothing was swept. Exit 3 for a classified prerequisite failure, distinct from the pre-existing 2 for one this file cannot name; both non-zero, so no wrapper's behaviour changes. `--probe` answers "can live mode run HERE?" without sweeping. The probe cost one trap to get right, and it is pinned by the self-test: `/rate_limit` is EXEMPT from the limit it reports, so with the quota spent it still answers 200 while every other endpoint 403s. A status-only reading green-lit a sweep that could not make one request — the objectstack-ai#4690 shape this file exists to refuse. `parseRemaining` covers the sibling bug: `Number(null)` is 0, which would have turned every 401 into a phantom exhausted quota. Self-test 24 -> 58 cases. No H-predicate is touched (objectstack-ai#7553's spelling question is a separate pending ruling), and no transport re-architecture is attempted: which token to send, and whether these scripts should grow an MCP-backed transport, stay the maintainer's call per triage. The script does not drop or substitute the token on its own, so a container where the sweep worked before works identically after. Refs objectstack-ai#7341, objectstack-ai#7379, objectstack-ai#7718
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7681
What was wrong
check-i18n-bundleshad exactly one prerequisite classifier:looksLikeMissingCliCommand(), which matches oclif'sError: command … not foundand therefore recognises an unbuilt CLI only. A stale dependency dist makes the extract fail with a module-export mismatch instead — node refusing the import outright — which matched no classifier, fell past the in-loop prerequisite net into theelsebranch, and printed as:One environment fact, rendered as a content verdict about translation bundles nothing had compared, in the two words ("bundle", "extract") that send the reader to the i18n configs. The sibling
check-i18n-coveragemet the identical cause in the same QA run and refused to judge instead ("Nothing was compared… the baseline was left exactly as committed" — the #6033/#5862 honesty).Premise verified at
21888ab: the mislabel path is present onorigin/main, and reproduced end-to-end (see below).What changed
scripts/cli-build-prerequisite.mjs— a second classifier,looksLikeStaleWorkspaceDist(), living beside the first so the sibling gates can adopt it. It recognises two shapes of the same prerequisite:The requested module '@objectstack/spec/system' does not provide an export named 'authorisesIrreversibleAction'— that package'sdistpredates its source;Cannot find modulereaching into a workspace package'sdist/— never built at all.It shares the existing oclif-flattening step, since node prints its diagnostics as a frame plus a stack and a per-line regex would meet the frame first.
scripts/check-i18n-bundles.mjs— the in-loop net now tries both signatures and raises a hardPREREQUISITE NOT METthat names the package whose build output is at fault, exonerates the i18n config that was merely holding the bag, and prescribes rebuilding that package rather than the CLI.reportPrerequisiteNotMetalso learned how many packages the loop had already attempted: the in-loop nets can fire after other packages have printed "in sync", where the old fixed "Nothing was checked" line would have been false — it now says what was and was not judged, mirroring the coverage gate's partial-round wording.Deliberately narrow
A genuine content failure must still read as content, so the classifier claims only specifiers naming a package this repo builds. Everything else keeps the verdict it had: a third party's export mismatch, CommonJS interop's differently-worded
Named export 'x' not found, aCannot find modulefor a path that is not build output, a real bundle drift, and an undeclared authoring key. Both directions are pinned in the self-test — 29 to 53 assertions.Verification
--self-test(29 to 53 assertions), coverage gate's self-test (shared module unchanged in behaviour),pnpm check:nul-bytes, ESLint over both touched scripts: all green.End-to-end against a fixture workspace with a scripted CLI, same tree, before =
origin/main:OK (2 package(s) …)1 bundle problem(s)1 bundle problem(s)1 bundle problem(s) / extract failedPREREQUISITE NOT MET — a workspace package this gate loads is built from older source — @objectstack/spec1 bundle problem(s)PREREQUISITE NOT MET — … is not built — @objectstack/specReverse verification, predicted red: neutering
looksLikeStaleWorkspaceDistto returnnullturns exactly the 9 positive pins red and leaves the negative ones green; restored green.The corpus is honest about its provenance: node's exact message shape was produced locally against a fixture standing in for the stale
packages/spec/dist, carrying the specifier and export name of the QA run. A full workspace build was not run in this container (nonode_modules), so the healthy-tree confirmation is the fixture matrix above plus the real gate on this worktree still raising the unbuilt-CLI prerequisite.Changeset
None: internal gate tooling under
scripts/, nothing published or user-visible.skip-changesetapplied.Generated by Claude Code