Skip to content

Ground YouTube comment replies in per-comment context - #1478

Draft
Foundup wants to merge 3 commits into
mainfrom
codex/youtube-comment-context-openrouter-phase1
Draft

Ground YouTube comment replies in per-comment context#1478
Foundup wants to merge 3 commits into
mainfrom
codex/youtube-comment-context-openrouter-phase1

Conversation

@Foundup

@Foundup Foundup commented Aug 9, 2026

Copy link
Copy Markdown
Member

What changed

  • Extracts the exact video title, video ID, and video URL from each YouTube Studio inbox row and propagates the receiving channel ID for personality routing.
  • Preserves the original comment when semantic guidance is added, applies commenter history and verified VoiceMemory to every tier, and makes #FFCPLN context-sensitive instead of automatically treating it as a troll marker.
  • Makes the local model route the default: LM Studio first with a 3-second bound, then embedded general-purpose Qwen. Grok is now an explicit legacy opt-in.
  • Uses resolve_general_model_path() instead of the coding-role model and passes embedded Qwen the same full grounded prompt as the service route.
  • Records the actual provider beneath skill routing and fails closed when only template, BanterEngine, stats-only, unknown, or stale output is available. Legacy generic replies require YT_ALLOW_GENERIC_REPLY_FALLBACK=true.
  • Adds focused regression coverage and updates module/test documentation.

Why

The active daemon showed Grok unavailable, LM Studio consuming most of the 10-second budget, embedded Qwen receiving a reduced context-free prompt, and generic templates such as “Appreciate the comment!” being posted and mislabeled as contextual output. Studio rows also lost their video context before generation.

OpenRouter / RedDog decision

RedDog's production Fusion calls are autonomous and do not require 012 to approve individual calls. They consume policy and signed runtime/model bindings and persist durable, content-free provider-call evidence.

This PR does not import the private advisory_model_once.py bridge because the currently exposed production runners are typed for repository audits, backend-architect decisions, and bounded artifact generation—not short-form YouTube replies. The next RedDog slice should expose a provider-neutral reply runner that consumes preconfigured daemon policy and returns reply text plus a durable call receipt. 012 remains out of the per-comment loop.

Validation

  • python -m pytest modules/communication/video_comments/tests/test_reply_context_pipeline.py modules/communication/video_comments/tests/test_ytr1_runtime_hardening.py modules/communication/video_comments/tests/test_classifier_pipeline.py -q — 23 passed
  • python -m py_compile on the three changed runtime modules
  • git diff --check
  • WSP-97 repository evidence receipt — compliant, 0 violations

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