2c2efafc6f
ci / unit-tests (pull_request) Failing after 18s
Phase 0/1 of the Lark integration RFC: a standalone poll-mode daemon that makes ONE Molecule workspace act as a Lark (or Feishu) bot. - Molecule side mirrors codex-channel-molecule: registers as its own poll-mode workspace (register + heartbeat + inbox poller from molecule_runtime), relays to the TARGET agent workspace over peer a2a. - Lark side: lark-oapi websocket long-connection (no public endpoint), im.v1 send/reply; DMs always forwarded, group messages on @mention; message_id dedup LRU; text-only MVP. - Brand axis: brand.py is the ONLY module with Feishu/Lark domains (enforced by a source-grep test + pinned against the SDK constants); creds tuple = (app_id, app_secret, brand). - Onboarding: 'lark-channel-molecule connect' runs the RFC-8628 scan-to-create device grant (dual-brand, auto-detects tenant_brand), prints the verification URL + optional QR, persists creds 0600. - Correlation MVP: per-chat FIFO pending turns, persisted across restart, 600s expiry; deliver-first-ack-after so failed Lark sends retry. - plugin.yaml CONFORMS to the plugin-manifest SSOT (validated through the fail-closed molecule_runtime.manifest_ssot gate). - 49 tests (both sides mocked; sentinel-drift pins against the installed runtime wheel); CI mirrors the runtime repo's shape. Follow-ups tracked as issues #1-#4 (VC Agent meetings, lark-mcp capability plugin, user-token OAuth ops, dual manifest skins). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
unit-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: "3.11"
|
|
cache: pip
|
|
|
|
- name: Install package + test deps
|
|
env:
|
|
# molecules-workspace-runtime is published on the org Gitea PyPI
|
|
# registry, not public PyPI — same PIP_INDEX_URL pattern as
|
|
# molecule-ai-workspace-runtime's own ci.yml. The Gitea "simple"
|
|
# index proxies public PyPI for everything else (lark-oapi, qrcode).
|
|
PIP_INDEX_URL: https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/
|
|
run: pip install -e ".[qr]" pytest
|
|
|
|
- name: Byte-compile all modules
|
|
run: python -m py_compile lark_channel_molecule/*.py
|
|
|
|
- name: Run unit tests
|
|
# Both sides are mocked (fake ws events + fake platform tools) —
|
|
# no creds / network needed, deterministic on a generic runner.
|
|
run: pytest -q
|