feat(compile): add pool-overrides for per-job pool configuration (#1464)#1472
feat(compile): add pool-overrides for per-job pool configuration (#1464)#1472jamesadevine with Copilot wants to merge 6 commits into
Conversation
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
…ed signature Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
|
/rust-review |
|
✅ Rust PR Reviewer completed successfully! |
🔍 Rust PR ReviewSummary: Looks good — the implementation is correct and well-tested. One fragility concern and one minor nit worth noting. Findings
|
|
@copilot Fix up PR description and implement feedback and suggestions. |
… EMPTY_OVERRIDES static Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Done in commit 03505df. Two improvements from the rust review:
Updated PR description (reflecting the SummaryThe compiler previously cloned the top-level pool:
name: SpecializedLinuxPool
overrides:
detection:
vmImage: ubuntu-22.04
safe-outputs:
vmImage: ubuntu-22.04
conclusion:
vmImage: ubuntu-22.04Per-job overrides are nested under
Constraints: Docs: Full reference section added to Test plan12 new tests: 9 unit tests in |
|
/rust-review |
|
✅ Rust PR Reviewer completed successfully! |
🔍 Rust PR ReviewSummary: Looks good overall — clean design, solid test coverage, good error handling. A couple of things worth a second look. Findings🔒 Security Concerns
|
|
@copilot implement suggestions |
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Done in the latest commit. Three changes from the second rust-review:
|
|
@copilot why does the new override frontmatter support legacy strings? They are automatically transformed by the codemod before compilation. The new code should never support legacy string format. |
…legacy strings) Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Fixed in 6f879b6. Changed |
Summary
The compiler previously cloned the top-level
pool:onto every generated job, forcing lightweight downstream jobs (Detection, SafeOutputs, Conclusion) onto scarce specialized capacity. Addspool-overrides:to right-size individual jobs independently.src/compile/types.rs—pool_overrides: HashMap<String, PoolConfig>added toFrontMatter(serde:pool-overrides); sanitized alongsidepool:.src/compile/common.rs—PerJobPoolsstruct (one resolvedPoolper canonical job) +resolve_pool_overrides_typed()which applies overrides, inheritssafe-outputs-reviewedfromsafe-outputs, warns on unknown keys, hard-errors onmanual-review.src/compile/agentic_pipeline.rs—StandaloneCtx.pool: Pool→pools: PerJobPools; each of the 6 job builders reads its own field.SafeOutputs_Reviewedselectspools.safe_outputs_reviewed.src/compile/onees_ir.rs— compile-time error ifpool-overrides:is non-empty ontarget: 1es; the 1ES template owns pool selection.Constraints:
manual-reviewkey always rejected (agentless, fixedpool: server). Unknown keys warn and are ignored. Each override is validated through the sameresolve_pool_typedrules as the default pool (noname+vmImage,demandsrequiresname).Docs: Full reference section added to
front-matter.mdincluding key table and trust boundary note for self-hosted overrides; trust boundary callout added tosafe-outputs.md.Test plan
12 new tests: 9 unit tests in
common.rscovering default inheritance, per-key overrides,safe-outputs-reviewedinheritance,manual-reviewrejection, invalid pool combos, and demands composition; 3 integration tests inagentic_pipeline.rsverifying pools flow throughbuild_canonical_jobsto the emitted job objects.cargo test— 2567 passed, 0 failed.