feat: Add digital, dry, ink, and paint brush presets; implement regression testing hooks
mandatory-regression-gate / deterministic-tests (push) Has been cancelled
mandatory-regression-gate / protected-performance-path (push) Has been cancelled

- Introduced new crates for digital brushes, dry media brushes, ink brushes, and paint brushes, each containing various presets.
- Updated the menus to include "Paste Special" and "Paste as New Layer" options.
- Enhanced the feature scorecard tests to validate selection texture encoding.
- Added a regression gate workflow for automated testing on push and pull requests.
- Implemented Git hooks for pre-commit checks to ensure code formatting and run tests before commits.
- Created a settings file for local configurations.
This commit is contained in:
Your Name
2026-07-23 02:28:49 +03:00
parent 2d5b7a37e8
commit e509def0b2
26 changed files with 2446 additions and 335 deletions
+54
View File
@@ -0,0 +1,54 @@
#!/usr/bin/env bash
set -Eeuo pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd "$REPO_ROOT"
mapfile -d '' staged_files < <(
git diff --cached --name-only --diff-filter=ACMRDTUXB -z
)
if (( ${#staged_files[@]} == 0 )); then
echo "No staged files; commit regression tests are not required."
exit 0
fi
staged_rust_sources=()
for path in "${staged_files[@]}"; do
printf ' staged input: %s\n' "$path"
if [[ "$path" == *.rs && -f "$path" ]]; then
staged_rust_sources+=("$path")
fi
done
dirty_inputs=()
while IFS= read -r -d '' path; do
dirty_inputs+=("$path")
done < <(git diff --name-only --diff-filter=ACMRDTUXB -z)
while IFS= read -r -d '' path; do
dirty_inputs+=("$path")
done < <(git ls-files --others --exclude-standard -z)
if (( ${#dirty_inputs[@]} > 0 )); then
echo "Commit blocked: unstaged or untracked files would make staged test results ambiguous:" >&2
printf ' %s\n' "${dirty_inputs[@]}" >&2
echo "Stage or remove those files, then retry the commit." >&2
exit 1
fi
command -v cargo >/dev/null 2>&1 || {
echo "Commit blocked: cargo is unavailable." >&2
exit 1
}
if (( ${#staged_rust_sources[@]} > 0 )); then
echo "Checking staged Rust source formatting..."
rustfmt --edition 2021 --check "${staged_rust_sources[@]}"
fi
echo "Running deterministic workspace tests..."
cargo check --locked --workspace --exclude hcie-io --examples
cargo test --locked --workspace --exclude hcie-io --lib --tests -- \
--skip benchmark_4k_stroke_on_multilayer_document
echo "Mandatory Rust regression gate passed."