Skip to content

Commit 380dc76

Browse files
fix(ci): rsr-antipattern duplicate heredoc + setup-beam ubuntu24 (#31)
**rsr-antipattern.yml**: deletes the orphan duplicate Python script (lines 274-428) that escapes the heredoc and exits 127. Mirrors hyperpolymath/rsr-template-repo#39. **hypatia-scan.yml**: bumps `erlef/setup-beam` SHA from `2f0cc07b…` to `fc68ffb9…` so `ImageOS=ubuntu24` resolves to `ubuntu-24.04` (matches the pin in hyperpolymath/hypatia upstream). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 0b56331 commit 380dc76

2 files changed

Lines changed: 1 addition & 78 deletions

File tree

.github/workflows/hypatia-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fetch-depth: 0 # Full history for better pattern analysis
2727

2828
- name: Setup Elixir for Hypatia scanner
29-
uses: erlef/setup-beam@ee09b1e59bb240681c382eb1f0abc6a04af72764 # v1.18.2
29+
uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.18.2
3030
with:
3131
elixir-version: '1.19.4'
3232
otp-version: '28.3'

.github/workflows/rsr-antipattern.yml

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -138,83 +138,6 @@ jobs:
138138
print(f"✅ No TypeScript files outside allowlist ({len(exemption_patterns)} per-repo exemption(s) parsed).")
139139
PYEOF
140140
141-
# Universal builtin allowlist — bridges that need no per-repo declaration.
142-
# Files matching any of these patterns are always allowed.
143-
BUILTIN_GLOBS = [
144-
'*.d.ts',
145-
'**/bindings/**',
146-
'**/tests/**', '**/test/**',
147-
'**/scripts/**',
148-
'**/mcp-adapter/**',
149-
'**/*vscode*/**',
150-
'**/cli/**',
151-
'**/mod.ts',
152-
'**/lsp-server.ts', '**/lsp_server.ts', '**/lsp.ts', '**/*-lsp.ts',
153-
'**/deno-*/**',
154-
'**/node_modules/**',
155-
'**/vendor/**',
156-
'**/examples/**',
157-
'**/ffi/**',
158-
]
159-
160-
# Per-repo exemptions parsed from .claude/CLAUDE.md "TypeScript Exemptions" table.
161-
# Single source of truth — adding a row here unblocks CI for that path.
162-
# Format expected:
163-
# ### TypeScript Exemptions ...
164-
# | Path | Files | Rationale | Unblock condition |
165-
# |---|---|---|---|
166-
# | `path/to/file.ts` | 1 | ... | ... |
167-
# | `dir/*.ts` | 6 | ... | ... |
168-
exemptions = []
169-
claude_md = pathlib.Path('.claude/CLAUDE.md')
170-
if claude_md.exists():
171-
in_table = False
172-
for line in claude_md.read_text(encoding='utf-8').splitlines():
173-
if re.search(r'TypeScript [Ee]xemptions', line):
174-
in_table = True
175-
continue
176-
if in_table and line.startswith(('### ', '## ', '# ')):
177-
break
178-
if in_table and line.startswith('|'):
179-
m = re.match(r'\|\s*`([^`]+)`', line)
180-
if m:
181-
exemptions.append(m.group(1))
182-
183-
# Find all .ts and .tsx files
184-
found = []
185-
for ext in ('ts', 'tsx'):
186-
found.extend(str(p) for p in pathlib.Path('.').rglob(f'*.{ext}'))
187-
188-
def allowed(path):
189-
p = path.lstrip('./')
190-
for g in BUILTIN_GLOBS + exemptions:
191-
if fnmatch.fnmatchcase(p, g):
192-
return True
193-
# also treat glob ending with / as a directory prefix
194-
base = g.rstrip('/').rstrip('*').rstrip('/')
195-
if base and (p == base or p.startswith(base + '/')):
196-
return True
197-
return False
198-
199-
bad = sorted(f for f in found if not allowed(f))
200-
if bad:
201-
print("❌ TypeScript files detected outside the allowlist.\n")
202-
for f in bad:
203-
print(f" {f}")
204-
print()
205-
print("To resolve, either:")
206-
print(" (a) migrate the file to AffineScript")
207-
print(" (see Human_Programming_Guide.adoc migration chapter), OR")
208-
print(" (b) move it to an allowlisted bridge path")
209-
print(" (bindings/, tests/, scripts/, mcp-adapter/, *vscode*/, cli/, deno-*/, etc.), OR")
210-
print(" (c) add an entry to the 'TypeScript Exemptions' table in .claude/CLAUDE.md")
211-
print(" with rationale + unblock condition.")
212-
if exemptions:
213-
print(f"\n(Currently {len(exemptions)} exemption(s) parsed from .claude/CLAUDE.md.)")
214-
sys.exit(1)
215-
print(f"✅ No TypeScript files outside allowlist ({len(exemptions)} per-repo exemption(s) parsed).")
216-
PYEOF
217-
218141
- name: Check for Go
219142
run: |
220143
if find . -name "*.go" | grep -q .; then

0 commit comments

Comments
 (0)