Expand description
The POST /v1/issues dispatcher — see enhance::EnhanceApplication.
EnhanceApplication — the dispatcher for the POST /v1/issues
path.
The entry point (POST /v1/issues) only does IssueStore.create —
a synchronous enqueue. The actual dispatch is drained by a
consumer loop calling tick():
POST /v1/issues ──→ IssueStore (queue)
↓
consumer loop (tokio::spawn) ── tick() ──┐
↓
IssueStore.pop_pending + EnhanceSettingStore.get
↓
BPStore.read_head(setting.blueprint.id) (fetched on use)
↓
TaskLaunchService.launch(...) (engine bind + attach + start_task)
the drain stops waiting on this after
EnhanceSetting.ttl_secs (see the ceiling block below)One tick is one epoch. EnhanceSetting.ttl_secs is not a ceiling on
that epoch: it is a ceiling on how long the drain waits for one call —
TaskLaunchService::launch — and nothing else. Two consequences, both
load-bearing, both spelled out in the ceiling block in
EnhanceApplication::dispatch_one:
- It bounds the wait, which is the thing it was built to bound. The
knob exists so the Swarm can give up on an Operator that stopped
answering (model §4.4 R5 places the bound in infra, not in the
model), and that wait is an await point, so dropping the launch future
releases it. It does not stop a worker already running in an
in-process lane: those run in
tokio::spawned tasks that this future does not own, and nothing in this repository fires theCancellationTokenthey select on. The drain is unwedged either way; the work may still be running behind it, which is what the reason text tells the operator to check before re-posting. - It does not span the epoch. The store calls on either side of
launch—setting_store.get,resolve_blueprint,bp_store.read_head,bp_store.write_new,log_store.append, andissue_store.update_statusin bothtickarms — are outside it and are bounded by nothing.
So the ceiling removes exactly one wedge — a patch-spawner whose call
never returns — and leaves every other way to stall the single-threaded
drain in place.
Current scope:
- Engine task-completion →
Issue.update_statusis a carry. - Setting
VersionSelector(Fixed/Latest/SemverReq) is a carry — today we always useBPStore.read_head. - The agent-selection convention is
setting.blueprint.agents.first().name.
Structs§
- Enhance
Application - The
POST /v1/issuesdispatcher — enqueues viaApplication::handle, drains viaEnhanceApplication::tick/EnhanceApplication::run_forever. - Enhance
Application Config - Configuration parameters for
EnhanceApplication. - Enhance
Application Input - Input to
EnhanceApplication::handle— thePOST /v1/issuesrequest body once decoded. - Tick
Outcome - Result of a single
tick.task_idis gone — the flow-eval path runs many steps to completion instead of being tied to a single task id, so the entirefinal_ctxis the result. Outcomes are checked throughstatus.
Enums§
- Enhance
Application Error - Failure modes of
EnhanceApplication::tickand the internaldispatch_onestep it wraps.