P1 security batch: quota execution checks, cost accounting, goal/coordinator semantics, PR channel, orphan signature, control-plane and console hardening

- Docker quota watchdog + fail-closed quota checks, system tasks need real owner
- max_cost_usd actually accumulated, cancel records cost, estimated rows excluded from unpriced cap, cache_write declared non-billed
- goal-resume keeps original verify on breakpoint resume, goal retry falls back to resume, goal_max_rounds capped at 100 at create and execution
- coordinator children inherit parent model/effort, orphans marked interrupted with audit
- PR jobs on docker workers return explicit needs_local_worker instead of silent empty
- worker code signature covers 6 files and is checked before claim, fail-closed
- sub2api lazy provisioning with rotation, backup whitelist + 0600, push SSRF block, repos/workers desensitized, key/project audits and limits, console buttons/quota/status wording, coordinator/automation quota reserve
This commit is contained in:
host committed 2026-10-27 16:27:50 +00:00
1 parent d254240d84
commit 1402dc67fd
20 files changed
+2616 -179

No files matched your search

+6 -1
View File
@@ -307,7 +307,12 @@ class WorkerPrJobsTestCase(unittest.TestCase):
enqueue_pr_job(conn, "t1", "p1", worker.host_name)
finally:
conn.close()
self.assertEqual(worker._run_pr_jobs(), [])
# P1:Docker worker 不再静默返回空,改为显式 needs_local_worker,
# 任务保持 queued 等 local worker 认领。
jobs = worker._run_pr_jobs()
self.assertEqual(len(jobs), 1)
self.assertEqual(jobs[0]["status"], "needs_local_worker")
self.assertEqual(jobs[0]["task_id"], "t1")
def test_autoscaler_forces_host_name(self):
scaler = Autoscaler(self.db_path, [])