mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #401] [MERGED] feat(cursor-review): record the direct judge's token usage #402
Labels
No labels
cursor-review-catalog-drift
groom
groom
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/github-workflows#402
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/github-workflows/pull/401
Author: @mattmillerai
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @mattmillerai
Base:
main← Head:matt/judge-direct-usage📝 Commits (2)
a4b349bfeat(cursor-review): record the direct judge's token usagea2fb19efix(cursor-review): time-box judge usage steps and flag a failed usage upload📊 Changes
4 files changed (+227 additions, -4 deletions)
View changed files
📝
.github/cursor-review/README.md(+1 -1)📝
.github/cursor-review/tests/test_workflow_judge_direct.py(+105 -2)📝
.github/workflows/cursor-review.yml(+120 -0)📝
docs/callers/cursor-review.md(+1 -1)📄 Description
ELI-5
Each direct-Anthropic review cell already saves how many tokens it used, so you can work out what it cost. The direct judge from #399 doesn't save anything. This PR makes the judge save the same token counts, so its cost can be measured too.
Summary
judge-directgains the cells' two accounting steps,Record token usageandUpload usage artifact.Run judge (direct)already writes Claude Code's result JSON to/tmp/judge-claude-result.json, and the script reads it from there. A test pins the match, so the two scripts can't drift apart.measured: falseinstead of a guessed zero.usage-direct-judge-<model>, kept for 30 days.usage-direct-<review_type>-<model>family, with review typejudge.findings-*and isn'tcursor-review-judge-direct, so neitherconsolidatenor the hand-back reads it.always() && steps.judge_direct.outcome != 'skipped', andRun judge (direct)gainsid: judge_direct. A judge killed by its time cap is still recorded, as unmeasured.continue-on-error.ANTHROPIC_API_KEY.judge_direct_modelrows in.github/cursor-review/README.mdanddocs/callers/cursor-review.mdnow mention the artifact.Tests
JudgeTokenUsageTestintest_workflow_judge_direct.py. It checks:Run judge (direct)writes.review_type: judge;if:, evaluated forsuccess,failure,cancelledandskipped.test_the_direct_job_runs_no_shell_agent_and_no_bare_stdin_pythonnow expects threepython3 -I -scripts, all with-I.python3 -m unittest discover -s .github/cursor-review/tests -p 'test_*.py': 1334 tests, OK.python3 -m unittest discover -s .github/workflow-pins/tests -p 'test_*.py': 551 tests, OK (43 skipped).mainand 80 on this branch, so none are new. They are the existingjob.workflow_shaand SC2018/SC2019 notes.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.