Skip to content

Commit ff7d414

Browse files
rudiheydraclaude
andcommitted
fix: Align validator type naming from forbidden_output to forbidden_patterns (Feature AutoForgeAI#141)
Replace all remaining 'forbidden_output' references with 'forbidden_patterns' to match the validator registry in validators.py and the VALIDATOR_TYPES constant. - api/dspy_signatures.py: Updated DSPy signature field descriptions - api/static_spec_adapter.py: Updated create_validator() call - tests/verify_feature_8.py: Updated test validator type list Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 462c957 commit ff7d414

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

api/dspy_signatures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class SpecGenerationSignature(dspy.Signature):
9090
validators_json: JSON string containing acceptance validators.
9191
Array of validator objects, each with:
9292
{
93-
"type": "test_pass|file_exists|lint_clean|forbidden_output|custom",
93+
"type": "test_pass|file_exists|lint_clean|forbidden_patterns|custom",
9494
"config": {...},
9595
"weight": 1.0,
9696
"required": false
@@ -205,7 +205,7 @@ class SpecGenerationSignature(dspy.Signature):
205205
validators_json: str = dspy.OutputField(
206206
desc=(
207207
"JSON array of acceptance validators. Each validator: "
208-
"{\"type\": \"test_pass|file_exists|lint_clean|forbidden_output|custom\", "
208+
"{\"type\": \"test_pass|file_exists|lint_clean|forbidden_patterns|custom\", "
209209
"\"config\": {...}, \"weight\": 1.0, \"required\": false}. "
210210
"Include at least one validator. test_pass is common for coding tasks."
211211
)

api/static_spec_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def _create_coding_acceptance_spec(
589589
),
590590
# No console errors during verification
591591
create_validator(
592-
validator_type="forbidden_output",
592+
validator_type="forbidden_patterns",
593593
config={
594594
"patterns": [
595595
r"ERROR",

tests/verify_feature_8.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def verify_step_1_validator_config():
9292
print(" [PASS] Rejects invalid validator type")
9393

9494
# Test all valid validator types
95-
for vtype in ["test_pass", "file_exists", "lint_clean", "forbidden_output", "custom"]:
95+
for vtype in ["test_pass", "file_exists", "lint_clean", "forbidden_patterns", "custom"]:
9696
v = Validator(type=vtype, config={})
9797
assert v.type == vtype
9898
print(f" [PASS] All validator types work: {list(VALIDATOR_TYPES.__args__)}")

0 commit comments

Comments
 (0)