/** * Fix "Architectural Boundaries" Blog - Remove inst_017 Violations * Replace absolute guarantee language with evidence-based alternatives */ const { MongoClient } = require('mongodb'); const DEV_URI = process.env.MONGODB_URI || 'mongodb://localhost:27017'; const DEV_DB = process.env.MONGODB_DB || 'tractatus_dev'; const SLUG = 'why-ai-safety-requires-architectural-boundaries-not-just-training'; // Replacement mapping: prohibited term ā evidence-based alternative const REPLACEMENTS = [ { old: 'training alone cannot provide the guarantees needed for high-stakes systems', new: 'training alone cannot provide the level of assurance needed for high-stakes systems', context: 'Opening paragraph - claims about training limitations' }, { old: 'Training creates statistical patterns, not logical guarantees', new: 'Training creates statistical patterns, not deterministic constraints', context: 'Training Paradox section - explaining fundamental limitation' }, { old: 'only architecture provides verifiable guarantees', new: 'only architecture provides verifiable enforcement', context: 'Conclusion - architectural benefits' } ]; async function fixBlog() { const client = new MongoClient(DEV_URI); try { console.log('š§ Fixing "Architectural Boundaries" Blog\n'); console.log('ā'.repeat(70)); await client.connect(); const db = client.db(DEV_DB); const collection = db.collection('blog_posts'); // Fetch the blog const blog = await collection.findOne({ slug: SLUG }); if (!blog) { console.log(`\nā Blog not found: ${SLUG}`); return false; } console.log(`\nā Found blog: "${blog.title}"`); console.log(` Author: ${blog.author.name} (${blog.author.type})`); console.log(` Current status: ${blog.status}`); let updatedContent = blog.content; let changeCount = 0; console.log('\nš Applying replacements:\n'); REPLACEMENTS.forEach((replacement, idx) => { if (updatedContent.includes(replacement.old)) { updatedContent = updatedContent.replace(replacement.old, replacement.new); changeCount++; console.log(` ${idx + 1}. ā ${replacement.context}`); console.log(` OLD: "${replacement.old}"`); console.log(` NEW: "${replacement.new}"\n`); } else { console.log(` ${idx + 1}. ā ļø Pattern not found: ${replacement.context}`); console.log(` Searched for: "${replacement.old}"\n`); } }); if (changeCount === 0) { console.log('ā ļø No changes made - patterns not found in content'); return false; } // Add banner explaining the fix const banner = `
This blog was originally AI-curated in October 2025 and contained absolute assurance language ("guarantees") that violated inst_017. The content has been revised to use evidence-based language:
This demonstrates governance working retrospectively. When new rules are added (inst_017 in late October 2025), they can be applied to existing content. Rather than unpublish or silently edit, we're documenting the revision process transparently.
Note: The revised language is more precise and accurate. "Deterministic constraints" better describes what architecture provides than "guarantees," which implies perfection.