fix(main): repair post-consolidation merge fallout across gates - #224
Conversation
The production branch gate reported 2028/2030 after the consolidation vehicle landed: validate_entity_label and validate_project_label never observed an uppercase byte that passes the alphanumeric clause yet fails the lowercase clause, so the final || operand stayed uncovered. The quality suite likewise missed three Python arcs in scripts/ check_coverage.py: the previous-line scan exhausting over blank-only history (211->215, 212->211) and the escaped-character arc inside char literal scanning (318->311). Add exact red-to-green cases for each.
Protected main went red after the serial scheduler merges fused conflicting hunks: - check_coverage.py lost a 'return True' in the match-guard branch and carried shadowed duplicate load_union_branch_totals and _is_multiline_match_guard definitions whose branches can never execute; - EXPECTED_CRATES and the Cargo members/default-members arrays contained duplicate episode_membership and analysis_engine entries, failing the no-duplicate workspace contract; - event_core's error-message table fused two (variant, message) pairs into four-tuples that do not compile; - episode_membership::window fused two identity_recovery_rate bodies into an unreachable statement after Ok(...); - analysis_engine duplicated the eligible-count block (plain fold vs the required checked-arithmetic fold) and left 3-arg unit() call sites; - evidence_core documented a private constant via intra-doc link, breaking cargo doc -D warnings; - README held five fences with interleaved prose inside the crate list; ARCHITECTURE held duplicate foundation-crate rows. This restores each parent's intended semantics, keeps the exact-tally usize path for identity_recovery_rate, keeps checked arithmetic for eligible counts, dedupes registries to the canonical 54-crate set, and rebalances the README fence. Includes the #219 uppercase-label and scanner-arc coverage cases so the branch gate is satisfiable at this head.
|
Warning Review limit reachedNext included review available in 10 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (13)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| The repository currently implements 54 independently documented crates rather | ||
| than a full commercial release. The implemented crates include topic | ||
| measurement, the analysis engine, and psychometric input/recovery gates; they | ||
| do not claim a complete commercial estimator, |
There was a problem hiding this comment.
🟡 README states two different crate counts
The updated text says the repository implements 54 crates, while README.md still says the workspace contains 50. The enumerated fence lists 54, so the older count is stale and the two statements contradict each other.
Prompt for agents
README.md contains two conflicting crate counts. Line 21 says "The current workspace contains 50 independently documented Rust crates" while line 28 (updated in this PR) says "The repository currently implements 54 independently documented crates". The alphabetical crate-list fence enumerates 54 crates, matching the deduplicated Cargo.toml and check_workspace_contract.py EXPECTED_CRATES. Update the stale "50" on line 21 to "54" so the document is internally consistent.
Was this helpful? React with 👍 or 👎 to provide feedback.
| or text.startswith("if(") | ||
| or " if(" in text | ||
| ): | ||
| if text.startswith("if ") or text.startswith("if("): | ||
| return True | ||
| return _is_multiline_match_guard(lines, line_number) |
There was a problem hiding this comment.
📝 Info: Shadowed-definition removal is behavior-preserving
The removed first copies of load_union_branch_totals and _is_multiline_match_guard were always shadowed by later definitions, so they were dead. The surviving definitions at check_coverage.py and check_coverage.py retain the active logic, and the call at check_coverage.py and the tests still resolve. No behavior change.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Protected
mainis currently red: the serial scheduler merges fused conflicting hunks across several gates. This PR is a superset repair (includes #219) that restores every parent's intended semantics:Python quality tooling
check_coverage.py: restore lostreturn Truein the match-guard branch; remove shadowed duplicateload_union_branch_totalsand_is_multiline_match_guarddefinitions (dead code with uncoverable branches).check_workspace_contract.py: dedupeepisode_membership/analysis_engineinEXPECTED_CRATES(54 unique).Rust compilation and contracts
event_core/src/error.rs: split union-fused four-tuples back into(variant, message)pairs.episode_membership/src/window.rs: unfuseidentity_recovery_rate; keep the exact-tallyusizepath (count_matching_decisions+recovery_rate_from_tally) per its overflow documentation.analysis_engine/src/lib.rs: keep the checked-arithmetic eligible-count fold (fail-closedArithmeticOverflow) over the plain-fold duplicate; fix 3-argunit()call sites to the 4-arg helper; rustfmt clean.evidence_core/src/image_unit.rs: fix intra-doc link to private constant socargo doc -D warningspasses.Workspace registries and docs
Cargo.toml: dedupe members/default-members to the canonical 54-crate set.location_membership/validation_core/tepp_apirows.Verification at this head
cargo nextest run --workspace --all-features: 1209 passedcargo fmt --all -- --check,cargo clippy -D warnings,cargo doc: cleanpython3 -m pytest tests/quality: 158 passed (+67 subtests)validate_documentation.py,check_workspace_contract.py,check_docstrings.py: PASSSupersedes #222's scope (README fence + duplicate helper + architecture rows) on a current base; supersedes #219 by inclusion.