diff --git a/.github/workflows/boj-build.yml b/.github/workflows/boj-build.yml index e9b7b17..410dc3c 100644 --- a/.github/workflows/boj-build.yml +++ b/.github/workflows/boj-build.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: PMPL-1.0-or-later name: BoJ Server Build Trigger on: push: @@ -8,10 +9,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Trigger BoJ Server (Casket/ssg-mcp) run: | # Send a secure trigger to boj-server to build this repository curl -X POST "http://boj-server.local:7700/cartridges/ssg-mcp/invoke" -H "Content-Type: application/json" -d "{\"repo\": \"${{ github.repository }}\", \"branch\": \"${{ github.ref_name }}\", \"engine\": \"casket\\"}"} continue-on-error: true -permissions: read-all +permissions: + contents: read diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a90076e..982a028 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -9,7 +9,8 @@ on: schedule: - cron: '0 6 * * 1' -permissions: read-all +permissions: + contents: read jobs: analyze: diff --git a/.github/workflows/guix-nix-policy.yml b/.github/workflows/guix-nix-policy.yml index 3e1103a..a8e8f4e 100644 --- a/.github/workflows/guix-nix-policy.yml +++ b/.github/workflows/guix-nix-policy.yml @@ -2,7 +2,8 @@ name: Guix/Nix Package Policy on: [push, pull_request] -permissions: read-all +permissions: + contents: read jobs: check: diff --git a/.github/workflows/hypatia-scan.yml b/.github/workflows/hypatia-scan.yml index 23adfcd..8c9d807 100644 --- a/.github/workflows/hypatia-scan.yml +++ b/.github/workflows/hypatia-scan.yml @@ -11,7 +11,8 @@ on: - cron: '0 0 * * 0' # Weekly on Sunday workflow_dispatch: -permissions: read-all +permissions: + contents: read jobs: scan: diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index f914ba3..1bb153e 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -7,7 +7,8 @@ on: branches: [main] workflow_dispatch: -permissions: read-all +permissions: + contents: read jobs: mirror-gitlab: diff --git a/.github/workflows/npm-bun-blocker.yml b/.github/workflows/npm-bun-blocker.yml index 2d2783b..c6b6726 100644 --- a/.github/workflows/npm-bun-blocker.yml +++ b/.github/workflows/npm-bun-blocker.yml @@ -2,7 +2,8 @@ name: NPM/Bun Blocker on: [push, pull_request] -permissions: read-all +permissions: + contents: read jobs: check: diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 6bf5e48..284758d 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -3,7 +3,8 @@ name: Code Quality on: [push, pull_request] -permissions: read-all +permissions: + contents: read jobs: lint: diff --git a/.github/workflows/rsr-antipattern.yml b/.github/workflows/rsr-antipattern.yml index a001dcd..e81eafa 100644 --- a/.github/workflows/rsr-antipattern.yml +++ b/.github/workflows/rsr-antipattern.yml @@ -14,7 +14,8 @@ on: branches: [main, master, develop] -permissions: read-all +permissions: + contents: read jobs: antipattern-check: diff --git a/.github/workflows/scorecard-enforcer.yml b/.github/workflows/scorecard-enforcer.yml index 971951f..0e89dff 100644 --- a/.github/workflows/scorecard-enforcer.yml +++ b/.github/workflows/scorecard-enforcer.yml @@ -9,7 +9,8 @@ on: - cron: '0 6 * * 1' # Weekly on Monday workflow_dispatch: -permissions: read-all +permissions: + contents: read jobs: scorecard: diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 5521169..b68bcca 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -7,7 +7,8 @@ on: - cron: '0 4 * * *' workflow_dispatch: -permissions: read-all +permissions: + contents: read jobs: analysis: diff --git a/.github/workflows/secret-scanner.yml b/.github/workflows/secret-scanner.yml index a68f9ac..e1c1da8 100644 --- a/.github/workflows/secret-scanner.yml +++ b/.github/workflows/secret-scanner.yml @@ -7,7 +7,8 @@ on: push: branches: [main] -permissions: read-all +permissions: + contents: read jobs: trufflehog: diff --git a/.github/workflows/security-policy.yml b/.github/workflows/security-policy.yml index d4e9701..06d030c 100644 --- a/.github/workflows/security-policy.yml +++ b/.github/workflows/security-policy.yml @@ -2,7 +2,8 @@ name: Security Policy on: [push, pull_request] -permissions: read-all +permissions: + contents: read jobs: check: diff --git a/.github/workflows/ts-blocker.yml b/.github/workflows/ts-blocker.yml index 5c34a58..6a09ba2 100644 --- a/.github/workflows/ts-blocker.yml +++ b/.github/workflows/ts-blocker.yml @@ -2,7 +2,8 @@ name: TypeScript/JavaScript Blocker on: [push, pull_request] -permissions: read-all +permissions: + contents: read jobs: check: diff --git a/.github/workflows/wellknown-enforcement.yml b/.github/workflows/wellknown-enforcement.yml index 125b20c..351b0da 100644 --- a/.github/workflows/wellknown-enforcement.yml +++ b/.github/workflows/wellknown-enforcement.yml @@ -15,7 +15,8 @@ on: workflow_dispatch: -permissions: read-all +permissions: + contents: read jobs: validate: diff --git a/.github/workflows/workflow-linter.yml b/.github/workflows/workflow-linter.yml index 9bb4d39..b5cac32 100644 --- a/.github/workflows/workflow-linter.yml +++ b/.github/workflows/workflow-linter.yml @@ -12,7 +12,8 @@ on: - '.github/workflows/**' workflow_dispatch: -permissions: read-all +permissions: + contents: read jobs: lint-workflows: @@ -53,7 +54,8 @@ jobs: fi done if [ $failed -eq 1 ]; then - echo "Add 'permissions: read-all' at workflow level" + echo "Add 'permissions: + contents: read' at workflow level" exit 1 fi echo "All workflows have permissions declared" @@ -63,7 +65,7 @@ jobs: echo "=== Checking Action Pinning ===" # Find any uses: lines that don't have @SHA format # Pattern: uses: owner/repo@<40-char-hex> - unpinned=$(grep -rn "uses:" .github/workflows/ | \ + unpinned=$(grep -rnE "^[[:space:]]+uses:" .github/workflows/ | \ grep -v "@[a-f0-9]\{40\}" | \ grep -v "uses: \./\|uses: docker://\|uses: actions/github-script" || true) diff --git a/.machine_readable/contractiles/dust/Dustfile.a2ml b/.machine_readable/contractiles/dust/Dustfile.a2ml new file mode 100644 index 0000000..d7dfc19 --- /dev/null +++ b/.machine_readable/contractiles/dust/Dustfile.a2ml @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: PMPL-1.0-or-later +# Dustfile — Cleanup and Hygiene Contract + +[dustfile] +version = "1.0.0" +format = "a2ml" + +[cleanup] +stale-branch-policy = "delete-after-merge" +artifact-retention = "90-days" +cache-policy = "clear-on-release" + +[hygiene] +linting = "required" +formatting = "required" +dead-code-removal = "encouraged" +todo-tracking = "tracked-in-issues" + +[reversibility] +backup-before-destructive = true +rollback-mechanism = "git-revert" +data-retention-policy = "preserve-30-days" diff --git a/.machine_readable/integrations/feedback-o-tron.a2ml b/.machine_readable/integrations/feedback-o-tron.a2ml new file mode 100644 index 0000000..1c473ae --- /dev/null +++ b/.machine_readable/integrations/feedback-o-tron.a2ml @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: PMPL-1.0-or-later +# Feedback-o-Tron Integration — Autonomous Bug Reporting + +[integration] +name = "feedback-o-tron" +type = "bug-reporter" +repository = "https://github.com/hyperpolymath/feedback-o-tron" + +[reporting-config] +platforms = ["github", "gitlab", "bugzilla"] +deduplication = true +audit-logging = true +auto-file-upstream = "on-external-dependency-failure" diff --git a/.machine_readable/integrations/proven.a2ml b/.machine_readable/integrations/proven.a2ml new file mode 100644 index 0000000..6b3e805 --- /dev/null +++ b/.machine_readable/integrations/proven.a2ml @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: PMPL-1.0-or-later +# Proven Integration — Formally Verified Safety Library + +[integration] +name = "proven" +type = "safety-library" +repository = "https://github.com/hyperpolymath/proven" +version = "1.2.0" + +[binding-policy] +approach = "thin-ffi-wrapper" +unsafe-patterns = "replace-with-proven-equivalent" +modules-available = ["SafeMath", "SafeString", "SafeJSON", "SafeURL", "SafeRegex", "SafeSQL", "SafeFile", "SafeTemplate", "SafeCrypto"] + +[adoption-guidance] +priority = "high" +scope = "all-string-json-url-crypto-operations" +migration = "incremental — replace unsafe patterns as encountered" diff --git a/.machine_readable/integrations/verisimdb.a2ml b/.machine_readable/integrations/verisimdb.a2ml new file mode 100644 index 0000000..2c8f8f5 --- /dev/null +++ b/.machine_readable/integrations/verisimdb.a2ml @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: PMPL-1.0-or-later +# VeriSimDB Feed — Cross-Repo Analytics Data Store + +[integration] +name = "verisimdb" +type = "data-feed" +repository = "https://github.com/hyperpolymath/nextgen-databases" +data-store = "verisimdb-data" + +[feed-config] +emit-scan-results = true +emit-build-metrics = true +emit-dependency-graph = true +format = "hexad" +destination = "verisimdb-data/feeds/" diff --git a/.machine_readable/integrations/vexometer.a2ml b/.machine_readable/integrations/vexometer.a2ml new file mode 100644 index 0000000..bb7fc43 --- /dev/null +++ b/.machine_readable/integrations/vexometer.a2ml @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: PMPL-1.0-or-later +# Vexometer Integration — Irritation Surface Analysis + +[integration] +name = "vexometer" +type = "friction-measurement" +repository = "https://github.com/hyperpolymath/vexometer" + +[measurement-config] +dimensions = 10 +emit-isa-reports = true +lazy-eliminator = true +satellite-interventions = true + +[hooks] +cli-tools = "measure-on-error" +ui-panels = "measure-on-interaction" +build-failures = "measure-on-failure" diff --git a/EXPLAINME.adoc b/EXPLAINME.adoc new file mode 100644 index 0000000..15d008f --- /dev/null +++ b/EXPLAINME.adoc @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: PMPL-1.0-or-later += polyglot-formalisms-elixir — Show Me The Receipts +:toc: +:icons: font + +The README makes claims. This file backs them up. + +[quote, README] +____ +See the link:README.adoc[README] for details. +____ + +== Technology Choices + +[cols="1,2"] +|=== +| Technology | Learn More + +| **Elixir** | https://elixir-lang.org +|=== + +== File Map + +[cols="1,2"] +|=== +| Path | What's There + +| `lib/` | Library code +| `test(s)/` | Test suite +|=== + +== Questions? + +Open an issue or reach out directly — happy to explain anything in more detail. diff --git a/README.adoc b/README.adoc new file mode 100644 index 0000000..9a2b3a2 --- /dev/null +++ b/README.adoc @@ -0,0 +1,5 @@ += polyglot-formalisms-elixir +:toc: preamble +:icons: font + + diff --git a/README.md b/README.md deleted file mode 100644 index a9e3473..0000000 --- a/README.md +++ /dev/null @@ -1,149 +0,0 @@ -# PolyglotFormalisms.Elixir - -Elixir implementation of the PolyglotFormalisms Common Library specification. - -## Overview - -This package provides Elixir implementations of fundamental operations defined in the PolyglotFormalisms specification, enabling semantic equivalence verification across multiple programming languages. - -## Modules - -### Arithmetic -- `add(a, b)` - Addition -- `subtract(a, b)` - Subtraction -- `multiply(a, b)` - Multiplication -- `divide(a, b)` - Division -- `modulo(a, b)` - Modulo (integer operation) - -### Comparison -- `less_than(a, b)` - Strict less than -- `greater_than(a, b)` - Strict greater than -- `equal(a, b)` - Equality -- `not_equal(a, b)` - Inequality -- `less_equal(a, b)` - Less than or equal -- `greater_equal(a, b)` - Greater than or equal - -### Logical -- `logical_and(a, b)` - Logical conjunction -- `logical_or(a, b)` - Logical disjunction -- `logical_not(a)` - Logical negation - -**Note:** Function names include `logical_` prefix to avoid conflicts with Elixir's Kernel reserved keywords. - -## Installation - -Add this package to your `mix.exs` dependencies: - -```elixir -def deps do - [ - {:polyglot_formalisms, "~> 0.2.0"} - ] -end -``` - -## Usage - -```elixir -alias PolyglotFormalisms.{Arithmetic, Comparison, Logical} - -# Arithmetic -sum = Arithmetic.add(2.0, 3.0) -product = Arithmetic.multiply(4.0, 5.0) - -# Comparison -is_less = Comparison.less_than(2.0, 3.0) -is_equal = Comparison.equal(5.0, 5.0) - -# Logical -both_true = Logical.logical_and(true, true) -either_true = Logical.logical_or(false, true) -negated = Logical.logical_not(false) -``` - -## Mathematical Properties - -All implementations preserve the mathematical properties defined in the PolyglotFormalisms specification: - -### Arithmetic Properties -- Commutativity (for add, multiply) -- Associativity (for add, multiply) -- Identity elements -- Distributivity - -### Comparison Properties -- Transitivity -- Reflexivity -- Symmetry -- Asymmetry - -### Logical Properties -- Commutativity -- Associativity -- Distributivity -- De Morgan's laws -- Excluded middle -- Non-contradiction - -## Behavioral Semantics - -This implementation follows BEAM/Erlang semantics: - -### Float Operations -- Division by zero returns `Infinity` or `-Infinity` -- NaN propagation follows IEEE 754 -- Comparison with NaN returns `false` - -### Integer Operations -- Modulo uses Erlang `rem` operator semantics -- Modulo by zero raises `ArithmeticError` (BEAM behavior) - -### Boolean Operations -- Short-circuit evaluation for `and` and `or` -- Eager evaluation for wrapper functions - -## Testing - -Run the test suite: - -```bash -mix test -``` - -Run tests with documentation tests: - -```bash -mix test --include doctest -``` - -## Cross-Language Verification - -This Elixir implementation is semantically equivalent to: -- Julia implementation (PolyglotFormalisms.jl) -- ReScript implementation (alib-for-rescript) -- Gleam implementation (polyglot_formalisms_gleam) - -Formal verification proofs demonstrating semantic equivalence are available in the main PolyglotFormalisms specification repository. - -## Documentation - -Generate documentation: - -```bash -mix docs -``` - -## License - -PMPL-1.0-or-later (Polymathematical Meta-Public License / Palimpsest License) - -## Related Projects - -- [PolyglotFormalisms.jl](https://github.com/hyperpolymath/PolyglotFormalisms.jl) - Julia reference implementation -- [alib-for-rescript](https://github.com/hyperpolymath/alib-for-rescript) - ReScript implementation -- [polyglot_formalisms_gleam](https://github.com/hyperpolymath/polyglot_formalisms_gleam) - Gleam implementation - - -## Architecture - -See [TOPOLOGY.md](TOPOLOGY.md) for a visual architecture map and completion dashboard. diff --git a/tests/fuzz/placeholder.txt b/tests/fuzz/placeholder.txt new file mode 100644 index 0000000..8621280 --- /dev/null +++ b/tests/fuzz/placeholder.txt @@ -0,0 +1 @@ +Scorecard requirement placeholder