Skip to content

Commit ec2114a

Browse files
committed
Release v0.5.1
1 parent dadcfe6 commit ec2114a

6 files changed

Lines changed: 52 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.5.1] - 2026-03-20
9+
10+
### Fixed
11+
- Claude stop hook now resolves its real source path before loading shared helpers, so symlinked installs under `~/.claude/hooks/stop-hook.sh` no longer fail with missing helper-library errors
12+
- Added regression coverage for running the stop hook through a symlinked install path
13+
814
## [0.5.0] - 2026-03-20
915

1016
### Added
@@ -109,6 +115,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
109115
- Multi-language support in MEASURE phase (Elixir, Python, JavaScript, Ruby, Go)
110116
- Simultaneous multi-KPI completion gate
111117

118+
[0.5.1]: https://github.com/DjinnFoundry/forge-loop/releases/tag/v0.5.1
112119
[0.5.0]: https://github.com/DjinnFoundry/forge-loop/releases/tag/v0.5.0
113120
[0.4.2]: https://github.com/DjinnFoundry/forge-loop/releases/tag/v0.4.2
114121
[0.4.1]: https://github.com/DjinnFoundry/forge-loop/releases/tag/v0.4.1

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
**Forge Core with first-class drivers for [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and Codex/manual workflows.**
2222

2323
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
24-
[![Version](https://img.shields.io/badge/version-0.5.0-green.svg)](CHANGELOG.md)
24+
[![Version](https://img.shields.io/badge/version-0.5.1-green.svg)](CHANGELOG.md)
2525

2626
Forge is a protocol plus adapters. The protocol defines task success, KPI guardrails, state, strategy rotation, evaluation cadence, and completion rules. The bundled drivers make that protocol run inside Claude Code and Codex/manual workflows.
2727

@@ -73,7 +73,7 @@ The bundled Codex/manual adapter in this repo:
7373
- `.codex/forge/` state layout for per-project sessions
7474
- shared shell state helpers reused across drivers
7575

76-
Both drivers are first-class in `v0.5.0`. The difference is automation depth:
76+
Both drivers are first-class in `v0.5.1`. The difference is automation depth:
7777
Claude gets hook-driven iteration; Codex gets manual driver scripts that print
7878
the next prompt and manage session state.
7979

@@ -85,7 +85,7 @@ the next prompt and manage session state.
8585
| Codex CLI | First-class manual driver | Install script, `forge-init`, `forge-continue`, `forge-cancel`, project-local state |
8686
| Other agents / plain shell | Protocol-only | Reuse the protocol and state model manually |
8787

88-
Forge is not claiming native parity across agent runtimes. `v0.5.0` ships two real drivers with different control surfaces.
88+
Forge is not claiming native parity across agent runtimes. `v0.5.1` ships two real drivers with different control surfaces.
8989

9090
---
9191

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.0
1+
0.5.1

hooks/stop-hook.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,18 @@
77

88
set -euo pipefail
99

10-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10+
SOURCE_PATH="${BASH_SOURCE[0]}"
11+
while [[ -L "$SOURCE_PATH" ]]; do
12+
LINK_DIR="$(cd "$(dirname "$SOURCE_PATH")" && pwd)"
13+
TARGET_PATH="$(readlink "$SOURCE_PATH")"
14+
if [[ "$TARGET_PATH" == /* ]]; then
15+
SOURCE_PATH="$TARGET_PATH"
16+
else
17+
SOURCE_PATH="${LINK_DIR}/${TARGET_PATH}"
18+
fi
19+
done
20+
21+
SCRIPT_DIR="$(cd "$(dirname "$SOURCE_PATH")" && pwd)"
1122
source "${SCRIPT_DIR}/../scripts/forge-state-lib.sh"
1223

1324
# Read hook input from stdin

skills/forge/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Forge has two layers:
4949
- **Success contract** — task objective plus explicit or derived completion checks
5050
- **Driver** — runtime-specific integration that launches the loop, persists state, and handles pause/continue mechanics
5151

52-
`v0.5.0` ships two first-class drivers:
52+
`v0.5.1` ships two first-class drivers:
5353

5454
- **Claude Code** — command, agent, and stop-hook integration are bundled here
5555
- **Codex**`forge-init`, `forge-continue`, `forge-cancel`, and `forge-status` manage a manual loop with project-local state

tests/stop-hook.test.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,21 @@ run_hook() {
8484
| (cd "${repo_dir}" && bash "${HOOK_PATH}")
8585
}
8686

87+
run_hook_via_symlink() {
88+
local repo_dir="$1"
89+
local install_dir
90+
install_dir="$(mktemp -d)"
91+
mkdir -p "${install_dir}/hooks"
92+
ln -s "${HOOK_PATH}" "${install_dir}/hooks/stop-hook.sh"
93+
94+
local output
95+
output="$(printf '{"transcript_path":"%s"}\n' "${repo_dir}/transcript.jsonl" \
96+
| (cd "${repo_dir}" && bash "${install_dir}/hooks/stop-hook.sh"))"
97+
98+
rm -rf "${install_dir}"
99+
printf '%s' "$output"
100+
}
101+
87102
with_repo() {
88103
local test_name="$1"
89104
local repo_dir
@@ -202,6 +217,18 @@ test_exact_promise_marker_finishes() {
202217
fi
203218
}
204219

220+
test_symlinked_hook_resolves_helper_library() {
221+
local repo_dir="$1"
222+
write_state "${repo_dir}" "true" "1" "null"
223+
write_transcript "${repo_dir}" "regular output"
224+
225+
local output
226+
output="$(run_hook_via_symlink "${repo_dir}")"
227+
228+
assert_contains "$output" '"decision": "block"' "symlinked hook should still continue the loop"
229+
assert_equals "2" "$(state_field "${repo_dir}" "iteration")" "symlinked hook should increment iteration"
230+
}
231+
205232
main() {
206233
with_repo test_regular_output_continues
207234
with_repo test_embedded_complete_marker_does_not_finish
@@ -211,6 +238,7 @@ main() {
211238
with_repo test_paused_loops_stay_paused
212239
with_repo test_embedded_promise_marker_does_not_finish
213240
with_repo test_exact_promise_marker_finishes
241+
with_repo test_symlinked_hook_resolves_helper_library
214242

215243
echo "stop-hook tests passed"
216244
}

0 commit comments

Comments
 (0)