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
fix(ci): normalize Windows CRLF line endings in PR governance script (#1012)
Parideboy5194388b6652
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 56784737d..7168250af 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -155,7 +155,6 @@ jobs:matrix:shard: [1, 2, 3, 4]env:- HF_HUB_OFFLINE: "1"TRANSFORMERS_OFFLINE: "1"steps:- uses: actions/checkout@v6diff --git a/scripts/pr-governance.py b/scripts/pr-governance.pyindex d095363f4..9f4d426f5 100644--- a/scripts/pr-governance.py+++ b/scripts/pr-governance.py@@ -142,6 +142,9 @@ def validate_pull_request(event: dict[str, Any]) -> GovernanceReport:is_draft = bool(pull_request.get("draft", False))is_bot_pr = author.endswith("[bot]")body = pull_request.get("body") or ""+ # Normalize Windows line endings so regex patterns expecting \n+ # (particularly the code-block fence regex) match correctly.+ body = body.replace("\r\n", "\n")if is_bot_pr:summary = "### PR governance\n\nBot-authored PR detected; template enforcement is skipped."diff --git a/scripts/tests/test_pr_governance.py b/scripts/tests/test_pr_governance.pyindex 818e60663..d913d0d00 100644--- a/scripts/tests/test_pr_governance.py+++ b/scripts/tests/test_pr_governance.py@@ -87,6 +87,16 @@ def test_validate_pull_request_marks_ready_pr_valid() -> None:assert module.AUTHOR_ACTION_LABEL in report.labels_to_remove+def test_validate_pull_request_accepts_crlf_test_output_code_block() -> None:+ module = _load_module()+ body = VALID_BODY.replace("\n", "\r\n")++ report = module.validate_pull_request(_event(body))++ assert report.valid is True+ assert report.problems == []++def test_validate_pull_request_allows_draft_without_ready_checkboxes() -> None:module = _load_module()body = VALID_BODY.replace(