Skip to content

feat(config): surface attribution settings in ox config#456

Merged
rsnodgrass merged 1 commit intomainfrom
ryan/attribution-config
Apr 7, 2026
Merged

feat(config): surface attribution settings in ox config#456
rsnodgrass merged 1 commit intomainfrom
ryan/attribution-config

Conversation

@rsnodgrass
Copy link
Copy Markdown
Contributor

@rsnodgrass rsnodgrass commented Apr 7, 2026

Summary

  • Adds attribution.commit and attribution.pr to ox config so users can customize or disable AI coworker attribution via the CLI instead of editing YAML/JSON config files directly
  • Fixes case-sensitivity bug in ox config set that would lowercase free-text values like Co-Authored-By
  • Updates test to allow free-text settings with empty ValidValues

attribution.plan and attribution.session are intentionally not exposed — they are always-on transparency requirements, not user preferences (noted with inline code comments).

Test plan

  • make lint — 0 issues
  • make test — 12,309 tests pass
  • Manual: ox config list shows attribution settings
  • Manual: ox config get attribution.commit shows override chain
  • Manual: ox config set attribution.commit "" disables, ox config unset restores default

Co-Authored-By: SageOx

Summary by CodeRabbit

  • New Features

    • Added attribution.commit and attribution.pr configuration settings to customize git commit trailers and PR attribution text. Both can be customized at user and repository levels, with defaults provided and disabling via empty string supported.
  • Improvements

    • Enhanced configuration value handling to properly preserve case sensitivity for attribution settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 44b9db77-4791-4a73-9076-47ec3c01b19e

📥 Commits

Reviewing files that changed from the base of the PR and between 00df611 and 8d93cae.

📒 Files selected for processing (4)
  • cmd/ox/config.go
  • cmd/ox/config_get.go
  • cmd/ox/config_settings.go
  • cmd/ox/config_settings_coverage_test.go

📝 Walkthrough

Walkthrough

The pull request extends the ox configuration system to support two new attribution settings: attribution.commit and attribution.pr. Changes include new configuration key registrations, updated case-handling logic for free-text attribution strings, persistence layer updates, and test adjustments to accommodate settings without enumerated values.

Changes

Cohort / File(s) Summary
Documentation Update
cmd/ox/config.go
Added attribution.commit and attribution.pr to the "Available settings" help text list.
Case-Sensitivity Logic
cmd/ox/config_get.go
Modified runConfigSet to preserve case for attribution.* keys (in addition to existing timezone exemption) instead of lowercasing all other keys.
Configuration Settings & Persistence
cmd/ox/config_settings.go
Registered attribution.commit and attribution.pr in AllSettings with defaults. Extended ResolveConfigValue to handle attribution settings. Updated setUserConfig, setRepoConfig, unsetUserConfig, and unsetRepoConfig to persist and clear attribution fields, with support for disabling via empty string or "(disabled)" sentinel.
Test Coverage
cmd/ox/config_settings_coverage_test.go
Modified TestGetSetting_ValidValuesNotEmpty to conditionally skip validation checks for free-text settings that have empty ValidValues slices.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

Poem

🐰 Two new paths for attribution's grace,
Case-sensitive strings in their place,
Commits and PRs now get their say,
With settings to disable or display!
hop hop

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ryan/attribution-config

Comment @coderabbitai help to get the list of available commands and usage tips.

@rsnodgrass rsnodgrass marked this pull request as ready for review April 7, 2026 22:44
@rsnodgrass rsnodgrass merged commit 6b832f5 into main Apr 7, 2026
1 of 3 checks passed
@rsnodgrass rsnodgrass deleted the ryan/attribution-config branch April 7, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant