From 7d657a4d3e8736c7fdce8eb39b0c71daba6cea54 Mon Sep 17 00:00:00 2001 From: rUv Date: Sat, 7 Feb 2026 16:37:31 +0000 Subject: [PATCH] Checkpoint: File edits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic checkpoint created by Claude Code - Branch: feature/codex-integration - Timestamp: 2026-02-07T16:37:31Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- v3/@claude-flow/codex/src/migrations/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/v3/@claude-flow/codex/src/migrations/index.ts b/v3/@claude-flow/codex/src/migrations/index.ts index 11fdb0fa59..0666700494 100644 --- a/v3/@claude-flow/codex/src/migrations/index.ts +++ b/v3/@claude-flow/codex/src/migrations/index.ts @@ -497,9 +497,9 @@ function extractBehavioralRules(content: string): string[] { // Look for Behavioral Rules section const behavioralMatch = content.match(/##\s*Behavioral\s*Rules[^\n]*\n([\s\S]*?)(?=\n##|\n#\s|$)/i); - if (behavioralMatch) { - const lines = behavioralMatch[1].split('\n'); - for (const line of lines) { + if (behavioralMatch && behavioralMatch[1]) { + const ruleLines = behavioralMatch[1].split('\n'); + for (const line of ruleLines) { const trimmed = line.trim(); if (trimmed.startsWith('- ')) { rules.push(trimmed.substring(2)); @@ -511,9 +511,9 @@ function extractBehavioralRules(content: string): string[] { // Also look for Security Rules const securityMatch = content.match(/##\s*Security\s*Rules?[^\n]*\n([\s\S]*?)(?=\n##|\n#\s|$)/i); - if (securityMatch) { - const lines = securityMatch[1].split('\n'); - for (const line of lines) { + if (securityMatch && securityMatch[1]) { + const securityLines = securityMatch[1].split('\n'); + for (const line of securityLines) { const trimmed = line.trim(); if (trimmed.startsWith('- ')) { rules.push(trimmed.substring(2));