Skip to content

fix bootstrap sandbox gh diagnostic - #58

Closed
lmuehleisen wants to merge 3 commits into
kunchenguid:mainfrom
lmuehleisen:fm/sandbox-gh-diagnostic
Closed

lmuehleisen wants to merge 3 commits into
kunchenguid:mainfrom
lmuehleisen:fm/sandbox-gh-diagnostic

Conversation

@lmuehleisen

Copy link
Copy Markdown

Intent

Distinguish a real missing GitHub login from the Codex sandbox case where host GitHub credentials and network access are not directly available to the startup check.

Changes

  • Add HOST_GH_ACCESS_REQUIRED for sandboxed gh auth probe failures.
  • Preserve NEEDS_GH_AUTH outside the sandbox.
  • Document the handling in AGENTS.md and README.md.
  • Add focused bootstrap tests for both auth-failure paths.

Validation

  • bash tests/fm-bootstrap.test.sh
  • bash tests/fm-afk-inject-e2e.test.sh (exited 0; skipped pane-input check in this sandbox after tmux private-socket errors)
  • bash tests/fm-secondmate.test.sh
  • bash tests/fm-spawn-batch.test.sh
  • bash tests/fm-teardown.test.sh
  • bash tests/fm-wake-queue.test.sh
  • no-mistakes run 01KVV4WNRW9D1ZP7VZJNFSNR6Y: checks-passed

@kunchenguid

Copy link
Copy Markdown
Owner

Thanks for the PR! This branch currently has a merge conflict with the base branch.

When you get a chance, please rebase onto (or merge) the latest base branch, resolve the conflict, and push. After that, checks will re-run and the PR will get looked at again.

Noted for firstmate#58 at 9b8c4c35.

@kunchenguid

Copy link
Copy Markdown
Owner

Automated reminder: this PR still looks blocked on a rebase or merge conflict fix.

If you are still interested, please rebase onto the current base branch, resolve the conflict, and push.

If I do not hear back, I may close this as inactive.

@kunchenguid kunchenguid added wheelhouse:pending-contributor-action Managed by Wheelhouse and removed wheelhouse:pending-contributor-action Managed by Wheelhouse labels Jul 20, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

I am closing this because it has been waiting on a rebase or merge-conflict fix since 2026-07-10, and I have not seen a comment or push since then.

If you still want to keep working on this, please reopen it or open a new PR and mention this one.

Happy to take another look when there is an update.

@loothoarder

Copy link
Copy Markdown

Summary

Watcher now raises one fleet-level dead-air alarm when in-flight non-secondmate work exists and no worker shows liveness for three consecutive cycles.

This branch is rebased/merged onto current main so the alarm sits beside the already-landed prose-stall, child-heartbeat, and dispatch-nag paths.

Integrated behavior

  • bin/fm-watch.sh counts in-flight non-secondmate work each cycle.
  • Liveness is a status or turn-ended write since the last tick, a fresh child-run heartbeat, or a provably busy pane.
  • After FM_FLEET_STALL_CYCLES (default 3) all-quiet cycles, one current-state recheck of quiet tasks runs before the alarm.
  • One fleet-stall wake per episode; the counter and incident marker reset when any task is live again.
  • A fresh child heartbeat also resets the prose-only stall count, so a long suite behind an unchanged worktree is not reported as narration.
  • A stale or absent heartbeat does not hide a real prose stall or fleet stall.
  • Dispatchable queued rows stay silent while a worker is busy.

Test plan

  • bash tests/fm-watch-fleet-stall.test.sh — 5/5 passed (original 3 plus heartbeat suppress/stale)
  • bash tests/fm-prose-stall.test.sh — G22 PASS including running-loop durable notification and heartbeat mask
  • bash tests/fm-watch-dispatch-nag.test.sh — 4/4 including busy-worker silence
  • bash tests/fm-child-heartbeat.test.sh — R25 PASS
  • bash tests/fm-busy-source-liveness.test.sh — per-task stale still surfaces when fleet-stall is pinned out of the way
  • watcher triage, escalation stall cap, and wake-queue suites passed
  • bin/fm-lint.sh
  • bin/fm-doc-audience-check.sh
  • portable current-head suite (--all --exclude-family real-herdr-gated): 178/179 passed; tests/fm-pr-check-security.test.sh fails identically on this tree and on current main (unrelated merged-poll-upward-retry)

