Skip to content

ci: schedule live skills integration tests#1902

Open
luozhixiong01 wants to merge 2 commits into
mainfrom
ci/schedule-live-skills-tests
Open

ci: schedule live skills integration tests#1902
luozhixiong01 wants to merge 2 commits 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 a scheduled “Live skills integration” workflow (daily) with manual run support.
    • On failure, the workflow reports status by creating or updating a tracking issue with the run link.
  • Tests

    • Extended the script-test target to run a new workflow validation script.
    • Added checks to ensure correct triggers, tightened permissions/security settings, required limits/steps, and fully pinned action references (and no secrets.* usage).

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ac0d1653-5244-44a1-ae9d-f3b71d1ef169

📥 Commits

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

📒 Files selected for processing (2)
  • .github/workflows/live-skills.yml
  • scripts/live-skills-workflow.test.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/live-skills.yml
  • scripts/live-skills-workflow.test.sh

📝 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

Suggested reviewers: liangshuo-1

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the scheduled live skills integration test workflow.
Description check ✅ Passed All required template sections are present and filled with relevant details, including summary, changes, test plan, and related issues.
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 thread .github/workflows/live-skills.yml Outdated
@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.98%. Comparing base (8897196) to head (7ad9ffc).
⚠️ Report is 31 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1902      +/-   ##
==========================================
+ Coverage   74.72%   74.98%   +0.26%     
==========================================
  Files         886      896      +10     
  Lines       92621    94403    +1782     
==========================================
+ Hits        69208    70789    +1581     
- Misses      18052    18198     +146     
- Partials     5361     5416      +55     

☔ 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

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

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

The failure-notification step built the tracking-issue body as a
multi-line double-quoted string whose continuation lines sat at
column 1, which broke the run: block scalar. GitHub Actions could not
load the workflow (YAML parse error at the un-indented line), so the
scheduled drift monitor and failure notifications never ran.

Build the body with a heredoc into a variable so every line stays
inside the block scalar. Add a real YAML parse to the contract test
so grep-only assertions can no longer pass a structurally invalid
workflow.
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