Skip to content

ci(actions): restore audit lane and cache Docker builds#51933

Merged
vincentkoc merged 2 commits intomainfrom
ci/secrets-docker-cache
Mar 21, 2026
Merged

ci(actions): restore audit lane and cache Docker builds#51933
vincentkoc merged 2 commits intomainfrom
ci/secrets-docker-cache

Conversation

@vincentkoc
Copy link
Copy Markdown
Member

Summary

  • Problem: the CI secrets audit lane needs to remain active, and Docker Release currently has no explicit cross-run Buildx cache.
  • Why it matters: removing secrets drops detect-private-key, zizmor, and pnpm-audit-prod; missing Docker layer cache leaves the expensive image builds cold on each run.
  • What changed: restored the secrets job in ci.yml and added GitHub Actions Buildx cache scopes to docker-release.yml for amd64 and arm64 image builds.
  • What did NOT change (scope boundary): branch-protection policy, Docker tags/manifest flow, and the rest of the CI matrix.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

User-visible / Behavior Changes

None.

Security Impact (required)

  • New permissions/capabilities? (Yes/No): No
  • Secrets/tokens handling changed? (Yes/No): No
  • New/changed network calls? (Yes/No): No
  • Command/tool execution surface changed? (Yes/No): No
  • Data access scope changed? (Yes/No): No
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS arm64
  • Runtime/container: local repo worktree
  • Model/provider: n/a
  • Integration/channel (if any): GitHub Actions
  • Relevant config (redacted): n/a

Steps

  1. Restore the secrets audit job in .github/workflows/ci.yml.
  2. Add type=gha Buildx cache scopes in .github/workflows/docker-release.yml for amd64 and arm64 image builds.
  3. Validate the workflow files locally.

Expected

  • CI keeps the private-key, workflow, and production dependency audit coverage.
  • Docker Release can reuse GitHub-hosted Buildx cache across runs per architecture.

Actual

  • Matches expected in local validation.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Referenced runs:

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: actionlint on .github/workflows/ci.yml and .github/workflows/docker-release.yml; repo scripts/committer on touched files.
  • Edge cases checked: audit lane restored exactly; Docker cache scopes split by architecture so amd64 and arm64 caches do not collide.
  • What you did not verify: a live completed Docker Release run after the cache change lands.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes/No): Yes
  • Config/env changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: revert this PR.
  • Files/config to restore: .github/workflows/ci.yml, .github/workflows/docker-release.yml
  • Known bad symptoms reviewers should watch for: missing secrets check, or Docker Release builds failing to read/write Buildx cache.

Risks and Mitigations

  • Risk: GitHub Actions cache for Buildx can be flaky under cache pressure.
    • Mitigation: cache is additive only; the build still works without hits.
  • Risk: restored secrets lane increases CI time slightly.
    • Mitigation: it restores previously required audit coverage and remains lightweight compared with test lanes.

AI Assistance

  • AI-assisted
  • Testing: locally validated with workflow lint and repo commit wrapper checks

@openclaw-barnacle openclaw-barnacle bot added size: S maintainer Maintainer-authored PR labels Mar 21, 2026
@vincentkoc vincentkoc marked this pull request as ready for review March 21, 2026 23:36
@vincentkoc vincentkoc merged commit 6266b84 into main Mar 21, 2026
28 checks passed
@vincentkoc vincentkoc deleted the ci/secrets-docker-cache branch March 21, 2026 23:36
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 21, 2026

Greptile Summary

This PR makes two targeted CI changes: it restores the previously-removed secrets audit lane in ci.yml (bringing back detect-private-key, zizmor, and pnpm-audit-prod coverage) and adds type=gha Buildx cache entries to all four Docker image builds in docker-release.yml, correctly segregated by architecture.

  • The secrets job is well-formed and consistent with the rest of the CI matrix; it safely skips the zizmor step when no usable base SHA is available (e.g., first-ever push).
  • The Buildx cache configuration is additive and non-breaking; missing cache hits do not fail the build.
  • Minor: the full and slim image builds within each architecture share the same GHA scope (docker-release-amd64 / docker-release-arm64). Because cache-to overwrites the scope, the slim build (second) replaces the full image's cached layers each run, reducing mode=max effectiveness for the full image's unique final layers. Using separate scopes (e.g., docker-release-amd64-full / docker-release-amd64-slim) would give each variant a complete, persistent cache.
  • Minor: the restored secrets job has no timeout-minutes, defaulting to GitHub Actions' 6-hour maximum. Adding an explicit timeout (e.g., 20 minutes) would prevent a hung pre-commit process from holding a Blacksmith runner unnecessarily.

Confidence Score: 5/5

  • Safe to merge — both changes are additive, non-breaking, and restore/improve existing CI infrastructure.
  • The secrets job restoration is a faithful re-introduction of a previously present audit lane with no logic changes. The Buildx cache additions are purely additive (builds succeed with or without cache hits). Neither change affects application behavior, secrets handling, or network calls. The two P2 items (shared cache scope and missing timeout) are optimisation suggestions with no correctness or reliability impact on normal CI runs.
  • No files require special attention.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: .github/workflows/docker-release.yml
Line: 162-163

Comment:
**Shared scope causes slim build to evict full image cache**

Both the full and slim amd64 builds write to the same `scope=docker-release-amd64`. Because `cache-to: type=gha` overwrites the scope entry, the slim build (which runs second) replaces the full image's cached layers. On the next run the full build will get cache hits only on the shared base stages, but will miss the full image's final unique layers, negating the benefit of `mode=max` for those layers.

Consider using distinct scopes so each image variant retains its own complete cache across runs:

```suggestion
          cache-from: type=gha,scope=docker-release-amd64-full
          cache-to: type=gha,mode=max,scope=docker-release-amd64-full
```

And for the slim build (lines 176-177):
```
          cache-from: type=gha,scope=docker-release-amd64-slim
          cache-to: type=gha,mode=max,scope=docker-release-amd64-slim
```

The same applies to the arm64 pair (lines 279-280 and 293-294).

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

---

This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 495-497

Comment:
**Missing `timeout-minutes` on restored job**

The `secrets` job has no `timeout-minutes` setting, so it will fall back to GitHub Actions' 6-hour default. For an audit job running `detect-private-key`, `zizmor`, and `pnpm-audit-prod`, a typical run should complete in under 10 minutes. Adding an explicit ceiling prevents a hung pre-commit process from holding a Blacksmith runner for hours.

```suggestion
  secrets:
    if: github.event_name != 'pull_request' || !github.event.pull_request.draft
    runs-on: blacksmith-16vcpu-ubuntu-2404
    timeout-minutes: 20
```

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

Last reviewed commit: "ci(actions): restore..."

Comment on lines +162 to +163
cache-from: type=gha,scope=docker-release-amd64
cache-to: type=gha,mode=max,scope=docker-release-amd64
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 Shared scope causes slim build to evict full image cache

Both the full and slim amd64 builds write to the same scope=docker-release-amd64. Because cache-to: type=gha overwrites the scope entry, the slim build (which runs second) replaces the full image's cached layers. On the next run the full build will get cache hits only on the shared base stages, but will miss the full image's final unique layers, negating the benefit of mode=max for those layers.

Consider using distinct scopes so each image variant retains its own complete cache across runs:

Suggested change
cache-from: type=gha,scope=docker-release-amd64
cache-to: type=gha,mode=max,scope=docker-release-amd64
cache-from: type=gha,scope=docker-release-amd64-full
cache-to: type=gha,mode=max,scope=docker-release-amd64-full

And for the slim build (lines 176-177):

          cache-from: type=gha,scope=docker-release-amd64-slim
          cache-to: type=gha,mode=max,scope=docker-release-amd64-slim

The same applies to the arm64 pair (lines 279-280 and 293-294).

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/docker-release.yml
Line: 162-163

Comment:
**Shared scope causes slim build to evict full image cache**

Both the full and slim amd64 builds write to the same `scope=docker-release-amd64`. Because `cache-to: type=gha` overwrites the scope entry, the slim build (which runs second) replaces the full image's cached layers. On the next run the full build will get cache hits only on the shared base stages, but will miss the full image's final unique layers, negating the benefit of `mode=max` for those layers.

Consider using distinct scopes so each image variant retains its own complete cache across runs:

```suggestion
          cache-from: type=gha,scope=docker-release-amd64-full
          cache-to: type=gha,mode=max,scope=docker-release-amd64-full
```

And for the slim build (lines 176-177):
```
          cache-from: type=gha,scope=docker-release-amd64-slim
          cache-to: type=gha,mode=max,scope=docker-release-amd64-slim
```

The same applies to the arm64 pair (lines 279-280 and 293-294).

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

Comment on lines +495 to +497
secrets:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: blacksmith-16vcpu-ubuntu-2404
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 Missing timeout-minutes on restored job

The secrets job has no timeout-minutes setting, so it will fall back to GitHub Actions' 6-hour default. For an audit job running detect-private-key, zizmor, and pnpm-audit-prod, a typical run should complete in under 10 minutes. Adding an explicit ceiling prevents a hung pre-commit process from holding a Blacksmith runner for hours.

Suggested change
secrets:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: blacksmith-16vcpu-ubuntu-2404
secrets:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: blacksmith-16vcpu-ubuntu-2404
timeout-minutes: 20
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 495-497

Comment:
**Missing `timeout-minutes` on restored job**

The `secrets` job has no `timeout-minutes` setting, so it will fall back to GitHub Actions' 6-hour default. For an audit job running `detect-private-key`, `zizmor`, and `pnpm-audit-prod`, a typical run should complete in under 10 minutes. Adding an explicit ceiling prevents a hung pre-commit process from holding a Blacksmith runner for hours.

```suggestion
  secrets:
    if: github.event_name != 'pull_request' || !github.event.pull_request.draft
    runs-on: blacksmith-16vcpu-ubuntu-2404
    timeout-minutes: 20
```

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

JohnJAS pushed a commit to JohnJAS/openclaw that referenced this pull request Mar 22, 2026
* ci(actions): restore secrets audit lane

* ci(actions): restore audits and cache docker builds
pholpaphankorn pushed a commit to pholpaphankorn/openclaw that referenced this pull request Mar 22, 2026
* ci(actions): restore secrets audit lane

* ci(actions): restore audits and cache docker builds
MaheshBhushan pushed a commit to MaheshBhushan/openclaw that referenced this pull request Mar 22, 2026
* ci(actions): restore secrets audit lane

* ci(actions): restore audits and cache docker builds
frankekn pushed a commit to artwalker/openclaw that referenced this pull request Mar 23, 2026
* ci(actions): restore secrets audit lane

* ci(actions): restore audits and cache docker builds
furaul pushed a commit to furaul/openclaw that referenced this pull request Mar 24, 2026
* ci(actions): restore secrets audit lane

* ci(actions): restore audits and cache docker builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant