fix(charts): add query_context validation to prevent incomplete metadata#36076
fix(charts): add query_context validation to prevent incomplete metadata#36076ysinghc wants to merge 10 commits into
Conversation
Code Review Agent Run #50c92eActionable Suggestions - 0Additional Suggestions - 10
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Duplicate JSON validation logic ▹ view | ||
| Imperative field validation ▹ view | ||
| Falsy JSON strings incorrectly bypass validation ▹ view | ||
| Inefficient field validation with list collection ▹ view |
Files scanned
| File Path | Reviewed |
|---|---|
| superset/utils/schema.py | ✅ |
| superset/charts/schemas.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #36076 +/- ##
==========================================
- Coverage 64.70% 64.12% -0.58%
==========================================
Files 2686 2686
Lines 148626 148606 -20
Branches 34298 34290 -8
==========================================
- Hits 96164 95297 -867
- Misses 50697 51544 +847
Partials 1765 1765
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds validation to the query_context field in chart schemas to ensure it contains required metadata (datasource and queries) when provided, preventing runtime errors from incomplete query context data.
- Created a new
validate_query_context_metadata()function that validates both JSON structure and required fields - Updated
ChartPostSchemato use the new validator (replacing genericvalidate_json) - Updated
ChartPutSchemato add the new validator (previously had no validation) - Added comprehensive unit and integration tests
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| superset/utils/schema.py | Adds validate_query_context_metadata() function to validate query_context JSON structure and required fields |
| superset/charts/schemas.py | Updates ChartPostSchema and ChartPutSchema to use the new validator for query_context field |
| tests/unit_tests/utils/test_schema.py | Adds comprehensive unit tests for the new validator covering valid/invalid cases, edge cases, and error messages |
| tests/unit_tests/charts/test_schemas.py | Adds integration tests verifying schema-level validation for both POST and PUT operations |
There was a problem hiding this comment.
I've completed my review and didn't find any issues.
Files scanned
| File Path | Reviewed |
|---|---|
| superset/utils/schema.py | ✅ |
| superset/charts/schemas.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
|
Running CI, but I think i defer to @betodealmeida here :D |
|
CodeAnt AI is reviewing your PR. |
|
CodeAnt AI finished reviewing your PR. |
💡 Enhance Your PR ReviewsWe noticed that 3 feature(s) are not configured for this repository. Enabling these features can help improve your code quality and workflow: 🚦 Quality GatesStatus: Quality Gates are not enabled at the organization level 🎫 Jira Ticket ComplianceStatus: Jira credentials file not found. Please configure Jira integration in your settings ⚙️ Custom RulesStatus: No custom rules configured. Add rules via organization settings or .codeant/review.json in your repository Want to enable these features? Contact your organization admin or check our documentation for setup instructions. |
|
CodeAnt AI is running Incremental review |
|
@betodealmeida @villebro @michael-s-molina Request for review |
Code Review Agent Run #ee8dfeActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
Thanks for sticking with this @ysinghc! The gap is real... What I'm chewing on: this rejects the bad @betodealmeida do you think save-time validation is the right layer here, or should we be fixing the generation side? You've got way more context on this corner than I do. |
|
@ysinghc this needs as mentioned. I''ll see if I can tackle that part now to help keep the ball moving forward. |
…chema and ChartPutSchema
…ying missing fields check
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…schema to chartputschema
774df59 to
54f3f27
Compare
| required_fields = {"datasource", "queries"} | ||
| missing_fields: set[str] = required_fields - parsed_data.keys() | ||
| if missing_fields: | ||
| fields_str = ", ".join(sorted(missing_fields)) | ||
| raise ValidationError(f"Query context is missing required fields: {fields_str}") |
There was a problem hiding this comment.
Suggestion: The validation only checks that datasource and queries keys exist, but does not validate their value types/content, so payloads like {"datasource": null, "queries": null} pass and fail later when query context is built/executed. Add structural checks (e.g., datasource must be an object and queries must be a list, ideally non-empty) to enforce the contract at schema-validation time. [incomplete implementation]
Severity Level: Major ⚠️
- ❌ Saved charts can store unusable query_context payloads.
- ❌ Chart data API `/api/v1/chart/<id>/data` returns 400 on use.
- ⚠️ MCP `get_chart_data` tooling may silently fall back or fail.Steps of Reproduction ✅
1. The `validate_query_context_metadata` function at `superset/utils/schema.py:89-118`
only verifies that the parsed JSON object is a dict and that its key set includes
`"datasource"` and `"queries"` via `required_fields = {"datasource", "queries"}` and
`missing_fields = required_fields - parsed_data.keys()`, without validating value types or
contents, as shown in lines 114-118.
2. This validator is applied to `query_context` in both `ChartPostSchema` and
`ChartPutSchema` at `superset/charts/schemas.py:32-36` and `95-99`, so a payload like
`{"datasource": null, "queries": null}` serialized as a JSON string will pass schema
validation and be persisted into `Slice.query_context` (see
`superset/models/slice.py:69-84` where `query_context = Column(utils.MediumText())`).
3. When chart data is later requested via `GET /api/v1/chart/<id>/data` in
`superset/charts/data/api.py:150-31`, the code does `json_body =
json.loads(chart.query_context)` and then calls `query_context =
self._create_query_context_from_form(json_body)` at line 217, where
`_create_query_context_from_form` delegates to
`ChartDataQueryContextSchema().load(form_data)` (see the analogous implementation in
`superset/tasks/async_queries.py:1-12`). That schema expects a structured `datasource`
object and a list of query dicts; with `datasource=None` and `queries=None`, it will raise
a `ValidationError`.
4. The `ValidationError` from `ChartDataQueryContextSchema` is caught in
`superset/charts/data/api.py:224-41` and converted into a 400 response, and similar
parsing/validation occurs in MCP chart tooling
(`superset/mcp_service/chart/tool/get_chart_data.py:450-485` and
`superset/mcp_service/chart/tool/get_chart_sql.py:170-209`), meaning charts saved with
such minimally valid-but-structurally-wrong `query_context` pass the current metadata
validator but subsequently fail whenever their data or SQL is requested, leaving persisted
but unusable chart configurations.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** superset/utils/schema.py
**Line:** 114:118
**Comment:**
*Incomplete Implementation: The validation only checks that `datasource` and `queries` keys exist, but does not validate their value types/content, so payloads like `{"datasource": null, "queries": null}` pass and fail later when query context is built/executed. Add structural checks (e.g., `datasource` must be an object and `queries` must be a list, ideally non-empty) to enforce the contract at schema-validation time.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
Code Review Agent Run #8c0fa2Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
| if value is None or value == "": | ||
| return # Allow None values and empty strings |
There was a problem hiding this comment.
Suggestion: Treating an empty string as valid query_context bypasses the new metadata checks and still allows persisting blank payloads; those charts later fail data retrieval paths that expect saved query context JSON. Only None should bypass validation, while empty strings should be rejected as invalid input. [incomplete implementation]
Severity Level: Major ⚠️
❌ /api/v1/chart/<id>/data fails for blank query_context.
⚠️ MCP get_chart_data treats chart as missing query_context.Steps of Reproduction ✅
1. Create a chart via the Charts REST API endpoint `POST /api/v1/chart/`, implemented by
`ChartRestApi` in `superset/charts/api.py` where `add_model_schema = ChartPostSchema()` is
defined at lines 36-37, using a request body that includes `"query_context": ""` (empty
string).
2. During request validation, `ChartPostSchema` in `superset/charts/schemas.py` (lines
52-56) maps the `query_context` field to `utils.validate_query_context_metadata`, which
executes `validate_query_context_metadata` in `superset/utils/schema.py` (definition at
lines 89-98).
3. Inside `validate_query_context_metadata`, the check at
`superset/utils/schema.py:99-100` (`if value is None or value == "": return`) treats the
empty string as valid, so no `ValidationError` is raised and the chart is persisted with
`Slice.query_context` (column defined at `superset/models/slice.py:84`) set to `""`
instead of `NULL`.
4. Later, when fetching chart data via `GET /api/v1/chart/<pk>/data` in
`superset/charts/data/api.py`, the handler at `superset/charts/data/api.py:160-167`
executes `json_body = json.loads(chart.query_context)` (line 162); for a blank string this
raises `json.JSONDecodeError`, is caught, sets `json_body = None`, and then returns HTTP
400 with message `"Chart has no query context saved. Please save the chart again."`,
meaning a chart that passed validation cannot be used until its query_context is fixed.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** superset/utils/schema.py
**Line:** 99:100
**Comment:**
*Incomplete Implementation: Treating an empty string as valid `query_context` bypasses the new metadata checks and still allows persisting blank payloads; those charts later fail data retrieval paths that expect saved query context JSON. Only `None` should bypass validation, while empty strings should be rejected as invalid input.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix| validate_json(value) | ||
|
|
||
| # Parse and validate the structure | ||
| parsed_data = json.loads(value) |
There was a problem hiding this comment.
Suggestion: Add an explicit type annotation for this parsed JSON variable so the new validation logic keeps full type-hint coverage. [custom_rule]
Severity Level: Minor
Why it matters? 🤔
This is newly added Python code and the local variable can be annotated. It currently lacks an explicit type hint, so it matches the rule requiring type hints on relevant variables.
(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** superset/utils/schema.py
**Line:** 106:106
**Comment:**
*Custom Rule: Add an explicit type annotation for this parsed JSON variable so the new validation logic keeps full type-hint coverage.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix| raise ValidationError(error_msg) | ||
|
|
||
| # When query_context is provided (not None), validate it has required fields | ||
| required_fields = {"datasource", "queries"} |
There was a problem hiding this comment.
Suggestion: Add a concrete collection type annotation for this required-fields variable to satisfy the type-hint requirement on newly introduced relevant variables. [custom_rule]
Severity Level: Minor
Why it matters? 🤔
This newly introduced variable is a concrete collection that can be annotated, but no type hint is provided. That is a real violation of the type-hint rule for relevant variables.
(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** superset/utils/schema.py
**Line:** 114:114
**Comment:**
*Custom Rule: Add a concrete collection type annotation for this required-fields variable to satisfy the type-hint requirement on newly introduced relevant variables.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix|
|
||
| def test_validate_json_valid() -> None: | ||
| """Test validate_json with valid JSON string.""" | ||
| valid_json = '{"key": "value", "number": 123}' |
There was a problem hiding this comment.
Suggestion: Add an explicit type annotation for this local test input variable to comply with the type-hint requirement. [custom_rule]
Severity Level: Minor
Why it matters? 🤔
This is new Python code in a test file and the local variable is untyped even though it can be annotated; this matches the type-hint requirement for relevant variables.
(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** tests/unit_tests/utils/test_schema.py
**Line:** 33:33
**Comment:**
*Custom Rule: Add an explicit type annotation for this local test input variable to comply with the type-hint requirement.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix|
|
||
| def test_validate_json_valid_bytes() -> None: | ||
| """Test validate_json with valid JSON bytes.""" | ||
| valid_json = b'{"key": "value", "number": 123}' |
There was a problem hiding this comment.
Suggestion: Add an explicit bytes type annotation for this variable instead of leaving it untyped. [custom_rule]
Severity Level: Minor
Why it matters? 🤔
This added local variable is a bytes value and is left without a type annotation, which violates the rule requiring type hints for annotatable Python variables.
(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** tests/unit_tests/utils/test_schema.py
**Line:** 40:40
**Comment:**
*Custom Rule: Add an explicit bytes type annotation for this variable instead of leaving it untyped.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix|
|
||
| def test_validate_json_not_json() -> None: | ||
| """Test validate_json with non-JSON string.""" | ||
| not_json = "this is not json" |
There was a problem hiding this comment.
Suggestion: Add a concrete type annotation for this string variable to satisfy the rule requiring typed relevant variables. [custom_rule]
Severity Level: Minor
Why it matters? 🤔
The variable is a newly added local string in Python code and could be annotated; leaving it untyped matches the type-hint rule violation.
(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** tests/unit_tests/utils/test_schema.py
**Line:** 68:68
**Comment:**
*Custom Rule: Add a concrete type annotation for this string variable to satisfy the rule requiring typed relevant variables.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix|
|
||
| def test_validate_query_context_metadata_missing_queries() -> None: | ||
| """Test validate_query_context_metadata with missing queries field.""" | ||
| missing_queries = json.dumps({"datasource": {"type": "table", "id": 1}}) |
There was a problem hiding this comment.
Suggestion: Add an explicit type annotation for this serialized query-context variable. [custom_rule]
Severity Level: Minor
Why it matters? 🤔
This local serialized JSON variable is untyped even though it can be annotated, so it falls under the rule requiring type hints for relevant variables.
(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** tests/unit_tests/utils/test_schema.py
**Line:** 134:134
**Comment:**
*Custom Rule: Add an explicit type annotation for this serialized query-context variable.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix|
|
||
| def test_validate_query_context_metadata_number_value() -> None: | ||
| """Test validate_query_context_metadata with number instead of JSON object.""" | ||
| number_value = json.dumps(12345) |
There was a problem hiding this comment.
Suggestion: Add an explicit type annotation for this variable holding serialized numeric JSON data. [custom_rule]
Severity Level: Minor
Why it matters? 🤔
This is another newly added untyped local variable in Python test code, and it can be annotated directly, so the type-hint rule applies.
(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** tests/unit_tests/utils/test_schema.py
**Line:** 226:226
**Comment:**
*Custom Rule: Add an explicit type annotation for this variable holding serialized numeric JSON data.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix| if not isinstance(parsed_data, dict): | ||
| error_msg = "Query context must be a valid JSON object" | ||
| raise ValidationError(error_msg) | ||
|
|
||
| # When query_context is provided (not None), validate it has required fields | ||
| required_fields = {"datasource", "queries"} | ||
| missing_fields: set[str] = required_fields - parsed_data.keys() | ||
| if missing_fields: | ||
| fields_str = ", ".join(sorted(missing_fields)) | ||
| raise ValidationError(f"Query context is missing required fields: {fields_str}") |
There was a problem hiding this comment.
Suggestion: The new validator only checks that datasource and queries keys exist, but it does not validate their types/shape. This allows invalid payloads such as {"datasource": null, "queries": null} or {"datasource": {}, "queries": "bad"} to pass schema validation and later crash when chart code builds a query context (for example in Slice.get_query_context() / QueryContextFactory.create()). Add structural checks that datasource is a dict with required datasource attributes and queries is a list of query objects (and reject null/invalid types). [incomplete implementation]
Severity Level: Major ⚠️
- ❌ Chart cache warm-up fails for malformed query_context metadata.
- ❌ Annotation layers using chart query_context crash during execution.
- ⚠️ Dataset column discovery breaks when query_context.queries is invalid.Steps of Reproduction ✅
1. Create or update a chart via Chart REST API (`ChartRestApi` in
`superset/charts/api.py:31-59`) using `POST /api/v1/chart/` or `PUT /api/v1/chart/<id>`,
including a `query_context` payload like `{"datasource": null, "queries": null}`
(syntactically valid JSON with required keys but null values).
2. The incoming payload is validated by `ChartPostSchema` or `ChartPutSchema` in
`superset/charts/schemas.py:225-285`, where the `query_context` field at lines 251-255 and
85-89 uses `validate=utils.validate_query_context_metadata`, which only checks that
`"datasource"` and `"queries"` keys exist and explicitly allows null values as shown by
tests `test_validate_query_context_metadata_null_datasource` and
`test_validate_query_context_metadata_null_queries` in
`superset/tests/unit_tests/utils/test_schema.py:179-199`.
3. Because `validate_query_context_metadata` in `superset/utils/schema.py:50-79` only
enforces key presence (lines 69-77 in the file, corresponding to PR lines 109-118) and
does not validate that `datasource` is a dict or `queries` is an iterable of dicts, the
malformed `query_context` string is accepted, and `CreateChartCommand` /
`UpdateChartCommand` in `superset/commands/chart/create.py:45-62` and
`superset/commands/chart/update.py:55-75` persist it into `Slice.query_context`
(SQLAlchemy column defined in `superset/models/slice.py:85-93`).
4. Later, when Superset executes features that rely on the saved `query_context`, such as
cache warm-up (`_warm_up_non_legacy_cache` in
`superset/commands/chart/warm_up_cache.py:11-27`), annotation query processing
(`superset/common/query_context_processor.py:14-37`), or column discovery in
`superset/connectors/sqla/models.py:15-36`, they all call `chart.get_query_context()` in
`superset/models/slice.py:19-28`, which does `json.loads(self.query_context)` and then
`self.get_query_context_factory().create(**{...})`. Inside `QueryContextFactory.create` in
`superset/common/query_context_factory.py:45-89`, the comprehension `for query_obj in
queries` at lines 77-88 attempts to iterate `queries=None` and raises a `TypeError:
'NoneType' object is not iterable`, causing these operations to fail at runtime for any
chart whose `query_context` has the malformed structure that current validation permits.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** superset/utils/schema.py
**Line:** 109:118
**Comment:**
*Incomplete Implementation: The new validator only checks that `datasource` and `queries` keys exist, but it does not validate their types/shape. This allows invalid payloads such as `{"datasource": null, "queries": null}` or `{"datasource": {}, "queries": "bad"}` to pass schema validation and later crash when chart code builds a query context (for example in `Slice.get_query_context()` / `QueryContextFactory.create()`). Add structural checks that `datasource` is a dict with required datasource attributes and `queries` is a list of query objects (and reject null/invalid types).
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
User description
SUMMARY
This PR adds comprehensive validation for the
query_contextfield in bothChartPostSchemaandChartPutSchemato ensure that when provided, it contains the required metadata fields (datasourceandqueries) needed for chart data retrieval.Changes:
validate_query_context_metadata()function insuperset/utils/schema.pythat validates the structure of query_context JSONChartPostSchemato use the new validator (previously used genericvalidate_json)ChartPutSchemato add the new validator (previously had no validation)tests/unit_tests/utils/test_schema.pytests/unit_tests/charts/test_schemas.pyto verify schema-level validationRationale:
Previously, the
query_contextfield only validated that the value was valid JSON, but didn't ensure it contained the necessary structure for chart operations. This could lead to runtime errors when charts are rendered with incomplete query context data. The new validation ensures data integrity at the API level.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A - Backend validation change with no UI impact
TESTING INSTRUCTIONS
Run the unit tests:
Manual API testing (optional):
/api/v1/chart/) with invalid query_context (missingdatasourceorqueries)nullquery_context - should succeed (field is nullable)Verify pre-commit hooks pass:
git add . pre-commit runADDITIONAL INFORMATION
CodeAnt-AI Description
Reject incomplete chart query context data
What Changed
query_contextvalues that are not valid JSON objects with bothdatasourceandqueriesquery_contextvalues are still allowedImpact
✅ Fewer chart save failures✅ Clearer chart validation errors✅ Fewer runtime errors from incomplete chart data💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.