Skip to content

feat: jev brief readiness sensor on peer dispatch (0.0.58) - #61

Merged
okisdev merged 4 commits into
mainfrom
feat/jev-brief-sensor
Sep 20, 2026
Merged

okisdev merged 4 commits into
mainfrom
feat/jev-brief-sensor

Conversation

@okisdev

@okisdev okisdev commented Sep 20, 2026

Copy link
Copy Markdown
Owner

summary

  • adds an optional dispatch time check that asks TypeSafe AI's Jev (jev-1.13.0, a typed decision model that returns yes or no probabilities and no text) four fixed questions about every codex:codex-rescue and grok:grok-rescue brief of at least 200 characters: does it mix diagnosis with a fix, carry style intent only as prose, name no checkable completion condition, or ask for a sweep without named paths. an answer at or above 0.7 adds one brief-sensor.readiness-advisory line with the probability and the remedy to the orchestrator's context
  • advisory tier only: the hook emits additionalContext and never a permissionDecision, so it cannot approve, deny or hold a dispatch. off unless TYPESAFE_API_KEY is in the session environment; a missing key, a 2.5 second timeout, any status other than 200 and a malformed body all produce no output. no retry, nothing written to disk, no new dependency (built in fetch)
  • jev is not a lane: no agentic CLI, no sandbox, no text output, so no companion, no routing table row and no verified-versions.json key. the check is its own brief-sensor.mjs PreToolUse hook because worker-lifecycle.mjs is synchronous, fails closed on a throw in PreToolUse, and returns early for peer wrappers with no advisory path
  • reviewable logic lives in plugins/fusion/scripts/lib/jev.mjs and plugins/fusion/scripts/brief-sensor.mjs; the rest is wiring (hooks.json, message registry, verification manifest), docs (README safety model, SECURITY.md data boundary) and the 0.0.58 release (changelog plus the seven version fields)

test plan

already verified

  • npm test on the feature tree before the release commit -> 1175 tests, 1174 pass, 0 fail, 1 skipped (the existing skip)
  • node --test tests/plugin-versions.test.mjs tests/verified-versions.test.mjs tests/routing-policy.test.mjs after the version bump -> 10/10 pass
  • TYPESAFE_API_KEY=leak-check node --test tests/jev.test.mjs tests/brief-sensor.test.mjs tests/user-messages.test.mjs -> 23/23 pass; the suites scrub the inherited key and endpoint and only talk to a local node:http server
  • live call against the real API through the hook script: a brief that mixes diagnosis, a fix and prose only style intent produced one advisory with p=0.93, 0.84 and 0.91; a spec grade brief produced no output; non peer agent, missing key, unreachable endpoint and a short prompt all exited 0 with empty stdout
  • threshold replay over this repository's retained briefs: at 0.7, 0 of 21 accepted briefs flagged, 8 of 8 deliberately flawed briefs flagged, 4 clean controls under 0.3, scores stable within about 0.01 across runs, latency p50 about 350ms and p99 about 1300ms over 79 calls

reviewer should verify

  • after the marketplace cache refresh and a session restart with TYPESAFE_API_KEY set, dispatch a brief to codex:codex-rescue that asks to find a cause and fix it in one package; expect one context line ending in [fusion:9825], the dispatch still proceeding, and the inline guard's own context still arriving (how Claude Code aggregates additionalContext from parallel PreToolUse hooks is undocumented)
  • with the key unset, confirm a peer dispatch shows no new output and no added latency

notes

  • the 0.7 threshold is provisional: labeled positives in this repository are scarce, so it rests on handwritten flawed briefs plus the false positive rate on accepted ones
  • the key lives in the session environment: the grok child scrubs it with the other secret bearing variables, while the codex child inherits the environment unchanged, so a codex write shell can read it. SECURITY.md states this
  • live only after marketplace cache refresh plus a session restart

@okisdev
okisdev merged commit 1dca053 into main Sep 20, 2026
6 checks passed
@okisdev
okisdev deleted the feat/jev-brief-sensor branch September 20, 2026 03:01
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