Skip to content

feat(cicd_rules): typescript_detected gains path_allow_prefixes (parallel to vlang)#375

Merged
hyperpolymath merged 1 commit into
mainfrom
feat/typescript-detected-path-allowlist
May 28, 2026
Merged

feat(cicd_rules): typescript_detected gains path_allow_prefixes (parallel to vlang)#375
hyperpolymath merged 1 commit into
mainfrom
feat/typescript-detected-path-allowlist

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

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 PERMANENT
  • vite.config.ts, vitest.config.ts, tsup.config.ts, tsconfig.json — tooling
  • affinescript-deno-test/, affinescript-cli/ — bootstrap shims
  • rescript/, servers/, repos-monorepo/ — upstream forks
  • hyperpolymath-archive/** — archived

Executor

No change. check_pattern uses String.contains?/2 against allow_prefixes — substring matching works uniformly for both directory prefixes and suffix patterns. The rule structure is byte-identical to the proven :vlang_detected shape.

Tests

test/rules/cicd_rules_typescript_test.exs — 8 tests parallelling cicd_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

  • Admin-merge on green local verify (out of GH Actions budget)
  • Tests will run on next CI sweep when Elixir version is bumped (separate issue)

🤖 Generated with Claude Code

…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>
@hyperpolymath hyperpolymath merged commit 9641125 into main May 28, 2026
21 of 30 checks passed
@hyperpolymath hyperpolymath deleted the feat/typescript-detected-path-allowlist branch May 28, 2026 13:24
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 102 issues detected

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 102
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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant