Skip to content

fix(build): stop deno task test failing on the orphaned #dnt import - #3505

Merged
kojiwakayama merged 1 commit into
mainfrom
fix/release-test-gate-dnt
Aug 9, 2026
Merged

fix(build): stop deno task test failing on the orphaned #dnt import#3505
kojiwakayama merged 1 commit into
mainfrom
fix/release-test-gate-dnt

Conversation

@kojiwakayama

@kojiwakayama kojiwakayama commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Closes veryfront-issue-inbox#425.

Problem

deno task test has been unable to start since #3212. It discovers scripts/build/*.test.ts, which reach build-npm-extension-packages.ts, which imports #dnt. That specifier lives in scripts/test.deno.json, not the root import map, so the run dies at module resolution before a single test executes:

error: Import "#dnt" not a dependency and not in import map from
scripts/build/build-npm-extension-packages.ts

Scripts tests were never meant to run under the root config — they have their own test:scripts task that passes --config=scripts/test.deno.json. The root task simply never excluded them.

Why it matters

This is what forces deno task release to be invoked with --no-test --no-build: the release script's own gates call deno task test and deno task verify:dist, and both died here. Every recent release has been cut with its gates disabled.

Fix

Two task edits, no runtime code:

  1. test excludes scripts.
  2. verify chains deno task test:scripts, so that coverage moves rather than disappears. Excluding without this second half would trade a loud failure for a silent gap, which is the worse outcome.

Result

deno task test now runs to completion:

FAILED | 4217 passed (32071 steps) | 3 failed (2 steps) | 1 ignored (3m6s)

The 3 failures are pre-existing and unrelated — they were simply never reachable before, because the task could not get past module resolution. Verified by running them on a clean tree: extensions/ext-node-websocket-ws/src/package-boundary.test.ts fails identically without this change. They look environmental (S3BlobStorage transport, extension package boundary) and are left for separate triage rather than bundled here.

Note the pre-push gate runs a different task, so this does not change what that gate enforces.

Summary by CodeRabbit

  • Tests
    • Updated the test task to exclude the scripts directory from test runs.

`deno task test` has been unable to start since #3212. It discovers
`scripts/build/*.test.ts`, which reach `build-npm-extension-packages.ts`,
which imports `#dnt`. That specifier lives in `scripts/test.deno.json`,
not the root import map, so the run dies at module resolution:

  error: Import "#dnt" not a dependency and not in import map from
  scripts/build/build-npm-extension-packages.ts

Scripts tests were never meant to run under the root config -- they have
their own `test:scripts` task that passes `--config=scripts/test.deno.json`.
The root task simply never excluded them.

So exclude `scripts` from the root run, and chain `test:scripts` into
`verify` so the coverage moves rather than disappears. Excluding without
that second half would trade a loud failure for a silent gap.

This is what forces `deno task release` to be run with `--no-test`
`--no-build`: the release script's own gates call `deno task test` and
`deno task verify:dist`, and both died here. Closes
veryfront-issue-inbox#425.

`deno task test` now runs to completion: 4217 passed, 3 failed. Those 3
are pre-existing and unrelated -- they were simply never reachable before,
because the task could not get past module resolution. Verified by running
them on a clean tree, e.g.
`extensions/ext-node-websocket-ws/src/package-boundary.test.ts` fails
identically without this change.
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Deno test task now excludes the scripts directory. The verify task remains unchanged.

Changes

Deno test discovery

Layer / File(s) Summary
Test task discovery
deno.json
The test task excludes scripts from test discovery. The verify task command remains unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: kwakayama

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: preventing deno task test from failing because of the orphaned #dnt import.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-test-gate-dnt

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
deno.json (1)

467-467: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a focused regression test for the task split.

This change alters test discovery. Add or update a test that parses deno.json and verifies that test excludes scripts. Also verify that verify runs test:scripts.

As per coding guidelines, for behavior changes, add or update a focused failing test before changing the implementation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deno.json` at line 467, Add a focused regression test that parses the Deno
task configuration and asserts the test task excludes scripts while the verify
task invokes test:scripts. Ensure the test fails against the current
configuration before updating the task definitions.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@deno.json`:
- Line 467: Add a focused regression test that parses the Deno task
configuration and asserts the test task excludes scripts while the verify task
invokes test:scripts. Ensure the test fails against the current configuration
before updating the task definitions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1e591cca-9c58-47e1-8a1d-c10dc6521315

📥 Commits

Reviewing files that changed from the base of the PR and between 91b6bc3 and 87c6edd.

📒 Files selected for processing (1)
  • deno.json

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 87c6eddd55

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread deno.json
"build:npm": "deno run -A scripts/build/generate-integrations-module.ts && deno task generate && deno run --config=scripts/test.deno.json --frozen -A scripts/build/build-npm-dnt.ts",
"release": "deno run -A scripts/release.ts",
"test": "deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/schemas/_test-setup.ts --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' --unstable-worker-options --unstable-net",
"test": "deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/schemas/_test-setup.ts --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts,scripts' --unstable-worker-options --unstable-net",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include all excluded script tests in test:scripts

When deno task test runs, this directory-wide exclusion removes every test under scripts/, but the compensating test:scripts task has a fixed file list that omits existing tests such as scripts/build/browser-safe-exports.test.ts, scripts/build/generate-integrations-module.test.ts, and scripts/lint/extension-manifest-reader.test.ts. These tests were previously part of automatic discovery, so neither test nor the updated verify task now exercises them, allowing browser-export, generated-module, and extension-manifest regressions through the advertised replacement coverage. Add the omitted tests or make test:scripts discover the compatible script tests.

Useful? React with 👍 / 👎.

@kojiwakayama
kojiwakayama added this pull request to the merge queue Aug 9, 2026
Merged via the queue into main with commit 96ab97e Aug 9, 2026
33 checks passed
@kojiwakayama
kojiwakayama deleted the fix/release-test-gate-dnt branch August 9, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant