@@ -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