feat: support Devin CLI harness - #545
Conversation
d28d3cd to
38a9ee5
Compare
|
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#545 at |
38a9ee5 to
c10fd2f
Compare
Done. |
|
Automated reminder: 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#545 at |
|
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. |
c10fd2f to
0a66ea7
Compare
Rebased. |
What Changed
Risk Assessment
✅ Low: Captain, the Devin integration is well-bounded and the only remaining issue found is a non-functional duplicate control-flow arm.
Testing
Startup baselines and all focused automated suites passed; manual verification against installed Devin CLI 3000.1.27 demonstrated harness detection, rendered foreground supervision, and safety-hook denial, with the transcript captured as evidence and no testing artifacts left in the worktree.
Evidence: Devin end-user flow transcript
Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-supervision-instructions.sh:147- The newdevin)arm has no preceding;;after thepi|pi-signed)arm, making the entire script syntactically invalid. This already causesfm-session-start.shto fail while rendering supervision instructions for every harness.bin/fm-bootstrap.sh:719- The secondverifieddefinition overrides the first and dropspi-signedandkimi. Existing dispatch profiles using either supported harness are therefore rejected as invalid; merge the lists and retain all previously verified adapters.bin/fm-bootstrap.sh:440- The first wildcard arm consumes every harness not in the old list, sodevinnever reaches the later Devin-inclusive arm and dead/missing Devin secondmates are reclassified asunverified-harnessinstead of recovered. Consolidate this into one verified-harness arm containing the existing adapters plus Devin..agents/skills/harness-adapters/SKILL.md:4- The frontmatter now contains twodescriptionkeys. Strict YAML/skill loaders can reject duplicate keys (and the session did not exposeharness-adaptersas an available skill), which disables the mandatory harness workflow. Replace both entries with one combined description.bin/fm-tmux-lib.sh:96- The change documents Devin's verifiedesc to interruptbusy signature but does not add adevin)branch here. Because supplied harnesses intentionally do not use the shared fallback, active Devin turns are classified as idle, allowing premature wakes and stale-task handling. Map Devin to the Codex busy regex.🔧 Fix: Captain, fix Devin harness integration regressions
2 issues (1 error, 1 warning) still open:
AGENTS.md:222- A 153-line stale copy of sections 3–7 was inserted mid-document. It contradicts the authoritative rules above—for example, it omitspi-signedandkimifrom verified adapters and says invalid dispatch profiles should be ignored even though the current contract requires failing closed. Remove the duplicated block so agents cannot follow conflicting operational instructions.tests/fm-session-start.test.sh:511- This helper now runs session startup twice. The second invocation also swapsrootandhome, drops the Herdr fixture variables, and constructs PATH from the bare fakebin argument, so the Herdr recovery test no longer exercises its intended environment reliably. Remove the appended invocation and instead unsetDEVIN_CLIin the sharedrun_session_startwrapper.🔧 Fix: Captain, remove duplicate contract and fix session helper
4 issues (2 errors, 2 infos) still open:
docs/turnend-guard.md:91- A stale 158-line copy of the turn-end contract was appended after the current contract. It contradicts current behavior—for example, lines 139–141 say Claude allowsstop_hook_active=true, while lines 52–55 document that Claude now ignores it and uses bounded re-blocking. Integrate the Devin-specific facts into the current sections, then remove the duplicated legacy contract..agents/skills/harness-adapters/SKILL.md:60- The mandatory adapter skill contains overlapping, contradictory integration summaries: the newly added “every verified harness” blocks omitpi-signedand Kimi qualifications present immediately above, and the Devin model row is stranded below the model-discovery table. Consolidate each contract into one accurate block and place Devin in the launch-profile table.bin/fm-spawn.sh:461- This secondgrok)case is unreachable because line 455 already matchesgrok; it also preserves a stale launch path that bypasses the operational-input encoder. Remove the dead arm to keep one authoritative Grok launch template.bin/fm-harness.sh:31- The new shared process helper is sourced twice consecutively. Remove the duplicate source operation so initialization has one owner and future helper side effects cannot run twice.🔧 Fix: Captain, consolidate Devin contracts and remove duplicate paths
1 info still open:
bin/fm-supervision-instructions.sh:86- This harness-selection case duplicates the preceding arm; the first arm already matches every listed harness except Devin, making the repeated alternatives unreachable. Collapse both arms into oneclaude|codex|opencode|pi|grok|devin)branch so the supervision protocol mapping has one authoritative list.✅ **Test** - passed
✅ No issues found.
bin/fm-session-start.shbin/fm-test-run.sh tests/fm-devin-harness.test.shbin/fm-test-run.sh tests/fm-harness-process.test.shbin/fm-test-run.sh tests/fm-supervision-instructions.test.shbin/fm-test-run.sh tests/fm-bootstrap.test.shbin/fm-test-run.sh tests/fm-session-start.test.shdevin --versionandDEVIN_CLI=1 bin/fm-harness.shRenderedbin/fm-supervision-instructions.sh --harness devin --read-only 0 --afk 0 --x-mode 0Invoked the tracked Devin PreToolUse hook with unsafebin/fm-watch-arm.sh &input and confirmed denial with exit 2git status --shortcleanup audit✅ **Document** - passed
✅ No issues found.
🔧 Fix: Captain, remove duplicate supervision harness lint case
1 warning still open:
🔧 Fix: Captain, lint passes with pinned ShellCheck
1 warning still open:
🔧 Fix: Captain, verify clean lint with pinned ShellCheck
1 warning still open:
✅ **Push** - passed
✅ No issues found.