Skip to content

2026-104: fix(dispatch): fail closed on unverified OpenCode models - #104

Merged
Ivory2024 merged 5 commits into
mainfrom
fm/opencode-free-model-health-gate-namespace-20261007-w9
Oct 7, 2026
Merged

Ivory2024 merged 5 commits into
mainfrom
fm/opencode-free-model-health-gate-namespace-20261007-w9

Conversation

@Ivory2024

Copy link
Copy Markdown
Owner

Intent

Reliability defect (P1 near-P0). The OpenCode free-model health gate silently fails open because of a namespace mismatch.

  • Catalog identity: opencode-free/<model>
  • Dispatch identity: opencode/<model>
  • Result: catalog lookup misses and fm-spawn prints cannot verify ... model not tracked, then proceeds.

If the gate exists to block dead/expired free models, not tracked must NOT be treated as a normal pass. A printed warning is not evidence the gate worked.

What Changed

  • Map opencode/ and opencode-go/ dispatch IDs to opencode-free/ catalog IDs, requiring exactly one matching health entry.
  • Refuse OpenCode dispatch when the health catalog is missing, unreadable, or lacks the model; continue refusing inactive or early-terminated models and warn on expiring entries.
  • Update dispatch guidance and regression coverage for namespace mapping, fail-closed behavior, expiry warnings, and non-OpenCode dispatch.

Risk Assessment

✅ Low: The gate now maps both supported dispatch namespaces to the catalog identity and refuses missing or unresolved entries; tests exercise the behavior through spawn outcomes.

Testing

Ran the focused spawn behavior script against the real fm-spawn.sh executable with isolated disposable homes, projects, and external-tool doubles. Canonical lookup, fail-closed missing and untracked cases, expiring-model behavior, and ordinary Codex dispatch passed; no UI surface applies.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Dispatch an OpenCode free model using opencode/&lt;model&gt; or opencode-go/&lt;model&gt; when its opencode-free/&lt;model&gt; health entry is active; spawn proceeds. ✅ pass live Focused fm-spawn behavior test
Attempt OpenCode free-model dispatch with a missing or untracked health entry; spawn is refused before metadata publication or agent launch. ✅ pass live Focused fm-spawn behavior test
Dispatch an active model marked is_expiring_soon; spawn proceeds with a warning, and ordinary Codex dispatch remains independent of the OpenCode catalog. ✅ pass live Focused fm-spawn behavior test
Evidence: Focused fm-spawn behavior test
ok - OpenCode refuses dispatch when the health catalog is missing
ok - OpenCode refuses dispatch when the health catalog does not track the selected model
ok - OpenCode dispatch identity resolves to its canonical free-model health identity
ok - OpenCode warns but dispatches when a free-model catalog entry is expiring
ok - ordinary non-OpenCode dispatch remains independent of the free-model catalog
# all fm-spawn-dispatch-profile tests passed

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

🔧 **Rebase** - 3 issues found → auto-fixed ✅
  • ⚠️ bin/fm-spawn.sh - merge conflict rebasing onto origin/fm/opencode-free-model-health-gate-namespace-20261007-w9
  • ⚠️ docs/model-dispatch-rigor.md - merge conflict rebasing onto origin/fm/opencode-free-model-health-gate-namespace-20261007-w9
  • ⚠️ tests/fm-spawn-dispatch-profile.test.sh - merge conflict rebasing onto origin/fm/opencode-free-model-health-gate-namespace-20261007-w9

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Dispatch an OpenCode free model using opencode/&lt;model&gt; or opencode-go/&lt;model&gt; when its opencode-free/&lt;model&gt; health entry is active; spawn proceeds. ✅ pass live Focused fm-spawn behavior test
Attempt OpenCode free-model dispatch with a missing or untracked health entry; spawn is refused before metadata publication or agent launch. ✅ pass live Focused fm-spawn behavior test
Dispatch an active model marked is_expiring_soon; spawn proceeds with a warning, and ordinary Codex dispatch remains independent of the OpenCode catalog. ✅ pass live Focused fm-spawn behavior test
  • bash tests/fm-spawn-dispatch-profile.test.sh
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@Ivory2024 Ivory2024 changed the title fix(dispatch): fail closed on unverified OpenCode models 2026-104: fix(dispatch): fail closed on unverified OpenCode models Oct 7, 2026
@Ivory2024
Ivory2024 merged commit 279f062 into main Oct 7, 2026
20 checks passed
Ivory2024 added a commit that referenced this pull request Oct 8, 2026
- contract test: capture the node heredoc through a temp file instead of
  $(...), which stock macOS Bash 3.2 mis-parses as shell when the body
  holds an odd single quote.
- opencode.md: restore the #104 content the #106 merge reverted, dropping
  the dangling docs/supervision-host.md link.
- sessionstart-nudge.md: point the session-start truncation evidence at the
  existing #native-session-start-delivery anchor.
@Ivory2024
Ivory2024 deleted the fm/opencode-free-model-health-gate-namespace-20261007-w9 branch October 10, 2026 12:36
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