fix(#6678): split scaffold config into base layer and user overlay - #6809
fix(#6678): split scaffold config into base layer and user overlay#6809fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
BuildScaffoldFiles now supports a ConfigLayout field that controls how per-repo config files are generated during admin install: - ConfigLayoutLayered (fresh install): generates config.base.yaml with scaffold defaults and config.yaml as a minimal user-owned overlay - ConfigLayoutUpgrade (re-onboarding): regenerates config.base.yaml with new defaults, leaves config.yaml untouched - ConfigLayoutDefault (empty, backward compatible): generates a single config.yaml with full defaults baked in The admin install path (runPerRepoInstall) now detects whether the repo is already installed and sets the appropriate layout. On re-onboarding, config.yaml is never overwritten, preserving user customizations (custom agents, roles, runtime overrides). New scaffold defaults from fullsend upgrades appear automatically via config.base.yaml fallthrough (ADR 0069 Decision 2). When PerRepoConfig is explicitly set (migration path), the layout is ignored and config.yaml is written from the provided config, preserving existing migration behavior. Closes #6678
|
🤖 Finished Review · ✅ Success · Started 4:18 PM UTC · Completed 4:55 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.62 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Risk Assessment: moderate (2/5) DetailsFocused 4-file bug fix with strong test coverage (50% test files), bot-authored, no protected/security/CI/dependency changes; elevated git history churn and coupling are typical for these high-traffic core files and do not materially increase risk given the narrow, well-tested scope. |
ReviewFindingsMedium
Low
Next steps:
|
| @@ -862,6 +862,10 @@ func runPerRepoInstall(ctx context.Context, c perRepoInstallConfig) error { | |||
| // VendorBinary, UpstreamRef, UpstreamTag. Extra fields are included to stay aligned | |||
There was a problem hiding this comment.
[low] code-organization
The configLayout computation is duplicated between the dry-run path and real-install path. This follows a pre-existing pattern in the file where both paths construct separate InstallConfig structs.
|
🤖 Finished Fix · ❌ Failure (post-script /home/runner/work/fullsend/fullsend/.fullsend/.fullsend-cache/resources/sha256/e14f2eff53cc1ed5cb9200bf5471721ee531c61b6314e8977d603eae321214cd/scripts/post-fix.sh failed: exit status 1) · Started 4:57 PM UTC · Completed 5:07 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.29 |
|
The fix agent completed, but the post-fix script failed before finishing. Workflow run: https://github.com/fullsend-ai/fullsend/actions/runs/33416728975 Details: |
Summary
BuildScaffoldFilesconfig generation into a layered model:config.base.yaml(scaffold-managed defaults) +config.yaml(user-owned overlay), leveraging the existing three-tier config hierarchy from ADR 0069admin install), both files are generated; on re-onboarding, onlyconfig.base.yamlis regenerated —config.yamlis never touched, preserving custom agents, roles, runtime overrides, and other user customizationsConfigLayoutfield onInstallConfigChanges
internal/repos/install.go: AddConfigLayouttype with three variants (Default,Layered,Upgrade) and aminimalOverlayYAMLconstant for the stub overlay. ModifyBuildScaffoldFilesto select file strategy based on layout, withPerRepoConfigoverride taking precedenceinternal/cli/admin.go: SetConfigLayoutbased onalreadyInstalleddetection in both the install and dry-run paths ofrunPerRepoInstallinternal/repos/install_test.go: Add 5 tests covering layered fresh install, upgrade (no config.yaml), upgrade with runtime, default backward compat, and PerRepoConfig overrideinternal/cli/admin_test.go: Add 2 integration tests verifying fresh install generates both files and re-onboarding preserves user configTesting
TestBuildScaffoldFiles*tests pass (10 tests including 5 new)TestRunPerRepoInstall*tests pass (9 tests including 2 new)TestInstall_*tests passTestRunGitHubSetup*tests pass (github setup path unaffected)go vetcleanBuildScaffoldFilesat 90.6% (above 80% threshold)Closes #6678
Post-script verification
agent/6678-layered-config-install)32ad401f884b3fe989d689bab02be30657dce380..HEAD)