Skip to content

feat: add ownership, PR links, and delivered state to bearings - #4019

Open
mremond wants to merge 29 commits into
kunchenguid:mainfrom
mremond:fm/fm-bearings-board-loses-owner-state-and-links
Open

mremond wants to merge 29 commits into
kunchenguid:mainfrom
mremond:fm/fm-bearings-board-loses-owner-state-and-links

Conversation

@mremond

@mremond mremond commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Intent

The board loses three pieces of information the underlying digest already supplies. Same root, one delivery. Captain's request on 2026-09-08, looking at his own board.

COMMON ROOT: the digest carries more structure than the board's payload contract can express, so the composing agent flattens it by hand - and what it types in prose is not structure. Verified: "delivered" rows already carry an owner field and a request link; "in flight" and "upcoming" rows carry neither.

  1. OWNERSHIP, a first-class field on in-flight and upcoming rows
    The project CANNOT serve as the axis: the second mate's domain IS the firstmate repository, so both homes carry the same project label. Proof as of 2026-09-08: of seven in-flight rows, six displayed "firstmate" - three from the main home and three from the second mate. Only the words "Second mate:" typed by hand into the title told them apart.
    Display: a breakdown sub-line in the header tiles, not a fifth tile. The tiles answer "how many, in what state"; ownership answers "whose", and one more tile would repeat the same category error as the project column.
    INVIOLABLE RULE: the "needs you" tile is NEVER split and NEVER filtered. What needs the captain needs him, wherever it came from. That is where the risk of an ignored corner is most serious.

  2. A DISTINCT STATE: delivered, awaiting an outside maintainer
    This state belongs to none of the four sections: no action the captain can take, not yet landed, and nothing progressing in it. Today it falls into "in flight", where it lies twice - it reads as work in the air and it inflates the counter.
    STRUCTURAL ARGUMENT, stronger than the isolated case: it is the terminal state of EVERYTHING the second mate produces, which delivers exclusively into a repository where we never merge.
    Two mandatory safeguards:

  • the AGE displayed prominently; it is the only useful information in that state.
  • an EXIT RULE: past a delay, the row rises into "needs you", because "the maintainer has not merged for three weeks" becomes a possible nudge again. Without it the box becomes a polite graveyard.
    WARNING: the digest's contract states four sections explicitly and no fifth. This is therefore not a display adjustment but a change to the contract itself: update .agents/skills/bearings/SKILL.md in the SAME delivery, not afterwards.
  1. THE REQUEST LINK on those rows
    A "delivered, waiting" row without a link is unusable: you can neither go look nor nudge. The digest already provides recorded_prs associating the task with its URL; it is the payload that has no pr_url field on in-flight and upcoming rows, while delivered rows have one. Reuse exactly the same shape.

DO NOT widen beyond these three points. No per-home priority editor: the captain has delegated the ordering, and bringing him back into it would cancel the benefit.

ADDED 2026-09-11, captain's words, routed by the main firstmate (corr=2aeadb578ec7c3ea): "sur firstmate: merge main in #4019 to resolve conflicts - need to pass through no-mistakes."
This lifts the development pause for this one request and this one action only.
It is a merge of main INTO the branch, never a rebase: the maintainer wrote "no merge, no rebase" on this request, and an incoming merge neither rewrites published history nor merges the request.
Resolve conflicts preserving both sides' intent; a conflict that needs arbitration between incompatible intents is stopped and reported, not decided.
Push to the existing branch, no new request.
The held opt-in reclassification commit 4687b942 stays OUT of this push; it remains held to 2026-09-14.
The maintainer classed this delivery new-default twice; this pass does not change that class and the description must not suggest it does.
Merging the request stays with the captain.

ADDED 2026-09-14, captain's ruling routed by the main firstmate: publish the held commit "feat(bearings): make the delivered-row escalation opt-in and off by default" onto this request, placed as an addition on top of the current published head, never as a rebase - the maintainer's prohibition on rebasing this work is untouched.
The maintainer's own triage classed this delivery as changing default behaviour precisely because the delivered-row escalation reached an unconfigured installation, and stated that a bugfix framing would not reclassify it.
That commit makes the escalation opt-in and off by default: FM_BEARINGS_AWAITING_NUDGE_DAYS no longer has a default, so with it unset no delivered row escalates at any age, and the Delivered box states which regime is in force. An unconfigured installation is therefore no longer affected.
Publishing it now does not unblock anything and carries no urgency; the honest reason is queue position.
Nothing else in the delivery changes, and this does not widen the three points above.

