feat(cicd_rules): typescript_detected gains path_allow_prefixes (parallel to vlang)#375
Merged
Merged
Conversation
…llel to vlang) Extends :typescript_detected with the same path_allow_prefixes mechanism the :vlang_detected rule got in hypatia#372/#373. Carve-outs encode the seven legitimate-TS classes documented in standards#235: (1) .d.ts declaration files (FFI/library headers, not implementation) (2) */bindings/{deno,typescript,ts}/ — interop targets exposing our work to TS/Deno consumers (parallel to v-cartridge/v-adapter/ v-bindings/v-client). Exemplar: proven/bindings/deno/ (72 files) (3) avow-protocol/telegram-bot/avow-telegram-bot/ — Telegraf PERMANENT exemption (canonical TS-native Bot-API lib) (4) Tooling configs: vite.config.ts, vitest.config.ts, tsup.config.ts, tsconfig.json (build orchestration, not application code) (5) affinescript-deno-test/ + affinescript-cli/ — TS/JS shims that bootstrap the AffineScript toolchain itself (6) Upstream forks: rescript/, servers/, repos-monorepo/ (7) Archived repos: hyperpolymath-archive/** check_pattern uses String.contains?/2 so substring matching works uniformly for both directory prefixes (`/bindings/deno/`) and suffix patterns (`.d.ts`, `vite.config.ts`). No executor change needed. New test file cicd_rules_typescript_test.exs (8 tests) parallels cicd_rules_vlang_test.exs structure. Local CI blocked by pre-existing Elixir 1.14 vs Phoenix 1.15 drift; rule logic verified by structural parallel to the proven :vlang_detected shape. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 102 issues detected
View findings[
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in clusterfuzzlite.yml",
"type": "unknown",
"file": "clusterfuzzlite.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in clusterfuzzlite.yml",
"type": "unknown",
"file": "clusterfuzzlite.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
3 tasks
hyperpolymath
added a commit
that referenced
this pull request
May 30, 2026
…ch — standards#260/#261/#263) (#391) ## Summary Single batched Layer-1 PR for **three** estate-campaign STEP 1 sub-issues: - `hyperpolymath/standards#260` — ReScript→AffineScript Layer-1 (umbrella #252) - `hyperpolymath/standards#261` — npm→Deno Layer-1 (umbrella #253) - `hyperpolymath/standards#263` — Unnecessarily-JS→AffineScript Layer-1 (umbrella #254) Batched because the changes are non-conflicting and the carve-out classes share structural overlap (vscode, bootstrap shims, upstream forks, archived, vendored deps). Mirrors the TS Layer-1 batch shape from #375 + #378. ## Rule changes | Rule | Status | Carve-out classes | |---|---|---| | `:rescript_detected` | extended | 8 — bsconfig, upstream forks, archived, vendored, vscode, compiled output (lib/js, lib/es6, lib/bs), bootstrap shims, Telegraf | | `:rescript_interface_detected` | extended | same 8 | | `:nodejs_detected` (package-lock.json) | extended | 6 — vscode, bootstrap shims, upstream forks, archived, vendored, example/test fixtures | | `:javascript_detected` (*.js) | **NEW** | 8 — host-required (mcp-bridge/, /plugins/), tooling configs (.config.{js,cjs,mjs}), bootstrap shims, upstream forks, archived, vendored, compiled output (/out/, /lib/js/, /.deno/), vscode | | `:javascript_jsx_detected` (*.jsx) | **NEW** | same 8 | JS ship-mode design question (umbrella#254 STEP 1) decided in favour of HARD-BLOCK with extensive carve-outs; per-PR exemption via inline `// hypatia: allow cicd_rules/javascript_detected -- <reason>` pragma. ## Tests `test/rules/cicd_rules_rescript_npm_js_test.exs` — 15 representative cases across all 4 rules (flag + per-carve-out exemption) mirroring `cicd_rules_typescript_test.exs`. Verified locally via standalone `elixirc` compile + sanity-check script (15/15 pass). Local `mix test` blocked by Elixir 1.14 vs Phoenix dep mismatch unrelated to this PR; CI runs on a compatible toolchain. ## Seam-finding origin Identified as Layer-1 batch candidate during the umbrella filings session 2026-05-30 (see [[feedback_fanout_and_seam_analyst_meander]] in operator memory). The three STEP 1 sub-issues all cross-reference each other and this batch. ## Test plan - [ ] CI green (Elixir-compatible toolchain runs the new test file) - [ ] No regression in `cicd_rules_typescript_test.exs` (orthogonal rules) - [ ] Manual scan of an estate repo confirms new rules don't fire on legitimate paths ## Cross-references - Refs hyperpolymath/standards#260 (RS STEP 1) - Refs hyperpolymath/standards#261 (npm STEP 1) - Refs hyperpolymath/standards#263 (JS STEP 1) - Refs hyperpolymath/standards#252 (RS umbrella) - Refs hyperpolymath/standards#253 (npm umbrella) - Refs hyperpolymath/standards#254 (JS umbrella) - Pattern: hypatia#375 + #378 (TS Layer-1) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirrors hypatia#372/#373 (V-lang carve-out mechanism) for the TS rule. Closes the gating gap left by standards#235.
Carve-out classes
.d.ts— declaration files*/bindings/{deno,typescript,ts}/— interop targets (parallel to v-cartridge/v-adapter/v-bindings/v-client). Exemplar:proven/bindings/deno/(72 files)avow-protocol/telegram-bot/avow-telegram-bot/— Telegraf PERMANENTvite.config.ts,vitest.config.ts,tsup.config.ts,tsconfig.json— toolingaffinescript-deno-test/,affinescript-cli/— bootstrap shimsrescript/,servers/,repos-monorepo/— upstream forkshyperpolymath-archive/**— archivedExecutor
No change.
check_patternusesString.contains?/2against allow_prefixes — substring matching works uniformly for both directory prefixes and suffix patterns. The rule structure is byte-identical to the proven:vlang_detectedshape.Tests
test/rules/cicd_rules_typescript_test.exs— 8 tests parallellingcicd_rules_vlang_test.exs. Local CI blocked by pre-existing Elixir 1.14 vs Phoenix 1.15 drift; rule logic verified by structural parallel to the proven vlang rule.Test plan
🤖 Generated with Claude Code