Skip to content

feat(SUP-2214): jarvos-coding host adapters (supersedes #64 module) - #66

Merged
levineam merged 1 commit into
mainfrom
SUP-2214/host-adapters-v2
May 30, 2026
Merged

feat(SUP-2214): jarvos-coding host adapters (supersedes #64 module)#66
levineam merged 1 commit into
mainfrom
SUP-2214/host-adapters-v2

Conversation

@levineam

@levineam levineam commented May 30, 2026

Copy link
Copy Markdown
Owner

This lands the complete @jarvos/coding module from #65 — host adapters (claude-code/codex) driving runTakeIssueToDone, generic review-engine, session-state, submission-gate, and triage — adopting #65's self-consistent module which supersedes #64's simpler createCodingOrchestrator API (no other code on main imports it).

Closes the SUP-2214 host-adapter work.

Verified locally:

  • Module loads; 82 exports including createClaudeCodeHostAdapter, createCodexHostAdapter, createCodingHostAdapter, runTakeIssueToDone.
  • All node:test files pass: orchestrator-host-adapters (5/5), session-state (12/12) — 17 tests, 0 failures.
  • scripts/smoke-test.sh passes; its change is additive check_file lines only (new module structure files).
  • Root package.json unchanged (feat(SUP-2214): promote jarvos coding host adapters #65 introduced no root package.json delta).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added host adapter support for Claude Code and Codex integration.
    • Introduced submission gate contract for code review and validation requirements.
    • Added runtime preflight checks to ensure safe automation execution.
    • Implemented session state management for workflow continuity.
    • New coding work triage pipeline with product/release fit classification.
  • Documentation

    • Comprehensive module documentation with architecture overview and public interface details.
  • Refactor

    • Restructured module exports for improved organization and maintainability.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The @jarvos/coding module is refactored from monolithic code into a layered modular architecture. Issue triage (product/release fit), orchestration (8 stages), safety gates (checkout/worktree), host adapters (Claude Code/Codex), and session continuity are each implemented as independent feature modules, with a barrel index.js re-exporting the public API.

Changes

jarvos-coding Module Restructure

Layer / File(s) Summary
Issue Analysis and Triage Classification
src/core/text.js, src/features/triage/index.js, src/features/triage/product-fit.js
Text utilities for parsing issue labels, markers, and evidence; product-fit, release-fit, readiness classification; routing and decision logic using configurable markers and lifecycle policies.
Session State and Continuity
src/features/session-state/index.js
Session checkpoint builders and persistence layer; file-backed and in-memory store implementations; read/write helpers enforcing schema versions.
Submission Gate and Lifecycle Policy
src/features/submission-gate/index.js, src/lifecycle/policy.js
Evidence validation contract with required keys; submission gate phase contract; stage satisfaction evaluators; release gate and maturity normalization.
Orchestration Pipeline
src/features/orchestrator/index.js
Sequential 8-stage orchestrator (claim → branch → sliceReview → holisticReview → fixRerun → pullRequest → postMergeSweep → verifyClose) with per-stage event collection and optional session checkpointing.
Review Engine
src/features/review-engine/index.js
Command runner abstraction for clawpatch and autoreview tools; result normalization and schema wrapping; clawpatch+autoreview adapter factory.
Runtime Safety Gates
src/features/runtime-checkout-preflight/index.js, src/worktree-ownership.js
Git state inspection, branch hygiene evaluation, and Paperclip issue status rules; checkout-role classification; preflight decisions (block/preserve/cleanup/continue) and branch ownership hygiene.
Host Adapters
src/adapters/hosts.js, src/adapters/paperclip.js
Claude Code and Codex adapter factories with MCP tool and skill descriptor registration; orchestrator delegation; paperclip release-intake classification normalization.
Module Refactoring
src/index.js
Converted from monolithic implementation to barrel module re-exporting ~80 constants and functions from adapters, features, policies, and worktree modules; dropped legacy orchestrator/audit/review-engine code.
Documentation and Package
modules/README.md, modules/jarvos-coding/README.md, package.json
New README Public Interface section; Architecture/Submission Gate/Continuity contract documentation; updated package description, type, and keywords.
Test Coverage
test/orchestrator-host-adapters.test.js, test/session-state.test.js, tests/modules-smoke-test.js, scripts/smoke-test.sh
Orchestrator and host adapter end-to-end tests; session-state persistence tests; smoke test refactored to validate Codex adapter via subprocess; smoke-test.sh updated to verify hosts.js file.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • levineam/jarvOS#64: Removes legacy orchestrator/review-engine code that was replaced by the new layered architecture in this PR.
  • levineam/jarvOS#8: Earlier PR introducing scripts/smoke-test.sh module structure checks; this PR extends that same smoke test to verify the new @jarvos/coding host adapter file.
  • levineam/jarvOS#11: Adds the base modules smoke test framework that this PR refactors to validate the Codex host adapter contract and subprocess execution.

Poem

🐰 Whiskers twitch with modular delight,
Eight stages dance through code's long night,
Triage gates and session state,
Hosts adapt—no more too late,
From chaos springs a ordered sight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: introducing host adapters for the jarvos-coding module (claude-code/codex), with the issue reference.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch SUP-2214/host-adapters-v2

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@levineam
levineam merged commit d8122a9 into main May 30, 2026
6 of 7 checks passed
@levineam
levineam deleted the SUP-2214/host-adapters-v2 branch May 30, 2026 14:27

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: efe19db524

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +137 to +143
const pullRequest = await runStage('pullRequest', () => requireFn(adapters.pullRequest, 'openPullRequest', 'pullRequest')({
issue: input.issue,
issueIdentifier,
branch: context.branch,
baseRef: context.baseRef,
fixRerun,
}));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Block PR creation when review gates fail

When either review adapter returns a failed result, or fixAndRerun() returns { ok: false }/status: 'failed', runStage() only records that status and execution still reaches openPullRequest(). I verified this path with the new orchestrator: failed slice/holistic reviews plus a failed fixer still returned completed and called the PR adapter, which bypasses the module's pre-submit review gate and can submit known-bad code.

Useful? React with 👍 / 👎.

title: options.title || 'jarvOS Coding',
description: options.description || 'Run the portable jarvOS coding orchestrator from this host.',
host,
invokes: DEFAULT_MCP_TOOL_NAME,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point custom skills at the registered MCP tool

When a host supplies options.mcpTool.name to avoid collisions or follow host naming, registerMcpTool() registers that custom name but the skill descriptor still advertises invokes: jarvos_coding_take_issue_to_done. In that configuration the registered skill points at a tool that may not exist, so invoking the skill fails even though registration reports the custom MCP tool name.

Useful? React with 👍 / 👎.

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.

1 participant