Skip to content

Goal/phb remaining#325

Merged
cukas merged 9 commits into
mainfrom
goal/phb-remaining
May 26, 2026
Merged

Goal/phb remaining#325
cukas merged 9 commits into
mainfrom
goal/phb-remaining

Conversation

@cukas
Copy link
Copy Markdown
Contributor

@cukas cukas commented May 26, 2026

What

Why

How

Checklist

  • tsc -b passes
  • pnpm test passes
  • pnpm test:kern passes
  • pnpm lint passes
  • kern review packages/ --recursive checked

cukas and others added 9 commits May 26, 2026 12:12
…rst-only

Differential conformance fixtures for the landed host-builtins (tasks 01/04/05)
revealed 3 runtime bugs that passed codegen-string tests + 7-engine review +
mutation + the green gate:
- Math.trunc was not lowered (raw Math.trunc -> Python NameError)
- .startsWith/.endsWith were not lowered (-> AttributeError)
- .replace replaced ALL occurrences, not the first (JS replaces first only)

Adds 19 differential Express-vs-FastAPI fixtures to scripts/conformance.mjs
(now 38/38). The codegen-string tests never RAN the lowered Python; these do.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…+ 1-arg max/min)

Differential fixtures revealed task 02's landed impl was half-broken despite
passing gate + review + judge + mutation:
- Math.pow/sqrt/hypot/random were NOT lowered (raw -> Python NameError)
- Math.max(x)/Math.min(x) 1-arg emitted max(x)/min(x) -> Python TypeError
  (Python treats a lone arg as an iterable); JS returns the value.

Lowers pow->** , sqrt/hypot->math.*, random->random.random(); 1-arg max/min
returns the value. Adds 9 differential fixtures (now 47/47).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…forge target

parseInt/parseFloat/(n).toFixed(d)->STRING/Number.isInteger have no Python
lowering yet, so these 6 fixtures fail. They become the discriminating fitness
for the agon forge: a candidate passes only when 03 lowers correctly on BOTH
targets at runtime.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…/toFixed/isInteger)

Task 03 implemented via 'agon forge' (gemini winner, codex runner-up; both passed
all 53 differential fixtures). Judge (claude) flagged a reachable f-string bug:
(n).toFixed(d) emitted f"{recv:.{d}f}" which is a SyntaxError on CPython <3.12
when recv contains a quote (e.g. data["price"]) — local py is 3.9. Hardened to
quote-safe format(recv, '.'+str(d)+'f') and added a bracket-receiver fixture.

54/54 conformance fixtures green. Closes the host-builtin surface (6/6 groups).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cukas cukas merged commit 9045827 into main May 26, 2026
3 checks passed
@cukas cukas deleted the goal/phb-remaining branch May 27, 2026 04:59
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