update agent doc to cover more on tests + include it in review CI scope #14197
Merged
Conversation
…s, not mocks Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ule to skill only Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ew scope Move the Testing section out of the model-integration skill into a standalone .ai/testing.md so it loads in both the authoring and review flows, add it to review-rules' reading list and the reference guides, extend the mock rule to call-level doubles (monkeypatched component methods), and widen the @claude CI reviewer's review scope to tests/ (edit/commit scope unchanged). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- modular.md: new 'Running a modular pipeline' section — init_pipeline()/ load_components()/output= usage, from_blocks_dict composition, update_components() for config values, and the anti-pattern of calling blocks directly with a hand-built PipelineState - testing.md: modular block tests run through the pipeline API and assert on outputs; tiny repos must mirror the real checkpoint's shape (per-variant repos when configs differ); bespoke tests live on the tester class - pipelines.md: callback_kwargs must be built with a loop — locals() inside a dict comprehension sees the comprehension's scope and always KeyErrors Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sayakpaul
approved these changes
Jul 16, 2026
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(1) adding a note on create dummy components for test, since this is second time seeing these patterns https://github.com/huggingface/diffusers/pull/14181/changes#r3589666970
(2) I just realized our review agent (both the self-review skill and claude CI) are prompted not to review test files, so I updated the scope to include tests
(3) I noticed agents does not know how to run single modular block correctly -> they tends to create a state and pass it to block directly; so I added a notes on that too, a single block should also be turn into a pipeline with
init_pieplineand then it can be run directly with input etc