What Changed

  • Carry structured owners and recorded PR links into Underway and Charted Next rows, with owner breakdowns beneath state totals while keeping “needs you” unsplit and unfiltered.
  • Add a Delivered section across snapshots, board, and digest for declared external merge waits without outstanding captain action. Show wait ages and PR links, preserve age when the same PR is re-recorded, and exclude deliveries from in-flight counts.
  • Make overdue nudges opt-in through FM_BEARINGS_AWAITING_NUDGE_DAYS, disabled when unset. Display the escalation regime and route request-keyed nudge responses separately from task decisions.

Risk Assessment

✅ Low: The changes remain within the accepted scope, and the full static review found no new material issues beyond previously adjudicated concerns.

Testing

Targeted automated checks and isolated CLI/Lavish/Chromium scenarios passed after correcting Git-discovery and browser-driver setup; screenshots, rendered HTML, snapshots, nudge captures, and clock evidence were retained. Mocked regressions were supporting evidence only.

  • Live validation: ✅ go - 8 of 8 scenarios driven live against the product
Scenario Result Live Evidence
View same-repository work from two homes: ownership appears beneath the counts, while Needs you remains one combined count. ✅ pass live board-off.png; board-off.json
Refresh with escalation unset: 21-day and two-day deliveries remain in Delivered with ages and links, excluded from Underway. ✅ pass live snapshot-off.json; board-off.png
Configure an escalation threshold: overdue deliveries become nudge cards, younger deliveries remain below, and the regime stays visible when Delivered is empty. ✅ pass live snapshot-on.json; nudge-answer.png; board-all-escalated.png; board-empty-off.png
Declare an outside wait while approvals remain outstanding in both homes: both approvals remain Captain’s Calls and never become Delivered. ✅ pass live snapshot-off.json; snapshot-after-answer.json; validation-notes.json
Open recorded request links despite dependency URLs in prose: recorded /pull/2 wins over /pull/99, and unrecorded rows receive no link. ✅ pass live board-off.json; recorded-link-clicks.json
Submit Leave it waiting on a nudge: the captured answer is request-keyed, produces no task-answer or reconciliation entry, and preserves approvals and delivery ages. ✅ pass live nudge-capture.txt; nudge-routing.jsonl; snapshot-after-answer.json
Re-record requests: the same request preserves both daylight-saving-hour timestamps, a different request starts a new clock, and concurrent observations never report armed evidence with a null timesta… ✅ pass live delivery-clock.json; concurrent-registration.json
Build with an overdue, linkless, or null-age Delivered row: validation refuses the payload and preserves the existing board. ✅ pass live board-refusals.json
Evidence: Captured request-keyed nudge

Source: Captured request-keyed nudge

SESSION-ENDING MESSAGE: (none)

declared_items: 1
presented_items: 1
malformed_items: 0
complete: yes
lifecycle: feedback
session_ended: (unset)
annotation_count: 1
session_ending_message_count: 0

ANNOTATIONS
ANNOTATION 1 of 1
element_uid: 1
element_selector: div#bb-call > div:nth-of-type(3) > div > form
tag: nudge
text:
| Nudge the outside maintainer -> wait
prompt:
| Captain's Call answer - Nudge the outside maintainer: wait
| 
| Context data:
| {
|   "schema": "fm-bearings-nudge.v1",
|   "selection": "wait",
|   "note": "",
|   "pr_url": "https://github.com/kunchenguid/firstmate/pull/4019"
| }
END ANNOTATIONS
END LAVISH RESULT (1 of 1)
Evidence: Delivery clock preservation across daylight-saving ambiguity

Source: Delivery clock preservation across daylight-saving ambiguity

[
  {
    "action": "Re-record same PR during repeated daylight-saving hour",
    "local_time": "2025-10-26T02:30:00+02:00",
    "before_epoch": 1761438600,
    "after_epoch": 1761438600,
    "pr_url": "https://github.com/kunchenguid/firstmate/pull/4019",
    "output": "armed: state/clock.check.sh"
  },
  {
    "action": "Re-record same PR during repeated daylight-saving hour",
    "local_time": "2025-10-26T02:30:00+01:00",
    "before_epoch": 1761442200,
    "after_epoch": 1761442200,
    "pr_url": "https://github.com/kunchenguid/firstmate/pull/4019",
    "output": "armed: state/clock.check.sh"
  },
  {
    "action": "Record a different PR and start a new delivery clock",
    "pr_url": "https://github.com/kunchenguid/firstmate/pull/4444",
    "after_epoch": 1789406776,
    "output": "armed: state/clock.check.sh"
  }
]
Evidence: Concurrent registration observations

Source: Concurrent registration observations

{
  "registrations_replaced": 12,
  "snapshots": [
    {
      "generated": "2026-09-14T17:28:14Z",
      "pr": {
        "url": "https://github.com/kunchenguid/firstmate/pull/4444",
        "source": "meta",
        "merge_poll": {
          "armed": false,
          "armed_epoch": null
        }
      }
    },
    {
      "generated": "2026-09-14T17:28:15Z",
      "pr": {
        "url": "https://github.com/kunchenguid/firstmate/pull/4444",
        "source": "meta",
        "merge_poll": {
          "armed": false,
          "armed_epoch": null
        }
      }
    },
    {
      "generated": "2026-09-14T17:28:16Z",
      "pr": {
        "url": "https://github.com/kunchenguid/firstmate/pull/4444",
        "source": "meta",
        "merge_poll": {
          "armed": true,
          "armed_epoch": 1789406776
        }
      }
    },
    {
      "generated": "2026-09-14T17:28:16Z",
      "pr": {
        "url": "https://github.com/kunchenguid/firstmate/pull/4444",
        "source": "meta",
        "merge_poll": {
          "armed": true,
          "armed_epoch": 1789406776
        }
      }
    },
    {
      "generated": "2026-09-14T17:28:16Z",
      "pr": {
        "url": "https://github.com/kunchenguid/firstmate/pull/4444",
        "source": "meta",
        "merge_poll": {
          "armed": false,
          "armed_epoch": null
        }
      }
    }
  ]
}
Evidence: Invalid deliveries rejected without replacing the board

Source: Invalid deliveries rejected without replacing the board

[
  {
    "input": "overdue",
    "exit_code": 1,
    "error": "fm-bearings-board: board data does not satisfy fm-bearings-board.v1: ~/.no-mistakes/worktrees/acf4a767348a/01M2GAWMSDQK4B5EA9GZW35RXE/.test-lab/rejected.json",
    "existing_board_preserved": true
  },
  {
    "input": "missing-pr",
    "exit_code": 1,
    "error": "fm-bearings-board: board data does not satisfy fm-bearings-board.v1: ~/.no-mistakes/worktrees/acf4a767348a/01M2GAWMSDQK4B5EA9GZW35RXE/.test-lab/rejected.json",
    "existing_board_preserved": true
  },
  {
    "input": "null-age",
    "exit_code": 1,
    "error": "fm-bearings-board: board data does not satisfy fm-bearings-board.v1: ~/.no-mistakes/worktrees/acf4a767348a/01M2GAWMSDQK4B5EA9GZW35RXE/.test-lab/rejected.json",
    "existing_board_preserved": true
  }
]
Evidence: Validation scope, setup recovery, and postconditions

Source: Validation scope, setup recovery, and postconditions

{
  "target": "961871fb28e34ccd226260291cb40fb3ddeff958",
  "target_tree": "561674c15da31ff2a738d2b14f06a0a0a2f02e58",
  "runtime": "Real Firstmate CLI, isolated FM_HOME instances, real Lavish 4399 listener, Brave Chromium via CDP. Manual test data in documented home files; ages seeded by setting only isolated registration mtimes. No service stubs in these manual flows. Automated suites use their own mocks and are supporting evidence only.",
  "ui": "Shipped Bearings template and styles; 1440px browser with 360px Lavish sidebar. For the all-escalated screenshot, directly loaded the generated HTML after Lavish rejected a transient artifact token. Used Show anyway when Lavish layout gate was still waiting.",
  "setup_recovery": "Initial whole snapshot suite stopped at repository cap because Git discovered the enclosing worktree remote. GIT_CEILING_DIRECTORIES confined subsequent runs; the exact failing selector and all delivery selectors passed. Chrome wrapper lacked required pageId support; switched to a fresh direct CDP connection.",
  "nudge_postcondition": {
    "open_approvals_before": 2,
    "open_approvals_after": 2,
    "delivery_ages_and_nudges_unchanged": true,
    "task_answer_bytes": 0,
    "reconcile_answer_bytes": 0
  },
  "tests": {
    "initial_snapshot_suite": "stopped at test_pr_repository_cap_and_expansion; setup repaired",
    "focused_snapshot_selectors": "24 passed, including exact initial failing selector",
    "fm-fleet-snapshot-view.test.sh": "passed; 19 ok lines match 19 CI invocations",
    "fm-bearings-board.test.sh": "passed",
    "fm-bearings-board-render.test.sh": "passed, including actual browser layout check",
    "fm-pr-check-security.test.sh": "passed"
  },
  "cleanup": "Dedicated Lavish session ended, source retired, home swept, isolated server stopped; named Chrome bridge stopped. No source changes."
}

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

