refactor(config): make OrgConfig.Agents optional and add Phase 4 plan (ADR-0045 Phase 3 PR 6) - #2369
Conversation
Site previewPreview: https://dd76fed8-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 1:48 AM UTC · Completed 1:58 AM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Info
Previous runReviewFindingsLow
Info
Previous runReviewFindingsLow
Info
Previous run (2)ReviewFindingsLow
Info
|
343c155 to
8ea0f51
Compare
8ea0f51 to
c8710f1
Compare
|
🤖 Finished Review · ✅ Success · Started 2:08 AM UTC · Completed 2:20 AM UTC |
… (ADR-0045 Phase 3 PR 6) Add omitempty to OrgConfig.Agents yaml tag so config.yaml can omit the agents: block entirely. Add HasAgentsBlock() method for deprecation checks. Add tests covering nil/empty agents parsing, marshaling, and HasAgentsBlock behavior. Write the Phase 4 implementation plan documenting 4 PRs to complete the ADR-0045 migration: require role in Validate(), stop dual-writing agents to config.yaml, remove legacy discovery fallbacks, and remove OrgConfig.Agents field. Signed-off-by: Greg Allen <gallen@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
c8710f1 to
1077242
Compare
|
🤖 Finished Review · ✅ Success · Started 1:12 PM UTC · Completed 1:25 PM UTC |
|
🤖 Finished Retro · ✅ Success · Started 7:26 PM UTC · Completed 7:35 PM UTC |
Retro: PR #2369 —
|
Summary
omitemptytoOrgConfig.Agentsyaml tag soconfig.yamlcan omit theagents:block entirely without parse errorsHasAgentsBlock()method for CLI deprecation checksHasAgentsBlockbehaviordocs/plans/adr-0045-forge-portable-harness-phase4.md) documenting 4 PRs to complete the ADR-0045 migrationThis is the final PR in Phase 3 of ADR-0045. The
loadKnownSlugsfunction (merged in Phase 3 PR 4) already emits a deprecation warning when falling back to the legacyagents:block, so no additional runtime warning was added.Phase 4 plan highlights
The plan decomposes Phase 4 into 4 PRs, 3 of which can run in parallel:
roleinValidate()— promote Lint warning to hard erroragents:block during install — remove agents param fromNewOrgConfig()loadKnownSlugsLegacy, simplifydiscoverAgentSlugsOrgConfig.Agentsfield,AgentSlugs(),HasAgentsBlock()Config schema stays at v1 (removal is backward-compatible). Full consumer audit covering all 16 call sites is included.
Test plan
TestParseOrgConfig_WithoutAgentsBlock— config withoutagents:key parses,AgentSlugs()returns empty mapTestParseOrgConfig_EmptyAgentsList—agents: []parses,AgentSlugs()returns empty mapTestHasAgentsBlock— true with entries, false when nil, false when empty sliceTestOrgConfigMarshal_NilAgentsOmitted— nil agents omits key from YAML outputTestOrgConfigMarshal_EmptyAgentsOmitted— empty slice also omitted (yaml.v3 behavior locked in)make go-testpassesmake lintpasses🤖 Generated with Claude Code