Skip to content

ci: gate native smoke by changed paths#908

Closed
luoye520ww wants to merge 1 commit into
KunAgent:developfrom
luoye520ww:codex/ci-native-smoke-path-gate
Closed

ci: gate native smoke by changed paths#908
luoye520ww wants to merge 1 commit into
KunAgent:developfrom
luoye520ww:codex/ci-native-smoke-path-gate

Conversation

@luoye520ww

Copy link
Copy Markdown
Collaborator

Problem

Native packaging is expensive, but skipping it for runtime or packaging changes can let Linux/Windows/macOS regressions reach main. Conversely, documentation-only changes should not trigger a full package smoke run.

Scope

This PR adds a pure changed-path gate. It does not modify GitHub workflow YAML or execute any smoke command.

Changes

  • Classify changed paths as native-smoke-required or native-smoke-skipped-with-reason.
  • Require smoke for main/preload, electron-builder configuration, packaging scripts, icons, Kun runtime, and dependency/extension package changes.
  • Normalize Windows separators and duplicate paths.
  • Force smoke for workflow_dispatch or an explicit force flag.
  • Return matched rule IDs and human-readable reasons for CI diagnostics.

Safety

  • Unknown and documentation-only paths produce an explicit skip reason, never a silent pass.
  • The gate is deterministic and side-effect free.
  • It does not read repository contents, call GitHub, or run shell commands.

Typecheck

npm.cmd run typecheck

Passed.

Tests

node --test scripts/native-smoke-path-gate.test.cjs
npm.cmd run lint
npm.cmd run build
git diff --check

Passed: 6 path-gate tests; root typecheck, lint, and build passed; diff check passed.

Review performed

  • Path matching and normalization
  • Manual dispatch/force behavior
  • CI diagnostic output
  • Cross-platform path handling
  • Test quality and PR scope

Non-goals

  • Editing GitHub Actions workflows
  • Computing Git diffs
  • Running or uploading native package artifacts
  • Packaging smoke implementation

Follow-ups

H2 workflow integration can consume this result to set native-smoke-required and skip only low-risk changes with the returned reason.

@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