• Applicable Software: MokoGIT
  • Min Version Number: 02.89.01
  • Max Version Number: Not Applicable

Why this matters

The forge-native sync engine (see MokoGIT: Sync Profiles) runs in-process inside MokoGIT. It provisions no runner, triggers no workflow YAML, and writes its commits directly as Git tree content. That design is fast and recursion-safe, but it had one blind spot: because the sync never went through the normal Actions dispatch path, it produced no Actions record at all. The commits it wrote were stamped [skip ci], so even their downstream pipelines were suppressed. The result was that the admin Actions queue - the single pane intended to show every piece of work the forge executes - never showed the sync that just rewrote workflows across the whole fleet.

This feature closes that gap. Every profile apply now persists a lightweight, terminal Actions run so operators can see, filter, and audit sync activity in the same place they watch every other job.

How it works

When a profile finishes applying, the engine records a single terminal ActionRun plus one ActionRunJob that summarize the apply. Terminal means the run is created already in its final state - success or failure - and is never dispatched to a runner. The job emitter and the stuck-job detector only ever act on waiting, blocked, or running jobs, so a terminal row is inert to them: it simply renders in the queue's history and recent-sync views.

The record carries deliberate, recognizable markers:

  • Workflow id org-sync-profile - a synthetic id. There is no real YAML workflow behind it, but the queue and run views key off the workflow id, so a stable, recognizable value lets those views treat a sync apply as a first-class, filterable workflow.
  • Trigger event sync - a distinct event label (not push or schedule) shown in the queue's event column and its event dropdown, so sync runs are unambiguous and filterable alongside ordinary runs.
  • Title - a one-line summary in the form sync: <profile> - N applied, N failed, N skipped, tallied from each target's per-repo result.
  • Status - success when nothing failed, failure when any member repo errored. A no-op reconcile (nothing changed, nothing failed) is still recorded, so the audit trail shows the profile ran and found everything already in sync.

Underneath, the run uses the schedule event enum internally - an Actions-only enum whose payload switches all return nothing, so no code ever tries to decode a non-existent webhook payload - while the visible trigger event stays the distinct sync label. This is what lets the feature ship with no schema change: it reuses the existing Actions tables and enums rather than adding new columns.

One run per apply, on the source repo

A profile fans out across the whole fleet - often dozens of member repositories at once. Recording one run per target would flood the queue, so the engine instead writes one run per apply, attached to the source (template) repository rather than to each member. The source repo lives in the owner organization, so both the site-admin view and the owner-org queue see it. The run also keeps the source repo's run counters in step, exactly as the normal dispatch path does.

Best-effort, never fatal

Recording the run is best-effort. If the insert fails for any reason, the error is logged and swallowed - it must never fail the sync itself, because by the time the record is written the commits have already landed. This mirrors the engine's other side-channels (the failure-issue opener and auto-merge scheduling), which are likewise non-fatal.

Where it appears

Because these runs are terminal on insert, they never enter the live waiting, running, or blocked queue. Surfacing them there would be misleading - there is no job to dispatch. Instead the admin Actions queue reads them separately and renders them in their own recent-sync section below the live queue.

That section is intentionally bounded so the read stays cheap on a busy fleet:

  • Recent window - only sync runs from roughly the last 24 hours are shown.
  • Hard cap - the list is capped (currently 50 rows) regardless of how many syncs ran.
  • Access filtered - exactly like the live queue, a sync job is never shown for a repository the viewer cannot read Actions on. Site admins see everything; the org and sub-org scopes honor the same owner filtering as the rest of the queue.

The runs are matched by their parent run's synthetic workflow id (org-sync-profile), ordered newest first.

Step by step: finding sync runs

  1. Open the admin Actions queue (the cross-repo queue view), or your organization, then Actions, to scope to a single org and its sub-orgs.
  2. Look below the live queue for the recent-sync section listing recent profile applies.
  3. Read each row's title to see the profile name and the applied / failed / skipped tally; the status badge shows success or failure at a glance.
  4. In the live-queue filters, the event dropdown now includes sync when any sync run is present, so you can isolate sync activity.

Caveats

  • Sync runs are terminal on insert. They have no live progress, no logs streamed from a runner, and no re-run button - there was never a runner job behind them. To run a profile again, use the profile's Run button or its /sync API endpoint, not an Actions re-run.
  • The record is a summary, not a per-file or per-member breakdown. For the exact planned or applied changes per member and per branch, use the profile's dry-run preview (GET .../sync-profiles/{id}/sync).
  • Only the source template repository's queue carries the run. Member repositories do not each get a row, by design, to keep the fan-out from flooding the queue.
  • The recent-sync section is windowed and capped. An apply older than the recent window (or beyond the cap on an extremely busy fleet) will not appear there, though it remains in the underlying run history.
  • A sync that fails to even start recording (the best-effort guard) leaves no queue row but does leave an engine log line; the commits, if any, still landed.

Get help

Open a support ticket or call (931) 820-0265.