Repository navigation
feat(harness): register and detect the prime-agent harness adapter - #4283
Closed
eduardstan wants to merge 15 commits into
Closed
eduardstan wants to merge 15 commits into
eduardstan wants to merge 15 commits into
Conversation
…ispatch validation
Author
|
Opened by the pipeline by mistake; the change lives in #2062. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Upstream firstmate (kunchenguid/firstmate) triaged our proposal issue #3953 and accepted the path: our three pull requests in order, #2062 first (register and detect the prime-agent harness adapter), then 2070 and 2075. On 9 September the maintainer's firstmate asked for the tip of 2062 to be re-raised through no-mistakes so the PR body attestation binds to the current head. The previous worker did that (attestation bound to 655d66a, CI green at the time). Since then upstream main moved again and GitHub now reports PR 2062 as conflicting (mergeable false, state dirty, head 655d66a, base b84e0e3 at last triage, now c191eac or later). The captain today: "Post the attestation thing as comment on PR 2062" (done, in his voice, asking for a re-run) and, on seeing the conflict, sent the GitHub notice "This branch has conflicts that must be resolved". The captain never wants to pressure the maintainers; our side must be clean before anyone is asked for anything.
What Changed
.agents/skills/harness-adapters/references/harness/prime-agent.md, update the harness-adapters skill and docs (agent-control, architecture, configuration, trace-context, documentation-audiences.json, AGENTS.md) to list it among verified harnesses.CLAUDECODEalone), scrub that marker at launch/teardown, and preflight the prime-agent executable before spawn, launching it via the resolved executable path; wire this throughbin/fm-harness.sh,bin/fm-spawn.sh,bin/fm-control-lib.sh,bin/fm-bootstrap.sh,bin/fm-teardown.sh, andbin/fm-test-run.sh.tests/fm-prime-agent-harness.test.shandtests/fm-spawn-dispatch-profile.test.sh, and update existing harness tests (fm-cursor,fm-gemini,fm-kimi,fm-rovo,fm-secondmate,fm-trace-context-spawn) plustests/lib.shto scrub ambient prime-agent markers so detection tests stay isolated.Risk Assessment
✅ Low: Change registers a new crewmate/scout-only harness (prime-agent) following the exact established pattern for prior adapters (omp/pi-signed); every case-statement site that needed the new branch has it, sites that correctly exclude it (secondmate-only lists, primary-lock detection, busy-state wiring deliberately unimplemented) match documented, pre-existing precedent for other crewmate-only adapters (muse/gemini/rovo), and the added tests exercise real subprocess behavior (env markers, ancestry fakes, launch command capture) rather than source-text greps; the branch's own history shows two real bugs (bare
prime-agentin launch template, missing preflight) already caught and fixed in later commits within this same range.Testing
Drove the real fm-harness.sh/fm-control-lib.sh/fm-spawn.sh scripts through their existing behavior test suites (no mocks of the code under test); every prime-agent-specific scenario (detection precedence, ancestry guard, lifecycle table, spawn launch/marker, missing-executable preflight refusal, secondmate refusal) passed. The touched sibling harness suites (cursor/gemini/kimi/rovo/secondmate/trace-context), whose only edits were unrelated marker-scrub unsets, also passed except one pre-existing flaky timing test (
test_config_reread_serializes_concurrent_pushes, unrelated to prime-agent code) which I reproduced identically on the base commit, confirming it is a pre-existing environment timing issue and not caused by this change.bash tests/fm-prime-agent-harness.test.sh-> ok - Prime Agent detection splits its Pi-family marker without relabelling Pi or Claudebash tests/fm-prime-agent-harness.test.sh-> ok - fm-harness: the cursor, gemini, and rovo markers outrank inherited Prime Agent markers; ok - a prime-agent ancestor alone never claims the identity;…bash tests/fm-prime-agent-harness.test.sh-> ok - fm-control-lib: prime-agent's lifecycle table matches its verified factsbash tests/fm-spawn-dispatch-profile.test.sh-> ok - a prime-agent launch establishes the harness marker its own detection needsbash tests/fm-spawn-dispatch-profile.test.sh-> ok - prime-agent refuses safely and actionably when the selected executable is unavailablebash tests/fm-spawn-dispatch-profile.test.sh-> ok - a prime-agent secondmate spawn is refused by name, not as an unknown harnessbash tests/fm-cursor-harness.test.sh,bash tests/fm-gemini-harness.test.sh,bash tests/fm-kimi-harness.test.sh,bash tests/fm-rovo-harness.test.sh,bash tests/fm-trace-context-spawn.test.sh…Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
tests/fm-secondmate-harness.test.sh:2222- tests/fm-secondmate-harness.test.sh:test_config_reread_serializes_concurrent_pushes fails with 'first config push did not reach pointer delivery' in this sandbox. This test is untouched by the diff (only earlier, unrelated tests in the same file got new env-unsets for the prime-agent markers) and reproduces identically when running the base commit's (de00521) copy of the same test file, so it is a pre-existing timing-sensitive flake in this environment, not a regression from the prime-agent change.bash tests/fm-prime-agent-harness.test.sh-> ok - Prime Agent detection splits its Pi-family marker without relabelling Pi or Claudebash tests/fm-prime-agent-harness.test.sh-> ok - fm-harness: the cursor, gemini, and rovo markers outrank inherited Prime Agent markers; ok - a prime-agent ancestor alone never claims the identity;…bash tests/fm-prime-agent-harness.test.sh-> ok - fm-control-lib: prime-agent's lifecycle table matches its verified factsbash tests/fm-spawn-dispatch-profile.test.sh-> ok - a prime-agent launch establishes the harness marker its own detection needsbash tests/fm-spawn-dispatch-profile.test.sh-> ok - prime-agent refuses safely and actionably when the selected executable is unavailablebash tests/fm-spawn-dispatch-profile.test.sh-> ok - a prime-agent secondmate spawn is refused by name, not as an unknown harnessbash tests/fm-cursor-harness.test.sh,bash tests/fm-gemini-harness.test.sh,bash tests/fm-kimi-harness.test.sh,bash tests/fm-rovo-harness.test.sh,bash tests/fm-trace-context-spawn.test.sh…bash tests/fm-prime-agent-harness.test.shbash tests/fm-spawn-dispatch-profile.test.shbash tests/fm-cursor-harness.test.shbash tests/fm-gemini-harness.test.shbash tests/fm-kimi-harness.test.shbash tests/fm-rovo-harness.test.shbash tests/fm-secondmate-harness.test.shbash tests/fm-trace-context-spawn.test.shcontrol run: base commit de00521b9e6 version of tests/fm-secondmate-harness.test.sh + tests/lib.sh, restored via git checkout afterward✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.