fix: blank LangSmith input should disable tracing#54
Merged
Brace Sproul (bracesproul) merged 2 commits intoJul 5, 2026
Conversation
A LANGCHAIN_TRACING_V2=true saved by an earlier setup survived in ~/.openwiki/.env when the user later left the LangSmith prompt blank, because saveOpenWikiEnv merges updates and never clears the flag. Blank input now explicitly writes LANGCHAIN_TRACING_V2=false. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PRATHAM KUMAR (rajpratham1)
approved these changes
Jul 4, 2026
PRATHAM KUMAR (rajpratham1)
left a comment
There was a problem hiding this comment.
This is a small, targeted bug fix that matches the documented behavior.
Why approve:
✅ Fixes a real state persistence bug: clearing the LangSmith API key now explicitly disables tracing instead of leaving LANGCHAIN_TRACING_V2=true behind.
✅ Minimal, low-risk change.
✅ Comment clearly explains the previous behavior and why the fix is needed.
✅ No obvious regressions from the diff shown.
Brace Sproul (bracesproul)
approved these changes
Jul 5, 2026
Brace Sproul (bracesproul)
left a comment
Member
There was a problem hiding this comment.
nice, thank you!
Brace Sproul (bracesproul)
enabled auto-merge (squash)
July 5, 2026 22:09
Brace Sproul (bracesproul)
disabled auto-merge
July 5, 2026 22:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
During
--initsetup, entering a LangSmith key writesLANGCHAIN_TRACING_V2=trueto~/.openwiki/.env. But if the user later re-runs setup and leaves the LangSmith prompt blank (intending to opt out), the oldtrueflag survives:saveOpenWikiEnvmerges updates and nothing ever clears it. Tracing silently stays enabled with whatever stale key/config remains — the user believes they've opted out.Fix
Blank LangSmith input now acts as an explicit off switch:
LANGCHAIN_TRACING_V2is written asfalse. One conditional branch insrc/credentials.tsx, 5 lines.Verification
pnpm run build,pnpm run lint:check,pnpm run format:checkall pass.~/.openwiki/.envstill containsLANGCHAIN_TRACING_V2=true. After fix: it'sfalse.Surfaced during an automated documentation audit of the repo (same review pass that produced #50/#49, but this is an independent fix — kept as its own PR so each change reviews on its own merits).
🤖 Generated with Claude Code