Repository navigation
fix: plan worker-admission test for its source file - #1751
Merged
Merged
Conversation
worker-admission.test.ts reads test/postgresql/surface-parity. integration.ts from disk and evaluates extracted declarations in a vm context. Vitest's module graph cannot see that dependency, so a pull request touching only the integration file skipped the test in the selective CI plan and the breakage surfaced only on main. Add an extracted-sources entry to GRAPH_INVISIBLE_INPUTS, appended last so index-based assertions keep their meaning, and cover it in the classification cases. A matching reader regex joins the completeness table so any test that reads a postgresql/*.ts source via new URL must be listed under the entry. The completeness check only proves a reading test is listed; a new disk-read source still needs its own pattern and entry. The path also matches the PostgreSQL job patterns, so only the unit test is added. Closes #1720 Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>
bcdonadio
enabled auto-merge
October 25, 2026 06:13
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Closes #1720
Why
test/surface-parity/worker-admission.test.tsreadstest/postgresql/surface-parity.integration.tsfrom disk, extractsFixedBackendWorkerand its helpers through the TypeScript AST, and evaluates them in avmcontext. Vitest's module graph never sees that dependency andscripts/ci-plan.mjsdid not list it, so a pull request touching only the integration file did not run the worker-admission test in the selective plan. A breakage (for example a new import that the vm context cannot resolve) only surfaced in the complete run onmain. This was found while reviewing #1623.How
extracted-sourcesentry toGRAPH_INVISIBLE_INPUTS, aftercompiled-sources, mappingtest/postgresql/surface-parity.integration.tstotest/surface-parity/worker-admission.test.ts. The existing index-based assertions only reference the first two entries, so they keep their meaning.test/scripts/ci-plan.test.ts: assert the mapping ingraphInvisibleTests(plus a non-matching sibling path), assert thatclassifyChangesfor that path alone is selective with the worker-admission test inalwaysRun, and add anextracted-sourcesreader regex to the completeness table so any test that reads apostgresql/*.tssource vianew URL(...)must be listed under the entry.The path also matches the PostgreSQL path patterns, so the PostgreSQL job already ran for it; this only adds the unit test file. No production TypeScript changes, so no coverage fragment, changeset, or docs change.
Testing
vitest run test/scripts/ci-plan.test.ts test/surface-parity/worker-admission.test.ts: 2 files, 21 tests pass.tests, the completeness test fails withextracted-sources: expected [ 'test/surface-parity/worker-admission.test.ts' ] to deeply equal []. The temporary state was restored and is not part of the commit.tsc --noEmit -p .andeslinton the two changed files pass.Reviewer guide
Start with the new entry in
scripts/ci-plan.mjs, then the three additions intest/scripts/ci-plan.test.ts. The completeness check proves only that a reading test is listed; a new disk-read source still needs its own pattern and entry (noted in a comment).