Skip to content

docs: clarify local trigger automation - #1958

Merged
zhmushan merged 14 commits into
mainfrom
feat/trigger-guide-local-flow
Jul 20, 2026
Merged

docs: clarify local trigger automation#1958
zhmushan merged 14 commits into
mainfrom
feat/trigger-guide-local-flow

Conversation

@zhmushan

@zhmushan zhmushan commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Guide the agent through the full local trigger closed-loop in the lark-apps skill: distinguish "configure only", "enable an existing disabled trigger", "test an existing online trigger", "handler only", "publish but do not start", and "publish then start/test" intents, so a created trigger is never reported as a running one.
  • Defer business-handler details to the application project's own trigger-guide; lark-apps owns only the observable Apps/Git command lifecycle and the "code-side name must match the trigger name verbatim" constraint.
  • Harden state handling: an initially disabled trigger stays fail-closed to disabled on probe success/failure/uncertain/interruption; on +release-create failure or an unknown result the trigger is restored or kept disabled and verified via +release-list; enable only after this round's release reports finished.
  • Add shortcuts/apps contract tests that lock the intent routing, authorization boundaries, and fail-closed behavior.

Test plan

  • go test ./shortcuts/apps
  • go vet ./shortcuts/apps
  • gofmt -l and git diff --check clean
  • node scripts/skill-format-check/index.js

Summary by CodeRabbit

  • Documentation

    • Expanded automation guidance for configuring, enabling, testing, publishing, starting, and troubleshooting triggers.
    • Added a complete local full-stack trigger workflow with clearer authorization and diagnostic boundaries.
    • Improved local development and release instructions, including required identity, branch, environment, and deployment sequencing.
    • Clarified optional release outputs such as online links and error details.
    • Corrected shared documentation links and updated security and database guidance.
  • Tests

    • Added contract checks covering automation workflows, trigger boundaries, documentation links, and release guidance.

zhmushan added 12 commits July 20, 2026 12:36
Harden the automation guide's state handling. When testing an existing
online trigger, a formerly-disabled trigger is always restored to
disabled on probe success, failure, uncertain result, or early exit.
When +release-create itself errors or returns no release_id, treat it as
not published and restore the prior trigger state; when the result is
unknown, keep it disabled and verify via +release-list before deciding.
@zhmushan zhmushan added size/M Single-domain feat or fix with limited business impact feature labels Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 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: 6ca39f6c-d4a1-46f4-8624-86f69a98a2ab

📥 Commits

Reviewing files that changed from the base of the PR and between 700de9c and 4497da5.

📒 Files selected for processing (1)
  • shortcuts/apps/apps_automation_skill_contract_test.go
💤 Files with no reviewable changes (1)
  • shortcuts/apps/apps_automation_skill_contract_test.go

📝 Walkthrough

Walkthrough

Adds an Automation skill SOP covering bounded trigger lifecycle workflows, runtime authorization, diagnostics, and release handling. Updates local-development and shared-skill references, and adds Go contract tests for workflow wording, link resolution, optional outputs, and implementation-detail boundaries.

Changes

Automation skill contracts

