Skip to content

Bound integration tool discovery per run - #3515

Merged
kojiwakayama merged 2 commits into
mainfrom
fix/issue-8-integration-discovery-status
Aug 9, 2026
Merged

kojiwakayama merged 2 commits into
mainfrom
fix/issue-8-integration-discovery-status

Conversation

@kojiwakayama

@kojiwakayama kojiwakayama commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes veryfront/veryfront-issue-inbox#8

Summary

  • memoize successful and unavailable integration tool catalogs within each agent run or request scope
  • expose a typed discovery result while retaining the existing array-returning compatibility helper
  • surface one model-facing diagnostic when discovery fails instead of treating failure as an empty catalog
  • regenerate the public integration API reference

Verification

  • VF_DISABLE_LRU_INTERVAL=1 deno test --no-check --allow-all src/integrations/remote-tools.test.ts src/integrations/remote-tools.hardening.test.ts src/integrations/index.test.ts src/agent/runtime/agent-runtime-step.test.ts src/agent/runtime/tool-helpers.test.ts
  • VF_DISABLE_LRU_INTERVAL=1 DENO_TESTING=1 NODE_ENV=production LOG_FORMAT=text deno test --no-check --allow-all --parallel src/agent/runtime (496 passed, 592 steps)
  • deno task verify:quick
  • git diff --check

Summary by CodeRabbit

  • New Features

    • Added remote integration tool discovery APIs and result types.
    • Agent runs now display integration discovery warnings when tools cannot be loaded.
    • Discovery results are reused during a run and retried on subsequent runs.
  • Bug Fixes

    • Prevented unavailable integrations from being incorrectly treated as empty tool catalogs.
  • Documentation

    • Updated API references, examples, function tables, and source links for integration discovery.

@kojiwakayama
kojiwakayama requested a review from kwakayama as a code owner August 9, 2026 16:02
@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

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: c36f44a7-b3f0-4228-96a2-0f2484d94fd2

📥 Commits

Reviewing files that changed from the base of the PR and between a5eae33 and fa9b1b1.

📒 Files selected for processing (2)
  • src/agent/runtime/agent-runtime-step.test.ts
  • src/agent/runtime/agent-runtime-step.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/agent/runtime/agent-runtime-step.ts

📝 Walkthrough

Walkthrough

The change adds scoped remote integration tool discovery with cached success or unavailable results. Agent runtime steps preserve discovery status and update prompts for unavailable discovery. The public API and generated reference documentation expose the new function and result type.

Changes

Remote integration discovery

Layer / File(s) Summary
Discovery result and scoped caching
src/integrations/remote-tools.ts, src/integrations/remote-tools.test.ts
Discovery returns discriminated results, caches requests within a scope, preserves cancellation behavior, and retains compatibility through getRemoteIntegrationToolDefinitions.
Runtime discovery status propagation
src/agent/runtime/tool-helpers.ts, src/agent/runtime/agent-runtime-step.ts, src/agent/runtime/index.ts, src/agent/runtime/agent-runtime-step.test.ts
Runtime tool loading forwards discovery results. Prepared steps retain the result. Streaming and non-streaming execution update system prompts with unavailable discovery status.
Public API and reference documentation
src/integrations/index.ts, docs/api-reference/veryfront/integrations.md, scripts/docs/generate-api-reference.ts, docs/api-reference/veryfront/agent.md
The discovery function and result type are exported and documented. API examples and fallback descriptions use the new API.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • veryfront/veryfront-code#3309: Both changes modify agent runtime generate and streaming execution paths that apply runtime-scoped context around model calls.

Suggested reviewers: kwakayama, copilot

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.36% 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 concisely describes the main change: scoping integration tool discovery to each run.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-8-integration-discovery-status

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/agent/runtime/agent-runtime-step.ts`:
- Around line 111-114: Update the unavailable-discovery message in the runtime
step to use model-facing wording: address the model as “you” and express the
prohibition with “must not,” while preserving the instructions to explain
temporary unavailability and ask the user to retry.
- Around line 96-102: Update removeIntegrationToolDiscoveryStatus so it removes
the delimited status block wherever it appears in systemPrompt, including when
suffix content follows the footer, while preserving all surrounding prompt text.
Add a regression test covering suffix content after an existing status block and
verify subsequent status updates do not retain duplicate blocks.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 650d2254-9924-4de2-b3ca-ce06f5f158dc

📥 Commits

Reviewing files that changed from the base of the PR and between a0b1c9b and a5eae33.

📒 Files selected for processing (10)
  • docs/api-reference/veryfront/agent.md
  • docs/api-reference/veryfront/integrations.md
  • scripts/docs/generate-api-reference.ts
  • src/agent/runtime/agent-runtime-step.test.ts
  • src/agent/runtime/agent-runtime-step.ts
  • src/agent/runtime/index.ts
  • src/agent/runtime/tool-helpers.ts
  • src/integrations/index.ts
  • src/integrations/remote-tools.test.ts
  • src/integrations/remote-tools.ts

Comment thread src/agent/runtime/agent-runtime-step.ts Outdated
Comment thread src/agent/runtime/agent-runtime-step.ts

@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: a5eae33a9c

ℹ️ 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 thread src/agent/runtime/agent-runtime-step.ts Outdated
@kojiwakayama
kojiwakayama added this pull request to the merge queue Aug 9, 2026
Merged via the queue into main with commit a96ba9d Aug 9, 2026
31 checks passed
@kojiwakayama
kojiwakayama deleted the fix/issue-8-integration-discovery-status branch August 9, 2026 20:41
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