fix(ci): restore main CI to green (lint blocker + 2 test systems) - #529
Merged
Merged
Conversation
main CI was red at the Lint job (ruff check), so the Test job never ran (needs: lint). Fixing only the reported test failures would have left CI red. Addresses all blocking gates: Gate1 ruff check (the actual CI blocker): - 4x I001 import-sort auto-fixed (auth/router, ai_judgment_scheduler, test_fee_transfer_service, test_line_messaging) - isort split a combined import; restored # noqa: E402 on the 2nd line Gate2 ruff format: reformat 5 drifted files (whitespace-only). Gate3 mypy: - ignore reportlab.* missing stubs (no upstream type stubs) - annotate get_referral_earnings -> dict[str, str | int | None] Test system 1 - test_judge_with_rag_vcr (2 ERROR): aiohttp 3.14.0 removed AsyncStreamReaderMixin, breaking vcrpy<=8.1.1 (upstream Issue #995 / PR #996 unreleased). aiohttp is a transitive runtime dep via web3/ccxt, so pin aiohttp<3.14 in requirements.txt to keep CI and prod on the same compatible version. Verified green on 3.13.5. Test system 2 - test_monthly_report_router (8 FAILED): register restriction (INITIAL_ADMIN_EMAIL) is correct spec. Other test modules overwrite this env at fixture runtime, so the module-level set is clobbered before these tests run -> /auth/register returns 403. Re-set the env in _register_admin right before POST (same pattern as test_risk_mode.py). Reproduced the 8 failures and confirmed green. Verified locally: Gate1-3 green; both test systems green under cross-module ordering. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🛡️ Path Access Control❌ 違反 (マージブロック)
|
🤖 Automated Code ReviewFiles Reviewed: 0 |
🤖 Codex ReviewSecurity Check: ✅ PASS No issues found. ✨ |
Deploying ultra-autotrade-demo with
|
| Latest commit: |
a9e74bd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://79c2a4aa.ultra-autotrade-demo.pages.dev |
| Branch Preview URL: | https://fix-main-ci-green.ultra-autotrade-demo.pages.dev |
✅ CI Lint Report
|
backend/requirements.txt is a frozen file; PR #529 added aiohttp<3.14 to fix the CI vcrpy breakage. Adding the required entry to docs/integration/backend_deps.md to satisfy the Path Check workflow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🛡️ Path Access Control
|
🤖 Automated Code ReviewFiles Reviewed: 0 |
🤖 Codex ReviewSecurity Check: ✅ PASS No issues found. ✨ |
✅ CI Lint Report
|
milechy
pushed a commit
that referenced
this pull request
Jun 4, 2026
Cherry-applies the same fixes as PR #529 (fix/main-ci-green) to this branch. No branch-specific logic changed; all edits are in files this PR does not own. - 4x I001 import-sort auto-fixed (auth/router, ai_judgment_scheduler, test_fee_transfer_service, test_line_messaging) - ruff format: 5 files reformatted - mypy: pyproject.toml ignore reportlab.*; referral/service.py type annotation - test_fee_transfer_service.py L382: restored # noqa: E402 after isort split Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
milechy
pushed a commit
that referenced
this pull request
Jun 4, 2026
Cherry-applies the same fixes as PR #529 (fix/main-ci-green) to this branch. No branch-specific logic changed; all edits are in files this PR does not own. - 4x I001 import-sort auto-fixed (auth/router, ai_judgment_scheduler, test_fee_transfer_service, test_line_messaging) - ruff format: 5 files reformatted - mypy: pyproject.toml ignore reportlab.*; referral/service.py type annotation - test_fee_transfer_service.py L382: restored # noqa: E402 after isort split Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
milechy
pushed a commit
that referenced
this pull request
Jun 4, 2026
Cherry-applies the same fixes as PR #529 (fix/main-ci-green) to this branch. No branch-specific logic changed; all edits are in files this PR does not own. - 4x I001 import-sort auto-fixed (auth/router, ai_judgment_scheduler, test_fee_transfer_service, test_line_messaging) - ruff format: 5 files reformatted - mypy: pyproject.toml ignore reportlab.*; referral/service.py type annotation - test_fee_transfer_service.py L382: restored # noqa: E402 after isort split Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
milechy
pushed a commit
that referenced
this pull request
Jun 4, 2026
Same fixes as PR #529 applied to non-overlapping files only. aave/client.py excluded from ruff format (this branch owns that file). - 4x I001 import-sort auto-fixed - ruff format: 4 files reformatted - pyproject.toml: ignore reportlab.*; referral/service.py type annotation - test_fee_transfer_service.py L382: restored # noqa: E402 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
main CI を green に戻す(全 PR の関門)。red はいずれも既存 main 由来で #523 とは無関係。
真因(実機で裏取り済み)
CI の
Lint (ruff + mypy)job がruff checkで停止しており、Testjob はneeds: lintで未実行(run 26872934094 で確認)。よって報告の test 2系統だけ直しても CI は赤のまま。lint も同時に解消する。Gate1
ruff check(実際の CI ブロッカー)I001(import 未ソート)を auto-fix:auth/router.py,automation/ai_judgment_scheduler.py,tests/test_fee_transfer_service.py,tests/test_line_messaging.py# noqa: E402を復元Gate2
ruff format --checkGate3
mypy app/reportlab.*を missing-stubs ignore に追加(upstream 型スタブ無し)get_referral_earnings -> dict[str, str | int | None]に型付けTest系統1 —
test_judge_with_rag_vcr(2 ERROR)aiohttp 3.14.0 で
AsyncStreamReaderMixinが削除され vcrpy(<=8.1.1) が壊れる(upstream Issue #995 / PR #996 未リリース)。aiohttp は web3/ccxt 経由の transitive runtime dep のためrequirements.txtにaiohttp<3.14を固定し CI と prod で同一版を保証。3.13.5 で green 確認。Test系統2 —
test_monthly_report_router(8 FAILED)register 制限(
INITIAL_ADMIN_EMAIL)は仕様が正。フルスイートでは他テスト(test_risk_mode.py等)が fixture 実行時に同 env を上書きするため、module-level の set が本テスト実行前に潰され/auth/registerが 403。_register_admin内で POST 直前に env を再セット(test_risk_mode.pyと同パターン)。ローカル検証
ruff check .→ All checks passedruff format --check .→ 515 files already formattedmypy app/→ Success: no issues found in 249 source filestest_risk_mode.py先行 + 修正なしで 8 failed を再現 → 修正後 33 passedaiohttp>=3.7.4/ ccxt>=3.10.11と<3.14は両立🤖 Generated with Claude Code