Some checks failed
joule-moq-remote host agent / joule-moq-remote · does this change touch it (pull_request) Successful in 5s
joule-moq-room room service / joule-moq-room · does this change touch it (pull_request) Successful in 5s
joule-moq-web browser client / joule-moq-web · does this change touch it (pull_request) Successful in 6s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 8s
wai-audit collector and player integration / does this change touch it (pull_request) Successful in 9s
wai-app and Create / wai-app · does this change touch it (pull_request) Successful in 9s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (pull_request) Successful in 5s
WAI operation catalogue / does this change touch it (pull_request) Successful in 6s
WAI energy receipts / does this change touch it (pull_request) Successful in 7s
WAI examples / WAI examples · does this change touch them (pull_request) Successful in 5s
WAI conformance / does this change touch it (pull_request) Successful in 9s
wai-ledger service / does this change touch it (pull_request) Successful in 6s
WAI neural sink gates / does this change touch it (pull_request) Successful in 6s
wai-fleet service / does this change touch it (pull_request) Successful in 7s
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 7s
wai-quantum command line / does this change touch it (pull_request) Successful in 6s
wai-quantum contract / does this change touch it (pull_request) Successful in 6s
wai-quantum CUDA member / does this change touch it (pull_request) Successful in 7s
wai-quantum dataflow member / does this change touch it (pull_request) Successful in 8s
wai-quantum docs, course and locales / does this change touch it (pull_request) Successful in 7s
wai-quantum signal processor / does this change touch it (pull_request) Successful in 6s
wai-quantum resource estimation / does this change touch it (pull_request) Successful in 9s
wai-quantum editors / does this change touch it (pull_request) Successful in 10s
wai-quantum other formats / does this change touch it (pull_request) Successful in 8s
wai-quantum FPGA member / does this change touch it (pull_request) Successful in 5s
wai-quantum HIP member / does this change touch it (pull_request) Successful in 5s
wai-quantum for JavaScript / does this change touch it (pull_request) Successful in 6s
wai-quantum npu-cores member / does this change touch it (pull_request) Successful in 7s
wai-quantum neural-processor member / does this change touch it (pull_request) Successful in 7s
wai-quantum Metal member / does this change touch it (pull_request) Successful in 8s
wai-quantum OpenQASM reader / does this change touch it (pull_request) Successful in 8s
wai-quantum OpenCL member / does this change touch it (pull_request) Successful in 6s
wai-quantum on every processor / emulated · armv7-unknown-linux-gnueabihf (pull_request) Successful in 2m27s
wai-quantum on every processor / emulated · riscv64gc-unknown-linux-gnu (pull_request) Successful in 2m44s
wai-quantum pulse and dynamics / does this change touch it (pull_request) Successful in 5s
wai-quantum for Python / does this change touch it (pull_request) Successful in 5s
wai-quantum error correction and mitigation / does this change touch it (pull_request) Successful in 5s
wai-quantum-qpu / does this change touch it (pull_request) Successful in 5s
wai-quantum extension points / does this change touch it (pull_request) Successful in 7s
wai-quantum service / does this change touch it (pull_request) Successful in 7s
wai-quantum matrix-extension member / does this change touch it (pull_request) Successful in 6s
wai-quantum studio and desktop / does this change touch it (pull_request) Successful in 6s
wai-quantum tensor-engine member / does this change touch it (pull_request) Successful in 5s
wai-quantum portable tensor program / does this change touch it (pull_request) Successful in 6s
wai-quantum variational and algorithm library / does this change touch it (pull_request) Successful in 5s
wai-quantum CPU vector units / does this change touch it (pull_request) Successful in 5s
wai-quantum verdicts and repairs / does this change touch it (pull_request) Successful in 5s
wai-quantum views in agent hosts / does this change touch it (pull_request) Successful in 5s
wai-quantum wasmQ / does this change touch it (pull_request) Successful in 5s
wai-quantum WebGPU member / does this change touch it (pull_request) Successful in 5s
wai-sink-android native sink library / does this change touch it (pull_request) Successful in 5s
wai-sink-swift native sink package / does this change touch it (pull_request) Successful in 5s
WAI Studio / does this change touch it (pull_request) Successful in 5s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 5s
wai-web wasm32 / does this change touch it (pull_request) Successful in 6s
wai-quantum WebGPU member / member · DX12 and Vulkan (cbio-windows) (pull_request) Successful in 12m41s
wai-quantum on every processor / emulated · powerpc64-unknown-linux-gnu (pull_request) Successful in 5m22s
wai-quantum on every processor / emulated · aarch64-unknown-linux-gnu (pull_request) Successful in 5m40s
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Successful in 3m14s
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Successful in 4m32s
wai-quantum on every processor / emulated · powerpc64le-unknown-linux-gnu (pull_request) Successful in 9m17s
wai-quantum on every processor / emulated · loongarch64-unknown-linux-gnu (pull_request) Successful in 11m1s
WAI conformance / fast integer kernels, every x86_64 kernel set (AVX-512 silicon) (pull_request) Successful in 3m6s
wai-quantum HIP member / member · HIP (framework-128gb) (pull_request) Successful in 1m9s
wai-quantum npu-cores member / member · npu-cores, neural processor (framework-128gb silicon) (pull_request) Successful in 2m4s
wai-quantum OpenCL member / member · OpenCL GPU (framework-128gb) (pull_request) Successful in 31s
wai-quantum portable tensor program / tensor program · integrated GPU (framework-128gb) (pull_request) Successful in 16s
wai-quantum CPU vector units / member · vector units, avx2 and avx512 (framework-128gb silicon) (pull_request) Successful in 21s
wai-quantum studio and desktop / desktop app · windows (pull_request) Successful in 8m59s
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Successful in 9m17s
wai-quantum on every processor / emulated · s390x-unknown-linux-gnu (pull_request) Successful in 35m39s
wai-quantum CUDA member / member · CUDA (jetson-hub) (pull_request) Successful in 1m32s
wai-quantum CUDA member / member · CUDA (thor) (pull_request) Successful in 2m10s
wai-quantum OpenCL member / member · OpenCL GPU and CPU (jetson-hub) (pull_request) Successful in 34s
wai-app and Create / wai-app · tests, clippy, the line language's verifier (linux) (pull_request) Successful in 59s
wai-quantum OpenCL member / member · OpenCL GPU and CPU (thor) (pull_request) Successful in 57s
wai-audit collector and player integration / collector · linux (pull_request) Successful in 1m20s
wai-quantum service / service energy · linux packages (pull_request) Successful in 1m33s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (pull_request) Successful in 1m59s
wai-quantum portable tensor program / tensor program · GPUs (jetson-hub) (pull_request) Successful in 28s
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (pull_request) Has been cancelled
joule-moq-remote host agent / joule-moq-remote, every target (macos) (pull_request) Has been cancelled
joule-moq-room room service / joule-moq-room, every target (pull_request) Has been cancelled
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Has been cancelled
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Has been cancelled
standards workspaces build + test / macOS energy backends (pull_request) Has been cancelled
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Has been cancelled
wai-app and Create / wai-app · Create, browser end-to-end (macos) (pull_request) Has been cancelled
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · macos (pull_request) Has been cancelled
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Has been cancelled
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · macos (pull_request) Has been cancelled
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Has been cancelled
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI energy receipts / energy receipts · macos (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux (pull_request) Has been cancelled
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
WAI examples / WAI examples · portable · linux (pull_request) Has been cancelled
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Has been cancelled
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Has been cancelled
wai-fleet service / service · linux (pull_request) Has been cancelled
wai-fleet service / service · macos (pull_request) Has been cancelled
wai-ledger service / service · linux (pull_request) Has been cancelled
wai-ledger service / service · macos (pull_request) Has been cancelled
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Has been cancelled
WAI neural sink gates / the exact JPEG-AI decoder reports its path (pinned inputs, required) (pull_request) Has been cancelled
WAI conformance / faces from keypoints under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
WAI operation catalogue / the catalogue and every door · linux (pull_request) Has been cancelled
wai-pack / wai-pack · linux (pull_request) Has been cancelled
wai-pack / wai-pack · linux-arm64 (pull_request) Has been cancelled
wai-pack / wai-pack · macos (pull_request) Has been cancelled
wai-pack / wai-pack · independent verifier (Python) (pull_request) Has been cancelled
wai-pack / wai-pack · the floor through a media prober (pull_request) Has been cancelled
wai-pack / wai-pack · dependency licences (pull_request) Has been cancelled
wai-quantum command line / command line · macos (pull_request) Has been cancelled
wai-quantum contract / API compatibility · linux (pull_request) Has been cancelled
wai-quantum contract / schemas and the committed tool lists · linux (pull_request) Has been cancelled
wai-quantum contract / the policy is linked, and the deprecations page reads (pull_request) Has been cancelled
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (pull_request) Has been cancelled
wai-quantum command line / command line · linux (pull_request) Has been cancelled
wai-quantum CUDA member / member · CUDA absent (linux) (pull_request) Has been cancelled
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:b140) (pull_request) Has been cancelled
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:401e) (pull_request) Has been cancelled
wai-quantum dataflow member / member · dataflow device absent (macos) (pull_request) Has been cancelled
wai-quantum docs, course and locales / every command and snippet in the docs · linux (pull_request) Has been cancelled
wai-quantum docs, course and locales / the course and the command line's languages · linux (pull_request) Has been cancelled
wai-quantum docs, course and locales / the Studio's words in every locale · linux (pull_request) Has been cancelled
wai-quantum signal processor / processor and member · signal processor, emulated (pull_request) Has been cancelled
wai-quantum editors / editors · macos (pull_request) Has been cancelled
wai-quantum other formats / the set under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
wai-quantum FPGA member / member · FPGA datapath, simulated (macos) (pull_request) Has been cancelled
wai-quantum FPGA member / member · FPGA simulation absent (linux) (pull_request) Has been cancelled
wai-quantum other formats / readers, writers and the set · linux (pull_request) Has been cancelled
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum for JavaScript / javascript · linux (pull_request) Has been cancelled
wai-quantum OpenQASM reader / reader and corpus · linux (pull_request) Has been cancelled
wai-quantum OpenQASM reader / corpus under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
wai-quantum Metal member / member · Metal (macos) (pull_request) Has been cancelled
wai-quantum Metal member / member · Metal absent (linux) (pull_request) Has been cancelled
wai-quantum resource estimation / estimation and calibration · linux, release (pull_request) Has been cancelled
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum neural-processor member / member · neural processor (macos) (pull_request) Has been cancelled
wai-quantum neural-processor member / member · neural processor absent (linux) (pull_request) Has been cancelled
wai-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Has been cancelled
wai-quantum OpenCL member / member · OpenCL absent (linux) (pull_request) Has been cancelled
wai-quantum pulse and dynamics / the same bits · linux-arm64 (pull_request) Has been cancelled
wai-quantum pulse and dynamics / the same bits · macos (pull_request) Has been cancelled
wai-quantum for Python / python · macos (pull_request) Has been cancelled
wai-quantum error correction and mitigation / codes, decoders, texts and mitigation · linux, release (pull_request) Has been cancelled
wai-quantum editors / editors · linux (pull_request) Has been cancelled
wai-quantum pulse and dynamics / reader, simulator and pulse jobs · linux, release (pull_request) Has been cancelled
wai-quantum-qpu / clients against their contracts (linux) (pull_request) Has been cancelled
wai-quantum-qpu / credentials in the keychain (macos) (pull_request) Has been cancelled
wai-quantum extension points / the registry and the example · linux (pull_request) Has been cancelled
wai-quantum extension points / the registry and the example · linux-arm64 (pull_request) Has been cancelled
wai-quantum extension points / the registry under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
wai-quantum pulse and dynamics / reader, simulator and pulse jobs under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
wai-quantum service / service · linux (pull_request) Has been cancelled
wai-quantum service / service · macos (pull_request) Has been cancelled
wai-quantum matrix-extension member / member · matrix extension, emulated (aarch64 Linux) (pull_request) Has been cancelled
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Has been cancelled
wai-quantum studio and desktop / studio · browser (pull_request) Has been cancelled
wai-quantum studio and desktop / desktop app · macos (pull_request) Has been cancelled
wai-quantum studio and desktop / desktop app · linux (pull_request) Has been cancelled
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Has been cancelled
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · CPU, mutants, GPU builds (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Has been cancelled
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux, release (pull_request) Has been cancelled
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, rvv 1024-bit (riscv64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Has been cancelled
wai-quantum verdicts and repairs / the intent set and the verdict under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
wai-quantum views in agent hosts / views · the page and its engine (pull_request) Has been cancelled
wai-quantum views in agent hosts / views · a scripted host (pull_request) Has been cancelled
wai-quantum wasmQ / profile, engines, reference modules, adversarial, vectors · linux (pull_request) Has been cancelled
wai-quantum wasmQ / profile, engines, reference modules, adversarial, vectors · macos (pull_request) Has been cancelled
wai-quantum wasmQ / the reference modules rebuild to their modules of record · linux (pull_request) Has been cancelled
wai-quantum wasmQ / interpreter and vectors under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
wai-quantum for Python / python · linux (pull_request) Has been cancelled
wai-quantum verdicts and repairs / verdicts, repairs and the intent set · linux (pull_request) Has been cancelled
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness (pull_request) Has been cancelled
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · GPU, Vulkan (jetson-hub) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · GPU, Vulkan (thor) (pull_request) Has been cancelled
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Has been cancelled
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Has been cancelled
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Has been cancelled
WAI Studio / Studio in Chromium and Firefox · macos (pull_request) Has been cancelled
WAI Studio / Studio in WebKit · linux (pull_request) Has been cancelled
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Has been cancelled
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Has been cancelled
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Has been cancelled
WAI Studio / the catalogue's actions, the unit tests and the core · linux (pull_request) Has been cancelled
A review of the profile found ways for one envelope to seal two receipts, for an edit outside the signature to verify, and for malformed input to end in a panic. Each has a test that failed on the reviewed code and passes here (tests/review.rs, tests/fuzz.rs). One envelope, one receipt - The host reaches a module's memory only through the export named `memory`, on every engine; a bundle whose callouts or priors need a memory the host cannot reach, or lack `cabi_realloc`, is refused on reading (W015). Exports the host calls have exact types (W012), and a contract names exactly one callout for each extern, in the order declared. - The call-depth count is replaced by a weighted stack: each call adds the calling function's weight (576 + parameters + results + locals + the bytes of its code entry), the limit is 2^23, and the fault is `stack_exhausted`. An indirect call adds the weight before the table is read, so the reason is the same on every engine. The native engine runs each call on a thread with a stack of its own, and a test holds it to eight bytes for each unit of weight. - The interpreter reads an argument as a value of its parameter's type, and refuses a body that does not end. - Profile v1 is the Clifford gates and the `stabilizer` method, to 32,768 qubits; a program outside that is refused on reading (W016). The state-vector method is left out of the profile, and the text says so. A measurement or reset draws from the shot's integer stream only when its outcome is random, and the text states it. What a receipt says, and what verify checks - verify names the signer (did:key) and the outcome, holds the job body to the members the text defines, and refuses a body whose status or method differs from the signed result. - A fault's free text and the accuracy note are out of the signed result; a prepared module's digest is out too, since the text does not determine its bytes. Malformed input - profile::check scans a module without a validator, then validates it under the pinned feature set and finishes every body; a module, envelope or program changed at random is refused or runs the same on every engine, and none ends in a panic. - Limits are explicit and each is tested at its largest value and one more (W010); what pack accepts, every engine can instantiate. - A program input, seed or budget a double cannot hold is refused (W017), not changed. Command line - Builds again without the `providers` feature. `pack-wasmq` takes the global `--input` and orders callouts itself; `verify` prints the signer and the outcome. Vectors and CI - 55 vectors: every code W001 to W017 has a refusal vector, each refusal has a repaired twin that is accepted, and the committed files must equal the ones generated. - The wasmQ workflow runs on a change to the simulators, and checks that every test file ran; the command line's workflow runs on a change to the wasmQ crate or its vectors. - The text no longer describes other systems; the comparative-prose check gains the pattern that sentence passed. Co-Authored-By: Claude Fable 5.1 <[email protected]>
124 lines
3.8 KiB
Shell
Executable file
124 lines
3.8 KiB
Shell
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# check-comparative-prose.sh
|
|
#
|
|
# Holds WAI's public text to its writing rule: it states what WAI does,
|
|
# plainly, and does not rank WAI against anything else. The phrases below are
|
|
# the comparative and promotional forms the tree has had to remove; each is a
|
|
# POSIX extended regular expression, matched case-sensitively.
|
|
#
|
|
# Scope: the same files as scripts/check-public-names.sh — the tracked files
|
|
# under wai/ with the extensions .md .rs .toml .py .sh .mjs .js .json .html
|
|
# .css .ttl .h .c .txt and wai/'s .gitignore files, except wai/CHANGELOG.md and its entries
|
|
# waiting under wai/changes/ (scripts/changelog-assemble.py): its history is a record, and only names are redacted from it. Files given as arguments replace that
|
|
# list (the self-test, scripts/test-public-text-checks.sh, uses this).
|
|
#
|
|
# Opt-out, for a functional identifier or a quotation only (an environment
|
|
# variable or file name that contains a listed word, a phrase quoted from a
|
|
# cited document): put `allow-phrase: <reason>` on the same line, in a comment
|
|
# of the file's own syntax. The reason is required: it must contain a letter or
|
|
# a digit.
|
|
#
|
|
# Exit status: 0 clean; 1 a hit; 2 a pattern grep cannot compile, or any other
|
|
# grep error. The check never reads an error as "clean".
|
|
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$REPO_ROOT"
|
|
|
|
PHRASES=(
|
|
'\bSOTA\b'
|
|
'\bwin vs\b'
|
|
'\b[Mm]oat\b'
|
|
'[Nn]obody signs'
|
|
'[Nn]ot one signs'
|
|
'[Nn]one signs'
|
|
'\b[Nn]either\b[^.]* signs?\b'
|
|
'[Bb]est[- ]in[- ]class'
|
|
'\b[Bb]eats\b [A-Z]'
|
|
'\b[Ss]uperior(ity)?\b'
|
|
'% better'
|
|
'\b[Tt]he opposite\b'
|
|
'[Ss]trictly worse'
|
|
'[Tt]oll[- ]road'
|
|
'\b[Pp]arity \+'
|
|
'[Ff]eature[- ]parity'
|
|
'\bparity with\b'
|
|
'\b[Uu]nderperforms\b'
|
|
'\b[Oo]utperforms\b'
|
|
'royalty trap'
|
|
'well below [A-Z]'
|
|
'well above [A-Z]'
|
|
'among the (lowest|best|highest|fastest|smallest)'
|
|
'nothing else .* offers?'
|
|
'\b[Nn]o other .* (offers?|signs?|provides?)'
|
|
'[Cc]ommercial wedge'
|
|
'\b[Uu]nclaimed\b'
|
|
'\b[Ff]ast win\b'
|
|
'\b[Dd]ifferentiator\b'
|
|
'[Rr]ate-competitive'
|
|
)
|
|
|
|
args=()
|
|
for p in "${PHRASES[@]}"; do args+=(-e "$p"); done
|
|
# Compile every phrase once before scanning: grep exits 1 when nothing matches
|
|
# and 2 on an error, and only 0 and 1 mean the list is usable.
|
|
set +e
|
|
grep -E "${args[@]}" /dev/null >/dev/null
|
|
rc=$?
|
|
set -e
|
|
if [ $rc -gt 1 ]; then
|
|
echo "::error::a phrase in $0 does not compile (grep exit $rc); nothing was checked" >&2
|
|
exit 2
|
|
fi
|
|
|
|
files=()
|
|
if [ $# -gt 0 ]; then
|
|
files=("$@")
|
|
else
|
|
while IFS= read -r f; do
|
|
case "$f" in
|
|
wai/CHANGELOG.md|wai/changes/[0-9]*.md) continue ;;
|
|
esac
|
|
files+=("$f")
|
|
done < <(git ls-files 'wai/*.md' 'wai/*.rs' 'wai/*.toml' 'wai/*.py' 'wai/*.sh' 'wai/*.mjs' 'wai/*.js' \
|
|
'wai/*.json' 'wai/*.html' 'wai/*.css' 'wai/*.ttl' 'wai/*.h' 'wai/*.c' 'wai/*.txt' \
|
|
'wai/*.gitignore')
|
|
fi
|
|
if [ ${#files[@]} -eq 0 ]; then
|
|
echo "::error::no file to check" >&2
|
|
exit 2
|
|
fi
|
|
|
|
out="$(mktemp)"
|
|
trap 'rm -f "$out"' EXIT
|
|
set +e
|
|
grep -HnE "${args[@]}" -- "${files[@]}" > "$out"
|
|
rc=$?
|
|
set -e
|
|
if [ $rc -gt 1 ]; then
|
|
echo "::error::grep failed (exit $rc) while scanning; nothing was checked" >&2
|
|
exit 2
|
|
fi
|
|
|
|
hits=0
|
|
while IFS= read -r line; do
|
|
content="${line#*:}"
|
|
content="${content#*:}"
|
|
if printf '%s' "$content" | grep -qE 'allow-phrase:[[:space:]]*[[:alnum:]]'; then
|
|
continue
|
|
fi
|
|
if [ $hits -eq 0 ]; then
|
|
echo "::error::comparative or promotional phrasing in public text (scripts/check-comparative-prose.sh)"
|
|
fi
|
|
echo "$line"
|
|
hits=$((hits + 1))
|
|
done < "$out"
|
|
|
|
if [ $hits -gt 0 ]; then
|
|
echo "Fix: state what WAI does, measured where a figure is given, without ranking it against"
|
|
echo "anything else; for an identifier or a quotation, mark the line with allow-phrase: <reason>."
|
|
exit 1
|
|
fi
|
|
echo "comparative-prose check: clean (${#files[@]} files)"
|