Skip to content

perf(ci): gate install smoke on changed-smoke#52458

Merged
vincentkoc merged 1 commit intomainfrom
fix-install-smoke-changed-smoke
Mar 22, 2026
Merged

perf(ci): gate install smoke on changed-smoke#52458
vincentkoc merged 1 commit intomainfrom
fix-install-smoke-changed-smoke

Conversation

@vincentkoc
Copy link
Copy Markdown
Member

Summary

  • add a dedicated changed-smoke gate to the shared CI scope detector
  • run install-smoke only for install, packaging, and container-relevant changes
  • keep install-smoke separate from CI while reusing the same scope engine

Testing

  • pnpm exec vitest run src/scripts/ci-changed-scope.test.ts
  • pnpm exec oxfmt --check .github/workflows/install-smoke.yml docs/ci.md scripts/ci-changed-scope.d.mts scripts/ci-changed-scope.mjs src/infra/scripts-modules.d.ts src/scripts/ci-changed-scope.test.ts

@vincentkoc vincentkoc self-assigned this Mar 22, 2026
@openclaw-barnacle openclaw-barnacle bot added docs Improvements or additions to documentation scripts Repository scripts size: S maintainer Maintainer-authored PR labels Mar 22, 2026
@vincentkoc vincentkoc marked this pull request as ready for review March 22, 2026 19:57
@vincentkoc vincentkoc merged commit 4bd90f2 into main Mar 22, 2026
39 checks passed
@vincentkoc vincentkoc deleted the fix-install-smoke-changed-smoke branch March 22, 2026 19:58
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 769508d616

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +20 to +21
const CHANGED_SMOKE_SCOPE_RE =
/^(Dockerfile$|\.npmrc$|package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|scripts\/install\.sh$|scripts\/test-install-sh-docker\.sh$|scripts\/docker\/|extensions\/[^/]+\/package\.json$|\.github\/workflows\/install-smoke\.yml$|\.github\/actions\/setup-node-env\/action\.yml$)/;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Include Docker context files in changed-smoke scope

The new CHANGED_SMOKE_SCOPE_RE is too narrow for the install-smoke workflow it gates: PRs that only change Docker build-context inputs (for example .dockerignore, patches/**, or plugin manifests like extensions/*/openclaw.plugin.json) currently produce run_changed_smoke=false, so install-smoke is skipped by .github/workflows/install-smoke.yml even though that job builds Dockerfile with context: . and validates matrix plugin discovery. This creates a blind spot where install/container regressions can merge without the smoke checks that previously ran for non-doc changes.

Useful? React with 👍 / 👎.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 22, 2026

Greptile Summary

This PR gates install-smoke behind a new lightweight changed-smoke job that reuses the existing ci-changed-scope.mjs engine, so Docker/install smoke tests only run when install, packaging, or container-relevant files actually changed.

  • CHANGED_SMOKE_SCOPE_RE is added to ci-changed-scope.mjs covering Dockerfiles, lock files, install scripts, per-extension package.json files, and the workflow itself.
  • runChangedSmoke is threaded through the type declarations (scripts/ci-changed-scope.d.mts, src/infra/scripts-modules.d.ts) and all existing unit tests; a new focused test case validates the new scope.
  • The changed-smoke job is missing the same draft-PR guard (github.event_name != 'pull_request' || !github.event.pull_request.draft) that docs-scope has. Because docs-scope is skipped for drafts but changed-smoke's if condition still evaluates to true (the output is '', which != 'true'), changed-smoke runs a blacksmith-16vcpu-ubuntu-2404 runner on every draft PR and converted_to_draft event for no benefit.
  • INSTALL_SMOKE_WORKFLOW_SCOPE_RE and its early check are redundant — the same path (install-smoke.yml) is already covered by CHANGED_SMOKE_SCOPE_RE.

Confidence Score: 4/5

  • Safe to merge; the gate logic is correct and install-smoke will not regress — the only issues are minor efficiency and cleanup opportunities.
  • The core scope-detection logic is correct, the regex is well-formed, tests pass, and type declarations are consistent. The missing draft guard on changed-smoke causes a spurious runner execution on draft events but has no functional impact on install-smoke itself. The redundant INSTALL_SMOKE_WORKFLOW_SCOPE_RE check is cosmetic. Neither issue blocks the primary goal of the PR.
  • .github/workflows/install-smoke.yml — the changed-smoke job should carry the same draft guard as docs-scope.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: .github/workflows/install-smoke.yml
Line: 40-42

Comment:
**Draft-PR guard missing on `changed-smoke`**

`docs-scope` has an explicit draft guard (`if: github.event_name != 'pull_request' || !github.event.pull_request.draft`), so it is *skipped* for draft PRs. When a needed job is skipped, GitHub Actions still evaluates the dependent job's own `if`; here `needs.docs-scope.outputs.docs_only` becomes `''`, and `'' != 'true'` is `true`, so `changed-smoke` **runs** on every draft PR (including `converted_to_draft` events). This spins up a `blacksmith-16vcpu-ubuntu-2404` runner for a scope check that has no downstream effect because `install-smoke` is still guarded by the draft check.

Adding the same guard keeps the two gate jobs consistent:

```suggestion
  changed-smoke:
    needs: [docs-scope]
    if: (github.event_name != 'pull_request' || !github.event.pull_request.draft) && needs.docs-scope.outputs.docs_only != 'true'
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: scripts/ci-changed-scope.mjs
Line: 9

Comment:
**`INSTALL_SMOKE_WORKFLOW_SCOPE_RE` is redundant**

`CHANGED_SMOKE_SCOPE_RE` (line 21) already includes `\.github\/workflows\/install-smoke\.yml$`, so the dedicated `INSTALL_SMOKE_WORKFLOW_SCOPE_RE` constant and the separate `if` block at lines 70-72 are both dead code — `runChangedSmoke` is always set to `true` for this path by the broader `CHANGED_SMOKE_SCOPE_RE` check that comes after it. The constant and the early check can safely be removed to avoid confusion about why the same path is guarded twice.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "perf(ci): gate install smoke on changed-..." | Re-trigger Greptile

Comment on lines +40 to +42
changed-smoke:
needs: [docs-scope]
if: (github.event_name != 'pull_request' || !github.event.pull_request.draft) && needs.docs-scope.outputs.docs_only != 'true'
if: needs.docs-scope.outputs.docs_only != 'true'
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.

P2 Draft-PR guard missing on changed-smoke

docs-scope has an explicit draft guard (if: github.event_name != 'pull_request' || !github.event.pull_request.draft), so it is skipped for draft PRs. When a needed job is skipped, GitHub Actions still evaluates the dependent job's own if; here needs.docs-scope.outputs.docs_only becomes '', and '' != 'true' is true, so changed-smoke runs on every draft PR (including converted_to_draft events). This spins up a blacksmith-16vcpu-ubuntu-2404 runner for a scope check that has no downstream effect because install-smoke is still guarded by the draft check.

Adding the same guard keeps the two gate jobs consistent:

Suggested change
changed-smoke:
needs: [docs-scope]
if: (github.event_name != 'pull_request' || !github.event.pull_request.draft) && needs.docs-scope.outputs.docs_only != 'true'
if: needs.docs-scope.outputs.docs_only != 'true'
changed-smoke:
needs: [docs-scope]
if: (github.event_name != 'pull_request' || !github.event.pull_request.draft) && needs.docs-scope.outputs.docs_only != 'true'
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/install-smoke.yml
Line: 40-42

Comment:
**Draft-PR guard missing on `changed-smoke`**

`docs-scope` has an explicit draft guard (`if: github.event_name != 'pull_request' || !github.event.pull_request.draft`), so it is *skipped* for draft PRs. When a needed job is skipped, GitHub Actions still evaluates the dependent job's own `if`; here `needs.docs-scope.outputs.docs_only` becomes `''`, and `'' != 'true'` is `true`, so `changed-smoke` **runs** on every draft PR (including `converted_to_draft` events). This spins up a `blacksmith-16vcpu-ubuntu-2404` runner for a scope check that has no downstream effect because `install-smoke` is still guarded by the draft check.

Adding the same guard keeps the two gate jobs consistent:

```suggestion
  changed-smoke:
    needs: [docs-scope]
    if: (github.event_name != 'pull_request' || !github.event.pull_request.draft) && needs.docs-scope.outputs.docs_only != 'true'
```

How can I resolve this? If you propose a fix, please make it concise.

const DOCS_PATH_RE = /^(docs\/|.*\.mdx?$)/;
const SKILLS_PYTHON_SCOPE_RE = /^(skills\/|pyproject\.toml$)/;
const CI_WORKFLOW_SCOPE_RE = /^\.github\/workflows\/ci\.yml$/;
const INSTALL_SMOKE_WORKFLOW_SCOPE_RE = /^\.github\/workflows\/install-smoke\.yml$/;
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.

P2 INSTALL_SMOKE_WORKFLOW_SCOPE_RE is redundant

CHANGED_SMOKE_SCOPE_RE (line 21) already includes \.github\/workflows\/install-smoke\.yml$, so the dedicated INSTALL_SMOKE_WORKFLOW_SCOPE_RE constant and the separate if block at lines 70-72 are both dead code — runChangedSmoke is always set to true for this path by the broader CHANGED_SMOKE_SCOPE_RE check that comes after it. The constant and the early check can safely be removed to avoid confusion about why the same path is guarded twice.

Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/ci-changed-scope.mjs
Line: 9

Comment:
**`INSTALL_SMOKE_WORKFLOW_SCOPE_RE` is redundant**

`CHANGED_SMOKE_SCOPE_RE` (line 21) already includes `\.github\/workflows\/install-smoke\.yml$`, so the dedicated `INSTALL_SMOKE_WORKFLOW_SCOPE_RE` constant and the separate `if` block at lines 70-72 are both dead code — `runChangedSmoke` is always set to `true` for this path by the broader `CHANGED_SMOKE_SCOPE_RE` check that comes after it. The constant and the early check can safely be removed to avoid confusion about why the same path is guarded twice.

How can I resolve this? If you propose a fix, please make it concise.

frankekn pushed a commit to artwalker/openclaw that referenced this pull request Mar 23, 2026
furaul pushed a commit to furaul/openclaw that referenced this pull request Mar 24, 2026
alexey-pelykh pushed a commit to remoteclaw/remoteclaw that referenced this pull request Mar 25, 2026
alexey-pelykh added a commit to remoteclaw/remoteclaw that referenced this pull request Mar 25, 2026
* fix(ci): stop serializing push workflow runs

(cherry picked from commit 0a20c5c)

* test: harden path resolution test helpers

(cherry picked from commit 1ad47b8)

* Fix launcher startup regressions (openclaw#48501)

* Fix launcher startup regressions

* Fix CI follow-up regressions

* Fix review follow-ups

* Fix workflow audit shell inputs

* Handle require resolve gaxios misses

(cherry picked from commit 313e5bb)

* refactor(scripts): move container setup entrypoints

(cherry picked from commit 46ccbac)

* perf(ci): gate install smoke on changed-smoke (openclaw#52458)

(cherry picked from commit 4bd90f2)

* Docs: prototype generated plugin SDK reference (openclaw#51877)

* Chore: unblock synced main checks

* Docs: add plugin SDK docs implementation plan

* Docs: scaffold plugin SDK reference phase 1

* Docs: mark plugin SDK reference surfaces unstable

* Docs: prototype generated plugin SDK reference

* docs(plugin-sdk): replace generated reference with api baseline

* docs(plugin-sdk): drop generated reference plan

* docs(plugin-sdk): align api baseline flow with config docs

---------

Co-authored-by: Onur <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit 4f1e12a)

* fix(ci): harden docker builds and unblock config docs

(cherry picked from commit 9f08af1)

* Docs: add config drift baseline statefile (openclaw#45891)

* Docs: add config drift statefile generator

* Docs: generate config drift baseline

* CI: move config docs drift runner into workflow sanity

* Docs: emit config drift baseline json

* Docs: commit config drift baseline json

* Docs: wire config baseline into release checks

* Config: fix baseline drift walker coverage

* Docs: regenerate config drift baselines

(cherry picked from commit cbec476)

* Release: add plugin npm publish workflow (openclaw#47678)

* Release: add plugin npm publish workflow

* Release: make plugin publish scope explicit

(cherry picked from commit d41c9ad)

* build: default to Node 24 and keep Node 22 compat

(cherry picked from commit deada7e)

* ci(android): use explicit flavor debug tasks

(cherry picked from commit 0c2e6fe)

* ci: harden pnpm sticky cache on PRs

(cherry picked from commit 29b36f8)

* CI: add built plugin singleton smoke (openclaw#48710)

(cherry picked from commit 5a2a4ab)

* chore: add code owners for npm release paths

(cherry picked from commit 5c9fae5)

* test add extension plugin sdk boundary guards

(cherry picked from commit 77fb258)

* ci: tighten cache docs and node22 gate

(cherry picked from commit 797b6fe)

* ci: add npm release workflow and CalVer checks (openclaw#42414) (thanks @onutc)

(cherry picked from commit 8ba1b6e)

* CI: add CLI startup memory regression check

(cherry picked from commit c0e0115)

* Add bad-barnacle label to prevent barnacle closures. (openclaw#51945)

(cherry picked from commit c449a0a)

* ci: speed up scoped workflow lanes

(cherry picked from commit d17490f)

* ci: restore PR pnpm cache fallback

(cherry picked from commit e1d0545)

* CI: guard gateway watch against duplicate runtime regressions (openclaw#49048)

(cherry picked from commit f036ed2)

* fix: correct domain reference in docker setup script

* fix: adapt cherry-picks for fork TS strictness

* fix: adapt cherry-picked tests for fork structure

- Dockerfile test: OPENCLAW_ → REMOTECLAW_ ARG names
- ci-changed-scope test: add missing runChangedSmoke field
- doc-baseline test: rename to e2e (needs dist/ build artifacts)
- extension boundary test: update baselines and expectations for fork

* fix: adjust ci-changed-scope test for fork's narrower skills regex

---------

Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
Co-authored-by: Bob <[email protected]>
Co-authored-by: Onur <[email protected]>
Co-authored-by: Altay <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Onur Solmaz <[email protected]>
Co-authored-by: Harold Hunt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant