kataan 0.0.8

A high-performance JavaScript engine written in pure Rust. Library, C FFI, and CLI.
Documentation
# Manually-dispatched re-bless of the Test262 known-failures ledger.
#
# The full ~53k-test corpus is too heavy to run locally (it OOMs a dev box
# driving the interpreter under load), so we never run it on a developer
# machine. Instead, after landing a batch that changes which tests pass/fail,
# trigger this workflow:
#
#   gh workflow run bless-test262.yml --ref master
#
# It runs the official runner in BLESS mode (regenerating
# `tests/test262-status.txt` from the current pass/fail set), then commits the
# updated ledger back to the branch if it changed. The nightly/`ci.yml`
# `test262_official` job stays the *gate* (it fails on any regression not in the
# ledger); this job is the *bless* (it rewrites the ledger to match reality).
name: Bless Test262 ledger

on:
  workflow_dispatch:
    inputs:
      ref:
        description: Branch to bless (default master)
        required: false
        default: master

permissions:
  contents: write

jobs:
  bless:
    name: Regenerate tests/test262-status.txt
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ github.event.inputs.ref }}
          # Pull the pinned tc39/test262 corpus submodule (shallow).
          submodules: recursive
          # The org RELEASE_PLZ_TOKEN (write to all repos) so the bot can push the
          # regenerated ledger back to master past branch protection.
          token: ${{ secrets.RELEASE_PLZ_TOKEN }}
          persist-credentials: true

      - name: Fetch the intl crate (path-dependency sibling)
        run: git clone --depth 1 https://github.com/KarpelesLab/intlrs.git ../unicoders

      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable

      - name: Cache
        uses: Swatinem/rust-cache@v2

      # BLESS mode: rewrite the ledger from the current run (never fails on a
      # regression — it records it instead). The empty-ledger target (100%) is
      # the goal; this just keeps the ledger honest between batches.
      - name: Re-bless the ledger
        env:
          KATAAN_TEST262_BLESS: "1"
        run: cargo test --release --test test262_official -- --ignored --nocapture

      - name: Commit the regenerated ledger
        run: |
          if git diff --quiet -- tests/test262-status.txt; then
            echo "Ledger unchanged — nothing to commit."
            exit 0
          fi
          git config user.name "kataan-bless-bot"
          git config user.email "noreply@github.com"
          # Report the net change in the commit body.
          before=$(git show HEAD:tests/test262-status.txt | grep -vc '^#' || true)
          after=$(grep -vc '^#' tests/test262-status.txt || true)
          git add tests/test262-status.txt
          git commit -m "chore(test262): re-bless ledger (${before} -> ${after} known failures)

          Regenerated by the bless-test262 workflow."
          # The suite takes ~13 min, during which master may have advanced with
          # source-only commits. The bot only touches the ledger, so rebasing the
          # bless commit onto the latest tip is conflict-free; retry a few times in
          # case of a concurrent push.
          for attempt in 1 2 3 4 5; do
            git fetch origin "${{ github.event.inputs.ref }}"
            git rebase "origin/${{ github.event.inputs.ref }}" || { git rebase --abort; exit 1; }
            if git push origin "HEAD:${{ github.event.inputs.ref }}"; then
              echo "Pushed on attempt $attempt."; exit 0
            fi
            echo "Push rejected (attempt $attempt) — refetching and retrying."
            sleep 5
          done
          echo "Failed to push the re-blessed ledger after retries." >&2
          exit 1