Repository navigation
feat(#8330)!: unify repos.yaml config fields across all scopes - #8331
Conversation
defaults.config, the new github.config / gitlab.config sections, and each repository entry's config now accept every per-repo .fullsend/config.yaml field, including runtime and allowed_remote_resources. Before this change those two fields could only be set through sibling manifest keys and were rejected inside config, so operators could not express all per-repo settings in one schema or use forge-level defaults. Managed configuration now resolves defaults.config, then the repository's forge section config, then the entry config (glob entries included), using the existing per-repo merge rules (MergeManaged): a more specific scalar wins, maps merge key by key, allowed_remote_resources unions non-empty lists, and an explicit empty list replaces the inherited value. Sections stay sparse; omitted values are never materialized. A forge section's config never affects the other forge's repositories. - internal/config: drop the runtime/allowed_remote_resources rejection in ManagedConfig and ApplyManagedShorthands; add ExplicitRuntime. - internal/repos: remove the sibling Runtime/AllowedRemoteResources fields and their empty-list marshal shim, add PlatformConfig.Config, validate each layer with source-specific paths, and thread the platform into mergeManagedConfig, RenderManagedConfig and LayeredConfig. Adoption guidance moves every setting under config. - Manifest loading rejects defaults.runtime, defaults.allowed_remote_resources and the repository-entry equivalents with the replacement config path. There is no migration or alias. - repos install drops --runtime and --allowed-remote-resources; repos set-default rejects the old keys with guidance to edit defaults.config and writes nothing. - Docs: CLI reference, architecture, getting-started, runtime and operations guides describe the new schema and the breaking changes. Verification: config and repos tests pass; internal/cli has the same six sandbox-environment failures (fetch server socket, post-script env) as unmodified main. pre-commit could not fetch hook repos (TLS in the sandbox), so the applicable hooks were run directly (pre-commit-hooks 6.0.0 file checks, gofmt, go vet ./..., gitleaks) and passed. BREAKING CHANGE: repos.yaml no longer accepts runtime or allowed_remote_resources as sibling keys under defaults or repository entries; move them to defaults.config.<field> or the entry's config.<field>. A repository-level allowed_remote_resources list is now unioned with inherited prefixes instead of replacing them (use [] to deny all). repos install no longer accepts --runtime or --allowed-remote-resources, and repos set-default rejects defaults.runtime and defaults.allowed_remote_resources. Closes #8330 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 2:03 PM UTC · Completed 2:16 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $5.30 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Risk Assessment: moderate (2/5) DetailsLarge diff and breaking repos.yaml schema unification with elevated manifest churn are balanced by strong test coverage, no protected or CI workflow edits, complete acceptance criteria coverage, and bot authorship. Previous runRisk Assessment: moderate (2/5) DetailsLarge diff and breaking schema unification with elevated repo-manifest churn are balanced by strong test coverage, no protected or CI path changes, full acceptance criteria coverage, and bot authorship. Previous run (2)Risk Assessment: moderate (2/5) DetailsLarge diff and breaking schema unification with elevated repo-manifest churn are balanced by strong test coverage, no protected or CI path changes, full acceptance criteria coverage, and bot authorship. Previous run (3)Risk Assessment: moderate (2/5) DetailsLarge diff across 36 files with breaking schema changes and high regression churn is counterbalanced by bot authorship, zero protected or security-sensitive paths, high test coverage, and complete alignment with linked issue acceptance criteria. |
|
Looks good to me Earlier findings
Previous runReviewFindingsLow
Earlier findings
Next steps:
Previous run (2)ReviewFindingsMedium
Low
Next steps:
Previous run (3)ReviewFindingsHigh
Medium
Low
Next steps:
|
|
🤖 Finished Fix · ✅ Success · Started 2:17 PM UTC · Completed 2:29 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.60 |
Reject a non-empty allowed_remote_resources list declared in a more specific manifest layer than an explicit empty list: the sparse managed file flattens layers and cannot record the reset, so the preset and code default prefixes would be re-admitted at runtime. Deep-copy the config when carving a glob entry into an explicit entry and restore the isolation regression. Update the repos status and repo-management documentation for the removed shorthands and the clearable allowlist. Pre-commit could not fetch hook repos (TLS in sandbox); gofmt, go vet and the config/repos tests passed. internal/cli has the same six sandbox-environment failures as before this change. Addresses #8331 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🔧 Fix agent — iteration 1 (bot-triggered)Addressed all four findings. Chose to reject a non-empty allowlist below an explicit empty one instead of encoding a reset marker, since the sparse managed file schema cannot express it. internal/config and internal/repos tests pass; internal/cli has the same six sandbox-environment failures as before. Fixed (4):
Tests: passed CI inspections (5):
Conflict update: skipped; strategy
|
|
🤖 Finished Review · ✅ Success · Started 2:31 PM UTC · Completed 2:42 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $4.09 |
|
🤖 Finished Fix · ✅ Success · Started 2:44 PM UTC · Completed 2:47 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.21 |
- choosing-a-runtime: replace the stale GitLab --runtime install-flag sentence with the repos.yaml config instruction. - repos.md: state that a repository can no longer narrow inherited allowed_remote_resources prefixes; only [] denies all. Not addressed (advisory, optional): relaxing rejectAllowlistBelowReset for empty->non-empty->empty chains, and extending the old-key load error. Note: pre-commit could not run (hook repos unreachable from sandbox); change is docs-only. Addresses #8331 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🔧 Fix agent — iteration 2 (bot-triggered)Fixed the medium stale-doc finding and the documentation half of the low backward-compat finding. Two optional low-severity code suggestions were declined with reasons. Docs-only change; pre-commit could not run in the sandbox (hook repos unreachable); Go tests were not re-run since no code changed. Fixed (2):
Disagreed (2):
Tests: passed CI inspections (5):
Conflict update: skipped; strategy
|
|
🤖 Finished Review · ✅ Success · Started 2:49 PM UTC · Completed 2:58 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.11 |
|
🤖 Finished Fix · ✅ Success · Started 3:00 PM UTC · Completed 3:04 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.25 |
…on PR #8331 rejectAllowlistBelowReset now evaluates the whole layer chain: when the most specific declared allowed_remote_resources list is empty it supersedes every earlier layer (deny-all), so an empty -> non-empty -> empty chain is accepted instead of rejected. Adds regression cases and updates docs/cli/repos.md. Note: pre-commit could not fetch remote hook repositories (TLS failure); the applicable local hooks (gofmt, go vet) were run directly and passed. Addresses #8331 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🔧 Fix agent — iteration 3 (bot-triggered)Addressed the single open low-severity finding by evaluating the whole layer chain before rejecting an allowlist below a reset. Earlier findings were already resolved or reclassified by the reviewer. Fixed (1):
Tests: passed CI inspections (5):
Conflict update: skipped; strategy
|
|
🤖 Finished Review · ✅ Success · Started 3:06 PM UTC · Completed 3:14 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.75 |
Superseded by updated review
Summary
repos.yamlnow uses one per-repo config schema at every scope.defaults.config, the newgithub.config/gitlab.configsections, and each repository entry'sconfigaccept every.fullsend/config.yamlfield, includingruntimeandallowed_remote_resources. The old sibling keys and the matchingrepos installflags are removed. This is a breaking change.Related Issue
Sub-issue of #7318; unblocks #8219.
Changes
Resolution order: code defaults →
config_basepreset →defaults.config→ the repository's forge sectionconfig→ the repository entry'sconfig(glob entries included). It uses the existingMergeManagedper-field rules:allowed_remote_resourceslist is unioned with the inherited list;Each section stays sparse: omitted values are not written into the managed file.
github.confignever affects GitLab repositories, andgitlab.confignever affects GitHub ones.internal/config:ManagedConfigno longer rejectsruntime/allowed_remote_resources.ApplyManagedShorthandsis removed. NewManagedConfig.ExplicitRuntime()returns a layer's runtime without falling back to code defaults;ResolvedConfig.Runtimeuses it so a preset's runtime is not shadowed.internal/repos:RepoEntry/DefaultsConfigRuntimeandAllowedRemoteResources, the empty-allowlist marshal shim, andResolvedConfig.AllowedRemoteResources.PlatformConfig.Config.github.config.allowed_remote_resources[0]).mergeManagedConfig,RenderManagedConfigandLayeredConfignow take the forge.config.Old sibling paths rejected at load:
defaults.runtime,defaults.allowed_remote_resources, and the repository-entry equivalents fail with the replacement path, for exampledefaults.runtime is no longer supported; move it to defaults.config.runtime. There is no auto-migration and no alias.CLI:
repos installdrops--runtimeand--allowed-remote-resources; there is no replacement flag.repos set-defaultrejectsdefaults.runtime/defaults.allowed_remote_resourceswith guidance to editdefaults.config, and writes nothing.Docs:
docs/cli/repos.md(including a breaking-change upgrade section),docs/architecture.md,docs/reference/config-reference.md, and the repo-management, configuring-gitlab, choosing-a-runtime, operations, layered-config, runtimes and cli-internals guides.Behavior change to review
A repository-level
allowed_remote_resourceslist used to replacedefaults.allowed_remote_resources. Insideconfigit follows the existing layered merge rule, so a non-empty list is now unioned with the inherited prefixes.[]still denies every remote resource. The issue asks for the existing merge rules, and this is called out in the upgrade docs and in theBREAKING CHANGEtrailer.Testing
make lintpasses (stage changes first, then run).pre-commititself could not fetch hook repositories in the sandbox (TLS), so the applicable hooks were run directly and passed: pre-commit-hooks 6.0.0 file checks, gofmt,go vet ./..., gitleaks.internal/repos/config_platform_layers_test.go. It covers precedence for scalar, nested-map, list, omitted and explicit empty-list values on both forges and on glob-matched repos; sparse rendering; layering above a preset; source-specific validation errors; and rejection of all four old sibling paths.repos statusagree on values fromdefaults.config/github.config.set-defaultrejecting the old keys without writing anything.go test ./internal/config ./internal/repos ./internal/gitlablifecycle ./internal/layerspasses.go test ./internal/clihas the same six failures as unmodifiedmainin this sandbox: fetch-server socket tests and two post-script env tests.Checklist
!for breaking changes)🤖 Generated with Claude Code
Closes #8330
Post-script verification
agent/8330-unify-repos-config-fields)9f954d971c4c91fd74a2b1f2b94104127e010503..HEAD)