1.9 KiB
1.9 KiB
Git Hooks
This repository uses Husky hooks from .husky/. Those files are execution
surfaces; GLS-0844 (GHNQG) is the quality authority.
Installation
pnpm install runs the prepare script and installs the hooks into
.git/hooks. To reinstall them, run:
pnpm exec husky
Native policy
- Commit on
mainor in a detached verification worktree intended for direct promotion. - Push
main -> origin/mainor detachedHEAD -> origin/mainonly. - Never use
--no-verify. - Run
bash scripts/test-guanghu-native-authority.shbefore repository checks. - Accept only
GHNQG_PASS_100bound to the exact commit and tree. - Treat any incomplete required gate as
GHNQG_FAIL_0. - Do not use minimum percentages, weighted scores, waivers, or external analyzers as acceptance states.
- The Fifth Domain Router is a separate, explicitly authorized prototype-publication path. Its exact-SHA receipt proves repository publication only; it is not a merge, release, deployment, runtime-health, or persona-birth receipt.
Pre-commit
.husky/pre-commit keeps the edit loop fast:
- staged TypeScript files pass repository lint;
- documentation, workflow, and hook-only commits are classified without requiring application tooling.
Passing pre-commit is evidence, not a publication authorization.
Pre-push
.husky/pre-push requires:
- native-authority contract validation;
- TypeScript and Vite build;
- frontend tests;
- Rust lint, format, and tests when Rust source changed;
- the curated Playwright core smoke lane;
- a GLS-0844 receipt from the repository-owned executor.
The executor writes its receipt outside the source repository. On BingShuo's workstation, receipts go to JZAO when that volume is mounted.
Troubleshooting
If a hook cannot find node or pnpm, load the configured Node environment
and retry. Missing tooling makes the applicable gate incomplete; it does not
create a third acceptance state.