{"record":{"id":"b15fa9c74300c379","repo":"affaan-m/ECC","slug":"ecc-codex-warning-message","errorCode":null,"errorMessage":"[ecc-codex] WARNING: ${message}","messagePattern":"\\[ecc-codex\\] WARNING: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"scripts/codex/merge-codex-config.js","lineNumber":43,"sourceCode":"\nconst ROOT_KEYS = ['approval_policy', 'sandbox_mode', 'web_search', 'notify', 'persistent_instructions'];\nconst TABLE_PATHS = [\n  'features',\n  'profiles.strict',\n  'profiles.yolo',\n  'agents',\n  'agents.explorer',\n  'agents.reviewer',\n  'agents.docs_researcher',\n];\nconst TOML_HEADER_RE = /^[ \\t]*(?:\\[[^[\\]\\n][^\\]\\n]*\\]|\\[\\[[^[\\]\\n][^\\]\\n]*\\]\\])[ \\t]*(?:#.*)?$/m;\n\nfunction log(message) {\n  console.log(`[ecc-codex] ${message}`);\n}\n\nfunction warn(message) {\n  console.warn(`[ecc-codex] WARNING: ${message}`);\n}\n\nfunction getNested(obj, pathParts) {\n  let current = obj;\n  for (const part of pathParts) {\n    if (!current || typeof current !== 'object' || !(part in current)) {\n      return undefined;\n    }\n    current = current[part];\n  }\n  return current;\n}\n\nfunction setNested(obj, pathParts, value) {\n  let current = obj;\n  for (let i = 0; i < pathParts.length - 1; i += 1) {\n    const part = pathParts[i];\n    if (!current[part] || typeof current[part] !== 'object' || Array.isArray(current[part])) {","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/codex/merge-codex-config.js#L25-L61","documentation":"merge-codex-config.js prints `[ecc-codex] WARNING: <message>` through its warn() helper for non-fatal merge conditions encountered while merging ECC config into the Codex config file. The merge continues; the warning flags something the user should review (e.g. an unsafe skip or drift from the recommendation).","triggerScenarios":"Any code path in the merge (notably appendToTable, via the caller chain warn <- appendToTable) that detects a condition it cannot fix automatically, such as a TOML table it cannot safely modify.","commonSituations":"Running the Codex config merge against a hand-edited or non-standard .codex config file where a table is embedded in a larger structure, or running without --update-mcp while drift exists.","solutions":["Read the message after 'WARNING:' to identify the affected config section","Open the target config file and manually add or align the affected keys","Re-run the merge script to confirm the warning disappears","If drift is the cause, re-run with --update-mcp (for MCP-related warnings) to sync to the ECC recommendation"],"exampleFix":"// before (manual review needed)\n$ node scripts/codex/merge-codex-config.js\n[ecc-codex] WARNING: Skipping missing keys for [mcp_servers.x]...\n// after (fix TOML by hand, then rerun)\n$ node scripts/codex/merge-codex-config.js\n[ecc-codex] updated config","handlingStrategy":"validation","validationCode":"// ensure tables have standalone headers before merging\ntoml.parse(configText); // parse first; fix parse/layout issues before running the merge\n","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the Codex config formatted with standalone [table] headers","Review [ecc-codex] WARNING output after every merge run","Prefer regenerating the config via the script over hand edits"],"tags":["codex","config","toml","merge","scripting"],"backgroundTag":"unsupported-config-value","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}