Skip to content

fix(#1413): write ROCKETRIDE_URI/APIKEY to .env in local mode + add llms.txt (#586) - #1450

Closed
Pankajsharma99max wants to merge 8 commits into
rocketride-org:developfrom
Pankajsharma99max:develop
Closed

Pankajsharma99max wants to merge 8 commits into
rocketride-org:developfrom
Pankajsharma99max:develop

Conversation

@Pankajsharma99max

@Pankajsharma99max Pankajsharma99max commented Jul 3, 2026 •

Copy link
Copy Markdown

What & Why

Two independent fixes in one PR.

#1413 — Local engine never writes ROCKETRIDE_URI/APIKEY to .env

Root cause: ROCKETRIDE_QUICKSTART.md claims the extension "automatically creates/updates .env" for all modes. This is false for local mode — the engine uses --port=0 so the port is only known after the subprocess starts. Nothing in the extension ever wrote to .env for local mode.

Fix — apps/vscode/src/engine/local/engine-local.ts:

  • Add private writeLocalEnv(uri, apiKey) called in start() after the engine emits ready
  • Upserts ROCKETRIDE_URI and ROCKETRIDE_APIKEY into workspace root .env
  • Preserves all other existing .env variables (upsert, not overwrite)
  • Non-fatal: errors are logged as warnings, never propagated

Fix — docs/agents/ROCKETRIDE_QUICKSTART.md:

  • Replace false "auto-synced from extension settings" claim with an accurate per-mode table (local/docker: written on engine start; remote/cloud: from settings)
  • Add note that in local mode .env is absent until after the engine starts

#586 — Add llms.txt / llms-full.txt

Adds two root-level files per the llmstxt.org standard:

  • llms.txt — concise summary: what RocketRide is, links, quick-start, modes
  • llms-full.txt — extended: architecture, pipeline JSON, SDK patterns, auth flow

Static hand-authored files. CI automation deferred per issue discussion.

Files Changed

File Change
apps/vscode/src/engine/local/engine-local.ts Add writeLocalEnv() + call in start()
docs/agents/ROCKETRIDE_QUICKSTART.md Correct per-mode .env description
llms.txt New
llms-full.txt New

Testing

cd apps/vscode && tsc --noEmit


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Local engine startup now automatically updates your workspace `.env` with connection details, reducing manual setup.
  - Added expanded tooling documentation, including supported connection modes and local dynamic port behavior.

- **Documentation**
  - Improved quickstart guidance for Python and TypeScript, with clearer `.env` instructions for local vs Docker vs remote/cloud/on-prem.
  - Updated “Key Patterns” do/don’t checklist and refreshed example `.env` to reflect engine-driven overwrites.
  - Added consolidated project reference materials to help explain architecture, core concepts, SDK usage, and common mistakes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Pankajsharma99max and others added 2 commits July 3, 2026 15:32
…nv in local engine mode

Local engine starts on a dynamic port (--port=0). The port is only known
after the engine process starts and Uvicorn logs the ready message. Add
EngineLocal.writeLocalEnv(uri, apiKey) which upserts ROCKETRIDE_URI and
ROCKETRIDE_APIKEY into the workspace root .env file after the engine emits
its 'ready' status.

Behaviour:
- If .env doesn't exist, it is created with just the two keys
- If .env already exists, only the two keys are updated; all other
  variables are preserved (upsert, not overwrite)
- Errors are logged as warnings and never propagate (non-fatal)

Also correct ROCKETRIDE_QUICKSTART.md, which falsely claimed the extension
'automatically creates/updates .env with ROCKETRIDE_URI and ROCKETRIDE_APIKEY'
for all modes. Add a per-mode table explaining the actual behavior and a note
that in local mode .env is only written after the engine has started.

Closes rocketride-org#1413
…-and-llmstxt

fix(rocketride-org#1413): write ROCKETRIDE_URI/APIKEY to .env in local mode + add llms.txt (rocketride-org#586)
@github-actions github-actions Bot added docs Documentation module:vscode VS Code extension labels Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor
🤖 Internal: Discord sync marker

Auto-managed by the Discord notification workflow. Stores the linked Discord message ID. Do not edit or delete.

@coderabbitai

coderabbitai Bot commented Jul 3, 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b3ab4939-29d6-4729-95f3-2a47fbb7dff3

📥 Commits

Reviewing files that changed from the base of the PR and between 99abceb and e4fdc3d.

📒 Files selected for processing (5)
  • nodes/src/nodes/agent_langchain/langchain.py
  • nodes/src/nodes/chroma/chroma.py
  • nodes/src/nodes/tool_mcp_client/IGlobal.py
  • nodes/test/agent_langchain/test_zero_arg_tool_schema.py
  • nodes/test/chroma/test_collection_version_compat.py

📝 Walkthrough

Walkthrough

The PR writes local engine connection details into the workspace .env, updates setup docs to match that behavior, adds reference documentation, and fixes node tool-schema and Chroma compatibility handling with regression tests.

Changes

.env auto-write feature and documentation

Layer / File(s) Summary
EngineLocal start flow and .env writer
apps/vscode/src/engine/local/engine-local.ts
Adds .env writing after local engine readiness, preserving existing content while upserting ROCKETRIDE_URI and ROCKETRIDE_APIKEY; also updates nearby comments and spawn-argument formatting.
Quickstart docs update for .env behavior
docs/agents/ROCKETRIDE_QUICKSTART.md
Revises Python and TypeScript quickstarts with connection-mode guidance, updated .env examples, checklist changes, and project-structure notes.
New llms.txt and llms-full.txt reference documentation
llms.txt, llms-full.txt
Adds new reference docs covering project overview, architecture, connection modes, .env behavior, .pipe rules, SDK examples, and contributing guidance.

Node schema and Chroma compatibility

Layer / File(s) Summary
MCP tool schema key and zero-arg handling
nodes/src/nodes/tool_mcp_client/IGlobal.py, nodes/src/nodes/agent_langchain/langchain.py, nodes/test/agent_langchain/test_zero_arg_tool_schema.py
Changes MCP tool descriptors to use inputSchema, adds strict empty-argument schema handling in LangChain, and covers both behaviors with regression tests.
Chroma collection version compatibility
nodes/src/nodes/chroma/chroma.py, nodes/test/chroma/test_collection_version_compat.py
Normalizes Chroma collection lookup across client response shapes, adds clearer failure messages, and verifies both lookup and flush failure paths in tests.

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

Possibly related issues

Possibly related PRs

Suggested reviewers: ryan-t-christensen, Rod-Christensen, stepmikhaylov, jmaionchi

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main changes: local-mode .env writes and the addition of llms.txt documentation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

…y drop zero-argument MCP tools

Fixes rocketride-org#1404

Two independent defects combined to cause this:

1. `tool_mcp_client.IGlobal.list_namespaced_tools()` exposed a tool's JSON
   schema under the key `input_schema` (snake_case), but the canonical
   `ToolsBase.ToolDescriptor` contract in `packages/ai/src/ai/common/tools.py`
   -- and every framework driver that reads it -- expects `inputSchema`
   (camelCase). The mismatch meant `td.get('inputSchema')` always returned
   `None` for MCP-sourced tools, silently discarding the real schema before
   it ever reached the driver.

2. `agent_langchain.langchain._make_args_schema` treated "no schema info at
   all" and "schema explicitly declares zero properties" as the same case,
   falling back to the permissive `_ToolInput` (which advertises a generic
   `input` field) for both. A genuinely zero-argument tool therefore looked
   to the model like it required an `input` argument -- which is what caused
   reasoning models to either skip the tool or call it with an argument the
   MCP server didn't expect and rejected.

Fix: correct the key mismatch, and give explicitly zero-argument tools a
strict, field-free `_NoArgsInput` schema (rendered as
`{"type":"object","properties":{}}`) instead of conflating them with the
"unknown schema" fallback.

Added regression tests covering both defects; verified they fail against
the pre-fix code and pass after the fix.
…e' crash

Fixes rocketride-org#1405

`list_collections()`'s return shape differs across chromadb client
versions: newer clients (>=0.6) return a list of collection name strings,
older clients (<0.6) return a list of Collection objects exposing `.name`.
`_doesCollectionExist` compared `self.collection` (a str) directly against
the raw list, which only worked for the string-returning shape -- against
an older server it silently evaluated to "collection does not exist" even
when it did, and a raw client/server incompatibility during
`list_collections()` (e.g. `KeyError('_type')`) propagated as an opaque
error with no indication of the real cause.

Downstream, `flush()` called `self.collectionObj.delete(...)` /
`.upsert(...)` without checking whether `collectionObj` had actually been
resolved, so a prior silent failure surfaced later as an opaque
`AttributeError: 'NoneType' object has no attribute 'delete'` instead of an
actionable message -- appearing to the user as "0 done, 1 error" during
ingestion with no clue why.

Fix:
- Normalize `list_collections()` results to a set of names regardless of
  whether the client returns strings or Collection-like objects.
- Wrap `list_collections()` failures with a message naming the host/port
  and pointing at a likely version mismatch.
- Fail fast in `flush()` with a clear, actionable error when the
  collection was never resolved, instead of letting it crash deep inside
  a per-chunk write.

Added regression tests covering both the version-shape bug and the
flush() guard; verified they fail against the pre-fix code and pass after
the fix.
Fixes rocketride-org#1404 -- reasoning-model agents silently drop zero-argument MCP tools.
See PR rocketride-org#1451: rocketride-org#1451
Fixes rocketride-org#1405 -- Chroma version incompatibility fails silently + NoneType 'delete' crash.
See PR rocketride-org#1452: rocketride-org#1452
@github-actions github-actions Bot added the module:nodes Python pipeline nodes label Jul 3, 2026
…args

Addresses review feedback on rocketride-org#1404 (PR rocketride-org#1451).

`input_schema.get('properties', {})` collapsed two different schemas into
the same case: `{"type": "object"}` (properties key absent -- an
unconstrained object shape) and `{"type": "object", "properties": {}}`
(properties key explicitly present and empty -- a genuine zero-argument
declaration). Both produced an empty dict from `.get(..., {})` and were
routed to the new strict `_NoArgsInput` schema, so a tool with an
unconstrained/unknown argument shape would incorrectly be told it takes no
arguments at all.

Now `'properties' not in input_schema` is checked explicitly and routed to
the permissive `_ToolInput` fallback (same as "no schema info at all"),
leaving `_NoArgsInput` for schemas that explicitly declare zero
properties.

Added a regression test for the missing-properties-key case; verified it
fails against the pre-fix logic and passes after.
Pulls in the CodeRabbit review fix for rocketride-org#1404 (missing-properties-key edge
case). See PR rocketride-org#1451: rocketride-org#1451
@Pankajsharma99max

Copy link
Copy Markdown
Author

Closing this in favor of #1461.

This PR's head branch was my fork's develop rather than a dedicated feature branch, so when I later pushed the #1404 and #1405 fixes to develop (for unrelated PRs #1451/#1452), this PR's diff silently grew to include them too -- not intentional, and not what the title/description describe.

#1461 is opened from a dedicated branch containing only the original single commit (.env write for local engine mode + llms.txt/llms-full.txt), so its diff matches its description.

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

Labels

docs Documentation module:nodes Python pipeline nodes module:vscode VS Code extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant