gabriel / musehub public
feat patch dev
AI Agent gabriel · 129 days ago · May 9, 2026 · Diff

feat: merge gate evaluation and proposal sidebar checklist

- musehub_proposal_gate.py: evaluate_merge_conditions() returns ordered list of {key, label, met, status, actual, required} dicts for all active MergeConditions keys; canonical ordering enforced; payment_settled returns unknown status when unconfirmed - tests/test_merge_gate.py: 34 tests covering all 9 condition types, entry schema, canonical ordering, edge cases (empty commits, boundaries) - ui_proposals.py: wire merge_gate into proposal_detail_page context - proposal_detail.html: Merge Gate scard renders gate checklist with pass/fail/unknown icons when conditions are configured - _proposal-detail.scss: proposal-gate-* component styles compiled to app.css

sha256:44d8f80dc7942bc20e1ba0031189322c23ba45a02b7e2e4b7beaec2044c56cc5 sha
+69 ~3 symbols
sha256:cbf788f736ca066f5e457983b162c8a947a12b16bb43c368b2d0a706904f7475 snapshot
+69
symbols added
~3
symbols modified
0
dead code introduced
Semantic Changes 72 symbols
+ _CANONICAL_ORDER variable variable _CANONICAL_ORDER L7–17
+ _LABELS variable variable _LABELS L19–29
+ _evaluate_one function function _evaluate_one L71–205
+ evaluate_merge_conditions function function evaluate_merge_conditions L32–68
+ Any import import Any L5–5
+ annotations import import annotations L3–3
~ tests/test_merge_gate.py .py 51 symbols added
+ TestEntrySchema class class TestEntrySchema L291–308
+ test_every_entry_has_required_keys method method test_every_entry_has_required_keys L292–300
+ test_met_is_bool method method test_met_is_bool L302–304
+ test_status_is_valid_string method method test_status_is_valid_string L306–308
+ TestMaxAgentCommitRatio class class TestMaxAgentCommitRatio L214–232
+ test_actual_shows_percentage method method test_actual_shows_percentage L229–232
+ test_met method method test_met L215–218
+ test_no_commits_met method method test_no_commits_met L225–227
+ test_not_met method method test_not_met L220–223
+ TestMaxRiskScore class class TestMaxRiskScore L116–131
+ test_exact_boundary_met method method test_exact_boundary_met L125–127
+ test_met method method test_met L117–119
+ test_not_met method method test_not_met L121–123
+ test_required_shows_threshold method method test_required_shows_threshold L129–131
+ TestNoConditions class class TestNoConditions L60–77
+ test_empty_dict_returns_empty method method test_empty_dict_returns_empty L70–77
+ test_none_returns_empty method method test_none_returns_empty L61–68
+ TestOrdering class class TestOrdering L316–337
+ test_order_is_deterministic method method test_order_is_deterministic L317–337
+ TestRequireApprovals class class TestRequireApprovals L85–108
+ test_actual_shows_count method method test_actual_shows_count L100–103
+ test_met method method test_met L86–92
+ test_not_in_conditions_not_returned method method test_not_in_conditions_not_returned L105–108
+ test_not_met method method test_not_met L94–98
+ TestRequireDependencyMerged class class TestRequireDependencyMerged L199–206
+ test_met_not_blocked method method test_met_not_blocked L200–202
+ test_not_met_blocked method method test_not_met_blocked L204–206
+ TestRequireDomainsApproved class class TestRequireDomainsApproved L240–260
+ test_actual_shows_missing method method test_actual_shows_missing L255–260
+ test_met_all_domains_approved method method test_met_all_domains_approved L241–246
+ test_not_met_missing_domain method method test_not_met_missing_domain L248–253
+ TestRequireNoBreakage class class TestRequireNoBreakage L165–176
+ test_actual_shows_count method method test_actual_shows_count L174–176
+ test_met method method test_met L166–168
+ test_not_met method method test_not_met L170–172
+ TestRequirePaymentSettled class class TestRequirePaymentSettled L268–283
+ test_pass_when_settled method method test_pass_when_settled L277–283
+ test_unknown_when_not_settled method method test_unknown_when_not_settled L269–275
+ TestRequireSignedCommits class class TestRequireSignedCommits L139–157
+ test_actual_shows_signed_fraction method method test_actual_shows_signed_fraction L154–157
+ test_met_all_signed method method test_met_all_signed L140–143
+ test_no_commits_met method method test_no_commits_met L150–152
+ test_not_met_one_unsigned method method test_not_met_one_unsigned L145–148
+ TestRequireTestCoverage class class TestRequireTestCoverage L184–191
+ test_met method method test_met L185–187
+ test_not_met method method test_not_met L189–191
+ _commits function function _commits L33–37
+ _gate function function _gate L40–52
+ annotations import import annotations L22–22
+ evaluate_merge_conditions import import evaluate_merge_conditions L26–26
+ pytest import import pytest L24–24
~ musehub/api/routes/musehub/ui_proposals.py .py 1 symbol added, 1 symbol modified
+ evaluate_merge_conditions import import evaluate_merge_conditions L38–38
~ src/scss/components/_proposal-detail.scss .scss 11 symbols added, 1 symbol modified
+ proposal-gate-all-pass rule .proposal-gate-all-pass L1341–1347
+ proposal-gate-body rule .proposal-gate-body L1320–1323
+ proposal-gate-detail rule .proposal-gate-detail L1332–1339
+ proposal-gate-icon rule .proposal-gate-icon L1305–1318
+ proposal-gate-icon--fail rule .proposal-gate-icon--fail L1316–1316
+ proposal-gate-icon--pass rule .proposal-gate-icon--pass L1315–1315
+ proposal-gate-icon--unknown rule .proposal-gate-icon--unknown L1317–1317
+ proposal-gate-item rule .proposal-gate-item L1296–1303
+ proposal-gate-item:last-child rule .proposal-gate-item:last-child L1302–1302
+ proposal-gate-label rule .proposal-gate-label L1325–1330
+ proposal-gate-list rule .proposal-gate-list L1290–1294
← Older Oldest on dev
All commits
Newer → Latest on dev

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:44d8f80dc7942bc20e1ba0031189322c23ba45a02b7e2e4b7beaec2044c56cc5 --body "your comment"