Skip to content

refactor: migrate all banned Python to Deno (language policy)#59

Closed
hyperpolymath wants to merge 3 commits into
mainfrom
claude/complete-issue-standards-Wamwv
Closed

refactor: migrate all banned Python to Deno (language policy)#59
hyperpolymath wants to merge 3 commits into
mainfrom
claude/complete-issue-standards-Wamwv

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Eliminates the 4 remaining non-SaltStack Python files in the repo — the ones tripping the Check for Banned Languages (language-policy.yml) and antipattern-check (rsr-antipattern.yml) CI gates — by porting each to Deno, an allowed runtime per the estate language policy.

Was (Python) Now (Deno) Notes
a2ml/scripts/contractiles-a2ml-tool.py …-tool.js JSON emit is byte-identical to the old json.dumps(sort_keys=True, indent=2) output — verified against tests/contractiles/expected/*.json. 3 shell wrappers + a2ml docs now call deno run.
avow-protocol/.../examples/python/stamp_example.py examples/deno/stamp_example.js ctypesDeno.dlopen FFI; zig FFI README updated.
consent-aware-http/.../python/{aibdp_middleware,example_server}.py + README/reqs …/deno/ (aibdp_middleware.js, example_server.js on Deno.serve) Manifest moved, README ported, nodejs cross-link fixed.

Verification done in-sandbox (no Deno available here, Node used as a shim):

  • a2ml port: all 4 emit outputs byte-identical to committed expected fixtures; validate returns rc 0 on valid / rc 1 on invalid fixtures.
  • node --check passes on all 4 new JS files.
  • find with both CI banned-language filters now returns no Python.

Test plan

  • Check for Banned Languages and antipattern-check now pass (no .py outside SaltStack)
  • cd a2ml && bash scripts/contractiles-a2ml-test.sh (requires deno) — emit diffs clean, invalid fixtures fail as expected
  • deno run --allow-read --allow-net consent-aware-http/examples/reference-implementations/deno/example_server.js then the three curl checks
  • deno run --allow-read --allow-ffi avow-protocol/avow-lib/examples/deno/stamp_example.js (after zig 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

claude added 3 commits May 15, 2026 11:24
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
Copy link
Copy Markdown
Owner Author

Closing in favour of #60, which delivers the identical net change as a single clean commit off main.

Rationale: gitleaks-action scans each commit in the PR range. An intermediate commit here re-added pre-existing fake token/signature example literals, so a follow-up placeholder commit could not clear the finding. #60 carries the inert EXAMPLE-* placeholders from its only commit, so no commit ever contains the strings. The pre-existing ReScript/Hypatia failures are unrelated estate debt and out of scope for the Python removal.


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

2 participants