fix: exclude restricted runnables from dedicated worker startup

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-10-02 18:32:14 +02:00
co-authored by Claude Opus 5.5
parent 8627b649b4
commit 8a4e07fa82
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
d5879586211e7116d8198f9a03a0fcbb81c55787
56f2d36eff7edc4a2e36e89d8e3cb17588ceef38
+10
View File
@@ -127,6 +127,16 @@ async fn test_restricted_job_token_is_confined(db: Pool<Postgres>) -> anyhow::Re
.await?;
assert_eq!(resp.status() == StatusCode::FORBIDDEN, refused, "{job}");
}
// Its progress reaches only the flow it runs in.
for (flow, refused) in [(FLOW_JOB, false), (RUN_JOB, true)] {
let resp = client
.post(format!("{base}/job_metrics/set_progress/{OIDC_JOB}"))
.bearer_auth(&oidc_token)
.json(&json!({ "percent": 50, "flow_job_id": flow }))
.send()
.await?;
assert_eq!(resp.status() == StatusCode::FORBIDDEN, refused, "{flow}");
}
// A job it starts is capped at its own scopes, intersected with the target's setting.
let run_token = job_token(&db, RUN_JOB).await?;