MCPcopy
hub / github.com/neomjs/neo / formatProbeResult

Function formatProbeResult

ai/scripts/diagnostics/bootstrapCodexSandbox.mjs:210–236  ·  view source on GitHub ↗
(result)

Source from the content-addressed store, hash-verified

208 * @returns {String} Multi-line report.
209 */
210export function formatProbeResult(result) {
211 const lines = [];
212
213 if (result.ok) {
214 lines.push('Codex sandbox SQLite probe: ok');
215 lines.push(`logical path: ${result.paths.probePath}`);
216 lines.push(`physical path: ${result.paths.physicalProbePath}`);
217 if (result.paths.symlinkTarget) lines.push(`symlink target: ${result.paths.symlinkTarget}`);
218 lines.push('cleanup: transient SQLite probe artifacts removed');
219 return lines.join('\n');
220 }
221
222 lines.push('Codex sandbox SQLite probe: failed');
223 lines.push(`logical path: ${result.paths.probePath}`);
224 lines.push(`physical path: ${result.paths.physicalProbePath}`);
225 if (result.paths.symlinkTarget) lines.push(`symlink target: ${result.paths.symlinkTarget}`);
226 lines.push(`sandbox mode: ${result.sandboxMode}`);
227 lines.push(`sqlite error: ${result.error.code}: ${result.error.message}`);
228 lines.push('remediation: rerun the probe or affected test with sandbox_permissions=require_escalated, or replace the sqlite symlink with a local writable path if clone-local test DBs are intentional.');
229 if (result.cleanup.failed.length) {
230 lines.push(`cleanup warning: ${result.cleanup.failed.map(item => `${item.path} (${item.message})`).join('; ')}`);
231 } else {
232 lines.push('cleanup: transient SQLite probe artifacts removed');
233 }
234
235 return lines.join('\n');
236}
237
238/**
239 * @summary CLI entry point.

Callers 2

mainFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected