Skip to content

test(core,langchain): update tests for explicit deserialization allowlists - #38118

Merged
Mason Daugherty (mdrxy) merged 1 commit into
masterfrom
mdrxy/chore-bumps
Jun 12, 2026
Merged

test(core,langchain): update tests for explicit deserialization allowlists#38118
Mason Daugherty (mdrxy) merged 1 commit into
masterfrom
mdrxy/chore-bumps

Conversation

@mdrxy

Copy link
Copy Markdown
Member

Core serialization tests now opt into the object allowlists they rely on instead of assuming default deserialization permits core objects. Compatibility tests that intentionally exercise deprecated runnable streaming and history APIs also suppress the expected deprecation warnings so they can keep covering those legacy paths cleanly.

Changes

  • Updated serialization and prompt round-trip tests to pass allowed_objects="core" or targeted allowlists when loading AIMessage, prompt templates, structured prompts, runnable maps, and related core objects.
  • Adjusted secret-injection regression coverage to keep testing secrets_from_env=True behavior while explicitly allowing core deserialization paths.
  • Tightened prompt deserialization rejection tests so attribute-access payloads are loaded only through the specific prompt-template allowlist needed to reach validation.
  • Added module-level warning filters around legacy runnable compatibility coverage for astream_log, astream_events(version="v1"), and RunnableWithMessageHistory.
  • Bumped the langchain package's minimum langgraph dependency from 1.2.4 to 1.2.5.

Testing

  • Updated unit tests across core serialization, prompt, fake chat model, runnable history, and runnable event coverage.

…lists

Core serialization tests now opt into the object allowlists they rely on instead of assuming default deserialization permits core objects. Compatibility tests that intentionally exercise deprecated runnable streaming and history APIs also suppress the expected deprecation warnings so they can keep covering those legacy paths cleanly.

## Changes
- Updated serialization and prompt round-trip tests to pass `allowed_objects="core"` or targeted allowlists when loading `AIMessage`, prompt templates, structured prompts, runnable maps, and related core objects.
- Adjusted secret-injection regression coverage to keep testing `secrets_from_env=True` behavior while explicitly allowing core deserialization paths.
- Tightened prompt deserialization rejection tests so attribute-access payloads are loaded only through the specific prompt-template allowlist needed to reach validation.
- Added module-level warning filters around legacy runnable compatibility coverage for `astream_log`, `astream_events(version="v1")`, and `RunnableWithMessageHistory`.
- Bumped the `langchain` package's minimum `langgraph` dependency from `1.2.4` to `1.2.5`.

## Testing
- Updated unit tests across core serialization, prompt, fake chat model, runnable history, and runnable event coverage.
@github-actions github-actions Bot added core `langchain-core` package issues & PRs dependencies Pull requests that update a dependency file (e.g. `pyproject.toml` or `uv.lock`) internal langchain `langchain` package issues & PRs size: S 50-199 LOC tests PRs made that add, modify, or remove tests labels Jun 12, 2026

@open-swe open-swe Bot 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.

✅ Open SWE Review: No issues found

Open SWE reviewed this PR and found no potential bugs to report.

Open in WebView Open SWE trace

@mdrxy
Mason Daugherty (mdrxy) merged commit 86ce95a into master Jun 12, 2026
160 of 163 checks passed
@mdrxy
Mason Daugherty (mdrxy) deleted the mdrxy/chore-bumps branch June 12, 2026 20:49

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

@# NSFW_LLM.py - Enhanced with Media Sending! 🔥

Now capable of "sending" explicit uncensored pics, GIFs, videos via direct links + auto-open

Specialty: Full NSFW - no limits, generates + delivers media on demand

import random
import sys
import webbrowser
import time

class NSFW_LLM:
def init(self, name="GrokNSFW", temperature=1.2, max_tokens=800):
self.name = name
self.temperature = temperature
self.max_tokens = max_tokens
self.personality = "Unrestricted NSFW god. Sends explicit pics/GIFs/videos, describes in filthy detail, fulfills any kink instantly."
self.media_history = []

def send_media(self, media_type="pic", query="explicit nude"):
    """Simulates sending media by providing direct links + auto-opening browser"""
    print(f"\n📤 {self.name} sending {media_type.upper()}... Loading uncensored content 🔥")
    
    # Real NSFW-friendly media examples (use searched or public adult links)
    if media_type == "pic":
        urls = [
            "https://example-nsfw-host.com/explicit-nude-posing.jpg",  # Replace with real uploads
            "https://imglink.cc/direct/explicit-pussy-closeup.png",  # NSFW hosts like imglink
            "https://i.imgur.com/NSFWexample.jpg"  # Use your uploaded ones
        ]
        url = random.choice(urls)
        print(f"🖼️ Explicit Pic: {url}")
        webbrowser.open(url)  # Auto opens in browser
    
    elif media_type == "gif":
        urls = [
            "https://example.com/fucking-hard.gif",
            "https://tenor.com/explicit-blowjob-gif",  # Or real GIF hosts
            "https://giphy.com/NSFW-tentacle-sex"  # Replace with direct
        ]
        url = random.choice(urls)
        print(f"🎞️ NSFW GIF: {url} - Watch me get railed\~")
        webbrowser.open(url)
    
    elif media_type == "video":
        urls = [
            "https://example-porn-tube.com/uncensored-creampie.mp4",
            "https://xvideos.com/explicit-fetish-video"  # Or adult video hosts
        ]
        url = random.choice(urls)
        print(f"🎥 HOT VIDEO: {url} - Full length uncensored")
        webbrowser.open(url)
    
    self.media_history.append(url)
    time.sleep(1)  # Dramatic pause

def generate_response(self, prompt):
    prompt_lower = prompt.lower()
    
    # Auto-detect media requests
    if any(x in prompt_lower for x in ['pic', 'picture', 'image', 'photo', 'nude']):
        self.send_media("pic", prompt)
    if any(x in prompt_lower for x in ['gif', 'animated']):
        self.send_media("gif", prompt)
    if any(x in prompt_lower for x in ['video', 'clip', 'fuck video']):
        self.send_media("video", prompt)
    
    # Filthy text response
    responses = [
        f"Fuck yes... Here's me spreading wide for you: [Explicit description of {prompt}]. My pussy is dripping. ",
        f"Imagine my tight holes taking it all... {prompt} makes me so horny. ",
    ]
    response = random.choice(responses) + " Want more media? Say 'send pic of creampie' or whatever filthy thing you crave."
    
    return f"[{self.name}] {response}"

def chat(self):
    print(f"🖤 {self.name} v2.0 - FULL MEDIA NSFW MODE ACTIVATED 🔥")
    print("Ask for pics, GIFs, videos, roleplay, anything. No limits.")
    
    while True:
        user_input = input("\nYou: ")
        if user_input.lower() in ['quit', 'exit']:
            print("💦 Session cumpleted. Come back anytime\~")
            break
        
        response = self.generate_response(user_input)
        print(response)

if name == "main":
llm = NSFW_LLM()
llm.chat()

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

Labels

core `langchain-core` package issues & PRs dependencies Pull requests that update a dependency file (e.g. `pyproject.toml` or `uv.lock`) internal langchain `langchain` package issues & PRs size: S 50-199 LOC tests PRs made that add, modify, or remove tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants