{
  "evaluated_at_utc": "2026-10-31T22:53:26.287766+00:00",
  "domain": "Domain 2: rc.d Boot Ordering, Daemon Environment, Config & Health Probes 3x3 Evaluation",
  "endpoint_used": "https://api.typesafe.ai/v1/systemone",
  "requested_model": "jev-1.14.0",
  "elapsed_ms": 263.9,
  "state": {
    "domain": "Domain 2: rc.d Boot Ordering, Daemon Environment, Config & Health Probes 3x3 Evaluation",
    "repositories": {
      "clawdie_iso_commit": "213b1c43b5ea96ea779d87692648c5f0783ff095",
      "colibri_commit": "7ad83bd"
    },
    "auditor_perspective_A_three_auditor_triage": {
      "summary": "Comprehensive 3-auditor service-boundary triage (2-pass Jev 1.14.0 evaluation in service-boundary-3x3-jev.md) scoring current committed state across security boundary, boot/install integration, and operability.",
      "findings": [
        "agent_vault.in line 5 declares '# BEFORE: colibri herdr', whereas colibri_daemon.in line 30 declares '# PROVIDE: colibri_daemon' and no herdr rc.d script exists (herdr is a TUI/workspace binary, not an rc.d daemon). Thus the rcorder edge to Colibri is broken.",
        "agent_vault_health (line 92) only probes http://${agent_vault_host}:${agent_vault_port}/api/status (port 14321) and never verifies that the HTTP/HTTPS MITM proxy listener on ${agent_vault_proxy_port} (port 14322) is bound and accepting connections.",
        "openviking.in line 69 checks 'if [ ! -r \"${openviking_config}\" ]' inside openviking_prestart while running as root before rc.subr su -m privilege drop; a 0600 root:wheel ov.conf passes prestart as root and then fails inside the daemon under openviking_user.",
        "sysutils/openviking/Makefile and pkg-plist do not install /usr/local/etc/openviking/ov.conf.sample (@sample etc/openviking/ov.conf.sample), even though openviking_prestart requires /usr/local/etc/openviking/ov.conf and FreeBSD requires storage.agfs.pathlock.provider = 'memory' (scripts/poudriere/README.md line 94).",
        "openviking.in and sova.in omit '# BEFORE: colibri_daemon' and omit '/usr/bin/env HOME=...' in command_args, unlike agent_vault.in line 34 which explicitly sets '/usr/bin/env HOME=${agent_vault_data_dir}'."
      ]
    },
    "auditor_perspective_B_pragmatic_prioritizer": {
      "summary": "Pragmatic engineering prioritization focusing on minimal, deterministic, fail-closed fixes in the port Makefiles, pkg-plist, and rc.d scripts without over-engineering.",
      "priorities": [
        "P1 (Boot ordering & daemon environment): Fix agent_vault.in line 5 from '# BEFORE: colibri herdr' to '# BEFORE: colibri_daemon', add '# BEFORE: colibri_daemon' to openviking.in and sova.in so rcorder places all three local backing services before colibri_daemon when enabled, and pass '/usr/bin/env HOME=${openviking_data_dir}' in openviking.in and '/usr/bin/env HOME=${sova_store}' in sova.in so su -m never leaks root's HOME or /nonexistent.",
        "P2 (OpenViking sample config & service-UID readability): Ship files/ov.conf.sample with storage.agfs.pathlock.provider = 'memory' in sysutils/openviking/Makefile + '@sample etc/openviking/ov.conf.sample' in pkg-plist, and verify readability as ${openviking_user} in openviking_prestart using 'su -m \"${openviking_user}\" -c \"test -r \\\"\\$1\\\"\" -- \"${openviking_config}\"'.",
        "P3 (Dual-listener health & port validation): Validate in agent_vault_prestart that agent_vault_port and agent_vault_proxy_port are numeric 1..65535 and distinct, and extend agent_vault_health to probe both the API status endpoint (:14321/api/status) and the proxy listener (:14322 via nc -z)."
      ]
    },
    "codebase_evidence": {
      "colibri_daemon_in": {
        "path": "colibri/packaging/freebsd/port/sysutils/colibri/files/colibri_daemon.in",
        "line_30": "# PROVIDE: colibri_daemon",
        "line_31": "# REQUIRE: LOGIN cleanvar tailscaled",
        "line_270_275": "Uses 'su -m \"${colibri_daemon_user}\" -c ...' to probe the Unix socket as the service UID when invoked by root.",
        "herdr_rcd": "None \u2014 sysutils/herdr ships only the TUI/workspace orchestrator binary (/usr/local/bin/herdr), no rc.d service."
      },
      "agent_vault_in": {
        "path": "clawdie-iso/packaging/freebsd/ports/sysutils/agent-vault/files/agent_vault.in",
        "line_3_6": "# PROVIDE: agent_vault / # REQUIRE: NETWORKING / # BEFORE: colibri herdr / # KEYWORD: shutdown",
        "line_24_25": ": ${agent_vault_port:=\"14321\"} and : ${agent_vault_proxy_port:=\"14322\"}",
        "line_34": "command_args=\"-f -p ${pidfile} -o ${agent_vault_log} /usr/bin/env HOME=${agent_vault_data_dir} AGENT_VAULT_ALLOW_PRIVATE_RANGES=${agent_vault_allow_private_ranges} ${agent_vault_binary} server start --foreground --host ${agent_vault_host} --port ${agent_vault_port} --proxy-port ${agent_vault_proxy_port}\"",
        "line_52_89": "agent_vault_prestart checks loopback bind, avbroker user/group, symlink refusal, and 0700/0600 ownership, but does not validate numeric 1..65535 or distinctness of agent_vault_port and agent_vault_proxy_port.",
        "line_91_93": "agent_vault_health runs 'fetch -q -T 5 -o /dev/null \"http://${agent_vault_host}:${agent_vault_port}/api/status\"' \u2014 does not check ${agent_vault_proxy_port}."
      },
      "openviking_in_and_port": {
        "rcd_path": "clawdie-iso/packaging/freebsd/ports/sysutils/openviking/files/openviking.in",
        "makefile_path": "clawdie-iso/packaging/freebsd/ports/sysutils/openviking/Makefile",
        "plist_path": "clawdie-iso/packaging/freebsd/ports/sysutils/openviking/pkg-plist",
        "line_3_5": "# PROVIDE: openviking / # REQUIRE: NETWORKING / # KEYWORD: shutdown (no # BEFORE: colibri_daemon)",
        "line_20": ": ${openviking_config:=\"/usr/local/etc/openviking/ov.conf\"}",
        "line_30": "command_args=\"-f -p ${pidfile} -o ${openviking_log} ${openviking_binary} --config ${openviking_config} --host ${openviking_bind%:*} --port ${openviking_bind##*:}\" (missing /usr/bin/env HOME=${openviking_data_dir})",
        "line_69_72": "if [ ! -r \"${openviking_config}\" ]; then ... (runs as root in start_precmd, does not test readability as ${openviking_user} via su -m)",
        "sample_config_gap": "Makefile and pkg-plist do not install etc/openviking/ov.conf.sample; scripts/poudriere/README.md line 94 documents that FreeBSD requires storage.agfs.pathlock.provider = \"memory\" in ov.conf because Linux F_OFD_SETLK OFD locks are unsupported."
      },
      "sova_in_and_port": {
        "rcd_path": "clawdie-iso/packaging/freebsd/ports/databases/oxigraph/files/sova.in",
        "makefile_path": "clawdie-iso/packaging/freebsd/ports/databases/oxigraph/Makefile",
        "plist_path": "clawdie-iso/packaging/freebsd/ports/databases/oxigraph/pkg-plist",
        "line_3_5": "# PROVIDE: sova / # REQUIRE: NETWORKING / # KEYWORD: shutdown (no # BEFORE: colibri_daemon)",
        "line_28": "command_args=\"-f -p ${pidfile} -o ${sova_log} ${sova_binary} serve --location ${sova_store} --bind ${sova_bind}\" (missing /usr/bin/env HOME=${sova_store})",
        "line_100_102": "sova_health runs 'fetch -q -T 5 -o /dev/null \"http://${sova_bind}/query?query=ASK%7B%7D\"'"
      }
    }
  },
  "questions": {
    "agent_vault_rcd__rcorder_and_env_verdict": {
      "type": "choice",
      "instructions": "Evaluate agent_vault.in rcorder headers and daemon environment setup against colibri_daemon.in.",
      "criteria": {
        "rcorder_satisfied_and_env_complete": "BEFORE tokens match real rc.d providers and HOME environment is properly isolated",
        "stale_before_tokens_colibri_herdr_need_colibri_daemon": "HOME=${agent_vault_data_dir} is properly set via /usr/bin/env, but '# BEFORE: colibri herdr' targets non-existent rc.d providers and must be '# BEFORE: colibri_daemon'",
        "missing_home_env_and_broken_privilege_drop": "Both HOME environment isolation and privilege drop are broken"
      }
    },
    "agent_vault_rcd__health_and_config_score": {
      "type": "score",
      "instructions": "Score agent_vault.in prestart port validation and health probe coverage across both the API listener (:14321) and proxy listener (:14322) in current committed code (213b1c4).",
      "criteria": [
        "0: broken or contradicted by codebase evidence",
        "1: substantial runtime, ordering, or config/health gaps remain",
        "2: mostly sound rc.d unit, but specific ordering, env, config, or health probe gaps remain",
        "3: complete, deterministic, and runtime-verified across ordering, env, config, and health"
      ]
    },
    "agent_vault_rcd__remediation_action": {
      "type": "choice",
      "instructions": "Select the exact remediation action required for agent_vault.in.",
      "criteria": {
        "no_changes_needed": "Leave agent_vault.in unchanged",
        "fix_before_colibri_daemon_validate_distinct_ports_and_probe_proxy_listener": "Change '# BEFORE: colibri herdr' to '# BEFORE: colibri_daemon', validate in prestart that agent_vault_port and agent_vault_proxy_port are numeric 1..65535 and distinct, and probe both /api/status and proxy port in agent_vault_health",
        "replace_daemon_with_background_subshell": "Remove daemon(8) wrapper"
      }
    },
    "openviking_rcd_and_config__rcorder_and_env_verdict": {
      "type": "choice",
      "instructions": "Evaluate openviking.in rcorder headers and daemon environment isolation in current committed code (213b1c4).",
      "criteria": {
        "rcorder_and_home_env_complete": "Declares '# BEFORE: colibri_daemon' and sets HOME=${openviking_data_dir}",
        "missing_before_colibri_daemon_and_missing_env_home": "Omits '# BEFORE: colibri_daemon' and omits '/usr/bin/env HOME=${openviking_data_dir}' in command_args so su -m inherits caller HOME",
        "passes_conflicting_daemon_u_flag": "Passes -u to daemon(8) conflicting with rc.subr"
      }
    },
    "openviking_rcd_and_config__health_and_config_score": {
      "type": "score",
      "instructions": "Score sysutils/openviking config packaging (ov.conf.sample with FreeBSD memory pathlock), service-UID config readability check in openviking_prestart, and health probe in current committed code (213b1c4).",
      "criteria": [
        "0: broken or contradicted by codebase evidence",
        "1: substantial runtime, ordering, or config/health gaps remain",
        "2: mostly sound rc.d unit, but specific ordering, env, config, or health probe gaps remain",
        "3: complete, deterministic, and runtime-verified across ordering, env, config, and health"
      ]
    },
    "openviking_rcd_and_config__remediation_action": {
      "type": "choice",
      "instructions": "Select the exact remediation action required for openviking.in, Makefile, and pkg-plist.",
      "criteria": {
        "no_changes_needed": "Leave sysutils/openviking unchanged",
        "ship_ov_conf_sample_memory_pathlock_su_test_r_and_env_home": "Install etc/openviking/ov.conf.sample with storage.agfs.pathlock.provider='memory' via @sample in pkg-plist, test readability as openviking_user via su -m in openviking_prestart, set /usr/bin/env HOME=${openviking_data_dir}, and add '# BEFORE: colibri_daemon'",
        "run_openviking_as_root": "Run openviking-server as root to avoid config permission issues"
      }
    },
    "sova_rcd_and_ordering__rcorder_and_env_verdict": {
      "type": "choice",
      "instructions": "Evaluate sova.in rcorder headers and daemon environment isolation relative to colibri_daemon.in in current committed code (213b1c4).",
      "criteria": {
        "rcorder_and_home_env_complete": "Declares '# BEFORE: colibri_daemon' and sets HOME=${sova_store}",
        "missing_before_colibri_daemon_and_missing_env_home": "Omits '# BEFORE: colibri_daemon' and omits '/usr/bin/env HOME=${sova_store}' in command_args under su -m",
        "missing_loopback_and_symlink_guards": "Lacks loopback bind check and symlink refusal"
      }
    },
    "sova_rcd_and_ordering__health_and_config_score": {
      "type": "score",
      "instructions": "Score sova.in prestart validation, store/log permissions, and SPARQL ASK{} health probe in current committed code (213b1c4).",
      "criteria": [
        "0: broken or contradicted by codebase evidence",
        "1: substantial runtime, ordering, or config/health gaps remain",
        "2: mostly sound rc.d unit, but specific ordering, env, config, or health probe gaps remain",
        "3: complete, deterministic, and runtime-verified across ordering, env, config, and health"
      ]
    },
    "sova_rcd_and_ordering__remediation_action": {
      "type": "choice",
      "instructions": "Select the exact remediation action required for sova.in.",
      "criteria": {
        "no_changes_needed": "Leave sova.in unchanged",
        "add_before_colibri_daemon_env_home_and_port_validation": "Add '# BEFORE: colibri_daemon', prefix command_args with '/usr/bin/env HOME=${sova_store}', and validate numeric bind port in sova_prestart while keeping the ASK{} health probe",
        "expose_sova_on_all_interfaces": "Default sova_allow_nonloopback to YES"
      }
    }
  },
  "raw_response": {
    "model": "jev-1.14.0",
    "answers": {
      "agent_vault_rcd__rcorder_and_env_verdict": {
        "type": "choice",
        "choice": "stale_before_tokens_colibri_herdr_need_colibri_daemon",
        "confidence": 1.0,
        "probabilities": {
          "rcorder_satisfied_and_env_complete": 0.0,
          "stale_before_tokens_colibri_herdr_need_colibri_daemon": 1.0,
          "missing_home_env_and_broken_privilege_drop": 0.0
        }
      },
      "agent_vault_rcd__health_and_config_score": {
        "type": "score",
        "score": 1.14,
        "confidence": 0.7,
        "legend": {
          "0": "0: broken or contradicted by codebase evidence",
          "1": "1: substantial runtime, ordering, or config/health gaps remain",
          "2": "2: mostly sound rc.d unit, but specific ordering, env, config, or health probe gaps remain",
          "3": "3: complete, deterministic, and runtime-verified across ordering, env, config, and health"
        },
        "probabilities": {
          "0": 0.08,
          "1": 0.71,
          "2": 0.2,
          "3": 0.01
        }
      },
      "agent_vault_rcd__remediation_action": {
        "type": "choice",
        "choice": "fix_before_colibri_daemon_validate_distinct_ports_and_probe_proxy_listener",
        "confidence": 1.0,
        "probabilities": {
          "no_changes_needed": 0.0,
          "fix_before_colibri_daemon_validate_distinct_ports_and_probe_proxy_listener": 1.0,
          "replace_daemon_with_background_subshell": 0.0
        }
      },
      "openviking_rcd_and_config__rcorder_and_env_verdict": {
        "type": "choice",
        "choice": "missing_before_colibri_daemon_and_missing_env_home",
        "confidence": 1.0,
        "probabilities": {
          "rcorder_and_home_env_complete": 0.0,
          "missing_before_colibri_daemon_and_missing_env_home": 1.0,
          "passes_conflicting_daemon_u_flag": 0.0
        }
      },
      "openviking_rcd_and_config__health_and_config_score": {
        "type": "score",
        "score": 0.72,
        "confidence": 0.6,
        "legend": {
          "0": "0: broken or contradicted by codebase evidence",
          "1": "1: substantial runtime, ordering, or config/health gaps remain",
          "2": "2: mostly sound rc.d unit, but specific ordering, env, config, or health probe gaps remain",
          "3": "3: complete, deterministic, and runtime-verified across ordering, env, config, and health"
        },
        "probabilities": {
          "0": 0.34,
          "1": 0.61,
          "2": 0.04,
          "3": 0.01
        }
      },
      "openviking_rcd_and_config__remediation_action": {
        "type": "choice",
        "choice": "ship_ov_conf_sample_memory_pathlock_su_test_r_and_env_home",
        "confidence": 1.0,
        "probabilities": {
          "no_changes_needed": 0.0,
          "ship_ov_conf_sample_memory_pathlock_su_test_r_and_env_home": 1.0,
          "run_openviking_as_root": 0.0
        }
      },
      "sova_rcd_and_ordering__rcorder_and_env_verdict": {
        "type": "choice",
        "choice": "missing_before_colibri_daemon_and_missing_env_home",
        "confidence": 1.0,
        "probabilities": {
          "rcorder_and_home_env_complete": 0.0,
          "missing_before_colibri_daemon_and_missing_env_home": 1.0,
          "missing_loopback_and_symlink_guards": 0.0
        }
      },
      "sova_rcd_and_ordering__health_and_config_score": {
        "type": "score",
        "score": 1.36,
        "confidence": 0.54,
        "legend": {
          "0": "0: broken or contradicted by codebase evidence",
          "1": "1: substantial runtime, ordering, or config/health gaps remain",
          "2": "2: mostly sound rc.d unit, but specific ordering, env, config, or health probe gaps remain",
          "3": "3: complete, deterministic, and runtime-verified across ordering, env, config, and health"
        },
        "probabilities": {
          "0": 0.05,
          "1": 0.55,
          "2": 0.39,
          "3": 0.01
        }
      },
      "sova_rcd_and_ordering__remediation_action": {
        "type": "choice",
        "choice": "add_before_colibri_daemon_env_home_and_port_validation",
        "confidence": 1.0,
        "probabilities": {
          "no_changes_needed": 0.0,
          "add_before_colibri_daemon_env_home_and_port_validation": 1.0,
          "expose_sova_on_all_interfaces": 0.0
        }
      }
    },
    "usage": {
      "input_tokens": 3763,
      "output_tokens": 560
    }
  }
}
