Reference: ALFRED_WORKFLOW_DEVELOPMENT.md
- Confirm latest package was used:
scripts/workflow-pack.sh --id bangumi-search --install
- Confirm Alfred workflow variables are valid:
BANGUMI_MAX_RESULTS(optional, default10)BANGUMI_TIMEOUT_MS(optional, default8000)BANGUMI_API_FALLBACK(auto,never,always; defaultauto)
- Confirm script-filter contract output is JSON:
bash workflows/bangumi-search/scripts/script_filter.sh "anime naruto" | jq -e '.items | type == "array"'
- Confirm deterministic checks pass:
node --test workflows/bangumi-search/scripts/tests/bangumi_scraper_contract.test.mjsbash workflows/bangumi-search/tests/smoke.sh
| Symptom in Alfred | Likely cause | Action |
|---|---|---|
Invalid Bangumi workflow config |
BANGUMI_MAX_RESULTS, BANGUMI_TIMEOUT_MS, or BANGUMI_API_FALLBACK is invalid. |
Correct variable values and retry. |
Bangumi API rate-limited |
Upstream API returned 429 or equivalent throttle signal. |
Retry later and reduce BANGUMI_MAX_RESULTS if needed. |
Bangumi API unavailable |
DNS/TLS/network timeout or upstream 5xx. |
Check local network and retry; if sustained, pause rollout. |
Bangumi API key is missing |
Runtime path requires key and BANGUMI_API_KEY is empty. |
Set BANGUMI_API_KEY in workflow config and retry. |
bangumi-cli binary not found |
Packaged binary missing, build path mismatch, or bad BANGUMI_CLI_BIN. |
Re-pack workflow or set valid BANGUMI_CLI_BIN. |
Keep typing (2+ chars) |
Query is shorter than minimum length (<2). |
Continue typing until at least 2 characters. |
Notes:
- Current production runtime is API-first.
scripts/script_filter.shdoes not callbangumi_scraper.mjs.- Playwright bridge scaffold is disabled by default until rollout gates are completed.
Run these checks after any runtime/config change:
node --check workflows/bangumi-search/scripts/bangumi_scraper.mjsnode --test workflows/bangumi-search/scripts/tests/bangumi_scraper_contract.test.mjsbash workflows/bangumi-search/tests/smoke.shscripts/workflow-test.sh --id bangumi-searchscripts/workflow-pack.sh --id bangumi-search
Use this when API regressions or operator load rises above acceptable threshold.
- Stop rollout of new
bangumi-searchartifacts. - Revert Bangumi workflow changeset(s), including:
workflows/bangumi-search/crates/bangumi-cli/- docs updates in
workflows/bangumi-search/README.md,workflows/bangumi-search/TROUBLESHOOTING.md, andALFRED_WORKFLOW_DEVELOPMENT.md(if changed)
- Rebuild and validate rollback state:
scripts/workflow-lint.shscripts/workflow-test.shscripts/workflow-pack.sh --all
- Publish known-good artifact set and note that scraper bridge remains disabled by default.