Skip to content

test(stack): make tests read as focused scenarios - #6555

Merged
jgoux merged 2 commits into
developfrom
test/stack-test-stories
Sep 10, 2026
Merged

jgoux merged 2 commits into
developfrom
test/stack-test-stories

Conversation

@jgoux

@jgoux jgoux commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Refactors stack tests into focused scenarios with shared setup fixtures and structural assertions against observable outcomes. Separates configuration, lifecycle, and cleanup cases; replaces generated-text checks with parsing or execution; removes redundant coverage and strengthens previously vacuous checks.

The whole-stack E2E journey now has named service and restart phases. The Functions bundle smoke test moves to integration coverage because it executes the emitted module.

@jgoux
jgoux requested a review from a team as a code owner September 10, 2026 09:46
@jgoux jgoux self-assigned this Sep 10, 2026

@github-actions github-actions Bot 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.

🤖 AI Review

Adjudicated 10 unique findings: 7 confirmed and 3 refuted. The confirmed items are one minor Vector-config coverage regression plus six nits involving conventions, consistency, duplication, and maintainability. No critical or major issues were verified.

Findings

Severity Location Category Sources Claim
🟡 MINOR packages/stack/src/runtime/runtime-input-owner.integration.test.ts:511 test-coverage claude The rewritten Vector tests no longer verify several material parts of the generated configuration or removal of its containing directory.
⚪ NIT packages/stack/src/model/catalog.integration.test.ts:118 test-coverage claude Deleting the canonical-release-key test removes the only assertion that every release object remains accessible through releases[release.version].
⚪ NIT packages/stack/src/runtime/runtime-input-owner.integration.test.ts:514 consistency claude The three new Vector tests introduce repository-unique Arrange/Act/Assert comments and one test name inconsistent with neighboring verb-led names.
⚪ NIT packages/stack/src/public/whole-stack.e2e.test.ts:1092 maintainability claude The function route is derived independently in two places and then manually threaded through restart helpers, creating duplicate ownership of the same scenario value.
⚪ NIT packages/stack/src/public/promise.integration.test.ts:14 style claude The file has two consecutive type-only imports from the same Logs.ts module.
⚪ NIT packages/stack/src/state/secrets.integration.test.ts:49 maintainability claude Three tests introduce equivalent helpers for asserting and narrowing an optional value.
⚪ NIT packages/stack/src/runtime/database-bootstrap-catalog.integration.test.ts:65 effect-conventions codex The new assertions directly inspect the _tag field of Effect domain errors despite already checking the concrete error class.
Refuted findings (kept for transparency, not posted as review comments)
  • packages/stack/src/functions/serve-main-bundler.integration.test.ts:47 (test-coverage): Deleting the unit test allegedly removes all coverage that the bundled worker preserves forceCreate and noModuleCache behavior.
    Refuted: Although the new health test does not reach userWorkers.create, the whole-stack E2E exercises the actual bundled worker and verifies request-time source refresh after an edit. Thus the behavior protected by forceCreate/noModuleCache remains covered; having no unit-pattern files is not itself a correctness issue.
  • packages/stack/src/public/public-model.integration.test.ts:5 (test-coverage): The local STATUS_CAPABILITIES list allegedly allows the complete-status test to keep passing when CAPABILITY_NAMES gains or changes a capability.
    Refuted: A capability addition would leave STATUS_FIXTURE incomplete and make the decode at public-model.integration.test.ts:48 fail. A rename would likewise be rejected by CapabilityNameSchema, so the local list cannot silently drift in the claimed way.
  • packages/stack/src/functions/serve-main-bundler.integration.test.ts:2 (portability): Using vm.SourceTextModule allegedly introduces an unsupported Node portability requirement.
    Refuted: The cited API is available in the suite's deliberate Bun runtime. Plain-Node compatibility is not a supported execution path for this package test, so no portability regression was established.

Stats

Claude findings: 9 · Codex findings: 1 · Confirmed: 7 · Refuted: 3 · Uncertain: 0


Models: claude-opus-5 + gpt-5.6-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

@jgoux
jgoux added this pull request to the merge queue Sep 10, 2026
Merged via the queue into develop with commit 38a8c32 Sep 10, 2026
85 checks passed
@jgoux
jgoux deleted the test/stack-test-stories branch September 10, 2026 10:41
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.

2 participants