Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ state/ runtime records and signals; gitignored
.pr-check-migration-scan-v1 private marker proving the non-executing scan disabled every unsafe legacy check; .pr-check-migration-v1 separately records completed private repairs
x-watch.check.sh generated Relay poll shim; present only when opted in (section 14)
tool-updates.check.sh generated watched-tool update poll shim and its .check-trust binding; present only after bin/fm-tool-update-check.sh arm; its report record .tool-updates is what keeps one pending update from being reported on every poll
pr-conflict-watch.check.sh generated open-PR merge-conflict poll shim and its .check-trust binding; present only after bin/fm-pr-conflict-watch.sh arm; its dedupe record .pr-conflict-watch is what keeps one conflicted head from waking on every poll, and it is cut back to the conflicts each sweep still observes
pending-replies/ parent-owned secondmate pending-reply records (correlation id, delivery vs reply, recovery, escalation); fm-pending-reply-lib.sh
procevent/ registered process-to-event sources, one private record per canonical source id; written only by bin/fm-procevent.sh, and their presence alone keeps supervision required (section 13)
procevent-inbox/ private captured results and their durable handled-acknowledgement markers; source output lives here and never in an event line
Expand Down
12 changes: 5 additions & 7 deletions bin/fm-bearings-snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ FLEET="$SCRIPT_DIR/fm-fleet-snapshot.sh"
# shellcheck source=bin/fm-timeout-lib.sh
# shellcheck disable=SC1091
. "$SCRIPT_DIR/fm-timeout-lib.sh"
# shellcheck source=bin/fm-repo-slug-lib.sh
# shellcheck disable=SC1091
. "$SCRIPT_DIR/fm-repo-slug-lib.sh"

# Bounds (overridable for tests / large fleets).
FM_BEARINGS_LANDED=${FM_BEARINGS_LANDED:-6}
Expand Down Expand Up @@ -193,11 +196,6 @@ PR_REPOS_SHOWN=0
PR_ROWS_CAPPED=0
PR_ROWS_MIN_TOTAL=0

# Parse owner/repo from an https or ssh GitHub remote/PR URL; empty if not GitHub.
repo_slug() { # <url>
printf '%s' "$1" | sed -n 's#.*github\.com[:/]\([^/]*/[^/]*\)#\1#p' | sed 's#\.git$##; s#/pull/.*$##; s#/$##'
}

# Bounded gh call; prints stdout, non-zero on timeout/failure. gh only.
# bin/fm-timeout-lib.sh owns the bound itself.
gh_bounded() { # <args...>
Expand All @@ -213,7 +211,7 @@ if [ "$INCLUDE_PRS" = 1 ]; then
repos=""
while IFS= read -r u; do
[ -n "$u" ] || continue
s=$(repo_slug "$u"); [ -n "$s" ] || continue
s=$(fm_repo_slug "$u"); [ -n "$s" ] || continue
case " $repos " in *" $s "*) : ;; *) repos="$repos $s" ;; esac
done <<EOF
$(printf '%s' "$SNAP" | jq -r '.tasks[].pr.url // empty')
Expand All @@ -222,7 +220,7 @@ EOF
[ -n "$wt" ] || continue
[ -d "$wt" ] || continue
u=$(git -C "$wt" remote get-url origin 2>/dev/null) || continue
s=$(repo_slug "$u"); [ -n "$s" ] || continue
s=$(fm_repo_slug "$u"); [ -n "$s" ] || continue
case " $repos " in *" $s "*) : ;; *) repos="$repos $s" ;; esac
done <<EOF
$(printf '%s' "$SNAP" | jq -r '.tasks[] | select(.kind != "secondmate") | .paths.worktree.path // empty')
Expand Down
Loading