⏭️ **Rebase** - skipped
  • ⚠️ .agents/skills/bearings/SKILL.md - merge conflict rebasing onto origin/main
  • ⚠️ .agents/skills/bearings/assets/board-template.html - merge conflict rebasing onto origin/main
  • ⚠️ bin/fm-bearings-board.sh - merge conflict rebasing onto origin/main
  • ⚠️ bin/fm-bearings-snapshot.sh - merge conflict rebasing onto origin/main
  • ⚠️ tests/assets/board-render-harness.mjs - merge conflict rebasing onto origin/main
  • ⚠️ tests/fm-bearings-board-render.test.sh - merge conflict rebasing onto origin/main
🔧 **Review** - 2 issues found → auto-fixed (4) ✅
  • ⚠️ .agents/skills/bearings/SKILL.md:57 - Intent conformance: the added sentence says that when FM_BEARINGS_AWAITING_NUDGE_DAYS is set, awaiting_nudge_days is null and no row nudges. This reverses the required “with it unset no delivered row escalates at any age” rule: with threshold 7, an eight-day delivery actually nudges. Change the null/off explanation to explicitly apply when unset.
  • ⚠️ .agents/skills/bearings/assets/board-template.html:745 - Simplification / intent conformance: the added !data.awaiting.length ? "" branch hides the regime whenever Delivered is empty, including when all deliveries have escalated. The intent requires that the “Delivered box states which regime is in force.” Remove this unnecessary suppression so the configured threshold or off label remains visible.

🔧 Fix applied.
1 warning still open:

  • ⚠️ bin/fm-bearings-snapshot.sh:245 - The CLI help still contradicts “with it unset no delivered row escalates at any age”: the added text says “FM_BEARINGS_AWAITING_NUDGE_DAYS is set, and awaiting_nudge_days is then null and no row ever nudges.” With threshold 7, an eight-day delivery correctly nudges. Explicitly attach the null/off explanation to the unset case, matching the corrected skill text; leave the code unchanged.

🔧 Fix applied.
1 warning still open:

  • ⚠️ bin/fm-fleet-snapshot.sh:793 - Poll validation and timestamp collection observe the registration separately. Watcher retirement can delete it between these reads, leaving armed=true with armed_epoch=null. Both delivery projections then emit age_days=null, which the board validator rejects, preventing refresh. Concurrent replacement with another PR can instead attach the replacement's timestamp to the captured PR. Bind the timestamp to the same validated registration and mark delivery evidence unavailable when that observation cannot be completed.

🔧 Fix applied.
1 error still open:

  • 🚨 tests/fm-fleet-snapshot-view.test.sh:1144 - The new regression emits five ok lines inside its five-mode loop, but CI counts its single invocation once. The stock macOS guard in .github/workflows/ci.yml:438–447 therefore expects 19 results and receives 23 even when every assertion passes. Move the single pass call after the loop, preserving all five cases.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 8 of 8 scenarios driven live against the product
