Skip to content

ci: schedule live skills integration tests#1902

Open
luozhixiong01 wants to merge 1 commit into
mainfrom
ci/schedule-live-skills-tests
Open

ci: schedule live skills integration tests#1902
luozhixiong01 wants to merge 1 commit into
mainfrom
ci/schedule-live-skills-tests

Conversation

@luozhixiong01

@luozhixiong01 luozhixiong01 commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

PR #1883 made the two live skills integration tests strictly opt-in (make live-skills-test), which removed their accidental execution on developer machines — but also left them with no automated runs at all. Their dominant failure mode is upstream drift: npx -y skills always resolves the latest skills CLI release, so the integration can break without any commit in this repo. This PR restores the scheduled workflow (daily instead of weekly) and adds a failure-notification step, so breakage surfaces as an open issue instead of rotting silently.

Changes

  • Restore .github/workflows/live-skills.yml: daily cron (0 3 * * *) plus workflow_dispatch, running make live-skills-test
  • Add a failure step that keeps one open tracking issue current (creates it on first failure, comments on repeats) via gh with the workflow github.token (issues: write)
  • Restore scripts/live-skills-workflow.test.sh (workflow contract: schedule/dispatch-only triggers, SHA-pinned actions, no secrets) and wire it into make script-test

Test Plan

  • bash scripts/live-skills-workflow.test.sh passed on this branch
  • make live-skills-test itself verified by real opt-in runs on test: isolate unit tests from user state #1883 (2/2 tests passed against the live skills CLI, isolated home, no leakage)
  • skipped: unit-test / local-eval / acceptance-reviewer — CI-workflow-only change, no CLI behavior touched
  • manual verification: workflow triggers reviewed against the contract script; failure path exercised by dry-reading gh issue commands (will validate end-to-end via workflow_dispatch after merge)

Related Issues

