Skip to content

Code does not match site/compliance.html: Benchmark gates per-task floor; if the post-train number drops below the floor, the run fails (exit 3). (CR-A01-010) #89

Open

Description

@cemililik

Wave 0 · theme D0-3: Safety and quality gates: move to fail-closed · highest severity Critical · 2 finding(s) · effort not estimated

Summary

The document states: Benchmark gates per-task floor; if the post-train number drops below the floor, the run fails (exit 3).. Observed in the code: With the shipped default evaluation.auto_revert=false (forgelm/config.py:1191-1194), a failed benchmark gate only logs a WARNING and keeps the model: _apply_benchmark_result returns True (forgelm/trainer.py:1403-1407), TrainResult.success stays True (trainer.py:1602), and the CLI exits 0 (forgelm/cli/_training.py:159-161). I confirmed this with a probe (bench_probe.py in my work dir) that calls ForgeTrainer._apply_benchmark_result with passed=False and auto_revert=False: it returned continue=True, success=True, benchmark_passed=False. Exit 3 happens only when auto_revert is true.

Primary finding

CR-A01-010 — Code does not match site/compliance.html: Benchmark gates per-task floor; if the post-train number drops below the floor, the run fails (exit 3).

severity High · reachability default · intent intended-but-harmful · confidence confirmed · independently confirmed

What happens. Exit code 3 is the public eval-failure contract (_exit_codes.py, error-handling.md). A gate that measures a failure and still returns exit 0 is a gate fail-open (TM-v1 severity hook 3). The code should exit 3 on any failed gate whatever auto_revert says, with auto_revert deciding only whether the artefacts are deleted.

Where.

Evidence.

  • forgelm/config.py:1191-1194; forgelm/trainer.py:1403-1410; forgelm/trainer.py:1602; forgelm/cli/_training.py:159-161

Recommended fix. Fix the code: make a failed benchmark, safety or judge gate set success=False (exit 3) even when auto_revert=false. Until then, add a temporary warning to the card: 'Exit 3 only when evaluation.auto_revert: true; otherwise the failure is logged and the run exits 0.'

Other findings with the same root cause

These close with the same fix; update them in the same pull request.

DOC-D4B08-002 — site/compliance.html: false claim — Benchmark gates per-task floor; if the post-train number drops below the floor, the run fails (exit 3).

severity Critical · already tracked: KNOWN-OPEN DOCS-02 docs/roadmap/phase-16-trust-surface-hardening.md:776-777

Where. site/compliance.html:184; site/js/translations.js:3865 (EN text rendered on this card) · type: false claim

The document says. Benchmark gates per-task floor; if the post-train number drops below the floor, the run fails (exit 3).

What the code does. With the shipped default evaluation.auto_revert=false (forgelm/config.py:1191-1194), a failed benchmark gate only logs a WARNING and keeps the model: _apply_benchmark_result returns True (forgelm/trainer.py:1403-1407), TrainResult.success stays True (trainer.py:1602), and the CLI exits 0 (forgelm/cli/_training.py:159-161). I confirmed this with a probe (bench_probe.py in my work dir) that calls ForgeTrainer._apply_benchmark_result with passed=False and auto_revert=False: it returned continue=True, success=True, benchmark_passed=False. Exit 3 happens only when auto_revert is true.

Code references. forgelm/config.py:1191-1194, forgelm/trainer.py:1403-1410, forgelm/trainer.py:1602, forgelm/cli/_training.py:159-161

User impact. An operator who sets benchmark.min_score and relies on exit 3 to stop CI promotion gets exit 0 for a model below the floor. The gate fails open.

Proposed correction. Fix the code: make a failed benchmark, safety or judge gate set success=False (exit 3) even when auto_revert=false. Until then, add a temporary warning to the card: 'Exit 3 only when evaluation.auto_revert: true; otherwise the failure is logged and the run exits 0.'

Acceptance criteria

  • A regression test reproduces the failure scenario and asserts the corrected behaviour.
  • Documentation listed above is corrected in English and in its Turkish mirror in the same PR.
  • Every finding in this issue is resolved or explicitly closed with a reason.
  • The release note names the contract this fix restores.

Found by the October 2026 ForgeLM code and documentation review against commit cab2947. Code links point at that commit; line numbers may have moved since. Finding IDs (CR-…, DOC-…, TECH-…) are stable references for this backlog.

Activity

  1. added
    bug
    documentation
    area: config
    backlog: known
    severity: critical
    source: review-2026-10
    wave: 0
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: configbacklog: knownbugdocumentationseverity: criticalsource: review-2026-10wave: 0

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions