Docs/Skills and code/scripts/
scripts/test-balloon-channel-queues.js
import { scoreChannelQueues } from "../src/analysis/channel-queues.js";
const now = new Date("2026-10-12T00:00:00.000Z");
const makeVideo = (id, daysAgo, views) => ({
video_id: id, title: `Synthetic example ${id}`, view_count: views,
published_at_normalized: new Date(now.getTime() - daysAgo * 86400000).toISOString().slice(0, 10),
published_at_precision: "date"
});
const channels = [
{
channel_url: "https://www.youtube.com/@sample-specialist", name: "Sample Specialist", sampled_video_count: 15,
qualification_assessment: { classification: "core", confidence: 0.9, relevance_score: 95, focus_specificity: 85, focus_summary: "Close readings of systems designs", topic_tags: ["systems design", "technology education"], formats: ["video essays"], supporting_evidence: ["Description and recurring titles support configured ecosystem focus"], counter_evidence: [], uncertainty_flags: [], source: "llm" },
joined_date: "2016-01-01", total_view_count: 12000000, video_count: 180, description: "A focused educational technology channel.",
profile: JSON.stringify({ channel_summary: "A channel focused on close readings of systems designs.", vocabulary_proposals: { themes: [{ name: "systems design" }, { name: "composition" }], entities: [{ name: "Caravaggio" }] } }),
priority: { specialist_score: 86, breakthrough_score: 74, novelty_score: 55, exploration_score: 25, evidence_quality_score: 78, confidence: 0.82, embedded_video_count: 12, sampled_video_count: 15, performance_video_count: 8 },
videos: [...Array.from({ length: 4 }, (_, i) => makeVideo(`recent-${i}`, 10 + i * 10, 12000)), ...Array.from({ length: 5 }, (_, i) => makeVideo(`older-${i}`, 140 + i * 35, 1200))]
},
{ channel_url: "https://www.youtube.com/@unknown", name: "Unknown", videos: [], sampled_video_count: 0, priority: {} }
];
const result = scoreChannelQueues({ channels, referenceSeeds: [{ handle: "SampleSpecialist", name: "Sample Specialist" }], now });
for (const queue of result.queues) {
console.log(`\n${queue.label}`);
for (const channel of channels) {
const rating = result.ratings.find(row => row.channel_url === channel.channel_url && row.queue.queue_key === queue.key).queue;
console.log(` ${channel.name}: ${rating.score ?? "UNKNOWN"} | ${rating.status} | confidence ${rating.confidence} | ${rating.reason_codes.join(",")}`);
}
}
console.log("\nBalloon test completed: synthetic data only; no database reads or writes.");
Shown as it is in the repository at build time (2026-11-03); the home directory appears as <home>. If this page and the file differ, the file is right. Back to the catalogue.