N/A (follow-up to #1883 review feedback; depends on #1883 — merge after it so make live-skills-test exists on main)

Summary by CodeRabbit

  • Chores

    • Added an automated daily integration check, with an option to run it manually.
    • Failed checks now create or update a tracking issue with links to the relevant run for easier follow-up.
  • Tests

    • Expanded automated validation to verify workflow triggers, security settings, execution limits, and required test steps.
    • Added checks to ensure workflow actions use securely pinned versions.

Run make live-skills-test on a daily cron (plus workflow_dispatch). The
live tests exercise the real npx skills CLI, whose dominant failure mode
is upstream drift — a new release breaking output or flags without any
commit here — so a schedule fits and a per-PR gate would only import
live-network flakiness into unrelated changes.

On failure the job keeps one open tracking issue current instead of
failing silently: a scheduled job nobody hears about rots as quietly as
no job at all. The workflow contract (schedule/dispatch-only triggers,
pinned actions, no secrets) is pinned by scripts/live-skills-workflow.test.sh
wired into make script-test.
@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a daily and manually triggered GitHub Actions workflow for live-skills integration tests, failure issue tracking, and a Bash validation script wired into make script-test.

Changes

Live skills integration

Layer / File(s) Summary
Workflow execution and failure tracking
.github/workflows/live-skills.yml
Configures scheduled and manual execution, runtime setup, the make live-skills-test command, and GitHub issue creation or commenting on failures.
Workflow validation and test integration
scripts/live-skills-workflow.test.sh, Makefile
Validates workflow triggers, security settings, required commands, absence of secrets, and SHA-pinned actions; includes the validation script in make script-test.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: scheduling live skills integration tests in CI.
Description check ✅ Passed The description follows the required template and includes summary, changes, test plan, and related issues with sufficient detail.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/schedule-live-skills-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
scripts/live-skills-workflow.test.sh (1)

14-27: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Improve error visibility for silent assertions.

Because the script uses set -e, these bare grep commands act as silent assertions. If any check fails, the script will abort immediately with no output, making it difficult to debug which specific requirement was violated when make script-test fails.

Consider enabling set -x before these checks, or wrapping them in a helper function that prints a descriptive error message.

🛠️ Proposed fix (enable execution tracing)
 fi
 
+set -x
+
 grep -Eq '^[[:space:]]+workflow_dispatch:[[:space:]]*$' "$workflow"
 grep -Eq '^[[:space:]]+schedule:[[:space:]]*$' "$workflow"
 if grep -Eq '^[[:space:]]*(push|pull_request|pull_request_target|merge_group):|^[[:space:]]*on:[[:space:]]*\[[^]]*(push|pull_request|pull_request_target|merge_group)' "$workflow"; then
   echo "live skills workflow must only run on schedule or workflow_dispatch" >&2
+  set +x
   exit 1
 fi
 
 grep -Fq "permissions:" "$workflow"
 grep -Fq "contents: read" "$workflow"
 grep -Fq "persist-credentials: false" "$workflow"
 grep -Fq "timeout-minutes: 15" "$workflow"
 grep -Fq "runs-on: ubuntu-latest" "$workflow"
 grep -Fq "node-version: '22'" "$workflow"
 grep -Fq "make live-skills-test" "$workflow"
+
+set +x
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/live-skills-workflow.test.sh` around lines 14 - 27, Update the
assertion checks in the live-skills workflow test script so failures identify
the specific requirement instead of exiting silently under set -e. Add
descriptive failure output for each grep assertion, either by wrapping the
checks in a helper or enabling tracing as suggested, while preserving all
existing validation patterns and success behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/live-skills.yml:
- Around line 53-55: Fix the YAML block scalar in the workflow step containing
the --body message by indenting the continuation text lines to the same base
level required by the surrounding run: | block. Preserve the rendered blank line
and markdown content while ensuring every line remains valid YAML.

---

Nitpick comments:
In `@scripts/live-skills-workflow.test.sh`:
- Around line 14-27: Update the assertion checks in the live-skills workflow
test script so failures identify the specific requirement instead of exiting
silently under set -e. Add descriptive failure output for each grep assertion,
either by wrapping the checks in a helper or enabling tracing as suggested,
while preserving all existing validation patterns and success behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 543b7f1e-ccf1-4600-a5fa-f761d1a57f73

📥 Commits

Reviewing files that changed from the base of the PR and between 8897196 and be011db.

📒 Files selected for processing (3)
  • .github/workflows/live-skills.yml
  • Makefile
  • scripts/live-skills-workflow.test.sh

Comment on lines +53 to +55
--body "The scheduled live skills integration run failed: $run_url

The job runs \`make live-skills-test\` against the real \`npx skills\` CLI; a failure here usually means upstream drift in the skills CLI rather than a regression in this repo. Reproduce locally with \`make live-skills-test\`."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Fix YAML syntax error in block scalar.

Because this bash script is within a YAML block scalar (run: |), every line must be indented by at least the base indentation level of the block (10 spaces). Line 55 has no indentation, which causes a YAML parsing error (could not find expected ':') and will prevent the workflow from running.

Indenting the continuation lines will fix the syntax while still rendering correctly as markdown in the GitHub issue.

🐛 Proposed fix
             gh issue create --repo "$GITHUB_REPOSITORY" --title "$title" \
               --body "The scheduled live skills integration run failed: $run_url
 
-The job runs \`make live-skills-test\` against the real \`npx skills\` CLI; a failure here usually means upstream drift in the skills CLI rather than a regression in this repo. Reproduce locally with \`make live-skills-test\`."
+          The job runs \`make live-skills-test\` against the real \`npx skills\` CLI; a failure here usually means upstream drift in the skills CLI rather than a regression in this repo. Reproduce locally with \`make live-skills-test\`."
           fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
--body "The scheduled live skills integration run failed: $run_url
The job runs \`make live-skills-test\` against the real \`npx skills\` CLI; a failure here usually means upstream drift in the skills CLI rather than a regression in this repo. Reproduce locally with \`make live-skills-test\`."
gh issue create --repo "$GITHUB_REPOSITORY" --title "$title" \
--body "The scheduled live skills integration run failed: $run_url
The job runs \`make live-skills-test\` against the real \`npx skills\` CLI; a failure here usually means upstream drift in the skills CLI rather than a regression in this repo. Reproduce locally with \`make live-skills-test\`."
fi
🧰 Tools
🪛 actionlint (1.7.12)

[error] 55-55: could not parse as YAML: could not find expected ':'

(syntax-check)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/live-skills.yml around lines 53 - 55, Fix the YAML block
scalar in the workflow step containing the --body message by indenting the
continuation text lines to the same base level required by the surrounding run:
| block. Preserve the rendered blank line and markdown content while ensuring
every line remains valid YAML.

Source: Linters/SAST tools

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.72%. Comparing base (8897196) to head (be011db).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1902   +/-   ##
=======================================
  Coverage   74.72%   74.72%           
=======================================
  Files         886      886           
  Lines       92621    92621           
=======================================
  Hits        69208    69208           
  Misses      18052    18052           
  Partials     5361     5361           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@be011db6851906b08769285a1ef467b77ad09873

🧩 Skill update

npx skills add larksuite/cli#ci/schedule-live-skills-tests -y -g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant