From b239e20f4e6eea208c567e9b42f38c4d3a69f35f Mon Sep 17 00:00:00 2001 From: Loning Date: Sat, 20 Jun 2026 22:22:56 +0800 Subject: [PATCH] refactor(saga): convert substrate_ref_scan to std.saga.department MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert github-devloop substrate_ref_scan (trivial always-run tick dept; consumes devloop_substrate_ref_tick, produces github-proxy.github_pr_comment_request) to std.saga.department: done=false, always_accept, act = old body byte-for-byte (core.log_entry + core.substrate_ref_scan). The old code had NO wrap_pipeline_failure, so the new shape correctly omits the wrap handler (no-wrap behavior preserved). produces preserved. saga-handler.allowlist (G10 5->4). sshx-reviewed (3/3 approve); full test 9 packages 0 failed. ⟦AI:FKST⟧ Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_0163uaeg6woT12QeZE1cAkn6 --- migration/saga-handler.allowlist | 1 - .../departments/substrate_ref_scan/main.lua | 21 ++++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/migration/saga-handler.allowlist b/migration/saga-handler.allowlist index 4ee0fb2f..99e63143 100644 --- a/migration/saga-handler.allowlist +++ b/migration/saga-handler.allowlist @@ -1,5 +1,4 @@ packages/github-devloop/departments/rollup_merge/main.lua packages/github-devloop/departments/rollup_scan/main.lua -packages/github-devloop/departments/substrate_ref_scan/main.lua packages/github-devloop/departments/sync_conflict/main.lua packages/github-devloop/departments/sync_scan/main.lua diff --git a/packages/github-devloop/departments/substrate_ref_scan/main.lua b/packages/github-devloop/departments/substrate_ref_scan/main.lua index c019c400..c956e237 100644 --- a/packages/github-devloop/departments/substrate_ref_scan/main.lua +++ b/packages/github-devloop/departments/substrate_ref_scan/main.lua @@ -1,18 +1,23 @@ local core = require("core") +local saga = require("std.saga") -local M = {} - -M.spec = { +local spec = { consumes = { "devloop_substrate_ref_tick" }, - produces = { - "github-proxy.github_pr_comment_request", - }, + produces = { "github-proxy.github_pr_comment_request" }, stall_window = "5m", } -function pipeline(event) +local function done(_event) + return false +end + +local function act(event) core.log_entry("substrate_ref_scan", event, "repo-management-plane", "tick") core.substrate_ref_scan() end -return M +return saga.department(spec, { + done = done, + act = act, + name = "substrate_ref_scan", +})