원클릭으로
agilab-testing
Quick, targeted test strategy for AGILAB (core unit tests, app smoke tests, regression).
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Quick, targeted test strategy for AGILAB (core unit tests, app smoke tests, regression).
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Maintain repo-managed agent skills across `.claude/skills` and `.codex/skills`, including targeted sync, validation, index regeneration, drift checks, and Tokki skill visibility. Use when adding or updating a shared skill, migrating a user-managed skill into the repo, or reconciling agent skill copies without overwriting unrelated skills.
Review AGILAB changes for security hardening risks. Use when code, docs, or workflows touch installers, Streamlit exposure, cluster/SSH/share behavior, app execution, notebooks, LLM connectors, secrets, PyPI/GitHub/Hugging Face publishing, dependency policy, or external repositories.
Route terse AGILAB operator requests such as "do it", "review AGILAB", "next move", "update repos", "merge it", "check again", "release", and "cluster validation" into the right repo skills, safety mode, validation depth, and output contract using session-derived policy.
Streamlit page authoring patterns for AGILAB (session_state safety, keys, rerun, UX).
Create, edit, inspect, or explain presentation slide decks (`.pptx`) with PptxGenJS, bundled layout helpers, and render/validation utilities. Use when tasks involve building a new PowerPoint deck, recreating slides from screenshots/PDFs/reference decks, modifying content while preserving editable output, extracting or explaining a specific slide, adding charts/diagrams/visuals, or diagnosing layout issues such as overflow, overlaps, and font substitution.
Produce deep AGILAB audit and code-review artifacts with evidence-backed findings, mandatory architecture-foundation readiness, blast-radius tracing, security/test posture, and prioritized recommendations. Use when the user says "review AGILAB", "audit AGILAB", "code review AGILAB", "deep review", "architecture review", "security review", asks for a review document, or asks for comparison-quality critique rather than a quick fix.
| name | agilab-testing |
| description | Quick, targeted test strategy for AGILAB (core unit tests, app smoke tests, regression). |
| license | BSD-3-Clause (see repo LICENSE) |
| metadata | {"updated":"2026-06-17T00:00:00.000Z"} |
Use this skill when validating changes.
uv --preview-features extra-build-dependencies run python tools/impact_validate.py --staged
or --files ... and treat its output as the first pass for required validation.src/agilab/core/agi-env, src/agilab/core/agi-node, src/agilab/core/agi-cluster,
src/agilab/core/agi-core, or shared deploy/build helpers, get explicit user approval.
First explain why an app-local fix is insufficient and which regression will validate the shared change.HOME/~/.agilab, or stale cluster config leaking from the runner, harden the
shared helper or shared test fixture instead of patching just one assertion../dev <shortcut> output for agent-facing
validation. It writes the full stdout/stderr stream to ignored
reports/dev-logs/ artifacts and prints only a bounded signal summary, which
keeps prompt context focused without losing evidence.Validation passed. without listing every command. Include the exact command
list only when a check failed or was skipped, the message is release/audit
evidence, a PR/commit body needs reproducible proof, or the user explicitly
asks for validation details.--raw-output or AGILAB_DEV_OUTPUT=raw only when a human debugging
session, wrapper, or downstream tool must consume the live raw stream or raw
JSON. For normal diagnosis, inspect the cited reports/dev-logs/... artifact
instead of pasting full logs into the prompt.--summary-lines N or AGILAB_DEV_SUMMARY_LINES=N before
escalating to raw output.tools/impact_validate.py once per stable diff. Reuse its output if no
files changed since the previous run; rerun only after edits that alter the
impact surface.--profile arguments when the
tool supports it.git diff origin/main..HEAD, not only commit counts.
Squash merges can make a branch look many commits ahead even when most content
is already on main../dev builtin-app-tests or
uv --preview-features extra-build-dependencies run python tools/workflow_parity.py --profile builtin-app-tests
when validating the built-in app pytest suites.src/agilab/apps/builtin/*/test as
suspect unless the root environment intentionally includes every app-local
dependency. The valid regression path enters each app project and runs pytest
through uv --project ..VIRTUAL_ENV before invoking app-local uv commands. A
warning like VIRTUAL_ENV=... does not match the project environment path
means the shell's active root venv leaked into the app-local validation path.docs/source.page_meta.py) for page titles or other user-facing labels that tests also assert.glob, rglob, iterdir, or os.scandir order across macOS, Linux, and GitHub runners.test/ must not depend on the real machine HOME or an existing ~/.agilab/.env.test/conftest.py fixtures for a clean fake home; add local monkeypatches only
when a test truly needs custom env overrides.src/agilab/core/test must also run with a fake HOME, cleaned AGILAB-related
environment variables, and a valid temporary ~/.local/share/agilab/.agilab-path pointing at
the checkout's src/agilab directory. A polluted developer marker must not affect core tests.AgiEnv.logger must not leak that stub into later tests that expect the full
logger API.agi_env surface-budget refactors:
src/agilab/core/agi-env/src/agi_env/agi_env.py, keep
test_agi_env_surface_contract.py as the executable budget and lower the
limit only after the refactor lands below it.logging, _AgiEnvMeta, singleton class attribute fallback, and
AgiEnv static/class method dispatch.agi_env.py or
import through the public module seam when compatibility depends on it.src/agilab/core/agi-env/test
directory, the focused test_agi_env.py / surface-contract slice, Ruff on
touched modules, and shared-core strict typing.pagelib_runtime_support.activate_mlflow
starts passing env, stdout, stderr, or start_new_session, add a
regression through pagelib.activate_mlflow/pagelib.subproc, not only a
direct pagelib_runtime_support unit test.__name__, __package__) for representative
import-safe shims. A shim that imports the right target but exposes the
target module name is still broken for callers, monkeypatching, and
diagnostics.agi-app-* package payloads, treat the built-in app project as the
canonical source and src/agilab/lib/app_project_build_support.py as the
generator. Do not hand-edit embedded package payload copies without
regenerating or validating them against the generated payload contract.uv --preview-features extra-build-dependencies run python tools/app_contract_matrix.py --quiet
or ./dev app-contracts so stale embedded app payloads, package-data drift,
page-bundle contract drift, and local artifact leakage are caught before
release.ready/SSH-open worker candidate:
uv --preview-features extra-build-dependencies run --no-sync python tools/cluster_flight_validation.py --discover-lan --remote-user <user> --json --no-discovery-cache.
If discovery reports a remembered host as no-ssh-port, treat that host as
stale and pick the current ready node instead.--scheduler-ssh-port <port>. The share setup and full cluster doctor should
both use the same port so worker-to-scheduler SSHFS is tested exactly as
runtime uses it.--remote-cluster-share-premounted, do not accept “remote path is
writable” as proof of a cluster share. The sentinel check must pass: a marker
written under the scheduler cluster share must be visible from every worker
through its configured remote cluster share.~/wenv
is an environment corruption/dependency-drift signal; clear the generated
worker venv and rerun from the refreshed lock before treating it as a code
regression.app_settings.toml files are seeds; mutable settings live in the user workspace."cluster_pool" or "cluster_cython".pop(...) or reruns stay easy to diagnose.$HOME/agi-space,
add both a cold-bootstrap regression and a warm-session regression with a preexisting stale
st.session_state["env"] or persisted .agilab state.APPS_PATH, .agilab-path, or an old
packaged workspace.--apps-path and a polluted fake home so the old bug cannot be hidden by the
developer machine's clean state.streamlit run <app_surface.py> -- --active-app <project> or a
helper test for render(mode="full", active_app=<project>). A regression
should prove the process does not exit immediately with code 1 before
Streamlit can render a useful diagnostic.__init__ exports lazy when eager imports can pull in NumPy, Pandas, Torch,
workers, or cluster code.--active-app sidecar path when those
code paths differ.Orchestration log, ensure
the robot opens or inspects that container; widget-presence checks alone are
not enough.--action-button-policy click-selected with explicit --click-action-labels and check rendered
action feedback, not only whether the click completed.tools/agilab_widget_robot_matrix.py,
tools/ui_robot_matrix_aggregate.py, tools/ui_robot_evidence.py, or the
ui-robot-matrix workflow, cover the contract across shard execution,
aggregate artifact loading, public evidence projection, workflow text, and
workflow-parity commands.test/test_agilab_widget_robot_matrix.py, test/test_ui_robot_matrix_aggregate.py,
test/test_ui_robot_evidence.py, test/test_ci_workflow.py, and
test/test_workflow_parity.py.ui-robot-matrix-aggregate-* artifact.uv sync --project <app>uv run python src/agilab/apps/install.py <app> --verbose 1~/wenv/<app>_worker/pyproject.toml before changing app dependencies.src/agilab/apps/builtin/*_project/src/*_worker/pyproject.toml, validate local agi-env/agi-node sources relative to the worker manifest directory, not the app root. App-level manifests use ../../../core/...; nested worker manifests currently need ../../../../../core/....uv environment cleanup in agi_envagi_distributorsrc/agilab/core/test/test_agi_distributor_deployment_build_support.py, especially the
--with setuptools --with cython build-tool overlay plus source-env
--with-editable overlays for local agi-env and agi-nodeNo module named 'setuptools' or No module named 'psutil'
from agi_node.agi_dispatcher.build, treat it as shared worker-build command
construction first, not as an app dependency miss.HOME app install that failed before,
then rerun the failed-app slice or the full isolated installer validation when the
original run failed across several built-in apps.generation_mode / action_contract metadata.student_score and student_score_mean for diagnostic apps.tools/workflow_parity.py --profile <name> fails in files unrelated to
the current diff, keep the narrow changed-file tests green and report the
exact unrelated failing test. Do not patch unrelated pages just to clear a
broad profile unless the user approves that scope.test-results/coverage-agi-gui-*
manifests. Concurrent writers can make coverage evidence look corrupt. Stop
only verified PIDs started by the active task.SyntaxError on conflict markers,
check the current files with rg -n "^(<<<<<<<|=======|>>>>>>>)" ... before
editing. A concurrent merge/fetch can leave one run looking at half-updated
files; if the marker scan is clean, rerun the same targeted slice from the
current checkout before treating the failure as a code regression.git diff for the touched files before final validation.mergeStateStatus=UNSTABLE as pending-or-failing until the
check rollup is inspected. If required checks are still running and local
targeted validation is green, prefer arming auto-merge and watching checks
over bypassing branch protection.MERGED, record the merge commit, confirm
required checks completed successfully, and fetch/prune before claiming the
branch was deleted.src/agilab/pypi_app_packages.py, the PROJECT page app-install
flow, or agilab app CLI wiring, cover package catalog parsing, preflight
metadata, install/update/remove commands, and UI entry points together.agilab.apps entry-point discovery,
not just local src/agilab/apps directory scanning.test/test_github_ai_scraper_discoverability.py in the focused regression
slice.AGILAB_GITHUB_AI_SCRAPER_LIVE=1.Core tests (repo root):
uv --preview-features extra-build-dependencies run --no-sync pytest src/agilab/core/agi-env/testuv --preview-features extra-build-dependencies run --no-sync pytest src/agilab/core/testRoot repo smoke/coverage step with CI parity:
PYTHONPATH='src' COVERAGE_FILE=.coverage.agilab uv --preview-features extra-build-dependencies run --no-project --with pytest --with pytest-cov --with toml --with packaging python -m pytest -q --maxfail=1 --disable-warnings -o addopts='' -m 'not integration' --cov=agilab --cov-report=xml:coverage-agilab.xml --ignore=src/agilab/test/test_model_returns_code.py src/agilab/testagi-env isolated coverage step with CI parity:
COVERAGE_FILE=.coverage.agi-env uv --preview-features extra-build-dependencies run --no-project --with-editable ./src/agilab/core/agi-env --with-editable ./src/agilab/core/agi-node --with sqlalchemy --with pytest --with pytest-cov python -m pytest -q --maxfail=1 --disable-warnings -o addopts='' --cov=agi_env --cov-report=xml:coverage-agi-env.xml src/agilab/core/agi-env/testShared core isolated coverage step with CI parity:
COVERAGE_FILE=.coverage.agi-node uv --preview-features extra-build-dependencies run --no-project --with-editable ./src/agilab/core/agi-env --with-editable ./src/agilab/core/agi-node --with-editable ./src/agilab/core/agi-cluster --with-editable ./src/agilab/core/agi-core --with sqlalchemy --with pytest --with pytest-asyncio --with pytest-cov python -m pytest -q --maxfail=1 --disable-warnings -o addopts='' --cov=agi_node --cov-report=xml:coverage-agi-node.xml src/agilab/core/testShared core dependency collection caveat:
sklearn -> scipy.stats -> numpy with _CopyMode.IF_NEEDED is neither True nor False, do not patch AGILAB code for that collection error. Re-run the
same isolated validation with temporary dependency constraints such as
--with 'numpy<2.3' --with 'scipy<1.16' and report the dependency override
in the validation evidence.Streamlit page regression (active-app aware):
sys.argv with ["<page>.py", "--active-app", "<app_path>"] before streamlit.testing.v1.AppTest.from_file(...).uv --preview-features extra-build-dependencies run pytest -q test/test_view_maps_network.pyPyPI app management and PROJECT install flow:
uv --preview-features extra-build-dependencies run pytest -q -o addopts='' test/test_pypi_app_packages.py test/test_lab_run.py test/test_project_clone_policy.pyWindows link/share fallback coverage:
uv --preview-features extra-build-dependencies run --no-sync pytest -q -o addopts='' src/agilab/core/agi-env/test/test_agi_env.py src/agilab/core/test/test_base_worker.pyFocused ORCHESTRATE robot action regression:
AGILAB_WIDGET_ROBOT_RUNTIME_ISOLATION=current-home uv --preview-features extra-build-dependencies run --with playwright python tools/agilab_widget_robot.py --apps flight_project --pages ORCHESTRATE --apps-pages none --json --json-output /tmp/flight-orchestrate-widget-robot.json --progress-log /tmp/flight-orchestrate-widget-robot.ndjson --interaction-mode full --action-button-policy click-selected --click-action-labels "CHECK distribute" --preselect-labels "Run now" --missing-selected-action-policy fail --runtime-isolation current-homeService health smoke tests (CI parity on Python 3.13):
COVERAGE_FILE=.coverage.service-health uv --preview-features extra-build-dependencies run --no-project --with-editable ./src/agilab/core/agi-env --with-editable ./src/agilab/core/agi-node --with-editable ./src/agilab/core/agi-cluster --with-editable ./src/agilab/core/agi-core --with sqlalchemy --with pytest --with pytest-asyncio --with pytest-cov python -m pytest -q -o addopts='' --cov=agi_cluster --cov=agi_env --cov-report=xml:coverage-service-health.xml src/agilab/core/test/test_agi_distributor_service_state_support.py src/agilab/core/test/test_agi_distributor_service_runtime_support.py test/test_service_health_check.pyAccount-free cloud connector validation:
uv --preview-features extra-build-dependencies run python tools/workflow_parity.py --profile cloud-emulatorsExternal scanner discoverability:
uv --preview-features extra-build-dependencies run --with pytest python -m pytest -q -o addopts='' test/test_github_ai_scraper_discoverability.pyAGILAB_GITHUB_AI_SCRAPER_LIVE=1 only when intentionally running the
network-backed github-ai-scraper integration check.Whole repo tests (if needed):
uv --preview-features extra-build-dependencies run --no-sync pytestUse this when the user asks for full documentation alignment, source-install validation, release, and Hugging Face sync in one flow.
uv --preview-features extra-build-dependencies run python tools/sync_docs_source.py --deleteuv --preview-features extra-build-dependencies run python tools/workflow_parity.py --profile docsHOME, not from the developer checkout:
https://github.com/ThalesGroup/agilab.git into a new directory under $HOMEgit lfs install --local && git lfs pull--install-apps builtin --test-root --test-core --test-apps --skip-offlineAGI_LOCAL_SHARE="$PWD/localshare" and --agi-cluster-share "$PWD/clustershare"uv self update failures from package-manager-installed uv as
warnings only when the installer catches them and continues; do not ignore
uncaught install failures.curl https://pypi.org/pypi/agilab/json, because local Python SSL trust can
differ from the actual PyPI publication state.repo-guardrails clean public installs must install the exact
docs/source/data/release_proof.toml package spec via
tools/install_release_proof_package.py, not plain pip install agilab.
Release commits are pushed before PyPI propagation is guaranteed, so an
unpinned install can validate a stale previous release and fail for the wrong
artifact.pyproject.toml, otherwise the released wheel can
pass local macOS validation and still fail repo-guardrails on Windows.agilab version. The umbrella
may publish a metadata-only post release while exact-pinning already-published
core libraries; assert exact internal pins and marker correctness instead.uv pip install for Windows, Linux, and
macOS x64 before upload so repo-guardrails cannot be the first place a bad
platform marker or resolver failure appears.uv run --refresh-package agilab --no-project --with agilab==<version> ....
Running this from the repo can import local source and give a false pass.Staged uv source
lines and run tools/hf_space_smoke.py --json only after the runtime stage is
RUNNING on the uploaded Space SHA..coverage* artifacts; keep service health smoke coverage in
.coverage.service-health to match the workflow guardrails.agi-core
uses aggregate_policy = "minimum" in
tools/generate_component_coverage_badges.py, tools/coverage_badge_guard.py
must call the generator with the same policy before a release badge guard can
be trusted.badges profile expects coverage-agi-env.xml, coverage-agi-node.xml,
coverage-agi-cluster.xml, coverage-agi-gui.xml, and
coverage-agi-web.xml; aggregates such as agi-core and agilab are only
trustworthy after all component XML inputs are present.tools/coverage_badge_guard.py --allow-badge-only only for a deliberate
badge-only correction that was regenerated from current coverage XML. Run
tools/workflow_parity.py --profile badges after the generated SVG diff is
committed or the tree is otherwise clean; its final git diff --exit-code -- badges/ step is expected to fail while the intended badge refresh is still
unstaged or uncommitted.coverage.yml on main and wait for the
aggregate badge-freshness job before calling the badge fixed.agi-gui coverage parity, keep the optional visualization extra aligned
with CI (--extra ui --extra viz). Tests that import plotting-aware pages can
require plotly even when the touched code is not directly visualization
logic.2: often environment/tooling/collection failure1: often an actual test failure after collectionuv run pytest ... environment is the right reproduction target. Use the isolated no-project commands above first.tools/impact_validate.py reports required artifact refreshes, treat those as part of validation,
not as optional cleanup.AppTest when the bug is in widget wiring or session-state behavior. If the logic lives in a backend helper, test that helper directly and keep the UI test surface small.