Skip to content

Conversation

@anujhydrabadi
Copy link
Contributor

@anujhydrabadi anujhydrabadi commented Aug 18, 2025

Summary by CodeRabbit

  • New Features
    • Added an optional configuration field, name_length_limit, to control maximum allowed name length. Accepts an integer value of 1 or greater. If not provided, no length limit is enforced.

@coderabbitai
Copy link

coderabbitai bot commented Aug 18, 2025

Walkthrough

Adds an optional integer property name_length_limit (minimum 1) to yaml_schema.properties in ftf_cli/schema.py; not added to the required list.

Changes

Cohort / File(s) Summary
Schema update
ftf_cli/schema.py
Added optional property name_length_limit to yaml_schema["properties"] with type integer and minimum 1; no change to required.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nudge the schema, hop by hop,
A limit on names—plop, plop, plop!
Not required, just a guide,
Keep those titles neat in stride.
Ears up high, I stamp approval: ✅
Bounds in place, no name removal! 🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch name-length-limit

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
ftf_cli/schema.py (1)

107-110: Clarify intent with a description field (nit).

Adding a short description will help downstream tooling and future maintainers understand how this knob is consumed.

Apply this diff:

         "name_length_limit": {
             "type": "integer",
             "minimum": 1,
+            "description": "Maximum allowed length for names; consumed by the CLI for validation (optional).",
         }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8e066e9 and f9f5750.

📒 Files selected for processing (1)
  • ftf_cli/schema.py (1 hunks)
🔇 Additional comments (1)
ftf_cli/schema.py (1)

107-110: LGTM: Schema addition is valid and optional as intended.

The new top-level property is correctly typed as an integer with a lower bound, and not added to required — matches the PR objective.

Comment on lines +107 to +110
"name_length_limit": {
"type": "integer",
"minimum": 1,
}
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Confirm enforcement path; schema alone won’t constrain other names.

As added, this is metadata that validators will accept, but it won’t automatically enforce name lengths elsewhere in the schema (JSON Schema can’t dynamically reference this value for other fields without extensions). Please verify that the CLI/runtime reads this property and applies the limit where intended (e.g., for inputs/outputs/spec keys).

[offer_assistance]
Run this script to locate usages and tests:

If there’s no consumer yet, I can help add a small validator hook and tests—want me to draft that?


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Searching code for name_length_limit usage..."
rg -n -C3 '\bname_length_limit\b' || echo "No code references found."

echo
echo "Searching for name length validation logic that might need to read this property..."
rg -n -C3 -i '\b(name.*length|length.*name|length_limit|max[_-]?length)\b' || echo "No obvious validators found."

echo
echo "Looking for tests touching name_length_limit..."
rg -n -C2 -i 'name_length_limit' -g '!*node_modules/*' -g '!*dist/*' || echo "No tests found referencing name_length_limit."

Length of output: 1236


Implement enforcement for name_length_limit
The name_length_limit setting is declared in ftf_cli/schema.py but there’s no runtime logic or tests consuming it. To ensure name-length constraints actually take effect, you should:

  • Add a validator in your CLI/runtime (e.g. in ftf_cli/validate.py) that reads schema["name_length_limit"] and enforces it on all relevant names (inputs, outputs, spec keys).
  • Write unit tests (e.g. tests/test_schema_validators.py) to verify names below, at, and above the limit are accepted or rejected as expected.

Let me know if you’d like me to draft the validator hook and accompanying tests.

@anujhydrabadi anujhydrabadi merged commit 57607c2 into main Aug 18, 2025
6 checks passed
@anujhydrabadi anujhydrabadi deleted the name-length-limit branch August 18, 2025 05:58
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.

2 participants