feat(harness): add ForgeConfig struct and merge logic (ADR-0045 PR 1/7) - #2127
Conversation
Site previewPreview: https://95530548-site.fullsend-ai.workers.dev Commit: |
0aea1c5 to
b0e335a
Compare
|
🤖 Review · Started 4:02 PM UTC |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 4:55 PM UTC · Completed 5:09 PM UTC |
ReviewFindingsMedium
Low
Info
Previous runReviewFindingsMedium
Low
Info
|
Add forge-portable harness schema support: ForgeConfig struct, ResolveForge merge method, and forge section validation. This is pure library code with no callers in the load pipeline yet. Phase 1 PR 1 of the ADR-0045 implementation plan. Signed-off-by: Greg Allen <gallen@redhat.com> Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b0e335a to
00ede60
Compare
|
🤖 Finished Review · ✅ Success · Started 5:17 PM UTC · Completed 5:30 PM UTC |
|
🤖 Finished Retro · ✅ Success · Started 8:13 PM UTC · Completed 8:21 PM UTC |
Retro: PR #2127 —
|
| Run | Trigger | Outcome | Notes |
|---|---|---|---|
| Review run 1 | Auto (PR open) | ❌ Failed | Agent completed (exit 0, schema valid) but post-review.sh got HTTP 401 — token expired. Review results lost. |
| Review run 2 | Manual /fs-review |
✅ Success | Re-triggered 50 min later by author. Posted medium-severity path-traversal finding. |
| Review run 3 | Auto (force-push) | ✅ Success | Redundant — same findings as run 2 on rebased commit. |
Waste: 3 review runs consumed ~35 min of agent compute; only run 2 was productive. Run 1's results were computed but never posted. Run 3 reviewed the same content as run 2.
Existing issues covering observed problems
- Status comment uses minted agent token and fails to update when token expires #2130 — Token expiry causing status comment / post-script failures (root cause of run 1 failure)
- Post-scripts should retry on transient HTTP errors before giving up #1296 — Post-scripts should retry on transient HTTP errors (would have mitigated run 1 failure)
- Deduplicate review dispatches for the same HEAD SHA #1452 / Skip review dispatch when HEAD SHA was already reviewed and approved #963 — Deduplicate review dispatches for same SHA / already-reviewed content (would prevent run 3)
- Review agent should alert when human approves with unresolved Medium+ findings #2099 — Alert when human approves with unresolved Medium+ findings
New proposal
One gap not covered by existing issues: when the agent completes successfully but the post-script fails, the entire agent must be re-run from scratch. Uploading agent output as an artifact before post-script execution would enable post-script-only retries, saving significant tokens and time.
Proposals filed
- Enable post-script-only retry when agent succeeds but post-script fails (in
fullsend-ai/fullsend)
Summary
ForgeConfigstruct withPreScript,PostScript,Skills,ValidationLoop, andRunnerEnvfields for platform-specific harness configurationForge map[string]*ForgeConfigfield toHarnessstruct with YAML supportResolveForge(platform)merge method following ADR-0045 inheritance rules: scalars override, skills concatenate, runner_env merges (forge wins), validation_loop replaces entirelyvalidateForge()to reject unrecognized forge keys and URL-based scripts in forge blocksPhase 1 PR 1 of 7 for the ADR-0045 implementation plan.
Test plan
forge_test.gocovering all merge behaviors, validation, YAML round-trip, edge casesTestHarnessesLoadAndValidatepasses (no regression)make go-vetcleanmake lintclean🤖 Generated with Claude Code