Summary
PR #817 (retro multi-forge) established a clean pattern: define shared config at the top level and only put forge-specific overrides in forge.<platform> sections. The harness runtime's mergeForgeConfig confirms this is safe — scalars only override when non-empty, and env maps merge with forge keys winning on collision.
Three other harness files have redundant duplication that can be cleaned up the same way.
What to change
harness/code.yaml
Remove duplicate scalars (identical to top-level):
forge.github.pre_script (line 78) — duplicates top-level line 44
forge.github.post_script (line 79) — duplicates top-level line 45
forge.gitlab.pre_script (line 107) — duplicates top-level line 44
forge.gitlab.post_script (line 108) — duplicates top-level line 45
Hoist common env.runner keys to top-level env.runner:
PUSH_TOKEN: "${PUSH_TOKEN}" (github:88, gitlab:116)
PUSH_TOKEN_SOURCE: "${PUSH_TOKEN_SOURCE}" (github:89, gitlab:117)
REPO_FULL_NAME: "${REPO_FULL_NAME}" (github:90, gitlab:118)
ISSUE_NUMBER: "${ISSUE_NUMBER}" (github:91, gitlab:119)
Hoist common env.sandbox keys to top-level env.sandbox:
GIT_AUTHOR_NAME: "fullsend-code" (github:100, gitlab:128)
GIT_AUTHOR_EMAIL: "${GIT_BOT_EMAIL}" (github:101, gitlab:129)
GIT_COMMITTER_NAME: "fullsend-code" (github:102, gitlab:130)
GIT_COMMITTER_EMAIL: "${GIT_BOT_EMAIL}" (github:103, gitlab:131)
harness/triage.yaml
Remove duplicate scalars (identical to top-level):
forge.github.pre_script (line 48) — duplicates top-level line 26
forge.github.post_script (line 49) — duplicates top-level line 27
forge.gitlab.pre_script (line 68) — duplicates top-level line 26
forge.gitlab.post_script (line 69) — duplicates top-level line 27
forge.jira.pre_script (line 88) — duplicates top-level line 26
forge.jira.post_script (line 89) — duplicates top-level line 27
harness/review.yaml
Hoist pre/post scripts to top-level (identical in both forge sections, currently missing from top-level):
pre_script: scripts/pre-review.sh (github:64, gitlab:92)
post_script: scripts/post-review.sh (github:65, gitlab:93)
Hoist common env.runner keys to top-level env.runner:
REPO_FULL_NAME: "${REPO_FULL_NAME}" (github:78, gitlab:105)
Hoist common env.sandbox keys to top-level env.sandbox:
REPO_FULL_NAME: "${REPO_FULL_NAME}" (github:83, gitlab:111)
PRIOR_REVIEW_SHA: "${PRIOR_REVIEW_SHA}" (github:88, gitlab:116)
PRIOR_REVIEW_PROVENANCE: "${PRIOR_REVIEW_PROVENANCE}" (github:89, gitlab:117)
Not in scope
Why this is safe
mergeForgeConfig in internal/harness/forge.go (lines 162–218) merges forge sections into the top-level harness:
- Scalars (
pre_script, post_script, policy): forge overrides only if non-empty; top-level value is preserved otherwise
- Env maps: top-level merged with forge; forge keys win on collision
All values listed above are identical across every forge section in their respective file. Moving them to the top level produces the same resolved config.
Line numbers
Based on commit 0a5599e (current main).
Summary
PR #817 (retro multi-forge) established a clean pattern: define shared config at the top level and only put forge-specific overrides in
forge.<platform>sections. The harness runtime'smergeForgeConfigconfirms this is safe — scalars only override when non-empty, and env maps merge with forge keys winning on collision.Three other harness files have redundant duplication that can be cleaned up the same way.
What to change
harness/code.yamlRemove duplicate scalars (identical to top-level):
forge.github.pre_script(line 78) — duplicates top-level line 44forge.github.post_script(line 79) — duplicates top-level line 45forge.gitlab.pre_script(line 107) — duplicates top-level line 44forge.gitlab.post_script(line 108) — duplicates top-level line 45Hoist common env.runner keys to top-level
env.runner:PUSH_TOKEN: "${PUSH_TOKEN}"(github:88, gitlab:116)PUSH_TOKEN_SOURCE: "${PUSH_TOKEN_SOURCE}"(github:89, gitlab:117)REPO_FULL_NAME: "${REPO_FULL_NAME}"(github:90, gitlab:118)ISSUE_NUMBER: "${ISSUE_NUMBER}"(github:91, gitlab:119)Hoist common env.sandbox keys to top-level
env.sandbox:GIT_AUTHOR_NAME: "fullsend-code"(github:100, gitlab:128)GIT_AUTHOR_EMAIL: "${GIT_BOT_EMAIL}"(github:101, gitlab:129)GIT_COMMITTER_NAME: "fullsend-code"(github:102, gitlab:130)GIT_COMMITTER_EMAIL: "${GIT_BOT_EMAIL}"(github:103, gitlab:131)harness/triage.yamlRemove duplicate scalars (identical to top-level):
forge.github.pre_script(line 48) — duplicates top-level line 26forge.github.post_script(line 49) — duplicates top-level line 27forge.gitlab.pre_script(line 68) — duplicates top-level line 26forge.gitlab.post_script(line 69) — duplicates top-level line 27forge.jira.pre_script(line 88) — duplicates top-level line 26forge.jira.post_script(line 89) — duplicates top-level line 27harness/review.yamlHoist pre/post scripts to top-level (identical in both forge sections, currently missing from top-level):
pre_script: scripts/pre-review.sh(github:64, gitlab:92)post_script: scripts/post-review.sh(github:65, gitlab:93)Hoist common env.runner keys to top-level
env.runner:REPO_FULL_NAME: "${REPO_FULL_NAME}"(github:78, gitlab:105)Hoist common env.sandbox keys to top-level
env.sandbox:REPO_FULL_NAME: "${REPO_FULL_NAME}"(github:83, gitlab:111)PRIOR_REVIEW_SHA: "${PRIOR_REVIEW_SHA}"(github:88, gitlab:116)PRIOR_REVIEW_PROVENANCE: "${PRIOR_REVIEW_PROVENANCE}"(github:89, gitlab:117)Not in scope
harness/prioritize.yaml— already follows the clean patternharness/retro.yaml— cleaned up in feat(#816): make retro agent multi-forge (GitHub + GitLab) #817Why this is safe
mergeForgeConfigininternal/harness/forge.go(lines 162–218) merges forge sections into the top-level harness:pre_script,post_script,policy): forge overrides only if non-empty; top-level value is preserved otherwiseAll values listed above are identical across every forge section in their respective file. Moving them to the top level produces the same resolved config.
Line numbers
Based on commit
0a5599e(currentmain).