Skip to content

1.1 — Scheduler (serial queue) #56

Description

@jack-champagne

Phase 1.1 (plan plan-20260603-124231-amicode-phased-build §3). ~3 pd.

Serial queue by default: enqueue(spec, {concurrent?}) → RunHandle; emits the run lifecycle events RunsManager/StatusBar consume. Opt-in parallel lane deferred to Phase 4 (§4.2).

Depends on: amico-run/Executor (β.1, shipped — the LocalExecutor).

Executor contract — RATIFIED (build the Scheduler to this)

Ratified 2026-07-02 in the Track C spec (spec-20260628-amicode-cloud-solve-service, Locked decisions). Build to this seam so the cloud RemoteExecutor (#32, Δ8) drops in with zero reshape:

  • Executor.submit(scriptPath, lab) → RunHandle{ runId, events, finished, abort }
  • S12 — downstream never branches on executor type. RunsManager / Inspector / Catalog see only the RunHandle; local-vs-remote lives entirely inside the two Executors.
  • (a) frames best-effort. S7/S11 asserts an identical terminal state on resolution + a best-effort frame stream (poll is lossy vs local fs.watch), not literal frame equality.
  • (b) abort() = request, not kill. The run is alive until FINISHED (or a liveness-inferred terminal) lands. The Scheduler must NOT treat post-abort() as terminated.
  • (c) per-executor warming budget. Do not hard-code a local-timed warming timeout — remote cold-start ≫ local seconds.
  • (d) terminal = best-effort; resolution reliable. Terminal resolution is via poll + liveness (a run whose box dies without FINISHED still resolves to an inferred terminal); the completion ping is a convenience, not a delivery guarantee.

LocalExecutor already ships (β.1); this issue builds the Scheduler around the contract above so #32 implements only the remote half.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions