Skip to content

ci: classify native packaging failures#907

Closed
luoye520ww wants to merge 1 commit into
KunAgent:developfrom
luoye520ww:codex/ci-package-failure-classifier
Closed

ci: classify native packaging failures#907
luoye520ww wants to merge 1 commit into
KunAgent:developfrom
luoye520ww:codex/ci-package-failure-classifier

Conversation

@luoye520ww

Copy link
Copy Markdown
Collaborator

Problem

Packaging failures currently require reading the full CI log to decide whether the cause is code, packaging, artifact layout, or a GitHub runner outage. This has already caused code changes to be blamed for infrastructure failures.

Scope

This PR adds a pure packaging-failure classifier and tests. It does not change CI workflows or rerun policy.

Changes

  • Classify failures into the documented packaging kinds: dependency install, native rebuild, TypeScript, tests, bundle, electron package, artifact layout, runtime/renderer smoke, signing, notarization, cleanup, and infrastructure.
  • Return normalized platform, artifact presence, last successful step, a bounded redacted key-log summary, a local reproduction command, and a code-failure hint.
  • Recognize Windows/macOS aliases and emit npm.cmd on Windows.
  • Bound input logs to 256 KiB and summaries to three 512-character lines; never return full logs.

Safety

  • The classifier is pure and does not execute commands, upload logs, or persist credentials.
  • Token, password, secret, API key, and bearer values are redacted from returned summaries and metadata.
  • Infrastructure failures are explicitly separated from likely code failures to avoid masking runner outages with retries.

Typecheck

npm.cmd run typecheck

Passed.

Tests

node --test scripts/packaging-failure-classifier.test.cjs
npm.cmd run lint
npm.cmd run build
git diff --check

Passed: 5 classifier tests; root lint and build passed; diff check passed.

Review performed

  • Functional classification precedence
  • Secret and log-size boundaries
  • Cross-platform reproduction commands
  • Backward compatibility (standalone script, no workflow changes)
  • Test quality and PR scope

Non-goals

  • GitHub Actions integration
  • Automatic retries or quarantine
  • Artifact upload/download
  • Native package execution

Follow-ups

H2 can consume this classifier for path-based native smoke reporting, and H3 can expose the same reproduction commands locally.

@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