feat(#5858): add Policy field to ForgeConfig - #5859
Conversation
|
🤖 Finished Review · ✅ Success · Started 2:37 PM UTC · Completed 2:50 PM UTC |
Site previewPreview: https://fa20dbf8-site.fullsend-ai.workers.dev Commit: |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
ReviewFindingsMedium
Next steps:
Previous runReviewFindingsMedium
Low
Labels: PR modifies documentation files under docs/ADRs/, docs/guides/, and docs/plans/ alongside harness Go code Next steps:
Previous run (2)ReviewFindingsMedium
Low
Next steps:
Previous run (3)ReviewFindingsMedium
Low
Next steps:
Previous run (4)ReviewFindingsHigh
Medium
Low
Labels: PR modifies internal/harness/ Go code for forge config schema Next steps:
|
db06a0d to
6394880
Compare
|
🤖 Finished Review · ✅ Success · Started 3:02 PM UTC · Completed 3:18 PM UTC |
6394880 to
4f44453
Compare
|
🤖 Finished Review · ✅ Success · Started 3:30 PM UTC · Completed 3:47 PM UTC |
4f44453 to
352f229
Compare
|
🤖 Finished Review · ✅ Success · Started 3:58 PM UTC · Completed 4:14 PM UTC |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
352f229 to
af5dd12
Compare
|
🤖 Finished Review · ✅ Success · Started 4:23 PM UTC · Completed 4:38 PM UTC |
|
🤖 Finished Retro · ✅ Success · Started 5:03 PM UTC · Completed 5:20 PM UTC |
Retro: PR #5859 — Add Policy field to ForgeConfigOverall: The workflow delivered a correct result — the code agent produced an 8-file, test-covered PR in ~11 minutes, and the review agent caught a genuine bug (missing Timeline
Key observationsReview quality was good. The review agent found real issues: the ADR-0045 self-contradiction (round 1), the missing Two known bugs compounded badly. (1) The fix agent's bot-detection regex ( Evidence for existing issues:
No new proposals. All improvement opportunities identified in this retro are already tracked as open issues. The highest-impact fix would be #5536 (fix agent eligibility), which has been open for over 2 months and is systematically blocking the fix agent on every bot-authored PR. |
Summary
Add a
policyfield toForgeConfigso harness files can select different sandbox policies per forge platform. This enables least-privilege network policies — e.g. the triage agent can use a GitHub-scoped policy by default and a GitLab-scoped policy when running against GitLab.Changes
Policy stringtoForgeConfigstruct withyaml:"policy,omitempty"tagmergeForgeConfig: scalar override — forge policy replaces top-level if non-empty (same pattern asPreScript/PostScript)validateForge: URL policies require#sha256=...integrity hash (mirrorsValidateResourceTypesfor declarative fields)mergeForgeConfigInto(compose.go): base composition inherits forge-level policy when child is emptyresolveBaseScripts(compose.go): resolve forge-level policy paths against base URL during base compositionForgeConfigstruct listing to includepolicyTesting
TestResolveForge_PolicyOverride— forge policy replaces top-levelTestResolveForge_PolicyNotOverriddenWhenEmpty— top-level preserved when forge policy absentTestValidate_ForgePolicyURLWithoutHash— URL without integrity hash rejectedTestValidate_ForgePolicyURLWithHash— URL with integrity hash acceptedTestValidate_ForgePolicyLocalPath— local path acceptedTestForgeConfig_PolicyParsesFromYAML— YAML round-trip parsinggo test -race ./internal/harness/...passesgo vet ./internal/harness/...passesmake lint— pre-commit could not run in sandbox (network restriction); post-script runs authoritativelyCloses #5858
Post-script verification
agent/5858-forge-policy-field)7a6f5043b510f43851d3414bc98f63080d1970f1..HEAD)