fix(review): treat a blank consentPhrase as unset in evaluateClaCheck - #5877
fix(review): treat a blank consentPhrase as unset in evaluateClaCheck#5877lourincedaging0-commits wants to merge 1 commit into
Conversation
An empty-string consentPhrase (distinct from null/unset — reachable via the dashboard/API-settable
claConsentPhrase, which has no non-empty validation) made phraseSatisfied unconditionally true, because
"".includes("") is always true, silently satisfying CLA consent for every PR. Normalize a blank or
whitespace-only consentPhrase to null before the phrase check, mirroring the config-as-code path's existing
empty-string handling, so it behaves exactly as if unset. Applied to BOTH hand-duplicated twins
(src/review/cla-check.ts and packages/loopover-engine/src/review/cla-check.ts) to keep engine-parity.
Scoped to consentPhrase normalization; the escalation/severity contract and either-method-holds logic are
untouched. Regression tests for empty and whitespace-only consentPhrase in both suites; full patch coverage.
Closes JSONbored#5838
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-14 21:30:27 UTC
🛑 Suggested Action - Reject/Close Review summary Nits — 6 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentCI checks failing
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
Gittensory is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests (6), validate-tests (1), validate-tests (4), validate-tests (2), validate-tests (3), validate-tests (5)); Linked issue overlaps another open PR; duplicate of another open PR). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Closes #5838. Gate-bypass fix in
evaluateClaCheck.An empty-string
consentPhrase(distinct fromnull/unset) makes"".includes("")unconditionally true, so phrase detection silently satisfies CLA consent for every PR. Reachable via the dashboard/API-settableclaConsentPhrase(z.string().nullable().optional(), no non-empty validation);?? nullat the call site only substitutes forundefined/null, not"".Fix: normalize a blank/whitespace-only
consentPhrasetonullonce at the top ofevaluateClaCheck, used at all three sites — mirroring the config-as-code path (focus-manifestnormalizeOptionalString). Applied identically to both hand-duplicated twins (src/review/cla-check.tsandpackages/loopover-engine/src/review/cla-check.ts) so the engine-parity check stays green. Scoped strictly toconsentPhrasenormalization — the escalation/severity contract and either-method-holds logic are untouched.Regression tests for
consentPhrase: ""and" "in both the host suite and the engine-copy suite (predicted-gate-engine-coverage.test.ts). Verified locally: engine-parity test 38/38, 100% branch coverage on both twins,tsc --noEmitclean.