Skip to content

feat(routines): run a routine now from the Routines list - #25

Merged
bketelsen merged 1 commit into
mainfrom
irulan/routine-run-now
Nov 3, 2026
Merged

bketelsen merged 1 commit into
mainfrom
irulan/routine-run-now

Conversation

@frostyard-machines

Copy link
Copy Markdown
Contributor

Night shift 2026-11-02, line 9 (Brian, T721a). From Irulan's muster proposal (T718, porter item 5).

What

  • activity.run {name} (schema first: schema/rpc/activity.yaml): starts a routine now, with the rights, tools, limits, prompt (with the last success) and output of a scheduled run. It returns when the run starts, and it runs on the scheduler's context, not on the request's.
  • Routine.running: whether a run of it is active now.
  • Web: each valid routine in Activity's Routines list has Run now. It shows Running… and is disabled while the routine runs. A conflict says "It is already running."
  • Errors: notFound (no such routine), conflict (invalid routine, or a run of it is active or waits for its provider), unavailable (no scheduler: no notes token, or porterd stops), invalidParams (empty name).

Rules (documented in docs/specs/routines.md, Run now and Rules)

  • A run now does not move the routine's last success, nor its last scheduled run. Only scheduled runs move them, so missed-run catch-up is unchanged.
  • A routine never has two active runs: a run now during an active run gets conflict. A scheduled time during a run now is skipped and noted, as before.
  • A run now is not retried when the provider is unavailable. It fails at once.
  • A disabled routine can run now (the owner asked for it). An invalid routine cannot.
  • Its thread line and Activity text say "run now".

The running mark is cleared once, before the run's Activity entry, so a view that rereads the routines on the entry sees the run as ended; a new run now that starts in that gap keeps its own mark (tested).

Checks

  • make check: pass. go test -race on internal/routine and cmd/porterd: pass.
  • Web tests are new in web/test/activity.test.ts; CI's make web-check runs them.

Coder model: deepseek/deepseek-flash. Reviewed by Irulan (claude-opus-5.5).

activity.run starts a routine at once with the rights, tools, limits,
prompt and output of a scheduled run. It records Activity and posts a
thread line marked run now. It does not move the routine's last success
or last scheduled run, and is not retried when the provider is
unavailable. A second run while one is active gets conflict.
activity.routines gains running, and the web Routines list gains a Run
now button. docs/specs/routines.md records the rules.

Coded with deepseek/deepseek-flash.
@frostyard-machines

Copy link
Copy Markdown
Contributor Author

Cross-review (cross-review skill): reviewer openai/gpt-6.1-sol, coder deepseek/deepseek-flash. Base 7b0fd1a, head bf6115b, all 14 files. Result: Ready, Blocking: none, no findings. CI green at bf6115b.

@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 3, 2026
@bketelsen
bketelsen merged commit 99ab9a3 into main Nov 3, 2026
5 checks passed
@bketelsen
bketelsen deleted the irulan/routine-run-now branch November 3, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Reviewed, CI green: ready for Brian to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants