Files
molecule-ai-plugin-scheduler/.gitea/workflows/ci.yml
T
plugin-devandClaude Opus 5.5 fcb7f1380d
meta-ci-advisory / meta (advisory) (pull_request) Successful in 3s
ci / validate (pull_request) Successful in 13s
ci / validate (push) Successful in 13s
fix(scheduler): regenerate from sdk 0.6.2 to re-arm edited schedules; plugin 0.2.4
0.2.3 kept a schedule's armed fire time after its cron or timezone was
edited in the grid, so the edited schedule fired once on its old cadence
first. A weekly -> daily edit made on a Saturday stayed armed for Tuesday
until it was poked.

This regenerates scheduler.py and trigger_schedule.py from the SDK
trigger scaffold carrying molecule-ai-sdk#217. The daemon records the
cron and timezone each armed time came from (`_armed_from` in
schedule-state.json) and re-arms a not-yet-due schedule whose definition
changed. tests/test_scaffold.py takes the scaffold's tests, including the
regression. CI pins SDK_VERSION 0.6.2 so the drift gate compares against
the wheel carrying the fix, and plugin.yaml goes to 0.2.4.

Refs molecule-ai/molecule-ai-sdk#215

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:39:08 -07:00

43 lines
1.9 KiB
YAML

name: ci
on: [push, pull_request]
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.11"
# No `cache: pip` — this plugin ships no requirements.txt/pyproject.toml
# (it vendors channel_sdk and installs the authoring SDK ad-hoc below),
# and setup-python's pip cache hard-fails without a deps file to hash.
- name: Install authoring SDK (scaffold SSOT)
# This plugin is a materialized instance of the SDK trigger scaffold, so
# `validate` and the drift gate need the SDK. Install it from its git
# RELEASED-wheel pin: bumped to sdk 0.6.2, whose scaffold re-arms a
# schedule whose cron or timezone was edited in the grid. 0.6.1 kept the
# fire time computed from the OLD cron until that schedule fired once
# (molecule-ai-sdk#215). Drift gate byte-identical vs the 0.6.2 wheel.
# Bump SDK_VERSION (and regenerate this plugin) whenever the SDK trigger
# scaffold changes.
env:
SDK_VERSION: 0.6.2
run: |
# --extra-index-url (not --index-url): the Gitea registry hosts only
# molecule packages; deps (pyyaml) must still resolve from PyPI.
python -m pip install "molecule-ai-sdk==${SDK_VERSION}" \
--extra-index-url https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/
- name: Manifest validation
run: python -m molecule_plugin validate plugin .
- name: SSOT drift gate (daemon logic == SDK scaffold)
run: python scripts/check_scaffold_drift.py
- name: Daemon unit tests
run: python -m unittest discover -s tests -v