Skip to content

fix(source-control-ai): give OMP a commit-message spec - #15678

Closed
yzxcj797 wants to merge 1 commit into
stablyai:mainfrom
yzxcj797:fix/omp-commit-message-spec-15646
Closed

yzxcj797 wants to merge 1 commit into
stablyai:mainfrom
yzxcj797:fix/omp-commit-message-spec-15646

Conversation

@yzxcj797

Copy link
Copy Markdown
Contributor

Summary

What

Adds an omp entry to COMMIT_MESSAGE_AGENT_SPECS, so a default TUI agent of OMP resolves to a working Source Control AI agent instead of failing.

Why

#15646 — omp is a first-class TuiAgent (PTY launch, hooks, AI Vault session scanning) but had no commit-message spec, so resolveCommitMessageAgentChoice(null, 'omp') hit the getCommitMessageAgentSpec(defaultTuiAgent) ? defaultTuiAgent : null branch and returned null — turning every Source Control AI operation into "Choose a supported Source Control AI agent…". Most visible: the first-work auto branch rename silently failed, leaving Orca-created creature branches (<user>/Nautilus-8) with their generated names.

Spec details — from the invocation the reporter verified against omp v17.3.7:

  • prompt on stdin (large staged diffs stay off argv), -p --no-session --no-tools --mode text
  • static model source with a single config-default entry — this invocation carries no model flag, so OMP's own config decides (the existing Kimi default pattern for CLIs without a per-call model flag)

The "Supported agents: …" error list derives from listCommitMessageAgentCapabilities(), so it picks OMP up with no further changes.

Testing

  • New case in commit-message-agent-spec.test.ts: the spec exists, delivers via stdin, builds exactly the verified argv, defaults to config-default, and — the regression that matters — resolveCommitMessageAgentChoice(null, 'omp') now returns 'omp'. Verified to fail on the pre-change registry.
  • Updated agent-id list test; suites commit-message-agent-spec / -generation / -plan 75/75, source-control-ai 25/25, pnpm run typecheck clean.

Fixes #15646

OMP is a first-class TuiAgent, but with no entry in
COMMIT_MESSAGE_AGENT_SPECS, resolveCommitMessageAgentChoice returned
null for a spec-less default agent and every Source Control AI
operation failed with 'Choose a supported Source Control AI agent' —
most visibly the first-work auto branch rename, which silently kept
generated creature branch names (stablyai#15646).

Adds the spec using the invocation verified against omp v17 in the
report: prompt on stdin, '-p --no-session --no-tools --mode text',
model resolved from OMP's own config (single config-default entry,
the Kimi 'default' pattern — this invocation carries no model flag).
The supported-agents error list derives from the registry, so it
picks OMP up automatically.
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d01123c8-94c5-49b4-9935-60aa8124df93

📥 Commits

Reviewing files that changed from the base of the PR and between 012e9f4 and 54dd177.

📒 Files selected for processing (2)
  • src/shared/commit-message-agent-spec.test.ts
  • src/shared/commit-message-agent-spec.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Added OMP as a static commit-message agent. The specification sends prompts through stdin, uses non-session text mode without tools, and configures the default model. Tests now include OMP in the installed agent list and verify its specification and choice resolution.

Merge Risk: ⚪ Minimal · up to 54dd1

This is a localized OMP commit-message integration with regression coverage; no actionable merge-blocking risk remains, so it is merge-ready after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, solution, linked issue, implementation details, and testing, but omits most required template sections and checklist items. Use the repository template headings and add the missing Visual Proof, AI Disclosure, Review, boundary, Notes, and Checklist sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding a commit-message specification for OMP.
Linked Issues check ✅ Passed The changes directly address issue #15646 by adding OMP resolution, stdin invocation, configured-model behavior, and regression coverage.
Out of Scope Changes check ✅ Passed The changes are limited to the OMP commit-message specification and focused tests required by issue #15646.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

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.

@nwparker

Copy link
Copy Markdown
Contributor

Superseded by #20624 (OMP Source Control AI support), which contains the current implementation and verification on . Closing this stale duplicate so review stays on the maintained PR.

@nwparker

Copy link
Copy Markdown
Contributor

Superseded by #20624.

@nwparker nwparker closed this Sep 19, 2026
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.

Source Control AI fails for OMP users: 'Choose a supported Source Control AI agent' on every action (incl. first-work auto branch rename)

2 participants