chore(governance): sync governance foundation and quality debt fixes into dev - #3
Merged
Conversation
Bootstrap 合入:治理文档、CI workflow、验证器、社区入口、发布守卫。质量门禁历史债务由后续 PR 清偿。
Quality Gates never ran before (workflow triggered only on nonexistent main/develop), so lint and type debt accumulated silently: - ruff: auto-fix 577 items (trailing whitespace, datetime.UTC, unused imports/noqa); manual fixes for E701, F841, B905, UP042 (StrEnum), TC002, and an F821 root-cause bug where _update_weights_based_on_ performance called an f1_score that was shadowed by a local float in a sibling method (would raise TypeError at runtime) - format: normalize 44 files via ruff format - mypy: annotate mixin-expected attributes in risk_management mixins; fix stale test attribute sets; narrow Optional types; targeted type-ignore comments only where tests intentionally pass invalid input to assert validation behavior
…n plan Track the v2 implementation/acceptance plan referenced by docs/governance/decision-log.md as its decision source, following the existing docs(plan) convention so the audit chain stays inside version control. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
The mypy-driven stubs added to MarketRiskMixin shadowed the real implementations in PositionRiskMixin (MRO order), making _calculate_position_concentration/_calculate_sector_exposure/_serialize_metrics return None at runtime and crashing MarketRiskMetrics construction. Move the cross-mixin orchestrator _calculate_market_risk into RiskCalculator, where all mixin methods are legitimately visible. Also skip repository-baseline and plugin-discovery tests when submodules or plugin packages are absent (CI checks out neither).
…y Gates real (#2) 清偿历史质量债务,Quality Gates 与全兼容性矩阵首次全绿。
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.
M1 步骤 6:master → dev 同步
将 bootstrap(PR #1) 与质量债务清偿(PR #2) 同步到日常集成分支。此 PR 合入并通过后,才将默认分支切换为 dev(D0)。
包含:
risk:r0 — 无行为语义变更,仅治理与质量基础设施。