Skip to content

t5494: remove legacy key mappings for contribution_watch and draft_responses#5502

Closed
marcusquinn wants to merge 2 commits intomainfrom
quality-debt/5494-config-helper
Closed

t5494: remove legacy key mappings for contribution_watch and draft_responses#5502
marcusquinn wants to merge 2 commits intomainfrom
quality-debt/5494-config-helper

Conversation

@marcusquinn
Copy link
Owner

Summary

  • Remove contribution_watch and draft_responses from _legacy_key_to_dotpath in config-helper.sh — these were new features introduced with namespaced keys in PR t1554: Auto-install contribution-watch launchd service on setup/update #5466, not old flat keys needing backward-compat mapping
  • Update setup.sh to call is_feature_enabled with the full dotpath (orchestration.contribution_watch, orchestration.draft_responses) directly, eliminating the need for the legacy mapping

Findings addressed

Medium-severity finding from Gemini code review on PR #5466:

  • config-helper.sh:384contribution_watch added to _legacy_key_to_dotpath for a new feature; legacy mappings are for backward compatibility with old flat keys, not new namespaced features. Same pattern applied to draft_responses at line 385.

Verification

  • ShellCheck: 0 violations on config-helper.sh and setup.sh
  • is_feature_enabled orchestration.contribution_watch resolves correctly via the dotpath lookup path (no legacy mapping needed)

Closes #5494

…onses

Both keys were added to _legacy_key_to_dotpath in PR #5466 for new features
that were introduced with namespaced keys from the start. Legacy mappings are
for backward compatibility with old flat keys — not for new features.

- Remove contribution_watch → orchestration.contribution_watch mapping
- Remove draft_responses → orchestration.draft_responses mapping
- Update setup.sh to call is_feature_enabled with namespaced dotpaths directly

Addresses Gemini medium-severity finding at config-helper.sh:384 (GH#5494).
Closes #5494
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 22, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 26 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0a14b537-0bfd-445b-832c-2fbd216a9f34

📥 Commits

Reviewing files that changed from the base of the PR and between 4a86c5f and 6b58c36.

📒 Files selected for processing (2)
  • .agents/scripts/config-helper.sh
  • setup.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch quality-debt/5494-config-helper

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the configuration key management system by correcting how new feature flags are handled. It removes unnecessary legacy mappings for contribution_watch and draft_responses and updates their usage to directly reference their full dotpaths. This change resolves a medium-severity code review finding, ensuring that the configuration system correctly distinguishes between legacy flat keys and modern namespaced keys, improving the accuracy and maintainability of feature flag checks.

Highlights

  • Configuration Key Management: Removed contribution_watch and draft_responses from _legacy_key_to_dotpath in config-helper.sh, as these were new features and not old flat keys requiring backward compatibility mapping.
  • Feature Flag Usage: Updated setup.sh to directly use the full dotpaths (orchestration.contribution_watch, orchestration.draft_responses) when calling is_feature_enabled, eliminating the need for incorrect legacy mappings.
  • Code Review Finding Resolution: Addressed a medium-severity finding from a Gemini code review regarding the incorrect inclusion of new feature keys in the legacy mapping function.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Contributor

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 479 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sun Mar 22 18:30:04 UTC 2026: Code review monitoring started
Sun Mar 22 18:30:04 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 479

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 479
  • VULNERABILITIES: 0

Generated on: Sun Mar 22 18:30:07 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly removes legacy key mappings for the contribution_watch and draft_responses features from config-helper.sh. Since these are new features introduced with namespaced keys, the backward-compatibility layer was unnecessary. The changes in setup.sh appropriately update the calls to is_feature_enabled to use the full dot-path keys directly. This refactoring improves code clarity and maintainability by removing the unneeded indirection.

@marcusquinn
Copy link
Owner Author

Closing as duplicate of PR #5505 (alex-solovyev's implementation, already approved). PR #5505 addresses the same issue #5494 and has a formal approval. Will rebase #5505 to resolve the conflict.

@github-actions
Copy link
Contributor

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 510 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Mar 24 09:07:19 UTC 2026: Code review monitoring started
Tue Mar 24 09:07:20 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 510

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 510
  • VULNERABILITIES: 0

Generated on: Tue Mar 24 09:07:22 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@alex-solovyev
Copy link
Collaborator

Closing: merge conflicts with main after reopening. The changes need to be rebased or re-implemented in a fresh branch.

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.

quality-debt: .agents/scripts/config-helper.sh — PR #5466 review feedback (medium)

2 participants