@lmuehleisen
lmuehleisen deleted the fm/sandbox-gh-diagnostic branch September 9, 2026 20:03
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 2, 2026
…anded list (kunchenguid#58)

* fix(bearings): keep a just-finished completion in the landed baseline

The captain-facing "Recently Landed" section could omit a task that had just
completed, telling the captain nothing landed immediately after they watched
something finish. The pure-upstream trial recorded this live
(data/fm-upstream-trial-verdict-v2/report.md), and our own surface shared it.

Every landed view caps its list, so the newest-first ordering decides which rows
survive the cap. The previous key, sort_by([(.completion.date // ""), .id]) |
reverse, broke that invariant two ways:

- A Done row with no completion date got the empty string, which sorts below
  every real date, so an undated completion ranked as the oldest thing in the
  fleet and was the first row the cap discarded.
- Completion dates are day-granularity, so same-day completions tied and the tie
  was broken on id, which is unrelated to recency. A just-finished task with an
  alphabetically-low id lost its place to same-day completions that had finished
  earlier. This is the default tasks-axi path and reproduces the trial failure.

Rank by completion date descending, then by recording position within the Done
section, and date an undated row as of the snapshot's own generation time. Done
is maintained newest-first, verified against tasks-axi 0.2.3, whose `done`
prepends each newly completed row, so a lower recording position is more recent.
The cap now always drops the oldest completions and never the newest.

The rule lives in one place, bin/fm-landed-lib.sh, because three sort sites
across two scripts would otherwise drift into disagreeing about which completion
is newest.

Also carries two related trial findings into the same surface: the bearings chat
contract now forbids an all-clear while anything is unresolved, including when a
state could not be read, and the skill is covered by the captain-facing
translation contract test.

* chore(fork-surface): declare the landed completion-truth capability

Claims the shared completion-recency ordering library and its regression test so
an upstream port cannot silently drop the guarantee that a just-finished task
appears in the next captain-facing report.

* no-mistakes(review): rank dated completions above undated and stop leaking order

* no-mistakes(review): restore the dead manual-Done-pruning guard in teardown tests

* no-mistakes(review): reserve the fleet-newest completion and scope the all-clear ban

* no-mistakes(review): publish recency_rank and reserve same-date tied homes
@kimdavid333

Copy link
Copy Markdown

Known remaining cases

Measured on the 47 audit menus (Vision boxes dumped on the Mac, score11.py, every row labelled): Riomaggiore 0 → 13 of 14 dishes; split rows on w01-w11 48 → 32 (bar: ≤ 15); F18 on w 64.5% → 68.6% (bar: ≥ 70%); recall on w 76.2% → 80.5%; F18 v 68.6% → 68.6%, z 60.8% → 61.9%, y 70.1% → 70.1%; no dish lost; slowest read +20 ms. The two missed bars were accepted (firstmate decision g1-acceptance).

The 32 split rows left are not reached by these rules:

  • 20 on Cadaqués: photo captions in small capitals stacked more than 1.3 letter heights apart, or capitalised words that are no pasta or food word ("CALAMARS" / "ROMANA", "PATATES" / "BRAVES", "PEIX" / "FREGIT").
  • 9 on El Chino: halves of one word on one row with a fan between them ("SAL" / "OJA", "QUI" / "enDILLAS").
  • 3 single OCR truncations.

Joining any short line in capitals under any short name reaches the caption stacks but merges consecutive dishes elsewhere (w F18 44.7%, z 51.8%), so it was not shipped. Same-row halves need a different join (pieces on one row), out of this change.

@jeffmlr

jeffmlr commented Nov 8, 2026

Copy link
Copy Markdown

Post-merge apply (operator, not run by this PR)

make ci-runner-collections     # installs jeffmlr.ci_runners 0.3.7 locally
make ci-runner-deploy-check    # dry run against the VPS
make ci-runner-deploy          # apply ci_vps_runner

Expected result: the collection reports 0.3.7, and the check/apply runs show no changes, or only version-related changes, to the VPS runner lane. ci_vps_runner is identical between v0.2.0 and v0.3.7. Bump home-iac's Mini pin to v0.3.7 to match.

fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 18, 2026
…ream-catchup-20261115

feat(bin): catch up with upstream firstmate through 427056c
SamuelZach added a commit to SamuelZach/firstmate that referenced this pull request Nov 22, 2026
… lands

When a second mate reports into this home (state/<mate>.status), the captain
heard about it only after the watcher woke, the supervision branch drained and
checked, and main posted the branch's summary (median 25 s, p90 39 s over the
last three days). The mate's done:/failed: line is already its own checked
outcome, so the primary now appends it to main the moment the wake arrives, as
a display-only custom entry (fm-mate-terminal-notice): never sent to the model,
no turn, no tokens. The wake keeps its normal route, so the branch's checked
summary still follows.

- only tasks whose metadata says kind=secondmate, only done/failed verbs;
- its own byte cursor (state/.mate-terminal-notice-cursor): no history replay,
  no repeats, partial lines wait, a replaced file restarts at its end;
- attended posture only; FM_MATE_TERMINAL_NOTICE=0 turns it off;
- any error yields no notice and never affects wake delivery.

The entry data is {version, mate, verb, key, corr, at, line, statusFile,
offset}; Firstmate Desktop renders it (firstmate-desktop PR kunchenguid#58).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants