feat(db): provision verified Ingglish phonetic lexicon and AQ attractor corpus
- Provision 872 verified Ingglish phonetic entries (253 Tier-1 lexicon/bridge items + 619 Tier-2 multi-scale 333/666/777/Numogram equations) formatted with native `[Ingglish: <English Gloss>]` comment brackets. - Guard short Ingglish syllables (`di`, `li`, `mi`, `vi`, `iv`) against Roman-numeral false positives in `tools/normalize_caps.py`. - Add newcomer onboarding documentation (`docs/ONBOARDING-INGGLISH-AQ.md`). - Bump `databaseVersion` in `config.default.js` to cache-bust precomputed JSON. - Verified 100% pass rate across all 4 CI gates (0 normalize mutations, 100.0% classify_candidates keep rate, 0 comment-strip/AQ mismatches).
This commit is contained in:
1 parent
79b4503d6c
commit
05b3309a2a
13 files changed
+2243
-2
No files matched your search
Executable
+71
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env bash
|
||||
# Zero-Ambiguity Git Commit & GitHub PR Submission Script for malonehunter/hyperdope-gematria
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_DIR="${1:-/workspace/hyperdope-ci-build}"
|
||||
BRANCH="feat/ingglish-aq-corpus"
|
||||
BASE_BRANCH="master"
|
||||
UPSTREAM_REPO="malonehunter/hyperdope-gematria"
|
||||
ORIGIN_URL="${ORIGIN_URL:-ssh://git@git.libre.audio:2222/seasharp/ingglish-hyperdope-gematria.git}"
|
||||
|
||||
if [ ! -d "$REPO_DIR/.git" ]; then
|
||||
echo "Error: Target git repository not found at $REPO_DIR" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$REPO_DIR"
|
||||
|
||||
# Configure 'origin' remote if not yet registered
|
||||
if ! git remote get-url origin >/dev/null 2>&1; then
|
||||
git remote add origin "$ORIGIN_URL"
|
||||
echo "Configured remote 'origin' -> $ORIGIN_URL"
|
||||
elif [ -n "${FORCE_ORIGIN_URL:-}" ]; then
|
||||
git remote set-url origin "$FORCE_ORIGIN_URL"
|
||||
echo "Updated remote 'origin' -> $FORCE_ORIGIN_URL"
|
||||
fi
|
||||
|
||||
# Ensure feature branch exists and is checked out
|
||||
CURRENT_BRANCH="$(git branch --show-current)"
|
||||
if [ "$CURRENT_BRANCH" != "$BRANCH" ]; then
|
||||
git checkout -B "$BRANCH"
|
||||
fi
|
||||
|
||||
# Stage only deterministic target files
|
||||
git add db.txt tools/normalize_caps.py config.default.js
|
||||
[ -f docs/ONBOARDING-INGGLISH-AQ.md ] && git add docs/ONBOARDING-INGGLISH-AQ.md
|
||||
[ -f tools/classify_candidates.py ] && git add tools/classify_candidates.py
|
||||
|
||||
# Create commit if staged changes exist
|
||||
if ! git diff --cached --quiet; then
|
||||
git commit -F "$SCRIPT_DIR/commit-message.txt"
|
||||
fi
|
||||
|
||||
echo "Committed on branch $BRANCH: $(git rev-parse --short HEAD)"
|
||||
|
||||
# First push of base branch + feature branch and optional PR creation when SUBMIT_REMOTE=1
|
||||
if [ "${SUBMIT_REMOTE:-0}" = "1" ]; then
|
||||
if git show-ref --verify --quiet "refs/heads/$BASE_BRANCH"; then
|
||||
git push -u origin "$BASE_BRANCH" || true
|
||||
fi
|
||||
git push -u origin "$BRANCH"
|
||||
if command -v gh >/dev/null 2>&1 && gh auth status >/dev/null 2>&1; then
|
||||
gh pr create \
|
||||
--repo "$UPSTREAM_REPO" \
|
||||
--base "$BASE_BRANCH" \
|
||||
--head "$BRANCH" \
|
||||
--title "feat(db): provision verified Ingglish phonetic lexicon and AQ attractor corpus" \
|
||||
--body-file "$SCRIPT_DIR/pr-body.md"
|
||||
elif [ -n "${GITHUB_TOKEN:-}" ]; then
|
||||
curl -sS -X POST \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/$UPSTREAM_REPO/pulls" \
|
||||
-d @"$SCRIPT_DIR/pr-payload.json"
|
||||
else
|
||||
echo "Remote branch '$BRANCH' pushed to origin. Set gh auth or GITHUB_TOKEN to also open a GitHub PR."
|
||||
fi
|
||||
else
|
||||
echo "Local commit ready on '$BRANCH' (origin: $(git remote get-url origin))."
|
||||
echo "For first push: git -C $REPO_DIR push -u origin $BASE_BRANCH $BRANCH (or SUBMIT_REMOTE=1 $0 $REPO_DIR)"
|
||||
fi
|
||||
Reference in new issue
Block a user