Layer / File(s) Summary
Automation lifecycle workflows
skills/lark-apps/references/lark-apps-automation.md, shortcuts/apps/apps_automation_skill_contract_test.go
Defines separate create, enable, test, handler-only, publish-only, and publish/start workflows with release-state and restoration boundaries; tests enforce their command ordering and restrictions.
Routing, authorization, and diagnostics
skills/lark-apps/references/lark-apps-automation.md, shortcuts/apps/apps_automation_skill_contract_test.go
Adds exact --name/--as user binding, operation-scoped probe authorization, UPSERT and approval boundaries, reset guidance, and ordered unfired-trigger diagnostics.
Local development and release-output guidance
skills/lark-apps/references/lark-apps-local-dev.md, skills/lark-apps/references/lark-apps-release-get.md, shortcuts/apps/apps_automation_skill_contract_test.go
Routes handler changes through the Automation SOP, updates release and database command guidance, and makes online_url and error_logs conditional outputs.
Skill routing and link validation
skills/lark-apps/references/lark-apps-*/, shortcuts/apps/apps_automation_skill_contract_test.go
Corrects lark-shared relative links and validates link resolution, project-guide boundaries, and absence of steering or synchronization internals.

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

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant AutomationSOP as lark-apps-automation SOP
  participant ReleaseAPI as +release-create/+release-get
  participant TriggerAPI as +automation-get/+automation-enable
  participant Probe as Authorized runtime probe
  Developer->>AutomationSOP: choose bounded trigger workflow
  AutomationSOP->>TriggerAPI: inspect trigger and release state
  AutomationSOP->>ReleaseAPI: publish and poll when authorized
  ReleaseAPI-->>AutomationSOP: return status and optional outputs
  AutomationSOP->>TriggerAPI: enable only after finished release
  TriggerAPI->>Probe: invoke authorized runtime operation
  Probe-->>AutomationSOP: return result and restoration state
Loading

Possibly related PRs

  • larksuite/cli#1926: Covers closely related Automation contract tests and lifecycle-routing documentation boundaries.

Suggested labels: documentation, domain/ccm

Suggested reviewers: liangshuo-1

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and clearly summarizes the main documentation change about local trigger automation.
Description check ✅ Passed The description covers Summary and Test Plan with enough detail, though the Changes and Related Issues sections are missing.
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 feat/trigger-guide-local-flow

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.

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.98%. Comparing base (44514ad) to head (4497da5).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1958      +/-   ##
==========================================
- Coverage   75.02%   74.98%   -0.05%     
==========================================
  Files         894      895       +1     
  Lines       94294    94379      +85     
==========================================
+ Hits        70746    70767      +21     
- Misses      18137    18197      +60     
- Partials     5411     5415       +4     

☔ 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.

@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

🤖 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 `@skills/lark-apps/references/lark-apps-local-dev.md`:
- Line 58: The release guidance must warn that returned online_url links are
creator-only by default before presenting them as usable or shareable. Update
skills/lark-apps/references/lark-apps-local-dev.md lines 58-58 and
skills/lark-apps/references/lark-apps-release-get.md lines 26-26 consistently,
directing users to the access-scope flow when broader access is required.
🪄 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: 4fb8fc7d-1adb-4867-b577-4b613cf9d409

📥 Commits

Reviewing files that changed from the base of the PR and between 44514ad and 5e5c75a.

📒 Files selected for processing (8)
  • shortcuts/apps/apps_automation_skill_contract_test.go
  • skills/lark-apps/SKILL.md
  • skills/lark-apps/references/lark-apps-automation.md
  • skills/lark-apps/references/lark-apps-db.md
  • skills/lark-apps/references/lark-apps-file.md
  • skills/lark-apps/references/lark-apps-local-dev.md
  • skills/lark-apps/references/lark-apps-openapi-key.md
  • skills/lark-apps/references/lark-apps-release-get.md

Comment thread skills/lark-apps/references/lark-apps-local-dev.md Outdated
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#feat/trigger-guide-local-flow -y -g

zhmushan added 2 commits July 20, 2026 13:25
Point the local-dev and release-get release flows to the access-scope
step so a returned online_url is not presented as a shareable link
without the creator-only visibility caveat, matching the SKILL.md
visibility contract.
The local trigger automation work does not require touching the lark-apps
SKILL.md: its description already routed automation, so compressing it only
dropped routing keywords (access scope, monitoring metrics, trigger
subtypes) to satisfy a non-blocking length convention. Restore SKILL.md to
its prior state and remove the description/optional-output assertions that
only guarded those reverted edits. Release-output-as-optional correctness
remains covered by the release-get contract.
@zhmushan
zhmushan merged commit d6cebd6 into main Jul 20, 2026
29 of 40 checks passed
@zhmushan
zhmushan deleted the feat/trigger-guide-local-flow branch July 20, 2026 10:27
@liangshuo-1 liangshuo-1 mentioned this pull request Jul 20, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants