M checks/default.nix => checks/default.nix +35 -0
@@ 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";