From 4d3807fbc1c0bd996fbb1e2f1ad63b36cd514628 Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Thu, 16 Apr 2026 22:35:18 +0800 Subject: [PATCH] Prepare crypto snapshot pipeline rename --- .github/workflows/ai_review.yml | 2 +- .github/workflows/auto_optimization_pr.yml | 2 +- .../monthly_optimization_planner.yml | 16 +++++++-------- CONTRIBUTING.md | 2 +- README.md | 19 ++++++++++-------- README.zh-CN.md | 6 ++++-- SECURITY.md | 2 +- docs/external_data_roadmap.md | 6 +++--- docs/integration_contract.md | 5 +++-- scripts/build_monthly_optimization_plan.py | 4 ++-- scripts/prepare_auto_optimization_pr.py | 20 +++++++++++++------ scripts/run_monthly_build_telegram.py | 2 +- scripts/run_monthly_report_bundle.py | 2 +- scripts/run_openai_secondary_review.py | 4 ++-- ...st_auto_optimization_pr_workflow_config.py | 2 +- tests/test_build_ai_review_payload.py | 4 ++-- tests/test_build_monthly_optimization_plan.py | 18 ++++++++--------- .../test_fanout_monthly_optimization_tasks.py | 10 +++++----- ...ly_optimization_planner_workflow_config.py | 4 ++-- tests/test_monthly_report_bundle.py | 2 +- tests/test_post_monthly_optimization_issue.py | 6 +++--- tests/test_prepare_auto_optimization_pr.py | 12 +++++------ tests/test_prepare_experiment_validation.py | 14 ++++++------- ...st_render_experiment_validation_summary.py | 2 +- tests/test_render_monthly_ai_review.py | 2 +- tests/test_run_openai_secondary_review.py | 2 +- 26 files changed, 92 insertions(+), 78 deletions(-) diff --git a/.github/workflows/ai_review.yml b/.github/workflows/ai_review.yml index 3047703..fa056be 100644 --- a/.github/workflows/ai_review.yml +++ b/.github/workflows/ai_review.yml @@ -86,7 +86,7 @@ jobs: Return only the final bilingual review in markdown. The workflow will publish your final review as the issue comment. - You are reviewing the monthly upstream selector report for CryptoLeaderRotation. + You are reviewing the monthly upstream selector report for CryptoSnapshotPipelines. This repository owns monthly universe selection, ranking, challenger evaluation, and publication of a 5-symbol Binance Spot leader pool for downstream execution. diff --git a/.github/workflows/auto_optimization_pr.yml b/.github/workflows/auto_optimization_pr.yml index 2d4ad7c..6a2dec4 100644 --- a/.github/workflows/auto_optimization_pr.yml +++ b/.github/workflows/auto_optimization_pr.yml @@ -138,7 +138,7 @@ jobs: Do not create a pull request yourself. The workflow will handle git, PR creation, CI dispatch, and post-CI merge. Only implement the low-risk tasks explicitly marked `[auto-pr-safe]`. Ignore any medium-risk or high-risk tasks. - You are working inside CryptoLeaderRotation, the upstream selector repository. + You are working inside CryptoSnapshotPipelines, the upstream selector repository. Prefer minimal changes in documentation, report wording, validation, shadow/challenger plumbing, instrumentation, and tests. Do not change production selector logic or ranking behavior from this issue alone. If an eligible task is marked `experiment-only`, keep the change non-production. diff --git a/.github/workflows/monthly_optimization_planner.yml b/.github/workflows/monthly_optimization_planner.yml index f80300e..8e93fd9 100644 --- a/.github/workflows/monthly_optimization_planner.yml +++ b/.github/workflows/monthly_optimization_planner.yml @@ -4,7 +4,7 @@ name: Monthly Optimization Planner workflow_dispatch: inputs: upstream_run_id: - description: "AI review run id from CryptoLeaderRotation" + description: "AI review run id from CryptoSnapshotPipelines" required: true downstream_run_id: description: "AI review run id from BinancePlatform" @@ -49,7 +49,7 @@ jobs: private-key: ${{ secrets.CROSS_REPO_GITHUB_APP_PRIVATE_KEY }} owner: ${{ github.repository_owner }} repositories: | - CryptoLeaderRotation + CryptoSnapshotPipelines BinancePlatform CryptoStrategies permission-actions: write @@ -151,14 +151,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Fan out CryptoLeaderRotation task issue + - name: Fan out CryptoSnapshotPipelines task issue run: | python3 scripts/fanout_monthly_optimization_tasks.py \ --plan-file data/output/monthly_optimization/optimization_plan.json \ - --owner-repo CryptoLeaderRotation \ + --owner-repo CryptoSnapshotPipelines \ --repo "${GITHUB_REPOSITORY}" \ --planner-issue-url "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/issues/${{ steps.optimization_issue.outputs.issue_number }}" \ - --output-file data/output/monthly_optimization/fanout/crypto_leader_rotation.json + --output-file data/output/monthly_optimization/fanout/crypto_snapshot_pipelines.json env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -213,12 +213,12 @@ jobs: from pathlib import Path fanout = json.loads( - Path("data/output/monthly_optimization/fanout/crypto_leader_rotation.json").read_text(encoding="utf-8") + Path("data/output/monthly_optimization/fanout/crypto_snapshot_pipelines.json").read_text(encoding="utf-8") ) plan = json.loads( Path("data/output/monthly_optimization/optimization_plan.json").read_text(encoding="utf-8") ) - actions = plan.get("repo_action_summary", {}).get("CryptoLeaderRotation", {}).get("actions", []) + actions = plan.get("repo_action_summary", {}).get("CryptoSnapshotPipelines", {}).get("actions", []) should_dispatch = bool(fanout.get("issue_number")) and fanout.get("status") in {"created", "updated"} and any( action.get("experiment_only") for action in actions ) @@ -227,7 +227,7 @@ jobs: print(f"issue_number={fanout.get('issue_number') or ''}", file=output) PY - - name: Dispatch CryptoLeaderRotation experiment validation + - name: Dispatch CryptoSnapshotPipelines experiment validation if: steps.upstream_experiment_target.outputs.should_dispatch == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e94f189..fd570a7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Thanks for contributing to `CryptoLeaderRotation`. +Thanks for contributing to `CryptoSnapshotPipelines`. ## Ground Rules diff --git a/README.md b/README.md index 1942d1e..8262096 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ -# crypto-leader-rotation +# CryptoSnapshotPipelines Language: English | [简体中文](README.zh-CN.md) -`crypto-leader-rotation` is the upstream research and release system for the monthly Binance Spot leader universe. +`CryptoSnapshotPipelines` is the upstream research, feature-snapshot, and release pipeline repo for crypto strategies. +The current production artifact family is still the `crypto_leader_rotation` Binance Spot leader universe. This repository does not place trades and does not contain live execution logic. Its deliverables are the validated upstream artifacts, the monthly reporting layer around those artifacts, and the publish/notification path that keeps downstream execution systems in sync. @@ -18,7 +19,7 @@ Core upstream artifacts: ## Upstream Boundary -`crypto-leader-rotation` is the single upstream owner for: +`CryptoSnapshotPipelines` is the single upstream owner for: - research and walk-forward validation - monthly universe selection and live-pool publication @@ -49,6 +50,8 @@ The repository is now intentionally split into two tracks: Production v1 is the frozen default path for this repository. The external-data branch stays in the repo, but it is explicitly experimental until it proves stably better than Binance-only across the key walk-forward leader-selection metrics. +The v1 artifact namespace intentionally remains `crypto-leader-rotation` and the live profile remains `crypto_leader_rotation` for downstream compatibility. + The design target is practical rather than flashy: - use only data visible at the time @@ -976,7 +979,7 @@ Documentation-only contract for downstream consumers: 2. if Firestore is unavailable, read `live_pool_legacy.json` 3. if both fail, fall back to a static local universe -See [docs/integration_contract.md](/Users/lisiyi/Projects/CryptoLeaderRotation/docs/integration_contract.md) for the precise payload contract and pseudocode. +See [docs/integration_contract.md](/Users/lisiyi/Projects/CryptoSnapshotPipelines/docs/integration_contract.md) for the precise payload contract and pseudocode. ### Manual Trigger And Rollback @@ -1113,9 +1116,9 @@ The first external-data priority is not sentiment or on-chain complexity. It is: Preparation added in this repository: -- [src/external_data.py](/Users/lisiyi/Projects/CryptoLeaderRotation/src/external_data.py) -- [scripts/validate_external_data.py](/Users/lisiyi/Projects/CryptoLeaderRotation/scripts/validate_external_data.py) -- [docs/external_data_roadmap.md](/Users/lisiyi/Projects/CryptoLeaderRotation/docs/external_data_roadmap.md) +- [src/external_data.py](/Users/lisiyi/Projects/CryptoSnapshotPipelines/src/external_data.py) +- [scripts/validate_external_data.py](/Users/lisiyi/Projects/CryptoSnapshotPipelines/scripts/validate_external_data.py) +- [docs/external_data_roadmap.md](/Users/lisiyi/Projects/CryptoSnapshotPipelines/docs/external_data_roadmap.md) The current merge policy is: @@ -1134,7 +1137,7 @@ Local validation of the merge logic: The current validation snapshot and remaining release blockers are tracked in: -- [docs/validation_status.md](/Users/lisiyi/Projects/CryptoLeaderRotation/docs/validation_status.md) +- [docs/validation_status.md](/Users/lisiyi/Projects/CryptoSnapshotPipelines/docs/validation_status.md) That document summarizes: diff --git a/README.zh-CN.md b/README.zh-CN.md index 4c86cd1..e98edcd 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,8 +1,8 @@ -# crypto-leader-rotation +# CryptoSnapshotPipelines 语言: [English](README.md) | 简体中文 -`crypto-leader-rotation` 是一个“研究 + 生产发布”结合的 Python 项目,它的职责不是交易,而是为下游执行脚本提供更稳定、更高质量的 Binance Spot 主流币候选池和 leader 排名结果。 +`CryptoSnapshotPipelines` 是加密货币策略的上游研究、特征快照和发布流水线仓库。当前生产 artifact family 仍然是 `crypto_leader_rotation` 这条 Binance Spot leader universe。 这个仓库**不下单**、**不包含 live 执行逻辑**。它的核心交付物是一个可稳定发布的上游选择器,默认输出: @@ -30,6 +30,8 @@ 当前默认生产路径已经冻结在 `Production v1`。外部数据分支仍保留在仓库中,但在它没证明自己长期稳定优于 Binance-only 之前,它都只是实验路线。 +为了保持下游兼容,v1 artifact namespace 仍保留为 `crypto-leader-rotation`,live profile 仍保留为 `crypto_leader_rotation`。 + ## 这个项目为什么存在 大多数交易系统会把三件事混在一起: diff --git a/SECURITY.md b/SECURITY.md index af8dc90..63173b5 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,6 +1,6 @@ # Security Policy -Thanks for helping keep `CryptoLeaderRotation` safe. +Thanks for helping keep `CryptoSnapshotPipelines` safe. This repository is part of a research and release pipeline. Please do **not** open a public issue for vulnerabilities involving credentials, broker access, cloud resources, order execution, or secret material. diff --git a/docs/external_data_roadmap.md b/docs/external_data_roadmap.md index 24672b8..6a6c148 100644 --- a/docs/external_data_roadmap.md +++ b/docs/external_data_roadmap.md @@ -32,9 +32,9 @@ Not first priority: The repository now includes: -- [src/external_data.py](/Users/lisiyi/Projects/CryptoLeaderRotation/src/external_data.py) -- [scripts/validate_external_data.py](/Users/lisiyi/Projects/CryptoLeaderRotation/scripts/validate_external_data.py) -- external-data config blocks in [config/default.yaml](/Users/lisiyi/Projects/CryptoLeaderRotation/config/default.yaml) +- [src/external_data.py](/Users/lisiyi/Projects/CryptoSnapshotPipelines/src/external_data.py) +- [scripts/validate_external_data.py](/Users/lisiyi/Projects/CryptoSnapshotPipelines/scripts/validate_external_data.py) +- external-data config blocks in [config/default.yaml](/Users/lisiyi/Projects/CryptoSnapshotPipelines/config/default.yaml) Implemented concepts: diff --git a/docs/integration_contract.md b/docs/integration_contract.md index 30edfa0..7ef005c 100644 --- a/docs/integration_contract.md +++ b/docs/integration_contract.md @@ -1,6 +1,7 @@ # Integration Contract -This document defines the production contract exposed by `crypto-leader-rotation` to downstream strategy systems. +This document defines the production contract exposed by `CryptoSnapshotPipelines` to downstream strategy systems. +The current v1 artifact namespace remains `crypto-leader-rotation` for compatibility with existing published objects and downstream readers. The upstream project publishes a monthly `core_major` live pool and exposes it through: @@ -14,7 +15,7 @@ The upstream project publishes a monthly `core_major` live pool and exposes it t This profile-aware manifest is the canonical contract wrapper for downstream runtimes. It lets the execution platform validate the artifact family without -binding to `CryptoLeaderRotation` internals. +binding to `CryptoSnapshotPipelines` internals. Required stable fields: diff --git a/scripts/build_monthly_optimization_plan.py b/scripts/build_monthly_optimization_plan.py index 140e908..3dbd330 100644 --- a/scripts/build_monthly_optimization_plan.py +++ b/scripts/build_monthly_optimization_plan.py @@ -10,7 +10,7 @@ RISK_ORDER = {"low": 0, "medium": 1, "high": 2} SCHEMA_VERSION = "2026-04-02" -REPO_ORDER = ["CryptoLeaderRotation", "CryptoStrategies", "BinancePlatform"] +REPO_ORDER = ["CryptoSnapshotPipelines", "CryptoStrategies", "BinancePlatform"] MANUAL_REVIEW_PREFIXES = ( "check ", "review ", @@ -64,7 +64,7 @@ def _resolve_owner_repo(source_review: dict[str, Any], action: dict[str, Any]) - "selection threshold", ) ): - return "CryptoLeaderRotation" + return "CryptoSnapshotPipelines" return action["owner_repo"] diff --git a/scripts/prepare_auto_optimization_pr.py b/scripts/prepare_auto_optimization_pr.py index d81d383..fbff524 100644 --- a/scripts/prepare_auto_optimization_pr.py +++ b/scripts/prepare_auto_optimization_pr.py @@ -32,7 +32,7 @@ "test coverage", ) AUTO_MERGE_BLOCK_TERMS = { - "CryptoLeaderRotation": ( + "CryptoSnapshotPipelines": ( "tie-break", "tie break", "ranking", @@ -81,7 +81,7 @@ ), } SENSITIVE_PATH_PATTERNS = { - "CryptoLeaderRotation": ( + "CryptoSnapshotPipelines": ( r"^src/", r"^config/", ), @@ -106,6 +106,14 @@ ), } +REPO_NAME_ALIASES = { + "CryptoLeaderRotation": "CryptoSnapshotPipelines", +} + + +def _repo_key(repo_root: Path) -> str: + return REPO_NAME_ALIASES.get(repo_root.name, repo_root.name) + def parse_actions(issue_body: str) -> list[dict[str, Any]]: actions: list[dict[str, Any]] = [] @@ -158,9 +166,9 @@ def _read_text(path: Path) -> str: def _is_completed_low_risk_task(action: dict[str, Any], repo_root: Path) -> bool: title = str(action.get("title", "")).lower() - repo_name = repo_root.name + repo_name = _repo_key(repo_root) - if repo_name == "CryptoLeaderRotation": + if repo_name == "CryptoSnapshotPipelines": if "shadow/challenger build generation" in title or "shadow build" in title: workflow = _read_text(repo_root / ".github" / "workflows" / "monthly_publish.yml") return "run_monthly_shadow_build.py" in workflow @@ -198,7 +206,7 @@ def classify_action_for_auto_merge(action: dict[str, Any], repo_root: Path | Non if not any(term in text for term in AUTO_MERGE_SAFE_TERMS): return False, "task_not_in_auto_merge_allowlist" - for term in AUTO_MERGE_BLOCK_TERMS.get(repo_root.name, ()): # pragma: no branch - tiny tuples + for term in AUTO_MERGE_BLOCK_TERMS.get(_repo_key(repo_root), ()): # pragma: no branch - tiny tuples if term in text: return False, f"guarded_keyword:{term}" return True, "auto_merge_safe" @@ -207,7 +215,7 @@ def classify_action_for_auto_merge(action: dict[str, Any], repo_root: Path | Non def evaluate_changed_files(changed_files: list[str], repo_root: Path | None = None) -> dict[str, Any]: repo_root = repo_root or PROJECT_ROOT blocked_files: list[str] = [] - patterns = tuple(re.compile(pattern) for pattern in SENSITIVE_PATH_PATTERNS.get(repo_root.name, ())) + patterns = tuple(re.compile(pattern) for pattern in SENSITIVE_PATH_PATTERNS.get(_repo_key(repo_root), ())) for raw_path in changed_files: normalized = raw_path.strip().lstrip("./") if not normalized: diff --git a/scripts/run_monthly_build_telegram.py b/scripts/run_monthly_build_telegram.py index 7734209..11e52e4 100644 --- a/scripts/run_monthly_build_telegram.py +++ b/scripts/run_monthly_build_telegram.py @@ -161,7 +161,7 @@ def format_message(payload: dict[str, Any]) -> str: else "shadow: not_generated_in_this_run" ) lines = [ - "CryptoLeaderRotation monthly release", + "CryptoSnapshotPipelines monthly release", f"status: {payload['status']}", f"as_of_date: {payload['as_of_date']}", ( diff --git a/scripts/run_monthly_report_bundle.py b/scripts/run_monthly_report_bundle.py index b310165..bddf760 100644 --- a/scripts/run_monthly_report_bundle.py +++ b/scripts/run_monthly_report_bundle.py @@ -129,7 +129,7 @@ def render_ai_review_input(bundle: dict[str, Any], release_status_md: str, month ## Review intent -- This is an upstream selector review for CryptoLeaderRotation, not a downstream execution report. +- This is an upstream selector review for CryptoSnapshotPipelines, not a downstream execution report. - The main question is whether the current monthly 5-symbol pool still looks like a sound production selector output, and what additional research evidence is still missing. - Shadow / challenger coverage should be used for strategy-optimization judgment when available. If missing, treat optimization evidence as incomplete rather than forcing a strong conclusion. - Downstream BinancePlatform consumes this pool monthly and then applies its own execution logic on top. diff --git a/scripts/run_openai_secondary_review.py b/scripts/run_openai_secondary_review.py index 85d7010..59443f4 100644 --- a/scripts/run_openai_secondary_review.py +++ b/scripts/run_openai_secondary_review.py @@ -43,7 +43,7 @@ "title": {"type": "string"}, "owner_repo": { "type": "string", - "enum": ["CryptoLeaderRotation", "CryptoStrategies", "BinancePlatform"], + "enum": ["CryptoSnapshotPipelines", "CryptoStrategies", "BinancePlatform"], }, "risk_level": {"type": "string", "enum": ["low", "medium", "high"]}, "auto_pr_safe": {"type": "boolean"}, @@ -86,7 +86,7 @@ def build_system_prompt(review_kind: str) -> str: if review_kind == "upstream_selector": return ( - "You are the independent secondary reviewer for CryptoLeaderRotation, an upstream selector " + "You are the independent secondary reviewer for CryptoSnapshotPipelines, an upstream selector " "repository that publishes a monthly 5-symbol Binance Spot leader pool. Review the issue body " "and the Claude primary review, then return only valid JSON matching the provided schema. " "Do not simply echo Claude. Re-check whether release consistency, selector quality, " diff --git a/tests/test_auto_optimization_pr_workflow_config.py b/tests/test_auto_optimization_pr_workflow_config.py index 95c4cf9..2046229 100644 --- a/tests/test_auto_optimization_pr_workflow_config.py +++ b/tests/test_auto_optimization_pr_workflow_config.py @@ -37,7 +37,7 @@ def test_auto_optimization_workflow_handles_monthly_task_issues(self) -> None: self.assertIn("gh workflow run ci.yml", workflow) self.assertIn("fetch-depth: 0", workflow) self.assertIn('FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"', workflow) - self.assertIn("You are working inside CryptoLeaderRotation, the upstream selector repository.", workflow) + self.assertIn("You are working inside CryptoSnapshotPipelines, the upstream selector repository.", workflow) self.assertIn("Never edit files under src/ or config/ in this automation step.", workflow) def test_auto_merge_workflow_waits_for_ci_and_merges_only_safe_ready_prs(self) -> None: diff --git a/tests/test_build_ai_review_payload.py b/tests/test_build_ai_review_payload.py index 196970c..e5fe619 100644 --- a/tests/test_build_ai_review_payload.py +++ b/tests/test_build_ai_review_payload.py @@ -8,7 +8,7 @@ class BuildAiReviewPayloadTests(unittest.TestCase): def test_build_review_payload_carries_standardized_root_fields(self) -> None: payload = build_review_payload( - source_repo="QuantStrategyLab/CryptoLeaderRotation", + source_repo="QuantStrategyLab/CryptoSnapshotPipelines", review_kind="upstream_selector", issue_context={"number": 11, "title": "Monthly Report Review: 2026-04-01"}, secondary_review={ @@ -28,7 +28,7 @@ def test_build_review_payload_carries_standardized_root_fields(self) -> None: self.assertEqual(payload["schema_version"], SCHEMA_VERSION) self.assertEqual(payload["repo_role"], "upstream_selector_review") - self.assertEqual(payload["source_issue"]["url"], "https://github.com/QuantStrategyLab/CryptoLeaderRotation/issues/11") + self.assertEqual(payload["source_issue"]["url"], "https://github.com/QuantStrategyLab/CryptoSnapshotPipelines/issues/11") self.assertEqual(payload["secondary_reviewer"]["model"], "gpt-5.4-mini") diff --git a/tests/test_build_monthly_optimization_plan.py b/tests/test_build_monthly_optimization_plan.py index badeadf..f062770 100644 --- a/tests/test_build_monthly_optimization_plan.py +++ b/tests/test_build_monthly_optimization_plan.py @@ -8,7 +8,7 @@ class BuildMonthlyOptimizationPlanTests(unittest.TestCase): def test_build_plan_groups_actions_by_owner_repo(self) -> None: upstream_review = { - "source_repo": "QuantStrategyLab/CryptoLeaderRotation", + "source_repo": "QuantStrategyLab/CryptoSnapshotPipelines", "review_kind": "upstream_selector", "source_issue": {"number": 11, "title": "Monthly Report Review: 2026-04-01", "url": "https://github.com/a/b/issues/11"}, "risk_level": "medium", @@ -16,7 +16,7 @@ def test_build_plan_groups_actions_by_owner_repo(self) -> None: "summary": "Need more challenger evidence.", "recommended_actions": [ { - "owner_repo": "CryptoLeaderRotation", + "owner_repo": "CryptoSnapshotPipelines", "title": "Add challenger breadth check", "risk_level": "low", "auto_pr_safe": True, @@ -47,14 +47,14 @@ def test_build_plan_groups_actions_by_owner_repo(self) -> None: plan = build_plan(upstream_review, downstream_review) self.assertEqual(plan["highest_review_risk"], "medium") - self.assertIn("CryptoLeaderRotation", plan["repo_action_summary"]) + self.assertIn("CryptoSnapshotPipelines", plan["repo_action_summary"]) self.assertIn("BinancePlatform", plan["repo_action_summary"]) self.assertEqual(len(plan["safe_auto_pr_candidates"]), 2) self.assertEqual(len(plan["experiment_candidates"]), 1) def test_build_plan_reassigns_reporting_tasks_and_downgrades_manual_checks(self) -> None: upstream_review = { - "source_repo": "QuantStrategyLab/CryptoLeaderRotation", + "source_repo": "QuantStrategyLab/CryptoSnapshotPipelines", "review_kind": "upstream_selector", "source_issue": {"number": 11, "title": "Monthly Report Review: 2026-04-01", "url": "https://github.com/a/b/issues/11"}, "risk_level": "low", @@ -108,7 +108,7 @@ def test_render_summary_markdown_mentions_source_reviews_and_repos(self) -> None "human_review_required": [{}], "source_reviews": [ { - "source_repo": "QuantStrategyLab/CryptoLeaderRotation", + "source_repo": "QuantStrategyLab/CryptoSnapshotPipelines", "risk_level": "medium", "production_recommendation": "research_only", "summary": "Need more evidence.", @@ -117,13 +117,13 @@ def test_render_summary_markdown_mentions_source_reviews_and_repos(self) -> None } ], "repo_action_summary": { - "CryptoLeaderRotation": { + "CryptoSnapshotPipelines": { "actions": [ { "risk_level": "low", "title": "Add challenger breadth check", "summary": "Improve evidence coverage.", - "source_repo": "QuantStrategyLab/CryptoLeaderRotation", + "source_repo": "QuantStrategyLab/CryptoSnapshotPipelines", "source_issue_number": 11, "auto_pr_safe": True, "experiment_only": True, @@ -131,13 +131,13 @@ def test_render_summary_markdown_mentions_source_reviews_and_repos(self) -> None ] } }, - "operator_focus": ["QuantStrategyLab/CryptoLeaderRotation: Need more evidence."], + "operator_focus": ["QuantStrategyLab/CryptoSnapshotPipelines: Need more evidence."], } markdown = render_summary_markdown(plan) self.assertIn("# Monthly Optimization Planner", markdown) - self.assertIn("QuantStrategyLab/CryptoLeaderRotation", markdown) + self.assertIn("QuantStrategyLab/CryptoSnapshotPipelines", markdown) self.assertIn("Add challenger breadth check", markdown) self.assertIn("Operator Focus", markdown) diff --git a/tests/test_fanout_monthly_optimization_tasks.py b/tests/test_fanout_monthly_optimization_tasks.py index d464f6b..322bb57 100644 --- a/tests/test_fanout_monthly_optimization_tasks.py +++ b/tests/test_fanout_monthly_optimization_tasks.py @@ -15,7 +15,7 @@ def setUp(self) -> None: self.plan = { "source_reviews": [ { - "source_repo": "QuantStrategyLab/CryptoLeaderRotation", + "source_repo": "QuantStrategyLab/CryptoSnapshotPipelines", "source_issue": {"number": 11, "title": "Monthly Report Review: 2026-04-01"}, }, { @@ -56,7 +56,7 @@ def setUp(self) -> None: def test_build_marker_and_title_include_owner_repo(self) -> None: self.assertEqual( build_marker(self.plan, "BinancePlatform"), - "", + "", ) self.assertEqual( build_issue_title(self.plan, "BinancePlatform"), @@ -67,11 +67,11 @@ def test_build_issue_body_lists_repo_specific_actions_and_flags(self) -> None: body = build_issue_body( self.plan, "BinancePlatform", - planner_issue_url="https://github.com/QuantStrategyLab/CryptoLeaderRotation/issues/20", + planner_issue_url="https://github.com/QuantStrategyLab/CryptoSnapshotPipelines/issues/20", ) self.assertIn("# Monthly Optimization Tasks · BinancePlatform", body) - self.assertIn("Planner issue: https://github.com/QuantStrategyLab/CryptoLeaderRotation/issues/20", body) + self.assertIn("Planner issue: https://github.com/QuantStrategyLab/CryptoSnapshotPipelines/issues/20", body) self.assertIn("Actions in this repo: `2`", body) self.assertIn("Highest repo risk: `high`", body) self.assertIn("Reconcile March cash flows", body) @@ -82,7 +82,7 @@ def test_build_closed_issue_body_marks_repo_as_resolved(self) -> None: body = build_closed_issue_body( self.plan, "CryptoStrategies", - planner_issue_url="https://github.com/QuantStrategyLab/CryptoLeaderRotation/issues/20", + planner_issue_url="https://github.com/QuantStrategyLab/CryptoSnapshotPipelines/issues/20", ) self.assertIn("") + self.assertEqual(build_marker(plan), "") self.assertEqual(build_issue_title(plan), "Monthly Optimization Plan: 2026-04-01 / 2026-03") def test_build_issue_body_prefixes_marker(self) -> None: plan = { "source_reviews": [ - {"source_repo": "QuantStrategyLab/CryptoLeaderRotation", "source_issue": {"number": 11, "title": "Monthly Report Review: 2026-04-01"}} + {"source_repo": "QuantStrategyLab/CryptoSnapshotPipelines", "source_issue": {"number": 11, "title": "Monthly Report Review: 2026-04-01"}} ] } diff --git a/tests/test_prepare_auto_optimization_pr.py b/tests/test_prepare_auto_optimization_pr.py index 6690aed..cfd701c 100644 --- a/tests/test_prepare_auto_optimization_pr.py +++ b/tests/test_prepare_auto_optimization_pr.py @@ -14,19 +14,19 @@ class PrepareAutoOptimizationPrTests(unittest.TestCase): def setUp(self) -> None: self.issue_context = { "number": 22, - "title": "Monthly Optimization Tasks · CryptoLeaderRotation: 2026-04-01 / 2026-03", - "body": """# Monthly Optimization Tasks · CryptoLeaderRotation + "title": "Monthly Optimization Tasks · CryptoSnapshotPipelines: 2026-04-01 / 2026-03", + "body": """# Monthly Optimization Tasks · CryptoSnapshotPipelines ## Actions - [ ] `low` Restore monthly shadow/challenger build generation before review [auto-pr-safe] - Summary: Ensure `official_baseline` and `challenger_topk_60` are produced each month. - - Source: [QuantStrategyLab/CryptoLeaderRotation #11](https://github.com/QuantStrategyLab/CryptoLeaderRotation/issues/11) + - Source: [QuantStrategyLab/CryptoSnapshotPipelines #11](https://github.com/QuantStrategyLab/CryptoSnapshotPipelines/issues/11) - [ ] `low` Document and verify tie-breaking for equal scores [auto-pr-safe] - Summary: Confirm the secondary sort used for equal scores is deterministic, stable, and documented. - - Source: [QuantStrategyLab/CryptoLeaderRotation #11](https://github.com/QuantStrategyLab/CryptoLeaderRotation/issues/11) + - Source: [QuantStrategyLab/CryptoSnapshotPipelines #11](https://github.com/QuantStrategyLab/CryptoSnapshotPipelines/issues/11) - [ ] `low` Add a boundary tracker [auto-pr-safe, experiment-only] - Summary: Track near-cutoff symbols monthly. - - Source: [QuantStrategyLab/CryptoLeaderRotation #11](https://github.com/QuantStrategyLab/CryptoLeaderRotation/issues/11) + - Source: [QuantStrategyLab/CryptoSnapshotPipelines #11](https://github.com/QuantStrategyLab/CryptoSnapshotPipelines/issues/11) """, } @@ -37,7 +37,7 @@ def test_parse_actions_preserves_risk_flags_and_source(self) -> None: self.assertEqual(actions[0]["risk_level"], "low") self.assertEqual(actions[0]["flags"], ["auto-pr-safe"]) self.assertEqual(actions[2]["flags"], ["auto-pr-safe", "experiment-only"]) - self.assertEqual(actions[2]["source_label"], "QuantStrategyLab/CryptoLeaderRotation #11") + self.assertEqual(actions[2]["source_label"], "QuantStrategyLab/CryptoSnapshotPipelines #11") def test_build_payload_skips_completed_clr_tasks_and_excludes_experiments(self) -> None: payload = build_payload(self.issue_context, repo_root=PROJECT_ROOT) diff --git a/tests/test_prepare_experiment_validation.py b/tests/test_prepare_experiment_validation.py index d59e1cd..65eeb03 100644 --- a/tests/test_prepare_experiment_validation.py +++ b/tests/test_prepare_experiment_validation.py @@ -9,16 +9,16 @@ class PrepareExperimentValidationTests(unittest.TestCase): def test_build_payload_selects_shadow_build_experiment(self) -> None: issue_context = { "number": 22, - "title": "Monthly Optimization Tasks · CryptoLeaderRotation", - "body": """# Monthly Optimization Tasks · CryptoLeaderRotation + "title": "Monthly Optimization Tasks · CryptoSnapshotPipelines", + "body": """# Monthly Optimization Tasks · CryptoSnapshotPipelines ## Actions - [ ] `low` Run monthly shadow build and archive challenger summaries [auto-pr-safe, experiment-only] - Summary: Generate official_baseline and challenger_topk_60 coverage each month. - - Source: [QuantStrategyLab/CryptoLeaderRotation #11](https://example.com/11) + - Source: [QuantStrategyLab/CryptoSnapshotPipelines #11](https://example.com/11) - [ ] `low` Document and verify tie-breaking for equal scores [auto-pr-safe] - Summary: Confirm deterministic secondary sorting. - - Source: [QuantStrategyLab/CryptoLeaderRotation #11](https://example.com/11) + - Source: [QuantStrategyLab/CryptoSnapshotPipelines #11](https://example.com/11) """, } @@ -32,13 +32,13 @@ def test_build_payload_selects_shadow_build_experiment(self) -> None: def test_build_payload_skips_when_no_experiment_tasks_exist(self) -> None: issue_context = { "number": 30, - "title": "Monthly Optimization Tasks · CryptoLeaderRotation", - "body": """# Monthly Optimization Tasks · CryptoLeaderRotation + "title": "Monthly Optimization Tasks · CryptoSnapshotPipelines", + "body": """# Monthly Optimization Tasks · CryptoSnapshotPipelines ## Actions - [ ] `low` Document and verify tie-breaking for equal scores [auto-pr-safe] - Summary: Confirm deterministic secondary sorting. - - Source: [QuantStrategyLab/CryptoLeaderRotation #11](https://example.com/11) + - Source: [QuantStrategyLab/CryptoSnapshotPipelines #11](https://example.com/11) """, } diff --git a/tests/test_render_experiment_validation_summary.py b/tests/test_render_experiment_validation_summary.py index 81b1e79..94a0624 100644 --- a/tests/test_render_experiment_validation_summary.py +++ b/tests/test_render_experiment_validation_summary.py @@ -9,7 +9,7 @@ class RenderExperimentValidationSummaryTests(unittest.TestCase): def test_build_summary_includes_shadow_track_details(self) -> None: payload = { "issue_number": 22, - "issue_title": "Monthly Optimization Tasks · CryptoLeaderRotation", + "issue_title": "Monthly Optimization Tasks · CryptoSnapshotPipelines", "should_run": True, "experiment_task_count": 1, "experiment_actions": [ diff --git a/tests/test_render_monthly_ai_review.py b/tests/test_render_monthly_ai_review.py index 292cb2e..42efd85 100644 --- a/tests/test_render_monthly_ai_review.py +++ b/tests/test_render_monthly_ai_review.py @@ -17,7 +17,7 @@ def test_render_secondary_review_markdown_includes_actions_and_flags(self) -> No "recommended_actions": [ { "title": "Add another challenger track", - "owner_repo": "CryptoLeaderRotation", + "owner_repo": "CryptoSnapshotPipelines", "risk_level": "low", "auto_pr_safe": True, "experiment_only": True, diff --git a/tests/test_run_openai_secondary_review.py b/tests/test_run_openai_secondary_review.py index c25c0dc..f11dab1 100644 --- a/tests/test_run_openai_secondary_review.py +++ b/tests/test_run_openai_secondary_review.py @@ -14,7 +14,7 @@ class RunOpenAiSecondaryReviewTests(unittest.TestCase): def test_build_system_prompt_for_upstream_selector_mentions_shadow_and_binanceplatform(self) -> None: prompt = build_system_prompt("upstream_selector") - self.assertIn("CryptoLeaderRotation", prompt) + self.assertIn("CryptoSnapshotPipelines", prompt) self.assertIn("shadow/challenger", prompt) self.assertIn("BinancePlatform", prompt)