agentleFS
DshamirDshamir/slm-forge/skills/forge-smoketest/SKILL.md

forge-smoketest

Skill1 starsChanged 6 months agoMITView on GitHub

Live API call to the freshly-registered HF Space. Verifies the model is serving and produces a non-degenerate response to a canonical probe prompt. Blocks forge-publish if the Space can't be reached OR the response shows degeneration patterns (triple-word, run-together tokens, paragraph loops).

Files
SKILL.md

forge-smoketest

When this fires

Phase position: SMOKETEST — between CARD_VALIDATOR and PUBLISH. The last automated check before the model goes public.

What it does

  1. Reads hf_space URL from state/manifest
  2. Polls https://huggingface.co/api/spaces/<id> for runtime.stage == RUNNING (up to 8 min)
  3. Verifies <subdomain>.hf.space/ returns HTTP 200
  4. Sends probe prompt to Gradio /run/predict:
    {"data": ["What is a dental crown?"]}
  5. Parses response and runs degeneration-pattern checks:
    • too short (< 30 chars)
    • triple-word repetition (\b(\w+)\s+\1\s+\1\b)
    • paragraph-level loops (same 40+ char substring repeated 3+ times)
    • GGUF detokenize artifacts (ttiuser, ttiassistant)
  6. Falls back to homepage-only check if /run/predict isn't reachable (custom endpoint / auth required)

Inputs

  • Reads slm-forge/.runs/<run-id>/state.json for hf_space URL
  • Needs HF_TOKEN for private Space access during the gate (Space is still private at this phase)

Outputs

  • Writes slm-forge/.runs/<run-id>/smoketest-report.json:
    {"status":"pass","url":"https://...","prompt":"...","response_preview":"..."}
  • On fail: exit 1, PUBLISH never runs, repos stay private

Failure modes

FailureTypical causeRecovery
Space never reached RUNNINGBuild failure, bad requirements.txt, sdk_version mismatchCheck Space build log on HF; fix template; re-register
HTTP 200 but empty responseModel died loading GGUF; llama-cpp-python crashCheck Space runtime log
Degenerate responseSampling params wrong OR model genuinely badReview plan-fit axis 3 score; consider re-forging with stronger prompt

Usage

bash slm-forge/skills/forge-smoketest/run.sh <run-id>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.