Repository navigation
chore: renew fork from upstream (8 commits) - #4
Conversation
* fix(bin): handle dash-leading harness process names (#2) * fix: handle dash-leading harness process names * no-mistakes(review): Make dash-leading harness regression hermetic * fix: preserve secondmate reply routes across relative homes Resolve relative home, data, and state inputs before durable charter generation, and fail when caller-relative directories cannot be resolved. Use absolute paths at the related spawn, AFK daemon, and X-mode cross-process handoffs so later processes cannot reinterpret them from another working directory. * no-mistakes(review): Preserve absolute overrides and normalize relative durable paths * no-mistakes(review): Normalize relative home before deriving durable paths * no-mistakes(document): Document relative durable-path normalization * no-mistakes(review): Captain: Ignore inherited CDPATH during relative path normalization * no-mistakes(lint): Fix empty CDPATH assignments for ShellCheck
* Add internal status skill * no-mistakes(document): register /status skill in documentation-audiences inventory * no-mistakes(lint): replace grep|wc -l with grep -c in status skill test * test: silence literal status skill patterns * Refactor bearings default to chat-only --------- Co-authored-by: Kun Chen <3233006+kunchenguid@users.noreply.github.com>
* docs: add captain-approved project operation exception to hard rule 1 Firstmate stays read-only over projects by default, but when the captain clearly approves a concrete project operation and scope in the moment, firstmate may perform exactly that approved operation with its own tools. The approval is never inferred, broadened, or standing, and it does not relax the existing force, discard, unlanded-work, or merge-authority boundaries. * no-mistakes(review): Clarify captain-approved project operation boundaries * no-mistakes(document): Clarify captain-approved project operation scope * docs: cover directories and preserve the operation-or-scope alternative Widen the captain-approved project operation exception in AGENTS.md to files or directories, and restore the explicit operation-or-scope alternative that a prior pipeline auto-fix had collapsed into "and". Rework project-management SKILL.md's Remove section, which previously told firstmate to refuse project removal until a guarded helper existed; that helper was never built, so the text directly contradicted the new instruction-only exception. It now points at the exception plus the existing removal preflight it still requires unchanged. Update the one instruction-owners test assertion that hard-coded the sentence removed above, so the suite tracks current, not obsolete, text. * docs: add captain-approved project operation exception to hard rule 1 Firstmate stays read-only over projects by default, but when the captain clearly approves a concrete project operation and scope in the moment, firstmate may perform exactly that approved operation with its own tools. The approval is never inferred, broadened, or standing, and it does not relax the existing force, discard, unlanded-work, or merge-authority boundaries. * no-mistakes(review): Clarify captain-approved project operation boundaries * no-mistakes(document): Clarify captain-approved project operation scope * docs: cover directories and preserve the operation-or-scope alternative Widen the captain-approved project operation exception in AGENTS.md to files or directories, and restore the explicit operation-or-scope alternative that a prior pipeline auto-fix had collapsed into "and". Rework project-management SKILL.md's Remove section, which previously told firstmate to refuse project removal until a guarded helper existed; that helper was never built, so the text directly contradicted the new instruction-only exception. It now points at the exception plus the existing removal preflight it still requires unchanged. Update the one instruction-owners test assertion that hard-coded the sentence removed above, so the suite tracks current, not obsolete, text. * no-mistakes(review): Align project removal preflight with approved exception * no-mistakes(document): Align project removal documentation with approved exception * fix: restore removal test byte-for-byte and preserve the default sentence tests/fm-instruction-owners.test.sh had been changed to assert different text; restore it byte-for-byte to origin/main. project-management SKILL.md's Remove section now keeps the exact default "Never issue a raw removal command from Firstmate." sentence that test still asserts, immediately followed by the already-approved captain-operation-or-scope exception, so the default and the exception both stay explicit and consistent. * no-mistakes(document): Align project-write boundary documentation
…henguid#1275) * Route project intake through secondmate scopes * no-mistakes(test): Guard all main-home project registry mutations * no-mistakes(document): Consolidate secondmate routing documentation * no-mistakes: apply CI fixes * Restore new-project routing scope * no-mistakes(document): Clarify secondmate routing for new-project intake * no-mistakes: apply CI fixes
…#1282) * test: remove source-content assertions * no-mistakes(review): Replace source assertions with runtime behavior coverage * no-mistakes(review): Isolate Kimi task temp runtime coverage * no-mistakes(document): Refresh test cleanup documentation * no-mistakes: apply CI fixes
…#1286) * fix(watch): bound how long a busy pane may run with no completed turn A busy pane (backend busy state or the harness's rendered footer) was unconditional, unbounded proof of liveness in every escalation path, so a hung foreground tool call behind a busy signature could run for hours undetected (2026-07 hibit-agent-focus-nonsteal-r1 incident: a catastrophic- backtracking regex hung one bash call for 25h behind an unchanging "Working..." footer). FM_BUSY_TURN_MAX_SECS (default 3600s) now bounds how long a busy pane may run with no completed turn (state/<id>.turn-ended, or its spawn record before any turn has completed). Past the bound, busy_turn_over_age routes the pane through the existing wedge_timer_check, reusing the identical stale reason, escalation counter, and demand-deep-inspection marker for human inspection only - never an automatic interrupt, signal, or restart of the worker or its tool process. A completed turn resets the age. Reproduced end-to-end against the real installed Pi TUI: a foreground `sleep 999999` bash call with no timeout renders the actual busy footer, and two captures ~15s apart show the elapsed counter changing the pane hash while the same turn stays unfinished. Running the pre-fix watcher against the real captures showed it never starts a wedge timer no matter how long the pane stays busy; the fixed watcher starts and escalates the timer through the same mechanism, while the real hung process remained untouched and alive throughout. * no-mistakes(review): fix: parse enriched AFK stale reasons * no-mistakes(review): fix: preserve enriched wedges during AFK supervision * no-mistakes(review): fix: route all enriched AFK wedges * no-mistakes(document): Clarify busy-turn age supervision documentation
Merges upstream 56a7ac6 (8 commits) into the fork, keeping both sides' intent in every conflicting file. Conflicts and resolutions: - bin/fm-harness.sh and bin/fm-session-lock-lib.sh: both sides fixed the same bug. Upstream's kunchenguid#1256 hardened the three ancestry-walk call sites with `basename --`, and the fork's login-shell fix replaced them with `${comm##*/}`. Kept the fork's parameter expansion, which delivers upstream's intent (a dash-leading process name is an operand, never a flag) and additionally drops a subprocess per hop. Both sides' regression tests pass against it. - tests/fm-secondmate-harness.test.sh: kept both new regression cases and both registrations. They are complementary: upstream's asserts a dash-leading harness name is accepted as a harness, the fork's asserts a login shell is traversed but not accepted as a lock holder. - bin/fm-test-run.sh: adopted upstream's restructured family map and shard composition from kunchenguid#1282, then re-expressed the fork's clickup test wiring inside it rather than restoring the fork's old lines. - README.md: kept upstream's rewritten Bearings row and its invocation examples, plus the fork's /clickup row. AGENTS.md auto-merged additively; upstream's project-boundary, project-intake, and validation follow-up edits landed on the fork's version with both clickup entries intact.
📝 WalkthroughWalkthroughThe PR tightens operational policy and Bearings contracts, canonicalizes relative runtime paths, adds bounded busy-pane escalation, refreshes portable test sharding, and replaces or expands numerous static and behavioral test checks. ChangesOperational policy and skill contracts
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
tests/fm-test-run.test.sh (1)
352-353: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRestore an explicit CI/docs contract guard.
test_ci_and_docs_call_the_ownerwas the only runner contract coverage for CI lane entries andCONTRIBUTING.md. Since it is no longer present, add a behavioral/source-snapshot check that.github/workflows/ci.ymlandCONTRIBUTING.mdstay listed as contract owners in the runner docs and any remaining source-inspection contract.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/fm-test-run.test.sh` around lines 352 - 353, Add an explicit behavioral/source-snapshot contract check alongside test_portable_shard_union_and_coverage_guard, restoring test_ci_and_docs_call_the_owner coverage. Verify that .github/workflows/ci.yml and CONTRIBUTING.md remain listed as contract owners in the runner documentation and any remaining source-inspection contract.bin/fm-test-run.sh (1)
118-191: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAdd the remaining unmapped test cases or change the default behavior.
fm-claude-stop-autoarm-live-e2e.test.sh,fm-claude-stop-autoarm.test.sh, andfm-pending-reply.test.share present undertests/but fall through tounclassified, reducing the counts for their logical families without a loud failure.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bin/fm-test-run.sh` around lines 118 - 191, Update family_for_basename to explicitly classify fm-claude-stop-autoarm-live-e2e.test.sh, fm-claude-stop-autoarm.test.sh, and fm-pending-reply.test.sh under their appropriate logical families, or change the default branch to fail loudly for unmapped tests. Ensure these tests no longer silently fall through to unclassified.tests/fm-test-isolation-proof.test.sh (1)
52-55: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winReinstate the archived-proof synchronization check.
tests/fm-test-isolation-proof.test.shnow only validates--listshape/contents and shard consistency; it no longer checksdocs/fm-test-isolation-proof.jsonagainst the live candidate set. Add the equality check back so updates to the proof document cannot silently drift frombin/fm-test-isolation-proof.sh --list.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/fm-test-isolation-proof.test.sh` around lines 52 - 55, Restore the archived-proof synchronization assertion in test_extra_hermetic_candidates_present() by loading docs/fm-test-isolation-proof.json and comparing its candidate set exactly with the output of $PROOF --list. Keep the existing list shape, contents, and shard consistency checks, and ensure the test fails when either source gains, loses, or changes a candidate.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/skills/bearings/SKILL.md:
- Around line 52-57: Update the explicit file-mode report-writing instructions
around the detailed report replacement to render the complete report into a
same-directory temporary file first, then atomically replace the existing status
report only after rendering and writing succeed. Remove the delete-first
requirement while preserving the full-report, today’s-date, and sole-write
constraints.
In `@AGENTS.md`:
- Around line 17-27: The direct-write exception in hard rule 1 must also require
successful session-lock acquisition and verification. Update the exception
wording to state that, without a verified session lock, the process remains
read-only and cannot mutate project or fleet state, while preserving the
existing captain-approval and scope requirements.
- Line 54: Update both projects/ directory descriptions at AGENTS.md lines 54-54
and 86-86 to use the complete Hard rule 1 exception boundary: include guarded
initialization, fleet sync, secondmate sync/inherited propagation, self-update,
and approved local-only merge paths alongside the concrete captain-approved
project-operation exception, keeping both descriptions identical.
---
Outside diff comments:
In `@bin/fm-test-run.sh`:
- Around line 118-191: Update family_for_basename to explicitly classify
fm-claude-stop-autoarm-live-e2e.test.sh, fm-claude-stop-autoarm.test.sh, and
fm-pending-reply.test.sh under their appropriate logical families, or change the
default branch to fail loudly for unmapped tests. Ensure these tests no longer
silently fall through to unclassified.
In `@tests/fm-test-isolation-proof.test.sh`:
- Around line 52-55: Restore the archived-proof synchronization assertion in
test_extra_hermetic_candidates_present() by loading
docs/fm-test-isolation-proof.json and comparing its candidate set exactly with
the output of $PROOF --list. Keep the existing list shape, contents, and shard
consistency checks, and ensure the test fails when either source gains, loses,
or changes a candidate.
In `@tests/fm-test-run.test.sh`:
- Around line 352-353: Add an explicit behavioral/source-snapshot contract check
alongside test_portable_shard_union_and_coverage_guard, restoring
test_ci_and_docs_call_the_owner coverage. Verify that .github/workflows/ci.yml
and CONTRIBUTING.md remain listed as contract owners in the runner documentation
and any remaining source-inspection contract.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: aa45a5f8-3781-4f7d-a025-66be51f25c0a
📒 Files selected for processing (60)
.agents/skills/ask-user-authority/SKILL.md.agents/skills/bearings/SKILL.md.agents/skills/firstmate-coding-guidelines/SKILL.md.agents/skills/project-management/SKILL.md.github/workflows/ci.ymlAGENTS.mdREADME.mdbin/fm-afk-launch.shbin/fm-bootstrap.shbin/fm-brief.shbin/fm-spawn.shbin/fm-supervise-daemon.shbin/fm-test-isolation-proof.shbin/fm-test-run.shbin/fm-watch.shdocs/architecture.mddocs/configuration.mddocs/fm-test-isolation-proof.jsondocs/fm-test-isolation-proof.mddocs/fm-test-portable-shards.mddocs/sessionstart-nudge.mddocs/verification/supervision.mdtests/fm-afk-launch.test.shtests/fm-arm-pretool-check.test.shtests/fm-ask-user-authority.test.shtests/fm-backend-herdr.test.shtests/fm-backend.test.shtests/fm-bearings-snapshot.test.shtests/fm-bootstrap.test.shtests/fm-brief.test.shtests/fm-calm-pi-extension.test.shtests/fm-captain-translation-contract.test.shtests/fm-cd-pretool-check.test.shtests/fm-claude-stop-autoarm.test.shtests/fm-daemon.test.shtests/fm-documentation-audiences.test.shtests/fm-gate-refuse.test.shtests/fm-gotmp.test.shtests/fm-install-herdr.test.shtests/fm-instruction-owners.test.shtests/fm-kimi-harness.test.shtests/fm-lint.test.shtests/fm-nm-test-contract.test.shtests/fm-no-mistakes-ownership.test.shtests/fm-pi-watch-extension.test.shtests/fm-pr-check-security.test.shtests/fm-quota-array-dispatch.test.shtests/fm-secondmate-harness.test.shtests/fm-secondmate-sync.test.shtests/fm-send-secondmate-marker-herdr-e2e.test.shtests/fm-sessionstart-nudge.test.shtests/fm-spawn-dispatch-profile.test.shtests/fm-stow-contract.test.shtests/fm-subagent-pretool-check.test.shtests/fm-test-isolation-proof.test.shtests/fm-test-run.test.shtests/fm-turnend-guard.test.shtests/fm-watch-triage.test.shtests/fm-x-mode.test.shtests/no-mistakes-required-workflow.test.sh
💤 Files with no reviewable changes (26)
- tests/fm-nm-test-contract.test.sh
- tests/fm-no-mistakes-ownership.test.sh
- tests/no-mistakes-required-workflow.test.sh
- tests/fm-quota-array-dispatch.test.sh
- tests/fm-stow-contract.test.sh
- docs/sessionstart-nudge.md
- docs/verification/supervision.md
- tests/fm-instruction-owners.test.sh
- tests/fm-install-herdr.test.sh
- tests/fm-gate-refuse.test.sh
- tests/fm-documentation-audiences.test.sh
- tests/fm-cd-pretool-check.test.sh
- tests/fm-captain-translation-contract.test.sh
- tests/fm-arm-pretool-check.test.sh
- bin/fm-test-isolation-proof.sh
- tests/fm-pr-check-security.test.sh
- tests/fm-claude-stop-autoarm.test.sh
- tests/fm-calm-pi-extension.test.sh
- tests/fm-bearings-snapshot.test.sh
- tests/fm-turnend-guard.test.sh
- tests/fm-secondmate-sync.test.sh
- tests/fm-sessionstart-nudge.test.sh
- tests/fm-backend-herdr.test.sh
- tests/fm-backend.test.sh
- tests/fm-pi-watch-extension.test.sh
- tests/fm-bootstrap.test.sh
| 3. **In explicit file mode only, compose and replace the detailed report file.** | ||
| The report uses the same four complete sections as the chat, in the same order, and adds the detail the chat omits. | ||
| Never read an earlier `data/status-report-*.md` to decide what to omit, include, describe as changed, or call current. | ||
| The report uses the same four complete sections as the chat (see the chat-response contract below), in the same order, each always present, and adds the detail the chat omits: | ||
| Write the full report to `data/status-report-<YYYY-MM-DD>.md` using today's date. | ||
| If today's file already exists, delete it first, then create a new file from scratch. | ||
| This is the only write allowed by the skill. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Replace the report atomically instead of deleting it first.
If snapshot rendering or writing fails after the existing report is deleted, file mode leaves the captain with no report. Render the complete report to a same-directory temporary file, then atomically replace the old file only after successful completion.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.agents/skills/bearings/SKILL.md around lines 52 - 57, Update the explicit
file-mode report-writing instructions around the detailed report replacement to
render the complete report into a same-directory temporary file first, then
atomically replace the existing status report only after rendering and writing
succeed. Remove the delete-first requirement while preserving the full-report,
today’s-date, and sole-write constraints.
| Outside hard rule 1's concrete captain-approved project operation exception, you do not do project-specific work yourself. | ||
| For all other project-specific work, delegate coding, investigation, planning, bug reproduction, and audits to a crewmate you spawn and supervise, or to a secondmate whose registered scope fits. | ||
| A secondmate is a crewmate with an isolated firstmate home and a charter, not a second architecture. | ||
|
|
||
| Hard rules, in priority order: | ||
|
|
||
| 1. **Never write to a project.** | ||
| Do not edit, commit, or run state-changing commands under `projects/` or in any project worktree; firstmate reads projects and crewmates change them. | ||
| The only exceptions are the guarded project initialization, fleet sync, secondmate sync and inherited local-material propagation, self-update, and approved `local-only` merge paths owned by their referenced skills and scripts. | ||
| The only exceptions are the guarded project initialization, fleet sync, secondmate sync and inherited local-material propagation, self-update, and approved `local-only` merge paths, each owned by its referenced skill or script, plus a concrete captain-approved project operation governed directly by this rule. | ||
| Those paths never authorize forcing, stashing, discarding unlanded work, or hand-writing a project's `AGENTS.md`. | ||
| Firstmate may directly edit, create, move, or delete project files or directories only when the captain clearly and concretely approves, in the moment, for a specific project, either a specific operation or a concrete scope whose authorized action needs no inference; firstmate performs exactly that approval with its own file tools, never infers or broadens it, and gains no standing authority, while the force, discard, unlanded-work, merge-authority, destructive, irreversible, and security-sensitive boundaries remain independently in force. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Keep the session-lock guard on the direct-write exception.
This exception is gated by captain approval and scope, but not by successful lock acquisition. If the session lock cannot be acquired and verified, the wording still permits direct project mutation, contrary to the required read-only safety boundary and risking concurrent writes. Add explicit lock-gate wording or a mandatory cross-reference.
As per coding guidelines, if the session lock cannot be acquired and verified, the process must remain read-only and must not mutate fleet state.
🧰 Tools
🪛 LanguageTool
[grammar] ~19-~19: Ensure spelling is correct
Context: ...stmate home and a charter, not a second architecture. Hard rules, in priority order: 1. **Nev...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` around lines 17 - 27, The direct-write exception in hard rule 1
must also require successful session-lock acquisition and verification. Update
the exception wording to state that, without a verified session lock, the
process remains read-only and cannot mutate project or fleet state, while
preserving the existing captain-approval and scope requirements.
Source: Coding guidelines
| `bin/fm-send.sh` fails closed unless `FM_HOME` is explicit, so a steer cannot silently resolve against another home. | ||
|
|
||
| Tracked files hold shared instructions and tooling; `data/` holds durable private fleet records; `state/` holds volatile runtime records and append-only status events; `config/` holds local operating choices; and `projects/` contains clones that are read-only to firstmate. | ||
| Tracked files hold shared instructions and tooling; `data/` holds durable private fleet records; `state/` holds volatile runtime records and append-only status events; `config/` holds local operating choices; and `projects/` contains clones that are read-only to firstmate except under hard rule 1's concrete captain-approved project operation exception. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Keep both project-directory descriptions aligned with Hard rule 1.
The new wording says project clones are writable only under the concrete captain-approved project-operation exception, but Hard rule 1 also lists guarded initialization, fleet sync, secondmate sync/inherited propagation, self-update, and approved local-only merge paths. This contradiction can make legitimate guarded operations appear forbidden.
- AGENTS.md#L54-L54: include the guarded exceptions as well as the concrete captain-approved exception.
- AGENTS.md#L86-L86: use the same complete exception boundary for the
projects/directory entry.
📍 Affects 1 file
AGENTS.md#L54-L54(this comment)AGENTS.md#L86-L86
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` at line 54, Update both projects/ directory descriptions at
AGENTS.md lines 54-54 and 86-86 to use the complete Hard rule 1 exception
boundary: include guarded initialization, fleet sync, secondmate sync/inherited
propagation, self-update, and approved local-only merge paths alongside the
concrete captain-approved project-operation exception, keeping both descriptions
identical.
Renews this fork from upstream
kunchenguid/firstmateby merging the pinned upstream head56a7ac6b5e8d7bef389a8364bbc2dd77eac89e47into the fork headcdcedcb14d32d399e5c10b63c04f889cb4de7c2d.This is a real merge commit with two parents, deliberately not rebased, squashed, or cherry-picked.
The merge topology is the point: it makes the next renewal a small merge instead of a repeat of this conflict set.
Please merge this with a merge commit or fast-forward, never with squash or rebase.
Upstream commits integrated (8)
56a7ac6a2d5f26daf6dce0bbb27ba24eac196e027ec21bf546ec5e08git merge-base --is-ancestor 56a7ac6b5e8d7bef389a8364bbc2dd77eac89e47 HEADpasses, so upstream is genuinely integrated rather than stubbed out or reverted to the fork's side.Conflicts and how each was resolved
Five files conflicted. In every one, both sides' intent is kept.
The strongest evidence is that the per-file diff against each parent contains only the other parent's contribution:
bin/fm-harness.shandbin/fm-session-lock-lib.shBoth sides fixed the same bug at the same three call sites, which the pre-merge probe did not reveal.
Upstream's kunchenguid#1256 carries a "handle dash-leading harness process names" change that hardens the ancestry walks with
basename -- "$comm"; the fork'scdcedcbreplaced the samebasenamecalls with the${comm##*/}parameter expansion.Resolved by keeping the fork's parameter expansion, because it fully delivers upstream's intent - a dash-leading process name such as
-zshis treated as an operand and never parsed as option flags - and additionally avoids a subprocess on every hop of a walk that runs up to sixteen times per check.For every value
ps -o comm=can produce,${comm##*/}andbasename --agree.This is not a case of dropping upstream's side: upstream's own new regression test passes unmodified against the fork's implementation (see verification below).
tests/fm-secondmate-harness.test.shBoth sides added a regression case immediately after the same anchor and registered it in the same runner list.
Kept both functions and both registrations, because they assert complementary things:
test_dash_leading_process_names_are_basename_operandsasserts a dash-leading harness name (-codex) is still accepted as a harness process.test_login_shell_process_name_in_ancestryasserts a login shell (-zsh) is traversed but not accepted as a lock holder, and that no walk writes to stderr.bin/fm-test-run.shUpstream's kunchenguid#1282 restructured this runner substantially (+23/-35): it dropped the deleted contract tests from the family map, the proven-isolated set, and both portable shards, and rebalanced the shards against current concurrent-proof durations.
Adopted upstream's restructured shape wholesale, then re-expressed the fork's clickup test wiring inside it -
fm-clickup-contract.test.shsits in alphabetical position in thepure-contract-unitfamily arm - rather than re-adding the fork's old lines on top of a structure that no longer expects them.Confirmed the runner still classifies it:
bin/fm-test-run.sh --list --family pure-contract-unitliststests/fm-clickup-contract.test.sh, and--check-coveragereportsok total=95 parallel=24 serial=61 herdr=10.README.mdKept upstream's rewritten
/bearingsrow and its new Bearings invocation examples block, plus upstream's "Strict project boundary" feature bullet, and kept the fork's/clickuprow in place after/bearings.AGENTS.md(auto-merged, reviewed by hand)The auto-merge was verified rather than assumed.
It is purely additive: 502 lines at the merge base, 505 on the fork, 506 upstream, 509 merged.
All seven upstream edits (the hard-rule-1 captain-approved project operation exception, the
projects/read-only wording, project add intake, and validation follow-up routing) landed on the fork's version, and both fork clickup entries survive at their original trigger points.Nothing contradicts: upstream's edits concern the project-write boundary, project intake, and validation scope, all orthogonal to the clickup pipeline.
Fork-local work verified to survive
The
/clickupskill and its surfaces (e38ac63,95009d2,3477bd0,8407232,89db673) -.agents/skills/clickup/SKILL.md,docs/clickup-command.md, andtests/fm-clickup-contract.test.share byte-identical to the fork head, confirmed by checksum againstcdcedcb.Its surrounding wiring also survives: the
/clickupREADME row, both AGENTS.md trigger lines, theconfig/clickup.jsongitignore entry, and bothdocs/documentation-audiences.jsonclassifications (agent-runtimeandmaintainer-architecture).The inventory still parses as valid JSON and every path in it still exists after upstream's eight test-file deletions.
The login-shell
basenamefix (cdcedcb, still open upstream as kunchenguid#1280) - present and proven functional, not merely present as lines.Exercised the merged ancestry walks with a stubbed
psreporting a login shell as-zsh:bin/fm-harness.shresolved the harness above it ascodexwith empty stderr.fm_harness_ancestry_pidselected the harness pid above the login shell with empty stderr.basename "-zsh"on this machine still printsbasename: illegal option -- z, so the failure mode is real and the fix is what suppresses it.Test suite
The repo's own suite is the gate for this branch (
bin/fm-test-run.sh), since the no-mistakes pipeline is deliberately not used on this branch - its first step is a rebase, which would destroy this merge commit.--check-coverage:ok total=95 parallel=24 serial=61 herdr=10.portable-parallel-1,portable-parallel-2,portable-serial) pass.tests/fm-secondmate-harness.test.sh, the file whose conflict I resolved by hand, passes with both the fork's and upstream's new regression cases green.bin/fm-harness.shandbin/fm-session-lock-lib.shpassshellcheckunder the pinned versionbin/fm-lint.shenforces.psreporting a login shell as-zshtraverses both merged ancestry walks with empty stderr, while barebasename "-zsh"on the same machine still printsbasename: illegal option -- z.tests/fm-test-run.test.sh's--jobsscheduler race (scheduler waited for oldest worker/jobs=2 must refill the first completed slot) is a timing-sensitive fixture unrelated to any file this merge touched; a controlled side-by-side run of the merged tree against the extracted upstream-parent tree showed 0/6 failures on both under identical conditions.--family real-herdr-gated) intermittently failstests/fm-afk-launch.test.shandtests/fm-backend-herdr-presentation-e2e.test.sh; both test files are byte-identical to their upstream-parent originals and untouched by this merge. The e2e failure's own error text - "could not acquire its session lock; refusing a concurrent resume" - points to contention with the live firstmate/Herdr session on this same machine while the suite ran, not a merge defect.One follow-up for the captain, not addressed here
Upstream's kunchenguid#1282 added a new rule to
firstmate-coding-guidelines: tests must exercise behavior through an executable or public interface and must never assert implementation-source bytes.Upstream applied it by deleting five prose/source-asserting contract tests.
The fork's
tests/fm-clickup-contract.test.shasserts prose in.agents/skills/clickup/SKILL.mdandAGENTS.md, so it sits in tension with the spirit of that new rule.Nothing enforces the rule mechanically, the merged tree is self-consistent, and the test passes, so it is kept exactly as-is here.
Rewriting or retiring fork-local coverage is a scope decision above this merge; flagging it so it can be decided deliberately rather than as a merge side effect.
Summary by CodeRabbit
New Features
/bearingsnow provides a concise four-section snapshot, with an optional detailed report that replaces the current dated report.Bug Fixes
Documentation
Tests