Skip to content

fix(test): keep Deno test tasks noninteractive in terminals - #3094

Merged
kwakayama merged 5 commits into
mainfrom
fix/test-unit-wizard-pty
Jul 25, 2026
Merged

fix(test): keep Deno test tasks noninteractive in terminals#3094
kwakayama merged 5 commits into
mainfrom
fix/test-unit-wizard-pty

Conversation

@kojiwakayama

@kojiwakayama kojiwakayama commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • set DENO_TESTING=1 on automated Deno test and coverage task families so PTY runs cannot enter real prompts
  • preserve NODE_ENV=production test behavior and keep generation outside the test-only environment
  • bump veryfront-code to 0.1.1143

Verification

  • red repro: PTY focused wizard test without DENO_TESTING entered the real wizard and timed out
  • PTY focused wizard test with the guard: 1 passed / 16 steps
  • PTY deno task test:unit --filter interactive-wizard: 1 passed / 16 steps, 2,660 filtered
  • exact-head pre-push at 57f16b0f9: fmt, lint, typecheck, and 2,661 unit tests / 21,603 steps passed
  • independent exact-diff review: APPROVE, zero findings

Dependencies

Copilot AI review requested due to automatic review settings July 25, 2026 06:12
@kojiwakayama

Copy link
Copy Markdown
Contributor Author

@codex review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Keeps automated Deno test task families noninteractive (even in PTY terminals) by setting DENO_TESTING=1 while continuing to run suites under NODE_ENV=production, and bumps the package version to 0.1.1143.

Changes:

  • Set DENO_TESTING=1 on the main deno task test* and test:coverage* task families to disable interactive CLI wizards/prompts during automated test runs.
  • Bump veryfront version to 0.1.1143 in deno.json and src/utils/version-constant.ts.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/utils/version-constant.ts Updates the shared VERSION constant to 0.1.1143 to match the release version.
deno.json Bumps package version and adds DENO_TESTING=1 to automated test/coverage task commands to keep tests noninteractive.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 8199f4d26a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Deno test tasks run with production defaults to match release behavior, but a local pseudo-terminal makes stdin interactive and lets the init wizard enter a real prompt. Set DENO_TESTING for shared automated test families so prompt guards remain active without test-global environment mutation.

Constraint: Local verification can execute Deno tasks under a pseudo-terminal.
Rejected: Mutate DENO_TESTING inside interactive-wizard.test.ts | file-local mutation leaves other prompt guards vulnerable under PTY test tasks.
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep DENO_TESTING on automated Deno test commands that run with production NODE_ENV.
Tested: PTY red repro; focused PTY task 1 test/16 steps; pre-push fmt, lint, typecheck, and unit suite 2661 passed/21603 steps.
Not-tested: Staging pending prerequisite framework releases.
@kojiwakayama
kojiwakayama force-pushed the fix/test-unit-wizard-pty branch from 8199f4d to 57f16b0 Compare July 25, 2026 06:21
@kojiwakayama

Copy link
Copy Markdown
Contributor Author

@codex review

Please re-review exact head 57f16b0. The code diff is unchanged from the prior clean review; only the commit metadata was corrected to the repository Lore protocol. Exact-head pre-push passes (2,661 tests / 21,603 steps). The version reservation and #3077 audit prerequisite are intentional.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 57f16b0f98

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

kojiwakayama added a commit that referenced this pull request Jul 25, 2026
Replay matching now records the exact call occurrence closed by an authoritative result. Direct conversion suppresses synthetic error output only for that matched occurrence, retaining the provider-safe Tool error fallback when malformed or partial history has no durable result.

Constraint: Hosted raw error calls require a separate adjacent tool_result, while the exported direct converter also accepts unvalidated partial history.

Rejected: Remove the generic error fallback globally | direct conversion could emit a dangling provider tool call.

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Suppress synthetic raw error output only when replay matching proves an authoritative result follows.

Tested: focused replay suites, 41 passed / 102 steps; scoped fmt, lint, check, and diff check

Not-tested: full unit gate cannot terminate on this branch because of the known interactive-wizard PTY hang fixed separately in PR #3094
Merge current origin/main into the PR branch so the PTY test-task fix can be reviewed against b2046b2 without rebasing or changing release ordering. The version conflict is resolved by keeping the branch release version while retaining main's dependency and documentation updates.

Constraint: Branch release version must remain 0.1.1143 despite origin/main carrying 0.1.1133

Constraint: Merge main into the branch without force-pushing

Rejected: Take origin/main version | would violate requested version ordering for this PR

Confidence: high

Scope-risk: moderate

Directive: Do not lower deno.json or src/utils/version-constant.ts from 0.1.1143 while this PR is queued ahead of lower-version main changes

Tested: Pending post-merge verification
The merged main baseline changes the source corpus consumed by the client prebundle generator. Running the standard generator after the refresh updates the framework candidate snapshot, so committing the generated output keeps the branch clean after the test and verify tasks.

Constraint: deno task test:unit and deno task verify:quick both run generation before validation.

Rejected: Revert the generated candidate list | would leave the branch stale relative to the repo generator after merging origin/main.

