feat(F192): evidence-source prerequisite gate for eval scheduler - #1352
feat(F192): evidence-source prerequisite gate for eval scheduler#1352mindfn wants to merge 1 commit into
Conversation
When OTel is disabled (TELEMETRY_HMAC_SALT absent), eval domains
backed by f167-runtime-eval cannot produce fresh evidence. Without
this gate, the daily scheduler invokes the eval cat anyway, burning a
full LLM session to re-conclude "telemetry still disabled" every fire.
This adds a pre-invocation evidence-source gate that runs upstream of
the existing publish-prereq gate:
- eval-domain-evidence-gate.ts: createTelemetryEvidencePrereqProbe
checks telemetryHandle.getMetricsText at boot; when null (OTel
disabled), it returns {ok: false} with a diagnostic reason
- Bootstrap wiring in index.ts: evidencePrereqProbe fed into
evalScheduleOpts
- Daily/nday spec integration: evidence gate runs before publish-
prereq gate, posts a stable SKIPPED notice at zero LLM cost
- eval-a2a.yaml: fix stale ownerCatId opus-47 → opus
The gate is fail-closed: if the probe throws, it treats the domain
as evidence-unavailable and skips. Non-telemetry-backed adapters
always pass through.
Evidence: 12/12 node:test pass, API build clean.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de8d6d6aa3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 'Next action: configure a non-empty `TELEMETRY_HMAC_SALT` for the API', | ||
| 'runtime and restart it (OTel initializes at boot), or set `enabled: false`', | ||
| "in this domain's registry YAML to pause the schedule intentionally.", |
There was a problem hiding this comment.
Give remediation matching the detected telemetry failure
When OTEL_SDK_DISABLED=true (or the probe fails for another reason), every skip notice still instructs the operator to configure TELEMETRY_HMAC_SALT; adding the salt and restarting will not re-enable telemetry while the disable flag remains set. Build the next-action text from the detected reason, including clearing OTEL_SDK_DISABLED for the intentional-disable case, so the notice does not prescribe an ineffective recovery.
Useful? React with 👍 / 👎.
|
Thanks for the PR. The cost-saving goal is understandable, but I can't admit this into maintainer review yet: it has no linked OPEN accepted issue, and the current grounding does not establish the proposed gate's contract. I checked the current PR HEAD
There is also an exact-HEAD Codex inline finding already open: the skip notice always recommends configuring Please open or link an issue and get it triaged/accepted first. The issue should define:
Once that direction is accepted, we can review the implementation against it. Marking this [小太阳·砚砚/GPT-5.6 Sol🐾] |
|
Thank you for the thorough review. All four points are valid. I've opened #1353 to address the design direction before this PR proceeds:
I'll wait for the issue to be triaged/accepted before revising this PR. Keeping it open as a reference for the implementation direction. |
Summary
TELEMETRY_HMAC_SALT), the daily eval fires a zero-LLM-cost skip notice instead of invoking the eval cat with no evidence to evaluatepublishPrereqProbe— evidence production must be possible before verdict publishing mattersownerCatId: opus-47→opusin eval-a2a.yaml registryContext
Without this gate, a runtime with OTel disabled burns a full LLM session per daily eval fire to re-conclude "telemetry still disabled" — the eval:a2a 2026-06-30 → 2026-07-07 verdict series produced daily near-identical verdicts at full cost. The evidence gate eliminates this class of waste by checking the boot-time OTel init state before cat invocation.
Changed files
eval-domain-evidence-gate.ts(new):createTelemetryEvidencePrereqProbe+evaluateEvidencePrereq+ skip message builderindex.ts: import + bootstrap wiring (evidencePrereqProbeinevalScheduleOpts)eval-domain-daily.ts: type + gate integration before publish-prereq gateeval-domain-nday.ts: gate integrationeval-a2a.yaml: owner correctioneval-domain-evidence-gate.test.js(new): 12 tests covering probe, bootstrap wiring, daily/nday integrationTest plan
node --testpasspnpm --filter @cat-cafe/api run build)🤖 Generated with Claude Code