Skip to content

Harden standalone bundle generation for @wanman/cli#10

Open
Cangminghai wants to merge 1 commit into
chekusu:mainfrom
Cangminghai:wanman/harden-standalone-bundle-generation
Open

Harden standalone bundle generation for @wanman/cli#10
Cangminghai wants to merge 1 commit into
chekusu:mainfrom
Cangminghai:wanman/harden-standalone-bundle-generation

Conversation

@Cangminghai
Copy link
Copy Markdown

Changes

  • extract standalone bundle generation into a dedicated helper with explicit embedded-asset validation
  • prebuild runtime, host-sdk, and cli dependencies before generating the standalone bundle
  • add a standalone smoke verifier that runs pnpm --filter @wanman/cli standalone, checks packages/cli/dist/wanman.mjs, and verifies temp asset cleanup
  • add focused standalone helper tests for missing assets, invalid manifests, output naming, cleanup, and compile-target branches

Test Coverage

Changed file packages/cli/src/standalone-build.ts coverage:

  • Lines: 95.52% (128/134)
  • Statements: 93.05% (134/144)
  • Branches: 81.63% (80/98)
  • Functions: 85.71% (18/21)

Verification

  • pnpm --filter @wanman/host-sdk build
  • pnpm --filter @wanman/runtime build
  • pnpm --filter @wanman/cli typecheck
  • pnpm --filter @wanman/cli build
  • pnpm exec vitest run packages/cli/src/standalone-build.test.ts
  • pnpm exec vitest run packages/cli/src/standalone-build.test.ts --coverage --coverage.reporter=text-summary --coverage.reporter=json-summary --coverage.include=packages/cli/src/standalone-build.ts
  • pnpm --filter @wanman/cli test:standalone

Notes

  • pnpm --filter @wanman/cli test:unit still hits unrelated pre-existing Windows baseline failures elsewhere in the CLI package, so verification here is targeted to the standalone bundle surface.

@Cangminghai
Copy link
Copy Markdown
Author

Coverage gate not met for changed file \packages/cli/src/standalone-build.ts, so this PR is not merge-ready yet.\n\nCurrent coverage from the PR and local rerun:\n- Lines: 95.52%\n- Statements: 93.05%\n- Branches: 81.63%\n- Functions: 85.71%\n\nTargeted local verification did pass:\n- pnpm --filter @wanman/cli typecheck\n- pnpm exec vitest run packages/cli/src/standalone-build.test.ts\n- pnpm exec vitest run packages/cli/src/standalone-build.test.ts --coverage ...\n- pnpm --filter @wanman/cli test:standalone\n\nPlease add meaningful tests for the remaining untested standalone-build branches until the changed-file coverage clears >=95%, then re-request review.

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