Repository navigation
Create the wake logs the lane launcher names - #170
Conversation
tmux_lane.sh said wakes land in events.jsonl before that file existed (booking#199). It now creates both logs, empty, before naming them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Confidence Score: 4/5
Summary
Pre-creates tmux-lanes/wake.jsonl and events.jsonl (mode 600) before the launcher prints their paths. Failure-tolerant one-liner; no harness reader keys on existence or emptiness, and launch/qualify/wake tests pass. Low risk.
Important Files Changed
| File | Overview |
|---|---|
| harness/tmux_lane.sh | Touches both wake logs under umask 077, then prints paths with new parenthetical |
Reviewed 2488390...ecb0476 · ↻ Re-run review · View in Adapt
| echo "tmux-lane: wakes land in $TMUX_ROOT/wake.jsonl and $ROOT/events.jsonl" | ||
| # Name only files that exist: an empty log means no wake yet, not a wrong path. | ||
| (umask 077; : >> "$TMUX_ROOT/wake.jsonl"; : >> "$ROOT/events.jsonl") || true | ||
| echo "tmux-lane: wakes land in $TMUX_ROOT/wake.jsonl and $ROOT/events.jsonl (empty until the first wake)" |
There was a problem hiding this comment.
events.jsonl is the run-wide log (refusals, fresh-session, blocking receipts, seat events) and is often non-empty at launch; condition the "(empty until the first wake)" text on [ -s ] or soften it.
| [ -z "$WALL_CAP_S" ] || echo "tmux-lane: capped at $((WALL_CAP_S / 60)) min wall clock${SPEND_CAP:+ (\$$SPEND_CAP at \$$RATE/h)}" | ||
| echo "tmux-lane: wakes land in $TMUX_ROOT/wake.jsonl and $ROOT/events.jsonl" | ||
| # Name only files that exist: an empty log means no wake yet, not a wrong path. | ||
| (umask 077; : >> "$TMUX_ROOT/wake.jsonl"; : >> "$ROOT/events.jsonl") || true |
There was a problem hiding this comment.
>> follows symlinks while every harness writer of these files uses O_NOFOLLOW; guard with [ -L ] (or reuse the Python writer) so the launcher never creates a symlink target.
…y claim events.jsonl is the run-wide log and is often not empty at launch, so the launcher no longer says it is. It creates each log only when the path is not a symlink, as every writer of these logs refuses one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed in bb30f2d:
The earlier CI failure was @adaptcom review |
|
I checked bb30f2d and both earlier findings are fixed. Score is 5/5 with no remaining findings.
|
The creation guard skipped only symlinks, so an existing FIFO at wake.jsonl or events.jsonl was opened and the launcher hung at its last step. Create the file only when neither -e nor -L holds, and open it under noclobber: bash then uses O_CREAT|O_EXCL for an absent path, so nothing that appears after the check (link, FIFO) is followed or opened. Existing files are never truncated, a new file is owner-only, and any failure leaves the launch successful. CHANGELOG ### Fixed line added for the user-visible fix. FactoryRun: review-chiron-prs Built-By: Factory v0.8.31
Through the real tmux_lane.sh launch on an ignited run (Lanes fixture, stub tmux): 1. a fresh launch names <run>/tmux-lanes/wake.jsonl and <run>/events.jsonl on its output and both exist as regular files; a log the launch created is 0600. The wake path is where the watcher writes wakes (Watched and Lane fixtures), so the launcher must name that file. If ignition already made events.jsonl, its mode falls under the existing-log contract. 2. dangling symlinks at both paths: launch succeeds, neither target created. 3. existing logs (0640, with rows) keep their rows as a prefix and their mode; appending is allowed because the launch may record itself. 4. a FIFO at the wake path: the launch returns within a bound. On timeout the test opens the FIFO read-write to release the blocked launcher, then fails. Decision: the FIFO case asserts completion only, not a return code; the brief states no disposition for it. FactoryRun: review-chiron-prs Built-By: Factory v0.8.31
|
Verified live: Nit: the description says the message now notes that the files stay empty until the first wake, but the printed line is unchanged. |
|
Thanks for testing this live, Shane. Replies to your review, checked at
|
tmux_lane.shprintedwakes land in …/tmux-lanes/wake.jsonl and …/events.jsonl, butevents.jsonldidn't exist until the first wake (booking#199), so the path looked wrong. The launcher now creates both files, empty and mode 600, before printing their paths, so the paths it prints exist (owner-only, never truncated, never through a link or onto a FIFO). The printed line itself is unchanged. Nothing in the harness or runtime treats whether the file exists as meaningful.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.