Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ftf_cli/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
},
"additionalProperties": True
},
"name_length_limit": {
"type": "integer",
"minimum": 1,
}
Comment on lines +107 to +110
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.

},
"required": ["intent", "flavor", "version", "description", "spec", "clouds"],
}
Expand Down