testing-and-profiles
Select safe LangChain package verification commands, standard tests, pytest markers, import/version checks, integration-test skip rules, and model-profile refresh workflows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- testing-and-profiles
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Select safe LangChain package verification commands, standard tests, pytest markers, import/version checks, integration-test skip rules, and model-profile refresh workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/model-profile-cli.md4.4 KB
- 参考文档references/native-verification.md5.1 KB
- 参考文档references/standard-tests.md4.9 KB
- 参考文档references/troubleshooting.md5.2 KB
- 脚本scripts/select_safe_langchain_checks.py7.2 KB
03 SKILL.md 正文
LangChain Testing and Profiles
Use this sub-skill when a task asks how to validate LangChain changes, add or run standard tests, choose safe native verification commands, inspect package-local pytest/ruff/mypy checks, handle snapshots or strict pytest markers, or refresh model profile data.
Start Here
- Identify the owning package and run commands from that package directory, not from the repository root.
- Prefer deterministic unit tests and static checks before integration tests. Use native-verification.md and select_safe_langchain_checks.py to choose a minimal no-network check set.
- For integration conformance tests, use standard-tests.md to distinguish
langchain_tests.unit_testsfromlangchain_tests.integration_tests. - For profile data changes, use model-profile-cli.md; do not manually edit generated
_profiles.pyunless the maintainer explicitly requests it. - If pytest, snapshots, credentials, markers,
uv, or profile refresh commands fail, use troubleshooting.md.
Routing Rules
- Standard interface tests, pytest markers, cassettes, snapshots,
pytest-socket,ruff,mypy, package-local import checks, version checks, and model profile refreshes belong here. - Provider package implementation details, API-client behavior, credentials, model defaults, and provider-specific feature semantics should route to
../integrations/SKILL.mdwhen that sibling exists. - Core primitives, public API contracts, serialization, messages, runnables, callbacks, and tools should route to
../core-primitives/SKILL.md. - Agents, middleware, response formats, and LangGraph-backed behavior should route to
../agents-and-middleware/SKILL.md. - Classic chains and legacy
langchain-classicbehavior should route to../classic-chains/SKILL.md. - Monorepo package ownership, dependency groups, public API guardrails, and contribution conventions should route to
../monorepo-development/SKILL.md.
Safe Validation Defaults
Run only commands that match the changed package and task risk:
cd libs/<package>
uv sync --group test
uv run --group test pytest tests/unit_tests/path/to/test_file.py
uv run --group lint ruff check .
uv run --group typing mypy .
When available in the package Makefile, prefer package-local targets such as make test, make lint, make format, make type, make check_imports, or make check_version because they encode package conventions. If uv is unavailable, do not claim validation ran; report that checks are blocked by missing uv and list the commands to run in a prepared environment.
Skip Conditions
Skip or ask before running checks that require any of the following:
- Network access, provider API credentials, real cloud services, Docker services, local model servers, or browser/system services.
- Integration test directories that are not explicitly requested or that rely on cassettes,
pytest-recording, VCR, scheduled markers, or external services. - GPU-heavy, model-download-heavy, tokenizer/model corpus downloads, or optional dependency groups that are unrelated to the changed files.
- Snapshot updates such as
--snapshot-updateunless the user confirms that changed serialized output is intentional.
References
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).