Skip to content

feat(model): enable key features by default#245

Merged
AnnatarHe merged 1 commit intomainfrom
feat/enable-default-features
Mar 1, 2026
Merged

feat(model): enable key features by default#245
AnnatarHe merged 1 commit intomainfrom
feat/enable-default-features

Conversation

@AnnatarHe
Copy link
Contributor

@AnnatarHe AnnatarHe commented Mar 1, 2026

Summary

  • Enable data masking and encryption by default for better security out of the box
  • Enable CCUsage, AICodeOtel, and code tracking by default so new users get the full feature set
  • AICodeOtel defaults to gRPC port 54027 with debug disabled

Test plan

  • Verify new defaults are applied correctly for fresh installs
  • Verify existing users with config.local.toml overrides are not affected
  • Run go test ./model/... to ensure no regressions

🤖 Generated with Claude Code


Open with Devin

Enable data masking, encryption, CCUsage, AICodeOtel, and code tracking
by default so new users get the full feature set out of the box.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@gemini-code-assist
Copy link
Contributor

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 streamlines the initial setup experience by activating several key features by default within the ShellTimeConfig. These changes aim to bolster security through default data masking and encryption, and provide a richer feature set for new users by enabling usage tracking, AI code telemetry, and code tracking without requiring manual configuration.

Highlights

  • Security Enhancements: Data masking and encryption are now enabled by default, enhancing out-of-the-box security.
  • Feature Activation: CCUsage, AICodeOtel, and code tracking features are now enabled by default to provide new users with a comprehensive feature set.
  • AICodeOtel Configuration: AICodeOtel now defaults to gRPC port 54027 with debugging disabled.
Changelog
  • model/types.go
    • Set DataMasking to new(true).
    • Set Encrypted to new(true).
    • Initialized CCUsage with Enabled: new(true).
    • Initialized AICodeOtel with Enabled: new(true), GRPCPort: 54027, and Debug: new(false).
    • Initialized CodeTracking with Enabled: new(true).
Activity
  • No human activity has been recorded on this pull request yet.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 37.49% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@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 enables several key features by default for new installations by updating DefaultConfig. The changes align with the goal of providing a better out-of-the-box experience.

My review includes two main points:

  • Inconsistent default handling: There's an inconsistency in how default settings are applied. While DataMasking has a fallback for existing users, the other newly-enabled features do not. I've recommended aligning the approach for all features to ensure consistency and to provide these new defaults to all users who haven't explicitly configured them.
  • Magic number: A hardcoded port number should be replaced with a constant to improve maintainability.

Overall, the changes are positive, and addressing these points would further improve the codebase's robustness and consistency.

Comment on lines +118 to +135
DataMasking: new(true),
Endpoints: nil,
EnableMetrics: nil,
Encrypted: nil,
Encrypted: new(true),
AI: DefaultAIConfig,
Exclude: []string{},
CCUsage: nil,
CCOtel: nil, // deprecated
AICodeOtel: nil,
CodeTracking: nil,
LogCleanup: nil,
CCUsage: new(CCUsage{
Enabled: new(true),
}),
CCOtel: nil,
AICodeOtel: new(AICodeOtel{
Enabled: new(true),
GRPCPort: 54027,
Debug: new(false),
}),
CodeTracking: new(CodeTracking{
Enabled: new(true),
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

high

These changes enable several features by default in DefaultConfig, which is great for new installations. However, the way defaults are applied seems inconsistent.

In model/config.go, DataMasking is already defaulted to true if it's nil when reading a config. This ensures the feature is on for existing users who haven't configured it.

The other features enabled in this PR (Encrypted, CCUsage, AICodeOtel, CodeTracking) don't have this fallback logic in ReadConfigFile. This means they will be enabled for new users, but will remain disabled (nil) for existing users who don't have these settings in their config files.

For consistency and to provide the benefits of these features (especially security-related ones like Encrypted) to all users, consider adding similar fallback logic for these new default-enabled features in model/config.go's ReadConfigFile function, similar to how DataMasking is handled.

CCOtel: nil,
AICodeOtel: new(AICodeOtel{
Enabled: new(true),
GRPCPort: 54027,
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The gRPC port 54027 is hardcoded here and also in model/config.go:275. To avoid magic numbers and ensure consistency, it's better to define this as a constant, for example const DefaultAICodeOtelGRPCPort = 54027 at the package level, and use it in both places.

Suggested change
GRPCPort: 54027,
GRPCPort: DefaultAICodeOtelGRPCPort,

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@AnnatarHe AnnatarHe merged commit 9970fc0 into main Mar 1, 2026
7 checks passed
@AnnatarHe AnnatarHe deleted the feat/enable-default-features branch March 1, 2026 03:15
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