Skip to content

ci: add local packaging reproduction entrypoint#909

Closed
luoye520ww wants to merge 1 commit into
KunAgent:developfrom
luoye520ww:codex/ci-local-reproduction
Closed

ci: add local packaging reproduction entrypoint#909
luoye520ww wants to merge 1 commit into
KunAgent:developfrom
luoye520ww:codex/ci-local-reproduction

Conversation

@luoye520ww

Copy link
Copy Markdown
Collaborator

Problem

Native packaging failures were difficult to reproduce locally because each CI job used a different command and the required Node/npm/Electron/dependency state was not shown consistently.

Scope

This PR adds the ci:reproduce entry point for the three native package jobs. It does not change CI workflows or retry policy.

Usage

npm run ci:reproduce -- --job linux-package
npm run ci:reproduce -- --job windows-package
npm run ci:reproduce -- --job macos-package
npm run ci:reproduce -- --job linux-package --dry-run

Changes

  • Accept only the three explicit package jobs.
  • Print Node, npm, Electron, package-lock, and node_modules state before execution.
  • Fail with a clear non-zero status when prerequisites are missing; never silently skip a step.
  • Support Windows npm.cmd shims without interpolating user input into a shell command.
  • Provide dry-run output for command review without executing packaging.

Safety

  • Commands and arguments come from a fixed job table.
  • Windows shell mode exists only for the fixed npm.cmd shim; no user-provided text is passed to the shell.
  • No secrets, logs, or artifacts are uploaded or persisted.

Typecheck

npm.cmd run typecheck

Passed.

Tests

node --test scripts/ci-reproduce.test.cjs
npm.cmd run lint
npm.cmd run build
git diff --check

Passed: 5 local reproduction tests; root typecheck, lint, and build passed; diff check passed.

Review performed

  • Argument validation and command allow-list
  • Windows .cmd compatibility
  • Missing dependency behavior
  • Dry-run vs real execution semantics
  • Test quality and PR scope

Non-goals

  • GitHub Actions workflow changes
  • Automatic dependency installation
  • Artifact upload or smoke execution beyond the selected package command

@luoye520ww

Copy link
Copy Markdown
Collaborator Author

This work is consolidated into #941, which contains the related CI diagnostics and packaged smoke fix as one tested PR. Closing this duplicate to avoid parallel review and PR noise.

@luoye520ww luoye520ww closed this Jul 14, 2026
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