Skip to content

[FEATURE] Rectify: Agent-Eval Detection Criteria Schema Drift Immunity#3885

Merged
Trecek merged 4 commits into
developfrom
agent-eval-prep-skill-md-detection-criteria-schema-is-outdat/3611
Jun 7, 2026
Merged

[FEATURE] Rectify: Agent-Eval Detection Criteria Schema Drift Immunity#3885
Trecek merged 4 commits into
developfrom
agent-eval-prep-skill-md-detection-criteria-schema-is-outdat/3611

Conversation

@Trecek

@Trecek Trecek commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

The agent-eval-prep SKILL.md documents detection_criteria as plain strings but the validator (_eval.py) requires structured {text, type} objects. This is a class of bug where documentation-as-code-instruction drifts from the enforcement layer because there is no shared schema definition and no automated conformance test bridging the two.

The architectural immunity creates a single canonical schema constant in the validation code, exposes it for testing, adds a conformance test that reads a fixture derived from the SKILL.md and feeds it through the validator, and registers a semantic rule that fires at recipe-validation time if manifests use the wrong format — making drift impossible without a test failure.

Closes #3611

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/remediation-20260607-131119-345378/.autoskillit/temp/rectify/rectify_agent_eval_schema_drift_immunity_2026-06-07_131119.md

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
rectify* opus[1m] 1 59 21.2k 1.6M 107.1k 51 84.9k 22m 16s
review_approach* opus[1m] 1 12.4k 5.4k 233.8k 59.2k 11 40.5k 6m 45s
dry_walkthrough* opus 1 54 12.5k 2.0M 93.1k 59 70.9k 6m 51s
audit_impl* opus[1m] 2 1.1k 27.3k 544.7k 64.0k 36 85.3k 13m 16s
prepare_pr* MiniMax-M3 1 45.2k 3.1k 382.2k 49.3k 17 0 1m 24s
compose_pr* MiniMax-M3 1 38.3k 3.0k 229.4k 39.4k 12 0 1m 31s
review_pr* opus[1m] 1 37 30.5k 622.8k 90.8k 27 69.0k 7m 42s
resolve_review* opus[1m] 1 43 6.1k 982.6k 71.8k 32 50.1k 4m 39s
Total 97.2k 109.1k 6.6M 107.1k 400.7k 1h 4m

* Step used a non-Anthropic provider; caching behavior may differ.

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 5 13.7k 90.5k 4.0M 329.8k 54m 40s
opus 1 54 12.5k 2.0M 70.9k 6m 51s
MiniMax-M3 2 83.5k 6.1k 611.5k 0 2m 55s

Trecek and others added 4 commits June 7, 2026 15:36
…nd semantic drift guard

Extract VALID_CRITERION_TYPES and REQUIRED_CRITERION_KEYS as canonical
frozenset constants in smoke_utils/_eval.py and use them in the runtime
validator. Add conformance tests that read a structured-format fixture
through parse_agent_eval_manifests, a negative test verifying the
constants drive rejection, and an entry for each eval callable in
skill_contracts.yaml. Add a criterion-schema-drift semantic rule that
fires at recipe-validation time when bundled manifests still use
plain-string detection_criteria entries, and update the existing
make-plan-canaries.json fixtures to use the structured {text, type}
format that the runtime validator requires.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…mmit

- Fix cross-package submodule import: use smoke_utils (package init) not smoke_utils._eval
- Update _eval.py json.dumps line numbers in schema version convention allowlist (+3 offset)
- Bump recipe/rules file count exemption from 46 to 47 for rules_criterion_schema_drift.py
- Update pyright suppression allowlist line 248→251 for recipe/__init__.py
- Add tests/arch/fixtures/* to test-filter-manifest.yaml

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace smoke_utils import with local _REQUIRED_CRITERION_KEYS constant to
avoid transitive import chain (smoke_utils → _telemetry → pipeline → config)
that breaks IL-2 recipe layer contracts. Add conformance test to guard
against divergence between local and canonical constants.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Subprocess tests for fleet import isolation inherit env from the parent
process (MCP server or xdist worker), which can include vars that trigger
circular imports in freshly-created venvs (fastmcp 3.3.1 _install_hints).
Pass a minimal clean env instead, and capture stderr for better diagnostics
on both tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Trecek Trecek force-pushed the agent-eval-prep-skill-md-detection-criteria-schema-is-outdat/3611 branch from 536f3cd to 3cf211a Compare June 7, 2026 22:37
@Trecek Trecek added this pull request to the merge queue Jun 7, 2026
Merged via the queue into develop with commit ae20d84 Jun 7, 2026
3 checks passed
@Trecek Trecek deleted the agent-eval-prep-skill-md-detection-criteria-schema-is-outdat/3611 branch June 7, 2026 22:45
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.

1 participant