docs: clarify local trigger automation - #1958
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughAdds 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. ChangesAutomation skill contracts
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
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
📒 Files selected for processing (8)
shortcuts/apps/apps_automation_skill_contract_test.goskills/lark-apps/SKILL.mdskills/lark-apps/references/lark-apps-automation.mdskills/lark-apps/references/lark-apps-db.mdskills/lark-apps/references/lark-apps-file.mdskills/lark-apps/references/lark-apps-local-dev.mdskills/lark-apps/references/lark-apps-openapi-key.mdskills/lark-apps/references/lark-apps-release-get.md
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@4497da50eadcf4bccf2f6aa98377f1b85e4ab4dc🧩 Skill updatenpx skills add larksuite/cli#feat/trigger-guide-local-flow -y -g |
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.
Summary
lark-appsskill: 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.trigger-guide;lark-appsowns only the observable Apps/Git command lifecycle and the "code-side name must match the trigger name verbatim" constraint.+release-createfailure or an unknown result the trigger is restored or kept disabled and verified via+release-list; enable only after this round's release reportsfinished.shortcuts/appscontract tests that lock the intent routing, authorization boundaries, and fail-closed behavior.Test plan
go test ./shortcuts/appsgo vet ./shortcuts/appsgofmt -landgit diff --checkcleannode scripts/skill-format-check/index.jsSummary by CodeRabbit
Documentation
Tests