Skip to content

fix: add sparse-checkout-cone-mode: false to verify workflows + harden setup-api-client - #1637

Merged
stranske merged 8 commits into
mainfrom
claude/debug-keepalive-workflow-88W3o
Feb 23, 2026
Merged

fix: add sparse-checkout-cone-mode: false to verify workflows + harden setup-api-client#1637
stranske merged 8 commits into
mainfrom
claude/debug-keepalive-workflow-88W3o

Conversation

@stranske

@stranske stranske commented Feb 23, 2026

Copy link
Copy Markdown
Owner

Source: Issue #185

Automated Status Summary

Scope

Summary

This PR adds a new workflow template for consumer repos that enables the keepalive pipeline with CLI Codex.

Changes

New Files

Context for Agent

Related Issues/PRs

Tasks

  • templates/consumer-repo/.github/workflows/agents-keepalive-loop.yml - Full keepalive workflow for consumer repos

Acceptance criteria

  • .github/scripts/keepalive_loop.js - Added support for override payload parameter
  • .github/workflows/maint-68-sync-consumer-repos.yml - Added agents-keepalive-loop.yml to sync list
  • .github/workflows/reusable-codex-run.yml - Added fetch/rebase before push to handle concurrent changes
  • docs/keepalive/SETUP_CHECKLIST.md - Added keepalive-specific requirements

Head SHA: 5401a89
Latest Runs: ✅ success — Gate
Required: gate: ✅ success

Workflow / Job Result Logs
.github/workflows/autofix.yml ❌ failure View run
Agents PR meta manager ❔ in progress View run
Gate ✅ success View run
Health 40 Sweep ✅ success View run
Health 44 Gate Branch Protection ❔ in progress View run
Health 45 Agents Guard ✅ success View run
Health 50 Security Scan ✅ success View run
Health 73 Template Completeness ✅ success View run
Health 74 Template Drift ✅ success View run
Maint 52 Validate Workflows ✅ success View run
PR 11 - Minimal invariant CI ✅ success View run
Selftest CI ✅ success View run
Validate Sync Manifest ✅ success View run

When workflows sparse-checkout the Workflows repo and include
.github/scripts/ files individually, cone-mode includes package.json
(as an ancestor-dir file) but NOT node_modules/minimatch/ (a
subdirectory). This causes npm install to fail on the unresolvable
"file:node_modules/minimatch" dependency.

Add a pre-install step that detects and strips file: dependencies
whose targets don't exist, so npm install succeeds regardless of
whether the vendored packages were checked out.

Fixes agents-verify-to-new-pr, agents-verify-to-new-pr-autopilot,
agents-verify-to-issue-v2, and ~12 other workflows that use
sparse-checkout with setup-api-client.

https://claude.ai/code/session_012WnYCcttvFEY3FETnhVcNL
Copilot AI review requested due to automatic review settings February 23, 2026 03:05
@agents-workflows-bot

Copy link
Copy Markdown
Contributor

⚠️ Action Required: Unable to determine source issue for PR #1637. The PR title, branch name, or body must contain the issue number (e.g. #123, branch: issue-123, or the hidden marker ).

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

Copy link
Copy Markdown

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: dc03a11e39

ℹ️ 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 thread .github/actions/setup-api-client/action.yml
@stranske-keepalive

stranske-keepalive Bot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 0610a09
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / guard
Required: core tests (3.11): ⏳ pending, core tests (3.12): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 93.12%
Baseline 85.00%
Delta +8.12%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
src/cli_parser.py 81.8% 4
src/percentile_calculator.py 95.0% 1
src/aggregator.py 95.0% 2
src/__init__.py 100.0% 0
src/ndjson_parser.py 100.0% 0

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

Summary

This PR adds a new workflow template for consumer repos that enables the keepalive pipeline with CLI Codex.

Changes

New Files

Context for Agent

Related Issues/PRs

Tasks

  • templates/consumer-repo/.github/workflows/agents-keepalive-loop.yml - Full keepalive workflow for consumer repos

Acceptance criteria

  • .github/scripts/keepalive_loop.js - Added support for override payload parameter
  • .github/workflows/maint-68-sync-consumer-repos.yml - Added agents-keepalive-loop.yml to sync list
  • .github/workflows/reusable-codex-run.yml - Added fetch/rebase before push to handle concurrent changes
  • docs/keepalive/SETUP_CHECKLIST.md - Added keepalive-specific requirements

@stranske-keepalive

stranske-keepalive Bot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

🤖 Keepalive Loop Status

PR #1637 | Agent: Codex | Iteration 0/5

Current State

Metric Value
Iteration progress [----------] 0/5
Action wait (missing-agent-label)
Disposition skipped (transient)
Gate success
Tasks 0/5 complete
Timeout 45 min (default)
Timeout usage 3m elapsed (9%, 42m remaining)
Keepalive ❌ disabled
Autofix ❌ disabled

🔍 Failure Classification

| Error type | infrastructure |
| Error category | resource |
| Suggested recovery | Confirm the referenced resource exists (repo, PR, branch, workflow, or file). |

Copilot AI left a comment

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.

Pull request overview

This PR fixes a critical issue where the setup-api-client action fails when workflows use sparse checkout that doesn't include vendored dependencies. The fix adds an inline Node.js script that strips unresolvable file: dependencies from package.json before running npm install, allowing the action to work regardless of whether vendored packages are present in the sparse checkout.

Changes:

  • Added inline Node.js script to strip unresolvable file: dependencies from package.json
  • Script runs after create_vendor_aliases and before npm install
  • Outputs GitHub Actions notices when dependencies are stripped

Comment thread .github/actions/setup-api-client/action.yml
…ify-to-issue-v2 workflows

Consistent with how all other workflows in the repo handle sparse
checkouts of the Workflows repo. Without non-cone mode, package.json
(which references vendored minimatch) gets pulled in by the ancestor
directory rule, but node_modules/minimatch/ does not, causing npm
install to fail with ENOENT.

https://claude.ai/code/session_012WnYCcttvFEY3FETnhVcNL
@stranske
stranske temporarily deployed to agent-high-privilege February 23, 2026 03:12 — with GitHub Actions Inactive
…ify-to-issue-v2 workflows

Consistent with how all other workflows in the repo handle sparse
checkouts of the Workflows repo. Without non-cone mode, package.json
(which references vendored minimatch) gets pulled in by the ancestor
directory rule, but node_modules/minimatch/ does not, causing npm
install to fail with ENOENT.

https://claude.ai/code/session_012WnYCcttvFEY3FETnhVcNL
…ify-to-issue-v2 workflows

Consistent with how all other workflows in the repo handle sparse
checkouts of the Workflows repo. Without non-cone mode, package.json
(which references vendored minimatch) gets pulled in by the ancestor
directory rule, but node_modules/minimatch/ does not, causing npm
install to fail with ENOENT.

https://claude.ai/code/session_012WnYCcttvFEY3FETnhVcNL
@stranske
stranske temporarily deployed to agent-high-privilege February 23, 2026 03:14 — with GitHub Actions Inactive
…ify-to-issue-v2 workflows

Consistent with how all other workflows in the repo handle sparse
checkouts of the Workflows repo. Without non-cone mode, package.json
(which references vendored minimatch) gets pulled in by the ancestor
directory rule, but node_modules/minimatch/ does not, causing npm
install to fail with ENOENT.

https://claude.ai/code/session_012WnYCcttvFEY3FETnhVcNL
@stranske stranske changed the title fix: handle missing vendored deps in setup-api-client sparse checkouts fix: add sparse-checkout-cone-mode: false to verify workflows + harden setup-api-client Feb 23, 2026
@stranske
stranske temporarily deployed to agent-high-privilege February 23, 2026 03:16 — with GitHub Actions Inactive
Address review feedback: the stripped package.json was never restored,
which could leak modified state into downstream steps that expect a
clean workspace. Now backs up the original before stripping and
restores it after npm install completes.

https://claude.ai/code/session_012WnYCcttvFEY3FETnhVcNL
Mirror the same backup/restore + strip logic for unresolvable file:
dependencies into the consumer-repo template copy, so synced consumer
repos also get the defense-in-depth fix.

https://claude.ai/code/session_012WnYCcttvFEY3FETnhVcNL
@stranske
stranske temporarily deployed to agent-high-privilege February 23, 2026 03:20 — with GitHub Actions Inactive
Previous push was empty due to shell variable truncation. This commit
contains the full action.yml with the vendored dep strip + restore fix.

https://claude.ai/code/session_012WnYCcttvFEY3FETnhVcNL
@stranske
stranske temporarily deployed to agent-high-privilege February 23, 2026 03:21 — with GitHub Actions Inactive
@stranske
stranske merged commit b71cce9 into main Feb 23, 2026
148 of 154 checks passed
@stranske
stranske deleted the claude/debug-keepalive-workflow-88W3o branch February 23, 2026 03:26
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.

2 participants