Skip to content

[AAASM-4838] 📝 (examples): Make crewai/langchain-research live-mode honest (was inert)#339

Merged
Chisanan232 merged 4 commits into
masterfrom
v0.0.1/AAASM-4838/live_mode_inert
Jul 18, 2026
Merged

[AAASM-4838] 📝 (examples): Make crewai/langchain-research live-mode honest (was inert)#339
Chisanan232 merged 4 commits into
masterfrom
v0.0.1/AAASM-4838/live_mode_inert

Conversation

@Chisanan232

Copy link
Copy Markdown
Contributor

What changed

Both python/crewai-research-crew and python/langchain-research-agent computed
a mock flag but never branched on it: every invocation replayed the static
scripted trajectory, while a non-mock run mislabelled the mode as "live". The
READMEs' "Switching to the live … integration" / "Switching to production mode"
sections handed users a uv run python src/main.py command that produced the
exact same scripted output — an inert "live mode" that promised a real
crew/agent loop the code never runs.

A real CrewAI crew / LangChain ReAct loop is out of scope for this example
gallery (offline, no LLM keys, CI-safe). So the fix makes the guidance honest
rather than faking a live path:

  • Gate the previously dead mock flag: a non-mock invocation (with
    OPENAI_API_KEY set) now prints a clear "live integration is not implemented
    in this example — it is an offline scripted governance demo" notice and exits,
    instead of replaying the mock under a "live" label. The dead computed flag is
    removed; the mode label is now always mock (offline).
  • Rewrite the module docstrings and the READMEs' live/production sections to
    state plainly that these are offline scripted demos with no runnable live mode,
    and describe a real integration only as a conceptual, out-of-scope exercise —
    no command that the code doesn't actually run.

The offline --mock path (what CI exercises) is unchanged.

Related ticket

Closes AAASM-4838

Jira: https://lightning-dust-mite.atlassian.net/browse/AAASM-4838

How to verify

# offline demo still runs (unchanged output)
cd python/crewai-research-crew && uv sync --extra dev && uv run python src/main.py --mock
cd python/langchain-research-agent && uv sync --extra dev && uv run python src/main.py --mock

# a "live" request is now refused honestly rather than replaying the mock
OPENAI_API_KEY=sk-test uv run python src/main.py   # prints the not-implemented notice, exits

# byte-compile + smoke tests
uv run python -m py_compile src/main.py
uv run pytest tests/ -q     # crewai 6 passed / langchain 8 passed

Checklist

  • PR title follows [AAASM-XXXX] <GitEmoji> (<scope>): <summary>
  • No secrets, API keys, or .env files committed
  • Example sub-projects include their own README.md with prerequisites and run instructions
  • SDK/runtime version dependencies are documented or pinned

🤖 Generated with Claude Code

Chisanan232 and others added 4 commits July 18, 2026 16:11
The computed `mock` flag was never branched on, so a non-mock run replayed
the scripted trajectory while labelling the mode "live". Gate the live path:
refuse it with a clear "not implemented" notice and drop the dead flag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the "Switching to the live CrewAI integration" runnable steps with an
honest note that this is an offline scripted demo and no live mode is shipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…eplay

The `mock` flag only fed a print label; a non-mock run replayed the scripted
ReAct trajectory mislabelled "live". Gate the live path: refuse it with a
clear "not implemented" notice and drop the dead flag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ions

Replace the "Switching to production mode" runnable steps with an honest note
that this is an offline scripted demo and no live mode is shipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@Chisanan232

Copy link
Copy Markdown
Contributor Author

🤖 Claude Code — PR review

Scope (AAASM-4838, MED): ✅ crewai/langchain-research 'live mode' now refuses cleanly with a clear notice instead of silently replaying the mock under a 'live' label; --mock path unchanged.

  1. CI ✅ green. 2. Scope ✅ 4 files, smoke tests pass. 3. Side effects none. 4. FE n/a. Verdict: ready to merge pending Pioneer approval.

@Chisanan232
Chisanan232 merged commit c26f79a into master Jul 18, 2026
26 checks passed
@Chisanan232
Chisanan232 deleted the v0.0.1/AAASM-4838/live_mode_inert branch July 18, 2026 09:17
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