Scenario Result Live Evidence
View same-repository work from two homes: ownership appears beneath the counts, while Needs you remains one combined count. ✅ pass live board-off.png; board-off.json
Refresh with escalation unset: 21-day and two-day deliveries remain in Delivered with ages and links, excluded from Underway. ✅ pass live snapshot-off.json; board-off.png
Configure an escalation threshold: overdue deliveries become nudge cards, younger deliveries remain below, and the regime stays visible when Delivered is empty. ✅ pass live snapshot-on.json; nudge-answer.png; board-all-escalated.png; board-empty-off.png
Declare an outside wait while approvals remain outstanding in both homes: both approvals remain Captain’s Calls and never become Delivered. ✅ pass live snapshot-off.json; snapshot-after-answer.json; validation-notes.json
Open recorded request links despite dependency URLs in prose: recorded /pull/2 wins over /pull/99, and unrecorded rows receive no link. ✅ pass live board-off.json; recorded-link-clicks.json
Submit Leave it waiting on a nudge: the captured answer is request-keyed, produces no task-answer or reconciliation entry, and preserves approvals and delivery ages. ✅ pass live nudge-capture.txt; nudge-routing.jsonl; snapshot-after-answer.json
Re-record requests: the same request preserves both daylight-saving-hour timestamps, a different request starts a new clock, and concurrent observations never report armed evidence with a null timesta… ✅ pass live delivery-clock.json; concurrent-registration.json
Build with an overdue, linkless, or null-age Delivered row: validation refuses the payload and preserves the existing board. ✅ pass live board-refusals.json
  • bash tests/fm-bearings-snapshot.test.sh — initial run stopped on enclosing-repository discovery; the failing selector passed after confining Git discovery.
  • GIT_CEILING_DIRECTORIES="$TASK_TMP" TMPDIR="$TASK_TMP" bash .test-lab/targeted-snapshot.sh — 24 existing selectors covering delivery, ownership, approvals, metadata-only links, cached ages, bounds, and the repaired setup case.
  • bash tests/fm-fleet-snapshot-view.test.sh — passed with 19 result lines, including all five registration-observation cases.
  • bash tests/fm-bearings-board.test.sh
  • bash tests/fm-bearings-board-render.test.sh — includes actual Chromium layout verification.
  • bash tests/fm-pr-check-security.test.sh
  • Real isolated fm-pr-check.sh, fm-fleet-snapshot.sh, fm-bearings-snapshot.sh, and fm-bearings-board.sh build flows with escalation unset, 7, and 1.
  • Real Lavish listener and Chromium interaction: captured screenshots, opened recorded links, submitted a nudge, and checked persisted results through nudges, answers, and reconciles.
  • Native timestamp preservation, concurrent registration replacement, malformed-payload refusal, and final cleanup checks.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…e board

The board lost three facts the digest already held, all from one cause: the
digest carried more structure than the payload contract could express, so the
composing agent flattened it into prose, and prose is not structure. Each fix
here moves a fact into the payload as a typed field.

OWNERSHIP. The second mate's domain IS the firstmate repository, so the project
column cannot be the axis: on 2026-09-08 six of seven in-flight rows displayed
"firstmate", three from the main home and three from the second mate, and only
the words "Second mate:" typed by hand into a title told them apart. The
canonical snapshot already published an owner on landed and gate rows; in-flight
rows now carry one too, derived from the record and never from a title. The
board requires a non-empty owner on every underway, delivered, landed and
charted row, prints it on the row, and breaks each header tile's count down by
owner in a sub-line rather than in a fifth tile.

The needs-you tile is never split and never filtered by ownership. That rule is
now a named regression test rather than a comment: it fails if the tile is ever
partitioned or if a home's calls are ever filtered out of it.

DELIVERED, AWAITING AN OUTSIDE MAINTAINER, becomes a fifth state. A task whose
merge watch is armed and whose worker has stopped has shipped: nothing local
progresses and nothing in it is the captain's to answer, so it belongs in
neither Underway nor Captain's Call. The signal is structural - bin/fm-pr-lib.sh
writes the merge-poll registration only after the worker's PR-ready signal - so
those rows leave in_flight and gates and become their own bucket, counted once
instead of twice. It is the terminal state of everything the second mate
produces, which delivers exclusively into a repository we never merge, so the
second mate's own home ledger publishes the same rows to its parent, and a
delivered child no longer reads as an inventory fault in that home's books.

The wait is displayed prominently because it is the only useful fact in that
state, and it has an exit rule so the box cannot become a polite graveyard: past
FM_BEARINGS_AWAITING_NUDGE_DAYS the row leaves the delivered box and becomes a
Captain's Call nudge card carrying its wait and its link.

THE THRESHOLD IS 7 DAYS, measured rather than invented, and it is one named
constant. Across the last 200 merged pull requests in this fleet's upstream
repository (gh pr list --state merged --limit 200, read 2026-09-08) merge
latency was 0.1 days at the median, 0.3 at the 75th percentile, 0.8 at the 90th
and 10.2 days at its single extreme. A week is therefore roughly nine times the
90th percentile: it absorbs a weekend and a busy week without firing, and still
fires before all but the most extreme merge this repository has completed. On
the fleet's four open deliveries that day it fires on none of them: two at 0
days, one at 1 and one at 5, all of which read as still normal. It is provisional: only four of those 200 merges
were our own deliveries, so a few dozen of ours would refine it, and the number
is one constant to change rather than a scattered literal.

