From 27a3a15ac6b3e7e2ef23990258bd4d7160fc7774 Mon Sep 17 00:00:00 2001 From: Molecule AI Core-DevOps Date: Tue, 12 May 2026 16:39:36 +0000 Subject: [PATCH 1/2] fix(ci): lint TRACKER_RE false-negative on mid-sentence tracker refs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two fixes bundled here (same bug class — TRACKER_RE misses trackers): 1. lint_continue_on_error_tracking.py: TRACKER_RE required a leading `#` comment marker followed by whitespace before the tracker slug. This caused a false-negative when the tracker appeared mid-sentence: `# Phase 3 mask (internal#350)` — the regex matched `# Phase 3` as the comment but then failed because `internal` wasn't directly after `#\s*`. Fixed by removing the `\#\s*` anchor so the regex scans the entire comment line for the `mc#NNN` / `internal#NNN` pattern. 2. lint-continue-on-error-tracking.yml: The lint job's own `continue-on-error: true` directive had no inline tracker comment. The lint script could not find `internal#350` because it was 3 lines above the directive. Added the tracker comment directly on the directive line. Both changes are Python/YAML only — no Go, no platform code. Fixes: lint self-violation that caused lint-continue-on-error-tracking to always fail on this workflow. Co-Authored-By: Claude Opus 4.7 --- .gitea/scripts/lint_continue_on_error_tracking.py | 8 +++++--- .gitea/workflows/lint-continue-on-error-tracking.yml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitea/scripts/lint_continue_on_error_tracking.py b/.gitea/scripts/lint_continue_on_error_tracking.py index f8a0269ad..afb1fcaee 100644 --- a/.gitea/scripts/lint_continue_on_error_tracking.py +++ b/.gitea/scripts/lint_continue_on_error_tracking.py @@ -98,11 +98,13 @@ except ImportError: # --------------------------------------------------------------------------- # Tracker comment regex. # Matches: `# mc#1234`, `# internal#42`, `# mc#1234 - description` +# Also matches trackers embedded mid-sentence: `# see mc#1234 for details` # Does NOT match: `# mc1234` (missing inner #), `mc#1234` (no leading -# `#` comment marker), `# MC#1234` (case-sensitive — `mc` and `internal` -# are conventional lower-case repo slugs). +# comment `#`), `# MC#1234` (case-sensitive). The search is line-wide, +# not just at the comment-marker prefix — fixes false-negative when +# the tracker appears mid-sentence (e.g. `internal#350` after prose). TRACKER_RE = re.compile( - r"#\s*(?Pmc|internal)#(?P\d+)\b" + r"(?Pmc|internal)#(?P\d+)\b" ) # Truthy continue-on-error values we treat as "true". PyYAML decodes diff --git a/.gitea/workflows/lint-continue-on-error-tracking.yml b/.gitea/workflows/lint-continue-on-error-tracking.yml index b9d03e3de..cd3a59a0d 100644 --- a/.gitea/workflows/lint-continue-on-error-tracking.yml +++ b/.gitea/workflows/lint-continue-on-error-tracking.yml @@ -97,7 +97,7 @@ jobs: # PRs. Pre-existing continue-on-error: true directives on main # all violate this lint at first — intentional. Flip to false # follow-up after main is clean for 3 days. internal#350. - continue-on-error: true + continue-on-error: true # internal#350 Phase 3 mask — 14d forced-renewal cadence steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 -- 2.52.0 From 1945b361bf9a3e04b6d744268ec98dfc600f78ef Mon Sep 17 00:00:00 2001 From: Molecule AI Core-DevOps Date: Tue, 12 May 2026 16:59:32 +0000 Subject: [PATCH 2/2] ci: re-trigger checks -- 2.52.0