justinmclean commented on code in PR #213:
URL: https://github.com/apache/airflow-steward/pull/213#discussion_r3295937052
##########
tools/skill-validator/tests/test_validator.py:
##########
@@ -208,6 +210,44 @@ def test_argument_hint_accepted(self, tmp_path: Path) ->
None:
violations = list(validate_frontmatter(path, text))
assert violations == []
+ def test_argument_hint_pipe_notation_with_spaces_in_option(self, tmp_path:
Path) -> None:
+ # setup-steward uses "[adopt|upgrade|worktree-init|verify|override
skill-name|unadopt]".
+ # The "override skill-name" option contains a space — the hint must
still be accepted
+ # and must not be misinterpreted as multiple frontmatter keys.
+ path = tmp_path / "SKILL.md"
+ text = (
+ "---\n"
+ "name: setup-steward\n"
+ "description: bar\n"
+ "license: Apache-2.0\n"
+ "argument-hint: [adopt|upgrade|worktree-init|verify|override
skill-name|unadopt]\n"
+ "---\n"
+ )
+ violations = list(validate_frontmatter(path, text))
+ assert violations == []
+
+ def test_argument_hint_does_not_inflate_metadata_budget(self, tmp_path:
Path) -> None:
+ # A large argument-hint value must not push the description+when_to_use
+ # total over MAX_METADATA_CHARS. The hint is autocomplete-only and
must
+ # be excluded from the budget calculation.
+ path = tmp_path / "SKILL.md"
+ # Fill description+when_to_use to just under the limit.
+ desc = "a" * 700
+ wtu = "b" * 700
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]