A crossed row does not oscillate. The wait is measured from the delivery's own
durable record and only grows, so the move into Captain's Call is one-way; the
row stays there until the PR merges, which retires the merge watch and moves it
to Recently Landed. Re-recording a PR restarts that clock, because a
re-recorded delivery is a new delivery. The board enforces the rule rather than
trusting the composer: build refuses any delivered row that has already reached
the threshold carried in the payload.

THE REQUEST LINK. Underway and charted rows now carry pr_url in exactly the
shape landed rows already used, from the same recorded metadata the digest's
recorded_prs is built from. It is required on a delivered row and on a nudge
card, where a row without a link cannot be acted on at all.

The bearings skill stated four sections and no fifth, so its contract is patched
in the same delivery rather than left to drift: the chat-response contract, the
file-mode report, the board payload rules and the board-wake routing all name
the fifth section, and README's mentions are updated as cross-references, not as
second copies.

PROVEN IN THIS HOME, on the real board and real current fleet state of
2026-09-08. The shipped template was executed against a payload composed from
this home's live snapshot, and it rendered: the underway tile broken down as
"4 fm-self / 1 main" where every one of those rows previously read "firstmate";
four delivered rows carrying 5d, 1d, 0d and 0d beside PR 3605, 3710, 3173 and
3844; the request links on those rows; and one undivided needs-you tile. The
exit rule was exercised on the same real rows with the threshold set to 3 days,
where the 5-day delivery correctly left the delivered box and rendered as a
Captain's Call nudge card badged "waiting 5d" with its link. The in-flight
request link was observed on a live row earlier the same day (PR 3710 on
fm-bearings-landed-drops-captain-decided while it was still validating) rather
than in the final render, where that task had already moved to delivered.

Two limits, stated rather than implied. The board was rendered through the
shipped template with real data but NOT published to a live Lavish session,
deliberately, so the captain's own open board was not replaced by a proof; the
session and arming path is unchanged and covered by its existing tests. And a
browser screenshot could not be produced: chrome-devtools-axi in this
environment refused every page operation with an internal pageId error and
wrote no file, so the visual evidence is the executed template's own output
rather than a picture of it.
Review found nine defects in the first commit. This applies all nine, and the
first of them is a correction to the specification, not to the code.

THE WAITING STATE WAS SPECIFIED TOO LOOSELY, AND WAS CORRECTED. It was asked for
as "delivered, awaiting an outside maintainer", and the code generalised that to
"waiting on someone else" - which is what the words say. The generalisation
swallowed the one actor it must never swallow: our own contract arms a merge
watch BEFORE asking the captain to approve a merge, so a request awaiting HIS
word matched the predicate, would have been filed as delivered-and-waiting, and
would then have been withheld from Captain's Call until it aged out. That is the
opposite of what this change exists to do, and one step from the rule that the
needs-you tile is never split. It was not caught by writing the code carefully;
it was caught in review, after passing the author.

The corrected boundary was then specified with three conditions - complete on our
side, the only remaining actor outside this fleet, and that actor not the captain.
The second could not be tested: nothing in fleet state records that a repository
is one we never merge into. The only trace of it is prose in a project
description, and reading a posture out of a description is the exact defect this
change exists to remove. So the state was narrowed to what structure proves:

  complete on our side, AND no captain action outstanding on the task.

Complete on our side is affirmative rather than "any state except working": the
delivery is recorded, the last event declares done or the bounded external wait
paused, and the live state is not working, blocked, or parked. Outstanding
captain action is read from the structured captain-hold classification alone. The
section is named for what it holds - waiting on a merge we do not control - not
for the stronger claim. The missing fact is a registered posture on the project;
it is tracked as its own task and deliberately has no hook here, because a
half-built hook for a contract that does not exist is worse than a clean
narrowing.

The next person deciding where a row belongs should know this trap exists. The
words "waiting on someone else" will read as harmless again.

THE TWO BOUNDARIES ARE NOW ONE PASSAGE in the bearings skill, not two paragraphs:
nothing that needs the captain may be hidden, whether by splitting a tile or by
re-labelling a row. Written apart, one gets honoured and the other quietly
defeated. Both faces are pinned by tests rather than prose, and the re-labelling
one is new here because it is the one that nearly got through.

THE WAIT NOW SURVIVES A RE-RECORDING. Measuring it from the merge-watch
registration meant an ordinary re-run of bin/fm-pr-check.sh for the same pull
request republished the record and turned a three-week wait into zero, silently
discarding the nudge it had earned. Re-recording the same PR now carries the
original delivery time onto the replacement; a different PR is a different
delivery and starts its own clock. Only the timestamp is carried - the bytes, the
inode identity, and the hashes bound to them are still produced by the
transactional publication.

The rest, briefly. A delivery that resumed and then failed keeps its own state
and detail instead of reading as delivered, in both projections. The recorded
request link now reaches the parent for a second mate's queued rows. A nudge card
key encodes the row id (underscore doubles, slash becomes _s) so a second mate's
row is representable at all - nudge.mate/mate-shipped was not a valid key, which
means an aged second-mate delivery could never have been carded. Overdue and
oldest deliveries sort ahead of the bound, so truncation can no longer drop the
row that most needs promoting. A truncated Charted Next tile says its ownership
breakdown covers the shown rows. The single-owner suppression is gone: a tile
owned entirely by one home still names it, since hiding ownership in the
commonest case is the defect the sub-line exists to correct. The pre-upgrade
board fallback is gone with its test, which had to bypass the build to
manufacture its own input.

Kept deliberately, and named because a documentation pass would find them easy to
trim: the measured seven-day threshold evidence (median 0.1 days, 75th percentile
0.3, 90th 0.8, maximum 10.2 across the last 200 merged upstream pull requests) and
its provisional caveat that only four of those were our own deliveries; and the
cause attribution that prose was standing in for structure.

VERIFIED ON REAL FLEET STATE of 2026-09-08, which is what showed the boundary
working rather than merely compiling: the captain-held delivery left the delivered
box for the gates with its link intact, one row at an active approval gate stayed
Underway, and two genuine waits remained. Had the narrowing been wrong in the
other direction the box would have been empty.
@greptile-apps

greptile-apps Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: contract-class new-default — board now always-on surfaces ownership/PR links/delivered rows and escalates overdue deliveries into Captain's Call at FM_BEARINGS_AWAITING_NUDGE_DAYS default 7. Presenting digest fields the board previously flattened is welcome, but the unconfigured nudge→Captain's Call path is new default behavior (not restore). A bugfix framing does not reclassify that.

VISION: mixed — honesty under load / peace of mind align; Authority/consent: new always-on captain-facing escalation needs captain decision before merge. Attestation MATCH HEAD 2376647d382debaf95a2472f99ffb0a67ef5c85f. NM pass. CI currently red (Behavior portable serial 3 + Stock macOS Bash snapshot compatibility; serial 4 still pending at stamp time). No auto-merge (new-default). Not flagging captain yet — still blocked by CI.

Waiting on: author to fix CI failures; captain decision only once otherwise ready.

mremond and others added 4 commits September 8, 2026 21:12
…test-count assertion and made Lavish help include its complete header. Verified 92 stock Bash cases, 87 process-event cases using an isolated temporary marker, ShellCheck, and workflow lint. Only two tracked files changed
The previous round was asked to fix two stale hardcoded numbers by deriving
them. It derived the help-window one and deleted the other: the workflow's
`[ "$bearings_count" -eq 53 ]` assertion was replaced with a bare invocation.
That guard exists to notice when the suite stops early or runs nothing, so
removing it turned the check green in precisely the case it was there to catch.

Restore both count guards in derived form. Each expected count comes from the
suite's own invocation list; each observed count comes from what the run
actually emitted. The two sources are independent on purpose - a count derived
from the output it checks would agree with itself and be green forever. The
`-gt 0` condition covers a derivation that silently finds no tests, which would
otherwise compare zero against zero and pass.

Measured before committing: a real run of the real suite passes (18/18), a
suite that stops early fails, a suite that runs nothing fails, and a derivation
that finds no tests fails.
@mremond mremond changed the title fix: preserve Bearings ownership, delivery state, and PR links fix(bin): preserve Bearings ownership, delivery state, and PR links Sep 8, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: tip 723830dc438374c69661f37fdee6d9606ce744cf — attestation MATCH. Contract-class still new-default: tip adds always-on board ownership / PR links / Delivered rows, and FM_BEARINGS_AWAITING_NUDGE_DAYS=${FM_BEARINGS_AWAITING_NUDGE_DAYS:-7} in bin/fm-classify-lib.sh (absent on main) so overdue Delivered escalates into Captain's Call unconfigured. Bug-fix / CI-guard framing does not reclassify that.

VISION: honesty under load / peace of mind align with surfacing owners and ages; Authority/consent: always-on captain-facing escalation remains a captain decision — but only once otherwise-ready.

CI: Lint / NM / coverage / portable parallel 1–2 / serial 1–3+5 / Herdr / macOS / invariants / timing / Greptile SUCCESS. Behavior portable serial 4 = CANCELLED (API conclusion cancelled, ~20m20s; gh pr checks flattens to fail) — shard step cut at the job ceiling, no pass/fail verdict. mergeable MERGEABLE, mergeStateStatus / mergeable_state BLOCKED (serial4 not green; ruleset also has require_extra_approval_for_unattributed_changes). Not otherwise-ready → not flagging captain.

Security FYI only: .github/workflows/ci.yml replaces hardcoded -eq 18 / -eq 53 with independently derived expected/observed counts + empty-derivation reject — no new permissions, secrets, or egress. Harmless.

Waiting on: CI (serial4 green / re-run once packing fix lands, e.g. #4006) before any captain card. No merge, no rebase.

mremond and others added 11 commits September 11, 2026 14:09
Clears the conflicts that had left this request unmergeable, by merging main in
rather than rebasing: the branch's published history stays as it is.

Two conflicts, both resolved keeping each side's intent.

.github/workflows/ci.yml - main moved the tasks-axi setup ahead of the stock-bash
suites and broadened its message; this branch adds helpers that derive each
expected test count from the suite's own invocation list. Both kept, setup first.
In the second hunk main had raised the Bearings literal from 53 to 56 while this
branch derives it. The derived form keeps main's assertion - the count is still
checked, and still fails when the suite stops early or runs nothing - and removes
the staleness that required the bump.

bin/fm-bearings-snapshot.sh - additive on both sides. This branch sources
fm-classify-lib.sh for the single paused-verb and delivered-threshold
definitions; main sources fm-timeout-lib.sh and fm-landed-lib.sh. All three are
sourced now, with main's shellcheck directive restored after the merge folded it
into a context line.
The derived count used ^test_[a-z_]*$, which cannot see a name with a digit.
Merging main brought test_landed_preserves_kindless_v1_summary_reports, so the
guard computed one test fewer than the suite runs and would have failed a
correct tree.

A derivation that silently undercounts is the same defect as a literal that goes
stale: both stop describing the suite they claim to measure. The character class
is now as wide as the shell function names it matches, and the reason is recorded
beside it so the next reader does not narrow it again.

Assertion semantics are unchanged and were re-proved: a complete run passes,
while a suite that stops early, a suite that runs nothing, and a derivation that
finds no tests all still fail.
…efault

FM_BEARINGS_AWAITING_NUDGE_DAYS no longer has a default. Unset, no delivered
row ever escalates however long it waits; set to a number of days, a row that
old rises into the captain-facing section as before. Nothing in this change is
active without configuration.

The null case is guarded explicitly rather than left to jq: jq sorts null below
every number, so a bare `age >= threshold` would report every row as
nudge-worthy exactly when the threshold is absent, turning off into always-on.
A regression pins that at ages up to 4000 days, and a malformed threshold is
refused rather than silently read as off, so off and misconfigured never look
alike.

The Delivered box now states which regime is in force. With no threshold set it
reads "no nudge threshold set - these rows will not escalate", so an unbounded
wait cannot be mistaken for a bounded one. That matters because the escalation
was specified as a safeguard against the section becoming a graveyard; with it
off by default, the section says so instead of implying otherwise.

Four existing tests asserted a nudge while relying on the old default. Each now
configures the threshold it asserts, which is what a test of the exit rule
should do. The test helpers pass a threshold through without overriding one a
caller set explicitly, so the cases that vary it per invocation keep working.
@mremond mremond changed the title fix(bin): preserve Bearings ownership, delivery state, and PR links feat: add ownership, PR links, and delivered state to bearings Sep 14, 2026
…nnotation documenting FM_PR_REG_EPOCH’s consumer. Runtime behavior is unchanged. Verified failure before the fix, then passing pinned full-analysis lint for the library, consumer, and test file; all 19 snapshot tests and git diff --check pass
…h direct font-request blocking. All 23 renderer tests pass locally; deliberately clipped owners still fail. Timeout and layout assertions remain unchanged. Only tests/assets/board-layout-harness.mjs changed
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.

2 participants