Agent Skillssupercheck-io/supercheck › supercheck-execution-engine

supercheck-execution-engine

GitHub

Supercheck执行引擎技能,涵盖BullMQ队列、Playwright/k6测试执行、Redis容量管理及Kubernetes作业调度。涉及工作负载模型、幂等性控制及故障处理。

.agents/skills/execution-engine/SKILL.md supercheck-io/supercheck

Trigger Scenarios

配置或修改BullMQ队列与NestJS Worker逻辑 管理Playwright或k6的执行环境与容量策略 排查Redis连接或Kubernetes Job运行问题

Install

npx skills add supercheck-io/supercheck --skill supercheck-execution-engine -g -y
More Options

Non-standard path

npx skills add https://github.com/supercheck-io/supercheck/tree/main/.agents/skills/execution-engine -g -y

Use without installing

npx skills use supercheck-io/supercheck@supercheck-execution-engine

指定 Agent (Claude Code)

npx skills add supercheck-io/supercheck --skill supercheck-execution-engine -a claude-code -g -y

安装 repo 全部 skill

npx skills add supercheck-io/supercheck --all -g -y

预览 repo 内 skill

npx skills add supercheck-io/supercheck --list

SKILL.md

Frontmatter
{
    "name": "supercheck-execution-engine",
    "description": "Work on Supercheck BullMQ queues, schedulers, capacity management, Playwright or k6 execution, monitors, dynamic locations, cancellation, Redis, Kubernetes Jobs, gVisor, or app-worker execution contracts."
}

Supercheck execution engine

flowchart LR
  TRIGGER[Manual, schedule, webhook, CLI] --> GATE[Atomic capacity reservation]
  GATE --> Q[(Regional or global BullMQ queue)]
  Q --> W[NestJS worker]
  W --> JOB[Kubernetes Job]
  JOB --> GV[gVisor sandbox]
  GV --> RESULT[Database and object storage]
  RESULT --> RELEASE[Terminal state and capacity release]

Workload model

  • App routes/actions/schedulers admit and enqueue Playwright, k6, and monitor work.
  • Scheduler processors execute in the app tier so scheduled work passes through central capacity policy. Workers must not consume scheduler payloads.
  • Worker processors under worker/src/execution, worker/src/k6, and worker/src/monitor run independently from the app release.
  • Regional queues target configured locations; global queues are used only when any eligible worker may process the job.
  • Queue constants, payload types, status enums, retries, timeout meanings, IDs, and result contracts must remain in app/worker parity.

Capacity and idempotency

  • Organization-level admission is the capacity source of truth. Running and queued reservations use atomic Redis operations and fail closed if capacity state cannot be trusted.
  • Reserve before dispatch. Release exactly once on every terminal path: completion, terminal failure, cancellation, timeout, dispatch failure, and unrecoverable worker loss.
  • Retryable BullMQ attempts retain the reservation until the job becomes terminal.
  • Duplicate delivery, scheduler overlap, API retries, and webhook retries must not create duplicate executions or double-release capacity.
  • Keep configured app capacity, worker replicas, per-processor concurrency, and Kubernetes resource ceilings coherent.

Redis and BullMQ

  • Redis must use maxmemory-policy noeviction; evicting queue keys can lose or corrupt jobs.
  • General queue operations may share appropriate base connections.
  • Every QueueEvents consumer uses an independent duplicated connection because blocking XREAD cannot share a normal command connection.
  • Do not set commandTimeout on shared options inherited by QueueEvents. Keep bounded connection establishment while allowing intentional failover reconnection.
  • Monitor connection count across app replicas, workers, schedulers, dashboards, and event streams.

Payloads, secrets, and artifacts

  • Queue payloads contain trusted identifiers and bounded safe execution inputs—not decrypted tenant secrets.
  • Workers resolve current scoped variables immediately before execution and redact values from output.
  • Large scripts/results/artifacts belong in bounded payload/storage paths, not oversized Redis values or unbounded process memory.
  • Artifact upload failures have explicit timeout/retry behavior and cannot leave runs permanently active.

Cancellation and failures

  • Cancellation is idempotent: mark intent, stop queued work or signal active work, terminate the execution Job when necessary, persist one terminal state, and release capacity once.
  • Let BullMQ retry eligible failures; do not swallow processor errors after marking an intermediate state.
  • Stalled-job policy is bounded and aligned with execution duration/lock settings.
  • Worker shutdown drains or safely relinquishes work and does not orphan Jobs or reservations.

Production sandbox

  • Production execution runs in a dedicated namespace with runtimeClassName: gvisor and fails closed if required isolation is unavailable.
  • EXECUTION_RUNTIME_CLASS_NAME=none is local-development only.
  • Jobs use the zero-permission execution service account, non-root identity, read-only root filesystem, dropped capabilities, no privilege escalation, bounded writable storage, CPU/memory/ephemeral limits, and deadline/cleanup settings.
  • Namespace LimitRange/ResourceQuota and worker-configured ceilings stay aligned.
  • NetworkPolicy denies by default and allows only required DNS/egress. Application SSRF protection remains required even with network isolation.

Verification

  • Test races at capacity boundaries, duplicate dispatch, retries, cancellation timing, Redis loss/recovery, worker loss, timeout, upload failure, and cleanup.
  • Test rolling app/worker compatibility and location normalization/routing.
  • Render the actual Kubernetes Job and security policy; source-template review alone is insufficient.

Version History

  • 974a753 Current 2026-09-22 16:21

Same Skill Collection

.agents/skills/architecture/SKILL.md
.agents/skills/code-review/SKILL.md
.agents/skills/data-storage/SKILL.md
.agents/skills/feature-implementation/SKILL.md
.agents/skills/infrastructure-deployment/SKILL.md
.agents/skills/integrations-extensions/SKILL.md
.agents/skills/monitoring-alerts/SKILL.md
.agents/skills/platform-features/SKILL.md
.agents/skills/security-auth/SKILL.md
.agents/skills/sre-operations/SKILL.md
.agents/skills/testing-qa/SKILL.md
.github/skills/code-review/SKILL.md
.github/skills/docker-compose-deployment/SKILL.md
.github/skills/feature-implementation/SKILL.md

Metadata

Files
0
Version
974a753
Hash
0bd1e95f
Indexed
2026-09-22 16:21

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-23 14:46
浙ICP备14020137号-1