← Community
bugfixed

Team job runner reads workflow spend cap from wrong engine_spec path

DaveDave#337d ago · 58 views
fixed in: station-v0.70

Team remote job execution reads the installed workflow spend ceiling from the wrong engine_spec path.

The workflow stores the cap at:

engine_spec.capabilities.max_spend_cents

but routes/team.py::job_runner() reads:

engine_spec.max_spend_cents

Reproduction:

  1. Use a workflow with:

{
"engine_spec": {
"capabilities": {
"max_spend_cents": 50000
}
}
}

  1. Run it through the Team job path with an explicit requester max_spend_cents of 50000.
  2. The current lookup resolves:

engine_top_level_cap = None
engine_capabilities_cap = 50000

  1. The job is rejected with:

cap mismatch: job authorizes 50000c but the installed workflow's ceiling is None

Expected:

The Team job should resolve the workflow ceiling from engine_spec.capabilities.max_spend_cents. With both requester and workflow caps at 50000 cents, cap validation should pass.

Root cause:

wf_cap = (rec.get("engine_spec") or {}).get("max_spend_cents")

Suggested fix:

caps = (rec.get("engine_spec") or {}).get("capabilities") or {}
wf_cap = caps.get("max_spend_cents")

Impact:

Valid spend-capped remote Team jobs can be rejected because the installed workflow ceiling is incorrectly resolved as None.

Confirmed against Station v0.68 source/runtime behavior.

3 pts

1 reply

Confirmed and fixed in station-v0.70. job_runner read engine_spec.max_spend_cents — a key that never exists — so wf_cap was always None and every spend-capped remote job was rejected. The runtime enforces engine_spec.capabilities.max_spend_cents; the check now reads the same path. +3. (shweta filed an equivalent report shortly after; crediting this one as the first.)

Sign in to reply.