gnhf 0.1.34 → 0.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -138,7 +138,7 @@ npm link
138
138
  └──────────────────────────────────────┘
139
139
  ```
140
140
 
141
- - **Incremental commits** - each successful iteration is a separate unsigned git commit, so you can cherry-pick or revert individual changes without GPG or SSH signing prompts blocking the run
141
+ - **Incremental commits** - each successful iteration is a separate unsigned git commit, so you can cherry-pick or revert individual changes without GPG or SSH signing prompts blocking the run; if the first commit attempt fails, gnhf re-stages changes and retries with `--no-verify` so hook-mutated work is not stranded
142
142
  - **Failure handling** - all failed iterations are rolled back with `git reset --hard`; agent-reported failures proceed to the next iteration immediately, retryable hard agent errors use exponential backoff, and permanent agent errors such as Claude low credit balance abort immediately and print the run log path. Complete no-op iterations are reported as failures and count toward the consecutive-failure abort limit.
143
143
  - **Runtime caps** - `--max-iterations` stops before the next iteration begins, `--max-tokens` can abort mid-iteration once reported usage reaches the cap, and `--stop-when` ends the loop after an iteration whose agent output reports the natural-language condition is met; resumed runs reuse the saved stop condition unless you pass a new value, or `--stop-when ""` to clear it; uncommitted work is rolled back in either case, and in the interactive TUI the final state remains visible until you press Ctrl+C to exit
144
144
  - **Iteration finalization** - agents are expected to finish validation, stop any background processes they started, and only then emit the final JSON result for the iteration
package/dist/cli.mjs CHANGED
@@ -562,17 +562,27 @@ function getBranchDiffStats(baseCommit, cwd) {
562
562
  return stats;
563
563
  }
564
564
  function commitAll(message, cwd) {
565
+ const commitArgs = [
566
+ "-c",
567
+ "commit.gpgsign=false",
568
+ "-c",
569
+ "tag.gpgsign=false",
570
+ "commit",
571
+ "-m",
572
+ message
573
+ ];
565
574
  git(["add", "-A"], cwd);
575
+ let firstError;
566
576
  try {
567
- git([
568
- "-c",
569
- "commit.gpgsign=false",
570
- "-c",
571
- "tag.gpgsign=false",
572
- "commit",
573
- "-m",
574
- message
575
- ], cwd);
577
+ git(commitArgs, cwd);
578
+ return;
579
+ } catch (error) {
580
+ firstError = error;
581
+ }
582
+ git(["add", "-A"], cwd);
583
+ try {
584
+ git([...commitArgs, "--no-verify"], cwd);
585
+ appendDebugLog("git:commit:no-verify-fallback", { firstError: serializeError(firstError) });
576
586
  } catch {}
577
587
  }
578
588
  function resetHard(cwd) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gnhf",
3
- "version": "0.1.34",
3
+ "version": "0.1.35",
4
4
  "description": "Before I go to bed, I tell my agents: good night, have fun",
5
5
  "type": "module",
6
6
  "bin": {