refactor: migrate all banned Python to Deno (language policy)#59
Closed
hyperpolymath wants to merge 3 commits into
Closed
refactor: migrate all banned Python to Deno (language policy)#59hyperpolymath wants to merge 3 commits into
hyperpolymath wants to merge 3 commits into
Conversation
Codify the CODEOWNERS standard for hyperpolymath repos: solo-owned repos carry no catch-all `*` or `/.github/workflows/` lines (silences the Dependabot review_requested notification flood); path lines are kept only for genuine co-owners; co-owner removal needs explicit confirmation. Includes the standards#55 per-repo decision matrix (idaptik retained as the sole Rule 2/3 case), canonical CODEOWNERS templates, README wiring, and an ADR record in META.a2ml. https://claude.ai/code/session_01GTo7dz32ZgxuHXefv8BGqn
Removes the 4 remaining non-SaltStack Python files (which were failing the language-policy + rsr-antipattern CI banned-language gates) by porting each to Deno, an allowed runtime: - a2ml/scripts/contractiles-a2ml-tool.py -> .js (Deno). JSON emit output is byte-identical to the previous json.dumps(sort_keys, indent=2) form; verified against tests/contractiles/expected/*.json. The three shell wrappers and the a2ml docs now invoke `deno run`. - avow-protocol stamp_example.py -> examples/deno/stamp_example.js using Deno FFI (Deno.dlopen) instead of ctypes; zig FFI README updated. - consent-aware-http python/ reference impl -> deno/ (aibdp_middleware.js + example_server.js on Deno.serve), manifest moved, README ported, nodejs cross-link fixed. No banned Python remains; new JS passes node --check. https://claude.ai/code/session_01GTo7dz32ZgxuHXefv8BGqn
The Deno port carried over literal fake credential strings from the former Python example; replace them with obviously-inert EXAMPLE-* placeholders so gitleaks does not flag the example. https://claude.ai/code/session_01GTo7dz32ZgxuHXefv8BGqn
4 tasks
Owner
Author
|
Closing in favour of #60, which delivers the identical net change as a single clean commit off Rationale: Generated by Claude Code |
hyperpolymath
added a commit
that referenced
this pull request
May 15, 2026
) (#60) ## Summary Clean-history replacement for #59 (closed). Eliminates the 4 remaining non-SaltStack Python files — the ones tripping the `Check for Banned Languages` / `antipattern-check` banned-language CI gates — by porting each to **Deno**, an allowed runtime. Delivered as a **single commit off `main`** so that no commit anywhere in this PR's history introduces the example credential-like strings. (On #59, an intermediate commit re-added pre-existing fake `token`/`signature` example literals; `gitleaks-action` scans per-commit, so a follow-up fix couldn't clear it. This branch carries the inert `EXAMPLE-*` placeholders from the first and only commit.) | Was (Python) | Now (Deno) | Notes | |---|---|---| | `a2ml/scripts/contractiles-a2ml-tool.py` | `…-tool.js` | JSON emit **byte-identical** to old `json.dumps(sort_keys=True, indent=2)` — verified against `tests/contractiles/expected/*.json`. Wrappers + a2ml docs call `deno run`. | | `avow-protocol/.../examples/python/stamp_example.py` | `examples/deno/stamp_example.js` | `ctypes` → `Deno.dlopen`; fake literals → inert `EXAMPLE-*`; zig FFI README updated. | | `consent-aware-http/.../python/{aibdp_middleware,example_server}.py` (+README/reqs) | `…/deno/` on `Deno.serve` | manifest moved, README ported, nodejs cross-link fixed. | Verified in-sandbox (Node shim; no Deno here): byte-identical emit, correct validate exit codes, `node --check` clean on all 4 files, no Python remains under either CI banned-language filter. CODEOWNERS policy (#58) is **not** included here — it already merged to `main`. ## Test plan - [ ] `gitleaks` passes (no fake secrets in any commit) - [ ] `Check for Banned Languages` / `antipattern-check` no longer fail on Python (pre-existing ReScript `.res` debt is separate/out of scope) - [ ] `cd a2ml && bash scripts/contractiles-a2ml-test.sh` (needs `deno`) - [ ] `deno run --allow-read --allow-net consent-aware-http/examples/reference-implementations/deno/example_server.js` + the curl checks https://claude.ai/code/session_01GTo7dz32ZgxuHXefv8BGqn --- _Generated by [Claude Code](https://claude.ai/code/session_01GTo7dz32ZgxuHXefv8BGqn)_ Co-authored-by: Claude <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
Eliminates the 4 remaining non-SaltStack Python files in the repo — the ones tripping the
Check for Banned Languages(language-policy.yml) andantipattern-check(rsr-antipattern.yml) CI gates — by porting each to Deno, an allowed runtime per the estate language policy.a2ml/scripts/contractiles-a2ml-tool.py…-tool.jsjson.dumps(sort_keys=True, indent=2)output — verified againsttests/contractiles/expected/*.json. 3 shell wrappers + a2ml docs now calldeno run.avow-protocol/.../examples/python/stamp_example.pyexamples/deno/stamp_example.jsctypes→Deno.dlopenFFI; zig FFI README updated.consent-aware-http/.../python/{aibdp_middleware,example_server}.py+ README/reqs…/deno/(aibdp_middleware.js,example_server.jsonDeno.serve)nodejscross-link fixed.Verification done in-sandbox (no Deno available here, Node used as a shim):
emitoutputs byte-identical to committed expected fixtures;validatereturns rc 0 on valid / rc 1 on invalid fixtures.node --checkpasses on all 4 new JS files.findwith both CI banned-language filters now returns no Python.Test plan
Check for Banned Languagesandantipattern-checknow pass (no.pyoutside SaltStack)cd a2ml && bash scripts/contractiles-a2ml-test.sh(requiresdeno) — emit diffs clean, invalid fixtures fail as expecteddeno run --allow-read --allow-net consent-aware-http/examples/reference-implementations/deno/example_server.jsthen the threecurlchecksdeno run --allow-read --allow-ffi avow-protocol/avow-lib/examples/deno/stamp_example.js(afterzig build)Note: this is a separate change from the merged CODEOWNERS policy (#58); it reuses the same working branch.
https://claude.ai/code/session_01GTo7dz32ZgxuHXefv8BGqn
Generated by Claude Code