Skip to content

Use prompt-based co-author attribution with config override#11617

Merged
gabec-openai merged 7 commits intomainfrom
codex/hook-based-coauthor-attribution
Feb 17, 2026
Merged

Use prompt-based co-author attribution with config override#11617
gabec-openai merged 7 commits intomainfrom
codex/hook-based-coauthor-attribution

Conversation

@gabec-openai
Copy link
Contributor

@gabec-openai gabec-openai commented Feb 12, 2026

Summary:

  • switch attribution to a hook-based approach using a Codex-managed prepare-commit-msg hook
  • inject core.hooksPath at exec bootstrap in both shell and unified exec paths
  • keep command_attribution config support (default Codex label, blank disables, custom label supported)
  • simplify behavior to commit co-author trailer attribution only and update config schema wording

Validation:

  • just fmt
  • just write-config-schema
  • cargo test -p codex-core command_attribution::
  • cargo test -p codex-core tools::handlers::shell::tests::shell_command_handler_to_exec_params_uses_session_shell_and_turn_context
  • cargo test -p codex-core tools::handlers::unified_exec::tests::test_get_command_uses_default_shell_when_unspecified

Edit - we must go deeper, this commit created with codex running this attribution changes
Screenshot 2026-02-12 at 10 09 06 AM

Co-authored-by: Codex <noreply@openai.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Feb 12, 2026
- remove hook/env interception path for commit attribution\n- inject commit trailer instruction via codex_git_commit feature\n- treat command_attribution override as verbatim trailer value\n- keep blank override as opt-out and default to Codex noreply trailer
- revert nonessential changes in shell_snapshot and unified exec process_manager
- add ignored live model-loop test that verifies commit trailer injection via codex_git_commit + command_attribution config
- restore live_cli test file to origin/main state
- reduce command_attribution API surface to one exported instruction helper
@gabec-openai gabec-openai changed the title Use hook-based co-author attribution with config override Use prompt-based co-author attribution with config override Feb 13, 2026
Sync config.schema.json with generated output for command_attribution description so config_schema_matches_fixture passes.
/// - `None`: use default attribution (`Codex <noreply@openai.com>`)
/// - `Some("")` or whitespace-only: disable command attribution
/// - `Some("...")`: use the provided attribution text verbatim
pub command_attribution: Option<String>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

command attribution feels strange. Commit attribution? Change attribution?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh this was a holdover from when it injected across more than just commits, will fix before merging

@gabec-openai gabec-openai enabled auto-merge (squash) February 17, 2026 16:59
@gabec-openai
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Feb 17, 2026
@gabec-openai gabec-openai merged commit 5341ad0 into main Feb 17, 2026
33 of 34 checks passed
@gabec-openai gabec-openai deleted the codex/hook-based-coauthor-attribution branch February 17, 2026 20:15
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants