From 6351d42d3ffd12f4ac1fdfcc8a07fb7935207fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Desbiens?= Date: Fri, 25 Sep 2026 16:57:03 -0400 Subject: [PATCH] Fixed disclosure check matching ordinary prose The disclosure check treated any mention of AI assistance as a malformed source comment, so two sentences in CONTRIBUTING.md failed every dev check. Limit the near-miss check to comment lines shaped like a file disclosure. This keeps documentation prose out of the check while retaining typo detection. The check passed on dev content and rejected a malformed disclosure comment. Assisted-by: Codex (GPT-6) --- scripts/check_ai_disclosure.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/check_ai_disclosure.sh b/scripts/check_ai_disclosure.sh index d9707ac..fe74397 100755 --- a/scripts/check_ai_disclosure.sh +++ b/scripts/check_ai_disclosure.sh @@ -103,7 +103,8 @@ fi # 4. A near miss. A line that is clearly meant to be the disclosure but is # not spelled exactly right defeats every deduplication that follows it. -hits="$(grep -nIF 'AI assistance' -- "${FILES[@]}" 2>/dev/null \ +hits="$(grep -nIE '^[[:space:]]*(//|/\*+|\*|;|@|#)[[:space:]]*(Portions? of this file|Some portions).*AI assistance' \ + -- "${FILES[@]}" 2>/dev/null \ | grep -vF "${FIXED}" || true)" if [ -n "${hits}" ]; then report "AI disclosure check FAILED: the text is not spelled exactly.