Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
ci: keep ready label off changes-requested PRs
JerrettDavis595b709a5b23
diff --git a/.github/workflows/pr-health.yml b/.github/workflows/pr-health.ymlindex 17c6351a8..688b39046 100644--- a/.github/workflows/pr-health.yml+++ b/.github/workflows/pr-health.yml@@ -196,12 +196,13 @@ jobs:fifor pr in $pr_numbers; do- data="$(gh pr view "$pr" --repo "$REPO" \- --json isDraft,labels,mergeStateStatus,statusCheckRollup)"-- merge_state="$(jq -r '.mergeStateStatus // "UNKNOWN"' <<<"$data")"- check_state="$(python3 .github/scripts/pr-health-labels.py --state-json "$data")"- is_draft="$(jq -r '.isDraft' <<<"$data")"+ data="$(gh pr view "$pr" --repo "$REPO" \+ --json isDraft,labels,mergeStateStatus,reviewDecision,statusCheckRollup)"++ merge_state="$(jq -r '.mergeStateStatus // "UNKNOWN"' <<<"$data")"+ check_state="$(python3 .github/scripts/pr-health-labels.py --state-json "$data")"+ is_draft="$(jq -r '.isDraft' <<<"$data")"+ review_decision="$(jq -r '.reviewDecision // ""' <<<"$data")"if [[ "$merge_state" == "BEHIND" ]]; thengh pr edit "$pr" --repo "$REPO" --add-label "status: needs rebase"@@ -221,7 +222,7 @@ jobs:gh pr edit "$pr" --repo "$REPO" --remove-label "status: ci failing" || truefi- if [[ "$merge_state" == "BEHIND" || "$merge_state" == "DIRTY" || "$check_state" == "failing" || "$is_draft" == "true" ]]; then- gh pr edit "$pr" --repo "$REPO" --remove-label "status: ready for review" || true- fi+ if [[ "$merge_state" == "BEHIND" || "$merge_state" == "DIRTY" || "$check_state" == "failing" || "$is_draft" == "true" || "$review_decision" == "CHANGES_REQUESTED" ]]; then+ gh pr edit "$pr" --repo "$REPO" --remove-label "status: ready for review" || true+ fidonediff --git a/scripts/tests/test_pr_health_workflow.py b/scripts/tests/test_pr_health_workflow.pyindex 24e13f22a..42c9a2f56 100644--- a/scripts/tests/test_pr_health_workflow.py+++ b/scripts/tests/test_pr_health_workflow.py@@ -14,3 +14,11 @@ def test_incomplete_pr_template_is_reported_without_failing_job() -> None:assert "PR template validation found missing fields" in workflowassert "Fail when the PR body is incomplete" not in workflowassert 'echo "PR template validation failed' not in workflow+++def test_ready_for_review_label_is_removed_when_changes_are_requested() -> None:+ workflow = Path(".github/workflows/pr-health.yml").read_text(encoding="utf-8")++ assert "reviewDecision" in workflow+ assert 'review_decision="$(jq -r \'.reviewDecision // ""\'' in workflow+ assert '$review_decision" == "CHANGES_REQUESTED"' in workflow