From 584ddbf35a59b5e876247e23aa0acad51f77cdb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Sat, 26 Sep 2026 21:52:14 +0200 Subject: [PATCH] Add real Codex integration check --- checks/default.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/checks/default.nix b/checks/default.nix index 767a31e3f43dedb7e46196e8601c7b7475359f24..ed1ee2e53b3282ad60d17aa7cf883c329c1e218e 100644 --- a/checks/default.nix +++ b/checks/default.nix @@ -244,6 +244,41 @@ in grep -qxF "CLAUDE_CONFIG_DIR=$HOME/odd \"dir\"/\$(touch injected)" $STUB_LOG.env || fail "$(cat $STUB_LOG.env)" ''; + # The stubs only prove what the launcher hands over; this proves the real Codex + # reads it: AGENTS.md, linked skills and the settings profile all reach the prompt. + codex-integration = + let + env = mkEnvironment { + inherit pkgs; + modules = [ + { + codex.enable = true; + instructions.probe.text = "PROBE_INSTRUCTION_MARKER"; + skills.packages = [ + (mkSkill { + inherit pkgs; + name = "probe"; + src = pkgs.writeTextDir "SKILL.md" '' + --- + name: probe + description: PROBE_SKILL_MARKER use when probing + --- + ''; + }) + ]; + codex.settings.developer_instructions = "PROBE_PROFILE_MARKER"; + launchers.codex-probe.agent = "codex"; + } + ]; + }; + in + runTest "codex-integration" '' + ${env.launchers.codex-probe}/bin/codex-probe debug prompt-input hi >prompt.json + for m in PROBE_INSTRUCTION_MARKER PROBE_SKILL_MARKER PROBE_PROFILE_MARKER; do + grep -q $m prompt.json || fail "codex prompt lacks $m" + done + ''; + skill-without-skill-md = pkgs.testers.testBuildFailure (mkSkill { inherit pkgs; name = "broken";