AgentSkillsCN

job-restart-feature

Slack-MM2同步的作业重启工作流(POST /api/jobs/{job_id}/restart),包括后端行为、UI条件及测试期望。适用于实施或调试失败/跳过的导出重试时使用。

SKILL.md
--- frontmatter
name: job-restart-feature
description: Job restart workflow for Slack-MM2 Sync (POST /api/jobs/{job_id}/restart), including backend behavior, UI conditions, and test expectations. Use when implementing or debugging retry of failed/skipped exports.
license: Complete terms in LICENSE.txt

Job Restart Feature

When to use

  • Implementing or debugging “retry failed/skipped entities” flows
  • Adjusting export orchestrator behavior for restarted jobs
  • Updating frontend job card UX around restart
  • Writing/maintaining unit/integration tests for restart

API contract

Endpoint:

  • POST /jobs/{job_id}/restart (also available as /api/jobs/{job_id}/restart)

Behavior (high level):

  • Only completed jobs can be restarted
  • Resets failed/skipped entities back to pending
  • Clears their error messages
  • Triggers export orchestrator for that job
  • Successful entities are not reset

UI behavior

  • Restart button appears only when:
    • job is completed (success or failed), and
    • there are retryable entities (failed or skipped)

Testing expectations

  • Unit tests cover: not found, invalid status, no retryables, success path
  • Integration tests validate end-to-end restart + export trigger

Source of truth