Skip to content

fix(spawn): enforce exact reasoning effort for harness launches - #1993

Open
coreldh wants to merge 5 commits into
kunchenguid:mainfrom
coreldh:fm/fm-spawn-codex-max-effort
Open

fix(spawn): enforce exact reasoning effort for harness launches#1993
coreldh wants to merge 5 commits into
kunchenguid:mainfrom
coreldh:fm/fm-spawn-codex-max-effort

Conversation

@coreldh

@coreldh coreldh commented Aug 9, 2026

Copy link
Copy Markdown

Intent

Ensure fm-spawn never records a requested reasoning effort unless its selected harness launches with that exact effort, or refuse before metadata and launch. Codex CLI 0.147.0 was empirically verified to accept model_reasoning_effort=max for gpt-5.6-luna, so Codex must emit max rather than silently omit or remap it. Apply the same fail-closed invariant to lower-ceiling and no-effort-flag adapters, without changing config/crew-dispatch.json, and publish only through no-mistakes. Kun retains merge authority.

What Changed

  • Enforce exact requested reasoning-effort propagation in fm-spawn, including Codex max, with fail-closed refusal before metadata and launch for unsupported adapter levels.
  • Align dispatch validation, harness guidance, and regression fixtures with the fail-closed effort contract while preserving config/crew-dispatch.json unchanged.

Risk Assessment

✅ Low: The authorized fixes now align dispatch validation, spawn behavior, documentation, and Muse regressions with the fail-closed effort invariant; the remaining duplicated effort lists are mechanically consistent and do not create a demonstrated reachable defect.

Testing

All focused suites completed with exit 0, demonstrating Codex max emission and fail-closed unsupported-effort refusal before metadata/launch; bootstrap also produced its terminal validation result.

Evidence: Focused regression evidence
Muse: max refuses before metadata/launch. Dispatch: Codex emits max model_reasoning_effort; unsupported adapters refuse before metadata/launch. Bootstrap validator exits 0.
- Outcome: 🔧 2 issues found → auto-fixed ✅ across 2 runs (25m9s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 3 issues found → auto-fixed ✅
  • 🚨 bin/fm-spawn.sh:1305 - The new Codex branch accepts and emits max at fm-spawn.sh:1305, but the shared dispatch validator still rejects codex:max at bin/fm-bootstrap.sh:1005. A dispatch-selected Codex max request therefore cannot reach fm-spawn; update the earliest shared validation boundary if dispatch profiles are required to express this newly supported effort. This conflicts with the required criterion that Codex must emit max.
  • ⚠️ bin/fm-spawn.sh:1325 - Muse max now correctly refuses instead of mapping to ultra at fm-spawn.sh:1325, but tests/fm-muse-harness.test.sh:255 still requires --reasoning-effort 'ultra' and will fail against the new fail-closed contract. Update that regression to assert refusal before metadata and launch.
  • ⚠️ .agents/skills/harness-adapters/SKILL.md:151 - The edited harness guidance still contains the obsolete rule at .agents/skills/harness-adapters/SKILL.md:151 that fm-spawn records unsupported effort in metadata and omits the launch flag. That directly contradicts the required fail-closed invariant and the newly updated adapter table; replace it with the refusal-before-metadata behavior.

🔧 Fix: Fixed dispatch validation and Muse fail-closed regression
✅ Re-checked - no issues remain.

🔧 **Test** - 2 issues found → auto-fixed ✅
  • ⚠️ tests/fm-muse-harness.test.sh - Muse fixture could not execute: available bash is Mach-O and exits 137 before detection.
  • ⚠️ tests/fm-bootstrap.test.sh - Bootstrap test was interrupted without a terminal summary.
  • bash tests/fm-spawn-dispatch-profile.test.sh
  • bash tests/fm-muse-harness.test.sh
  • bash tests/fm-bootstrap.test.sh (interrupted)

🔧 Fix: Muse fixtures now use executable Perl ancestry and both focused regressions pass
✅ Re-checked - no issues remain.

  • bash tests/fm-muse-harness.test.sh
  • bash tests/fm-spawn-dispatch-profile.test.sh
  • bash tests/fm-bootstrap.test.sh
  • Verified config/crew-dispatch.json is unchanged in the target diff.
✅ **Document** - passed

✅ No issues found.

🔧 **Lint** - 1 issue found → auto-fixed ✅
  • ⚠️ linter found issues (exit code 1)

🔧 Fix: Suppress intentional Perl interpolation ShellCheck warnings
✅ Re-checked - no issues remain.

✅ **Push** - passed

✅ No issues found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant