Skip to content

Commit 6129bb0

Browse files
committed
re-implement compose logic
- build observed state - compute reconciliation plan by comparing observed vs desired state - execute plan this allow to decorelate reconciliation (aka "convergence") logic from docker API, and write simpler and efficient tests to cover various scenarios Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
1 parent e8c2143 commit 6129bb0

18 files changed

+3381
-433
lines changed

AI_POLICY.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# AI Usage Policy
2+
3+
This document defines the Docker Compose project’s policy regarding the use of AI-assisted tools (such as code generation, refactoring, documentation, or analysis tools) by contributors.
4+
5+
## Summary
6+
7+
-**AI tools are allowed** for contributing to Docker Compose.
8+
- ⚠️ **AI-generated contributions are reviewed more strictly** than human-written ones.
9+
-**Pull requests based on AI output will only be reviewed if they are explicitly approved in advance by a maintainer via a tracked issue and correctly tagged.**
10+
11+
The goal of this policy is to balance openness to modern tooling with the project’s standards for correctness, maintainability, and long-term stewardship.
12+
13+
---
14+
15+
## Allowed Use of AI
16+
17+
Contributors may use AI tools to assist with:
18+
19+
- Exploring ideas or approaches
20+
- Writing or refactoring code
21+
- Generating tests or documentation
22+
- Explaining existing code or behavior
23+
24+
Using AI is **not considered misconduct**, and contributors are not required to avoid or hide AI usage.
25+
26+
---
27+
28+
## Requirements for AI-Assisted Pull Requests
29+
30+
Any pull request that includes **non-trivial AI-generated content** MUST meet **all** of the following requirements to be eligible for review:
31+
32+
### 1. Maintainer-Reviewed Issue
33+
34+
- The pull request **must be based on an issue that has been reviewed and approved by a Docker Compose maintainer**.
35+
- The issue discussion must clearly establish:
36+
- The problem being solved
37+
- The expected behavior or outcome
38+
- The scope of the change
39+
40+
Pull requests created without this prior agreement **will not be reviewed**, regardless of quality.
41+
42+
### 2. Explicit Tagging
43+
44+
- The pull request **must be labeled with the tag**:

cmd/compose/compose.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
"syscall"
3131

3232
"github.com/compose-spec/compose-go/v2/cli"
33+
"github.com/compose-spec/compose-go/v2/consts"
3334
"github.com/compose-spec/compose-go/v2/dotenv"
3435
"github.com/compose-spec/compose-go/v2/loader"
3536
composepaths "github.com/compose-spec/compose-go/v2/paths"
@@ -221,7 +222,7 @@ func makeJSONError(err error) error {
221222
}
222223

223224
func (o *ProjectOptions) addProjectFlags(f *pflag.FlagSet) {
224-
f.StringArrayVar(&o.Profiles, "profile", []string{}, "Specify a profile to enable")
225+
f.StringArrayVar(&o.Profiles, "profile", defaultStringArrayVar(consts.ComposeProfiles), "Specify a profile to enable")
225226
f.StringVarP(&o.ProjectName, "project-name", "p", "", "Project name")
226227
f.StringArrayVarP(&o.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
227228
f.StringArrayVar(&o.insecureRegistries, "insecure-registry", []string{}, "Use insecure registry to pull Compose OCI artifacts. Doesn't apply to images")

0 commit comments

Comments
 (0)