Loading...
Loading...
Run only the tests a change can affect — diffs the branch against its base, maps changed files to affected units via the repo's test map or workspace manifest, picks tests per configured suite, runs them, and falls back to the full suite whenever the mapping is unsure. Use for "run affected tests", "test only what changed", "smart test".
npx skill4agent add open-mercato/skills om-smart-test--base <ref>--suite <name>--full--plan-only--no-cache.ai/skills/om-smart-test/SKILL.mdreferences/agentic-setup.md.ai/agentic.config.jsonbaseBranchvalidation.commandspaths.qasmartTest.mapsmartTest.suitesfullsmartTest.suitesvalidation.commandssmartTest.suitesreferences/suites.md--no-cache--fullfull[cache hit: <short-sha>]references/cache.mdBASE_REF="${ARG_BASE:-}" # --base, validated per agentic-setup
if [ -z "$BASE_REF" ]; then
CFG_BASE=$(jq -r '.baseBranch // "auto"' .ai/agentic.config.json 2>/dev/null || echo auto)
REMOTE=$(git config "branch.$(git branch --show-current).remote" 2>/dev/null || echo origin)
if [ -n "$CFG_BASE" ] && [ "$CFG_BASE" != "auto" ]; then
for ref in "$REMOTE/$CFG_BASE" "$CFG_BASE"; do
git rev-parse --verify --quiet "$ref" >/dev/null && { BASE_REF="$ref"; break; }
done
else
BASE_REF=$(git symbolic-ref --quiet --short "refs/remotes/$REMOTE/HEAD" 2>/dev/null || true)
fi
fi
[ -n "$BASE_REF" ] && ! git merge-base "$BASE_REF" HEAD >/dev/null 2>&1 && BASE_REF=""
CHANGED_FILES=$({
[ -n "$BASE_REF" ] && git diff --no-renames --name-only "$BASE_REF...HEAD"
git diff --no-renames --name-only HEAD
git ls-files --others --exclude-standard
} | awk 'NF && !seen[$0]++')baseBranch: "auto"smartTest.map.ai/test-map.jsonignorewidereferences/test-map.mdreferences/selection.mddirectrelatedunitfullskipfullreferences/cache.md--plan-onlyneedsApp: trueom-prepare-test-env<paths.qa>/test-env.json.ai/qa/test-env.jsonom-prepare-test-envnot runfullreferences/report-templates.mdunknownreferences/rules.mdsmartTest.suitesvalidation.commandsvalidation.commandsom-check-and-commit.env