result-supabase-reporter
3
总安装量
3
周安装量
#61893
全站排名
安装命令
npx skills add https://github.com/httprunner/skills --skill result-supabase-reporter
Agent 安装分布
gemini-cli
3
opencode
3
codebuddy
3
github-copilot
3
codex
3
kimi-cli
3
Skill 文档
Result Supabase Reporter
Use this skill for a deterministic sqlite -> Supabase result pipeline around capture_results.
Path Convention
Canonical install and execution directory:
cd ~/.agents/skills/result-supabase-reporter
One-off invocation from any directory:
(cd ~/.agents/skills/result-supabase-reporter && npx tsx scripts/result_reporter.ts --help)
Workflow
- Optional data collection
collect-start: start backgroundevalpkgs runfor one device (SerialNumber) with oneTaskID(digits only).collect-stop: stop collector and print summary metrics (delta,task_delta,records_jsonl,tracking_events,runtime_sec).
- Data inspection / selection
stat: print total sqlite row count for one--task-id.filter: preview upload candidates fromcapture_results.- Default status filter is pending+failed (
reported IN (0,-1)).
- Data reporting
report: batch upsert to Supabase and write back sqlite status.--max-rows <n>sets total cap for one report run.- For per-task workflows, always pass
--task-id <TASK_ID>to avoid cross-task uploads. - Success writeback:
reported=1,reported_at=now_ms,report_error=NULL. - Failure writeback:
reported=-1,reported_at=now_ms,report_error=<truncated error>.
- Retry
retry-reset: move failed rows (reported=-1) back to pending (reported=0), then rerunreport.
Run
Install dependencies once:
npm install
CLI entry:
npx tsx scripts/result_reporter.ts <subcommand> [flags]
Subcommands:
collect-startcollect-stopstatfilterreportretry-reset
Environment Variables
Required by phase:
- Collection:
BUNDLE_ID,SerialNumber - Supabase report:
SUPABASE_URL,SUPABASE_SERVICE_ROLE_KEY
Optional overrides:
TRACKING_STORAGE_DB_PATH(default$HOME/.eval/records.sqlite)RESULT_SQLITE_TABLE(defaultcapture_results)SUPABASE_RESULT_TABLE(defaultcapture_results)
Recommended Command Patterns
Task-scoped preview:
npx tsx scripts/result_reporter.ts filter --task-id <TASK_ID> --status 0,-1 --limit 20
Task-scoped report:
export SUPABASE_URL=https://<project>.supabase.co
export SUPABASE_SERVICE_ROLE_KEY=<service_role_key>
npx tsx scripts/result_reporter.ts report --task-id <TASK_ID> --batch-size 100 --max-rows 500
Retry failed rows:
npx tsx scripts/result_reporter.ts retry-reset --app com.tencent.mm --scene onSearch
npx tsx scripts/result_reporter.ts report --task-id <TASK_ID> --status 0,-1
Failure Handling
- Use
--dry-runwithreportto validate selection size before network writes. - Check sqlite
report_errorfor root cause whenreported=-1. - Typical issues: invalid
SUPABASE_URL, expired/incorrect service role key, target table missing required columns, or missing unique key for upsert conflict columns. - Fix issue first, then run
retry-resetandreportagain.
Resources
scripts/result_reporter.ts: executable source of truth for flags and behavior.references/init.sql: Supabase table DDL forcapture_results.references/sqlite-and-field-mapping.md: sqlite schema expectations, mapping, and command examples.references/supabase-api-and-errors.md: Supabase API usage, upsert conflict key, and error triage.