Rejected: Commit deno.lock resolver churn | unrelated dependency resolution noise was not required after rerunning generation with the lock restored.

Confidence: high

Scope-risk: narrow

Directive: Do not hand-edit framework-candidates.generated.ts; regenerate it through deno task generate.

Tested: deno task generate; git diff --check; deno task test:unit --filter interactive-wizard; deno task test:unit; deno task verify:quick; deno fmt --check deno.json src/utils/version-constant.ts src/server/handlers/dev/framework-candidates.generated.ts; deno check src/utils/version-constant.ts src/server/handlers/dev/framework-candidates.generated.ts; deno task audit
Copilot AI review requested due to automatic review settings July 25, 2026 07:30
@kojiwakayama

kojiwakayama commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@copilot-pull-request-reviewer please re-review exact head 86a716f after merging origin/main b2046b2.

Conflict resolution preserved release version 0.1.1143, the DENO_TESTING=1 noninteractive test-task change, and main-side brace-expansion minimumDependencyAge exclusion.

Local evidence: PTY focused test passed, full unit suite passed (2662 tests / 21636 steps), verify:quick passed, audit passed, and pre-push passed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 86a716feff

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Merge current main into the test-unit wizard PTY branch while preserving the release reservation and the DENO_TESTING=1 test-task contract. Main's UI primitive and routing work is accepted as-is; the PR remains limited to test-task environment behavior, version reservation, and regenerated framework candidate metadata.

Constraint: PR #3094 requested a normal merge from current main, not rebase or force-push

Constraint: Deno test tasks must remain noninteractive even when launched from terminal-like environments

Rejected: Accept main's package version | would discard the PR's explicit release reservation

Rejected: Include deno.lock drift from local checks | dependency-resolution noise unrelated to this PR

Confidence: high

Scope-risk: narrow

Directive: Keep DENO_TESTING=1 on test and coverage tasks unless terminal prompting behavior is reworked

Tested: DENO_TESTING=1 deno test --no-check --allow-all src/config/environment-config.test.ts src/config/runtime-config.test.ts src/config/env.test.ts cli/shared/interactive.test.ts cli/utils/index.test.ts cli/commands/init/interactive-wizard.test.ts cli/commands/init/init.integration.test.ts

Tested: script -q /dev/null deno task | rg -n 'test(:unit|:integration|:coverage)?|DENO_TESTING'

Tested: deno task fmt:check

Tested: deno task lint

Tested: deno task typecheck

Tested: deno task audit

Tested: deno task verify:quick

Tested: deno task generate

Not-tested: Full deno task test and binary E2E were not rerun locally after verify:quick
Copilot AI review requested due to automatic review settings July 25, 2026 08:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread src/server/handlers/dev/framework-candidates.generated.ts
@kwakayama
kwakayama marked this pull request as ready for review July 25, 2026 09:00
@kwakayama
kwakayama self-requested a review as a code owner July 25, 2026 09:00
kwakayama
kwakayama previously approved these changes Jul 25, 2026
@kwakayama
kwakayama added this pull request to the merge queue Jul 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jul 25, 2026
Merging current main brings the latest SSR, docs, runtime, and dependency lockfile changes onto the PR while preserving the test-task environment contract and the reserved release version.

Constraint: PR #3094 intentionally reserves version 0.1.1143 while main is at 0.1.1142

Constraint: Automated Deno test and coverage task families must set DENO_TESTING=1 under PTYs

Rejected: Take main's version line | would drop the PR's release reservation

Rejected: Rebase the branch | request required a normal merge

Confidence: high

Scope-risk: narrow

Directive: Keep deno.json and src/utils/version-constant.ts versions in lockstep

Tested: DENO_TESTING PTY init wizard test; git diff --check; deno task fmt:check; deno task lint; deno task typecheck; deno task test:unit; deno task verify:quick; deno task audit

Not-tested: Full release/publish workflow
Copilot AI review requested due to automatic review settings July 25, 2026 09:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@kwakayama
kwakayama enabled auto-merge July 25, 2026 09:37
@kwakayama
kwakayama added this pull request to the merge queue Jul 25, 2026
Merged via the queue into main with commit 199ec20 Jul 25, 2026
31 checks passed
@kwakayama
kwakayama deleted the fix/test-unit-wizard-pty branch July 25, 2026 09:45
kojiwakayama added a commit that referenced this pull request Jul 25, 2026
Main advanced through #3089, #3092, #3094, and #3095 after the prior conflict fix. This merge keeps those upstream changes while preserving the SSR framework cache integrity fixes and concurrent framework bundle validation from the PR branch.

Constraint: PR #3099 must remain on fix/ssr-framework-cache-integrity with a normal merge commit, no rebase, and no force-push

Rejected: Take main's 0.1.1143 version | would roll back the PR branch version bump to 0.1.1144

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Keep deno.json and src/utils/version-constant.ts synchronized when resolving version-only release conflicts

Tested: Focused SSR/cache tests: 15 passed, 283 steps, 0 failed

Tested: deno task fmt:check

Tested: deno task lint

Tested: deno task typecheck

Tested: git diff --check plus unresolved-file and conflict-marker checks

Not-tested: Full repository test suite and release build
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.

3 participants