Skip to content

refactor: migrate all banned Python to Deno (clean history, replaces #59)#60

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/migrate-banned-python-to-deno
May 15, 2026
Merged

refactor: migrate all banned Python to Deno (clean history, replaces #59)#60
hyperpolymath merged 1 commit into
mainfrom
claude/migrate-banned-python-to-deno

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

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

Removes the 4 remaining non-SaltStack Python files (failing the
language-policy + rsr-antipattern banned-language CI gates) by porting
each to Deno, an allowed runtime. Single clean commit so no commit in
history introduces example credential-like strings (gitleaks-safe).

- a2ml/scripts/contractiles-a2ml-tool.py -> .js (Deno). JSON emit output
  byte-identical to the previous json.dumps(sort_keys, indent=2) form;
  verified against tests/contractiles/expected/*.json. Shell wrappers
  and a2ml docs now invoke `deno run`.
- avow-protocol stamp_example.py -> examples/deno/stamp_example.js using
  Deno FFI (Deno.dlopen); fake token/signature literals replaced with
  inert EXAMPLE-* placeholders; 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
@hyperpolymath hyperpolymath marked this pull request as ready for review May 15, 2026 17:46
@hyperpolymath hyperpolymath merged commit e830dd3 into main May 15, 2026
19 of 22 checks passed
@hyperpolymath hyperpolymath deleted the claude/migrate-banned-python-to-deno branch May 15, 2026 17:46
hyperpolymath added a commit that referenced this pull request May 15, 2026
## Summary

The **Hypatia Neurosymbolic Analysis (Dogfooding)** job
(`hypatia-scan.yml`, job `scan`) has been failing on **100% of runs**
across the estate, independent of PR content — red on already-merged PRs
(#58, #60) and every new PR (#62).

Root cause (inferred from a consistent ~12s fast-fail + workflow logic;
the scan step uses `--exit-zero` and the only gate is "warn but don't
fail"): the `Setup Elixir` step pinned `elixir-version: '1.19.4'` /
`otp-version: '28.3'`, which are **not present in the `setup-beam`
version index**, so the step errored immediately and failed the whole
job for everyone.

This pins to currently-published, resolvable **loose** major/minor
versions (`elixir 1.18` / `otp 27`) so patch availability cannot
re-break it.

## Changes

- `hypatia-scan.yml`: corrected `setup-beam` Elixir/OTP pins + rationale
comment.

## Test plan

- [ ] `Hypatia Neurosymbolic Analysis (Dogfooding)` goes green on this
PR (unrelated no-op change → proves the failure was environmental, not
finding-driven).
- [ ] Confirm `1.18` / `27` actually build Hypatia's scanner (`mix
escript.build`); bump deliberately if the scanner needs newer.
- [ ] Follow-up (tracked in companion issue): publish a
supported-toolchain matrix in `hyperpolymath/hypatia` + a smoke job
there so a bad pin fails *at the source*, not estate-wide.

https://claude.ai/code/session_01GTo7dz32ZgxuHXefv8BGqn

---
_Generated by [Claude
Code](https://claude.ai/code/session_01GTo7dz32ZgxuHXefv8BGqn)_

Co-authored-by: Claude <noreply@anthropic.com>
hyperpolymath added a commit that referenced this pull request May 15, 2026
## Summary

Estate-wide migration of **all 119 `.res` (ReScript, banned 2026-04-30)
→ `.affine` (AffineScript)**, per language policy. This clears the
standing ReScript `antipattern-check` / `Check for Banned Languages`
debt (the pre-existing failure noted on #58/#60).

Faithful semantic rewrites following the repo's established AffineScript
conventions (`module X;`, `pub type`, `fn … -> T { }`, `match`,
`Option<T>`, `extern fn … = "mod" "sym";`, `++`), modelled on existing
hand-ports (e.g. `axel-protocol/src/AxelSts.affine`). Delivered in 15
reviewable per-subproject commits.

### Progress — COMPLETE (119/119)

- [x] 24 × `SafeDOMExample` (canonical dedupe)
- [x] axel-protocol, avow-protocol (src/bindings/scripts/telegram-bot)
- [x] consent-aware-http (+ rhodium satellite mirror)
- [x] all of `lol/` (Lang1000, 5 crawlers, DBP API, OpenCyc, verisimdb,
utils, 4 test suites)
- [x] 0-ai-gatekeeper mcp-repo-guardian (+ identical `lib/ocaml/`
mirror)
- [x] panll-panels (React → `h()` lowering)
- [x] k9-svc + a2ml Deno bindings
- [x] cccp 7-tentacles (Types + 7 agents + RevealSystem)
- [x] a2ml prototype compiler (core/Compat/Json/CLI/runners/WASM)

**Verification:** `find . -name '*.res'` → zero; both CI banned-language
`find` filters return no ReScript. No AffineScript compiler exists in
this environment, so ports are not compile-verified — conventions are
consistent across all files so any needed correction is mechanical. The
`Hypatia` dogfooding check is a pre-existing repo-wide failure unrelated
to this migration.

## Test plan

- [ ] `antipattern-check` / `Check for Banned Languages` ReScript step
passes (no `.res` remain)
- [ ] AffineScript compiler review of the ports once available
(conventions inferred from existing hand-ports)
- [ ] Spot-check round-trip behaviour of A2ml/K9 parser-renderer ports

https://claude.ai/code/session_01GTo7dz32ZgxuHXefv8BGqn
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