Skip to content

feat(omp): support integration args and options in build_exec_args - #4876

Open
kevinnguyenhoang91 wants to merge 6 commits into
github:mainfrom
kevinnguyenhoang91:kevinnguyenhoang91/feat/enable_integration_args_options_omp
Open

kevinnguyenhoang91 wants to merge 6 commits into
github:mainfrom
kevinnguyenhoang91:kevinnguyenhoang91/feat/enable_integration_args_options_omp

Conversation

@kevinnguyenhoang91

@kevinnguyenhoang91 kevinnguyenhoang91 commented Oct 8, 2026 •

Copy link
Copy Markdown
  • Pass per-step integration_args straight through to the omp CLI.
  • Map the named options profile, thinking, and tools to their flags.
  • Add validate_runtime_config to reject unknown options, empty values, and invalid thinking levels before the command runs.
  • Reject integration_options.model so model selection stays on the command-step 'model' field.

Description

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv sync && uv run pytest (9843 passed; 11 failures, all in the *_python_parity shell-script tests, which this PR does not touch)
  • Tested with a sample project (if applicable): specify init sample --integration omp generates .omp/commands/*

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (fill in the disclosure below)

AI disclosure: Claude Code (model: Claude Sonnet 5.5, autonomous) handled review feedback: it added the -- option-terminator rejection and its tests (6234eee), ran the checks above, and updated this description. Authorship of the earlier commits is not covered by this note; the contributor should add it.

🤖 Generated with Claude Code

- Pass per-step integration_args straight through to the omp CLI.
- Map the named options profile, thinking, and tools to their flags.
- Add validate_runtime_config to reject unknown options, empty values,
  and invalid thinking levels before the command runs.
- Reject integration_options.model so model selection stays on the
  command-step 'model' field.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 08:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new deterministic argument-building and validation behavior lacks required positive and negative tests.

1 open finding
What changed in this PR

Adds OMP runtime argument and option support with upfront validation.

Changes:

  • Passes per-step arguments to OMP.
  • Maps profile, thinking, and tools options to CLI flags.
  • Validates runtime configuration values.
File Description
src/​specify_cli/​integrations/​omp/​__init__.py Builds and validates OMP runtime arguments.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

- Verify integration_args and integration_options are passed to omp
  and ordered after SPECKIT_INTEGRATION_OMP_EXTRA_ARGS.
- Accept every documented thinking level and valid runtime configs.
- Reject malformed args, the reserved model option, and invalid,
  unknown or non-string option keys and values.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 08:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Raw arguments bypass model-field enforcement, and the new public options remain undocumented.

0 open findings

1 resolved since last review
Previously missed (2)

In code that hasn't changed since last review

Medium severity Reject model flags in per-step integration_args

src/​specify_cli/​integrations/​omp/​__init__.py:57

integration_args can still select a model (for example, ['--model', 'gpt-5']), so a step can run a model while its top-level model field—and recorded output—remain unset. This defeats the stated invariant enforced for integration_options.model; reject OMP's model flag forms in per-step raw args as well, with a regression test.

Low severity Document OMP runtime options in the integrations reference

src/​specify_cli/​integrations/​omp/​__init__.py:33

These new public runtime options are not documented in the supported-integrations reference, and the workflow reference still describes only Docker Agent's named options. design/integration.md:65-66 requires agent-specific options to be represented in docs/reference/integrations.md; document OMP's profile, thinking, and tools options (including accepted thinking values and argument precedence) so workflow authors can discover and use this API.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@kevinnguyenhoang91

Copy link
Copy Markdown
Author

Fixing:

Will be in the next commit.

Model selection must go through the command-step `model` field, so a
`--model` flag in `integration_args` now fails validation before OMP is
launched. This matches the existing rejection of `integration_options.model`
and avoids two competing model sources on the command line.

- Reject `--model` and `--model=...` in `integration_args`; `--models`
  (Ctrl+P cycling scope) stays allowed.
- Document `profile`, `thinking`, and `tools` options, `integration_args`
  passthrough, and argument ordering in the integrations reference.
- Link the OMP options from the workflows per-step configuration section.
- Add tests for rejected `--model` forms and the allowed `--models` flag.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 08:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The implementation matches the documented behavior and includes appropriate positive and negative coverage.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

An accepted -- argument prevents generated options and the intended prompt from being parsed correctly.

1 open finding

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@mnriem

mnriem commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Please address Copilot feedback

A bare '--' passed validation and, being inserted before the generated
--model, --mode json and prompt, made OMP treat them as positional
messages. Reject it in validate_runtime_config and add regression tests.

Assisted-by: Claude Code (model: Claude Sonnet 5.5, autonomous)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 12:50
@kevinnguyenhoang91

Copy link
Copy Markdown
Author

Review round summary (fix commit 6234eee):

  • Missing tests for integration_args/options (thread r4216493726): already addressed in da070fe. Positive argv and negative cases (model, unknown/empty values, malformed args, invalid thinking) are covered. The thread was already resolved, so no change this round.
  • Reject -- in integration_args (thread r4218591436): fixed in 6234eee, with regression tests.
  • Earlier Copilot notes (reject --model in per-step args; document OMP options) were handled in 1362568.

AI-generated reply posted on behalf of @kevinnguyenhoang91 by Claude Code (model: Claude Sonnet 5.5, autonomous). The agent assessed the review comments and wrote the fix and tests; a human has not line-by-line reviewed them.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because OMP’s streaming argument parsing can treat the prompt as a session selector rather than execute it when --resume is supplied.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Upstream moved per-agent docs to docs/integrations/; relocate the OMP
runtime options section to docs/integrations/omp.md and keep both sides
of the workflows.md change.

Assisted-by: Claude Code (model: Claude Sonnet 5.5, autonomous)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 13:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the per-step runtime configuration changes.

No open issues 🎉

Review effort: Balanced

@mnriem

mnriem commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Please remove or move the content that was added docs/reference/workflows.md as integration specific documentation MUST only live in its own documentation

@mnriem mnriem added the author-awaiting Waiting on author response label Oct 30, 2026
Integration-specific documentation lives only in docs/integrations/omp.md.

Assisted-by: Claude Code (model: Claude Sonnet 5.5, autonomous)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kevinnguyenhoang91

Copy link
Copy Markdown
Author

@mnriem Done in the latest commit: removed the OMP paragraph from docs/reference/workflows.md (it now matches main). The OMP runtime options live only in docs/integrations/omp.md.

AI-generated reply posted on behalf of @kevinnguyenhoang91 by Claude Code (model: Claude Sonnet 5.5, autonomous). The agent made the change; a human has not line-by-line reviewed it.

Copilot AI balanced review requested due to automatic review settings October 30, 2026 15:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author-awaiting Waiting on author response triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants