Skip to content

Commit 30d4a85

Browse files
committed
Enable commit attribution by default
Promote codex_git_commit to a stable feature and enable it by default so Open Codex commits add the configured co-author trailer without requiring users to opt in through the experimental feature table. Tests: - cargo test -p codex-features codex_git_commit
1 parent fd2c543 commit 30d4a85

3 files changed

Lines changed: 13 additions & 11 deletions

File tree

codex-rs/features/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -768,12 +768,11 @@ pub const FEATURES: &[FeatureSpec] = &[
768768
stage: Stage::Removed,
769769
default_enabled: false,
770770
},
771-
// Experimental program. Rendered in the `/experimental` menu for users.
772771
FeatureSpec {
773772
id: Feature::CodexGitCommit,
774773
key: "codex_git_commit",
775-
stage: Stage::UnderDevelopment,
776-
default_enabled: false,
774+
stage: Stage::Stable,
775+
default_enabled: true,
777776
},
778777
FeatureSpec {
779778
id: Feature::RuntimeMetrics,

codex-rs/features/src/tests.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ fn use_linux_sandbox_bwrap_is_removed_and_disabled_by_default() {
5454
assert_eq!(Feature::UseLinuxSandboxBwrap.default_enabled(), false);
5555
}
5656

57+
#[test]
58+
fn codex_git_commit_is_stable_and_enabled_by_default() {
59+
assert_eq!(Feature::CodexGitCommit.stage(), Stage::Stable);
60+
assert_eq!(Feature::CodexGitCommit.default_enabled(), true);
61+
}
62+
5763
#[test]
5864
fn undo_is_removed_and_disabled_by_default() {
5965
assert_eq!(Feature::GhostCommit.stage(), Stage::Removed);

docs/config.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,19 @@ For a full configuration reference, see [this documentation](https://developers.
1010

1111
Open Codex can add a [git trailer](https://git-scm.com/docs/git-interpret-trailers)
1212
to generated commit messages so commits make Open Codex's involvement explicit.
13-
This behavior is gated by the `codex_git_commit` feature flag; the top-level
14-
`commit_attribution` setting is only used when that feature is enabled.
13+
This behavior is enabled by default. The top-level `commit_attribution` setting
14+
can override the default trailer identity.
1515

1616
Add the following to `~/.codex/config.toml`:
1717

1818
```toml
1919
commit_attribution = "Open Codex <hff582580@gmail.com>"
20-
21-
[features]
22-
codex_git_commit = true
2320
```
2421

25-
When enabled, Open Codex appends a `Co-authored-by:` trailer using the configured
26-
attribution value. If `commit_attribution` is omitted, Open Codex uses
22+
Open Codex appends a `Co-authored-by:` trailer using the configured attribution
23+
value. If `commit_attribution` is omitted, Open Codex uses
2724
`Open Codex <hff582580@gmail.com>`. Set `commit_attribution = ""` to disable the
28-
trailer while leaving the feature flag enabled.
25+
trailer.
2926

3027
## OpenTelemetry Trace Metadata
3128

0 commit comments

Comments
 (0)