fix(review): treat an empty consent phrase as unconfigured, not auto-satisfied - #5873
fix(review): treat an empty consent phrase as unconfigured, not auto-satisfied#5873luciferlive112116 wants to merge 1 commit into
Conversation
…satisfied Closes JSONbored#5838 evaluateClaCheck (src/review/cla-check.ts) computed `phraseSatisfied = config.consentPhrase !== null && body.includes(config.consentPhrase)`. When consentPhrase is the empty string "" (distinct from null; claConsentPhrase is a dashboard/API-settable `z.string().nullable()` field), `"" !== null` is true and any `body.includes("")` is unconditionally true, so phraseSatisfied was always true -- silently satisfying CLA consent for every PR, even one whose configured CLA check-run was failing. Fix: normalize an empty consentPhrase to null at the top of the function, so it is treated as "phrase detection not configured" (the same as null) -- it never satisfies consent, and never emits a nonsensical `the PR description must contain ""` requirement. This matches the field's documented contract ("null => phrase-match detection is not configured"). Regression tests: an empty phrase alongside a failing check-run now correctly hard-fails (cla_consent_missing) listing only the check-run; an empty phrase with no other method is "nothing configured" and yields no finding. cla-check.ts stays 100% branch-covered.
|
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:25 UTC
🛑 Suggested Action - Reject/Close Review summary Nits — 4 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentCI checks failing
Linked issue satisfactionPartially addressed 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 (4), validate-tests (1), validate-tests (5), validate-tests (2), validate-tests (6), validate-tests (3)); 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. |
Summary
Closes #5838
evaluateClaCheck(src/review/cla-check.ts) computedphraseSatisfied = config.consentPhrase !== null && (ctx.body ?? "").toLowerCase().includes(config.consentPhrase.toLowerCase()). WhenconsentPhraseis the empty string""(distinct fromnull—claConsentPhraseis a dashboard/API-settablez.string().nullable()field),"" !== nullistrueand anybody.includes("")is unconditionallytrue, sophraseSatisfiedwas always true — silently satisfying CLA consent for every PR, even one whose configured CLA check-run was failing.Fix: normalize an empty
consentPhrasetonullat the top of the function, so it is treated as "phrase detection not configured" (the same asnull) — it never satisfies consent, and never emits a nonsensicalthe PR description must contain ""requirement. This matches the field's documented contract ("null⇒ phrase-match detection is not configured").Scope
fix(review): …).CONTRIBUTING.md; nosite//CNAME/VitePress.Validation
git diff --checknpm run typecheckcleannpm run test:coverageonsrc/review/cla-check.ts: 100% lines & branches (25/25) — the new empty-vs-non-empty normalization branch is covered by the added tests; existing tests cover the null/non-empty paths.cla_consent_missing) listing only the check-run (nevermust contain ""); an empty phrase with no other method configured is "nothing configured" → no finding.If any required check was skipped, explain why:
test:cinot run end-to-end locally (Linux-only shell/self-host steps on Windows); the change-relevant gates (typecheck, focused coverage, the cla-check suite) were validated directly.Safety