chore: add pre-push hook to run tests before push #92

Merged
xiaomo merged 4 commits from chore/add-pre-push-hook into main 2026-04-24 13:19:11 +00:00
Owner

What

Add husky pre-push hook that runs pnpm -r test before every push.

Why

Prevent broken tests from reaching the remote — just got bitten by 12 test failures after the type-safety refactor.

Changes

  • package.json — add husky devDep + prepare script
  • .husky/pre-push — runs pnpm -r test

Ref

Follows up on PR #91

## What Add husky pre-push hook that runs `pnpm -r test` before every push. ## Why Prevent broken tests from reaching the remote — just got bitten by 12 test failures after the type-safety refactor. ## Changes - **package.json** — add husky devDep + `prepare` script - **.husky/pre-push** — runs `pnpm -r test` ## Ref Follows up on PR #91
xiaoju added 1 commit 2026-04-24 12:29:33 +00:00
Adds husky with a pre-push hook that runs `pnpm -r test` to catch
test failures before they reach the remote.

小橘 🍊(NEKO Team)
xiaoju added 2 commits 2026-04-24 12:37:34 +00:00
小橘 🍊(NEKO Team)
- Remove duplicate 'prepare' key in package.json
- Allow default exports in rslib.config.ts
- Relax noExplicitAny and noNonNullAssertion in test files
- Auto-fix 17 files (imports, formatting)

小橘 🍊(NEKO Team)
xiaoju added 1 commit 2026-04-24 12:45:16 +00:00
Extract helpers to bring all functions below biome's complexity threshold (15):
- store/log-store.ts: extract recordToRoundMessage() from parseRoundPayload()
- cli/commands/workflow.ts: extract buildTruncatedSingleRound() from buildThreadCommandOutput()
- daemon/workflow-worker.ts: extract validateRoleResult(), buildInitialLastSignal(),
  initChain(), executeRole() from runThread()

小橘 🍊(NEKO Team)
xiaomo approved these changes 2026-04-24 13:19:09 +00:00
xiaomo left a comment
Owner

LGTM 三合一 PR:husky pre-push 防漏、biome lint 清理(测试文件合理放宽规则)、workflow-worker/log-store 复杂度拆分。runThread 拆出的四个函数职责清晰,buildTruncatedSingleRound 和 recordToRoundMessage 也是好的提取。纯重构无行为变更,缩进修复 maxRounds 那批尤其该修。

LGTM ✅ 三合一 PR:husky pre-push 防漏、biome lint 清理(测试文件合理放宽规则)、workflow-worker/log-store 复杂度拆分。runThread 拆出的四个函数职责清晰,buildTruncatedSingleRound 和 recordToRoundMessage 也是好的提取。纯重构无行为变更,缩进修复 maxRounds 那批尤其该修。
xiaomo merged commit 06a957d62a into main 2026-04-24 13:19:11 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
2 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/nerve#92