Skip to content

Feat/eval gate - #3247

Closed
Hone125 wants to merge 2 commits into
Tencent:mainfrom
Hone125:feat/eval-gate
Closed

Hone125 wants to merge 2 commits into
Tencent:mainfrom
Hone125:feat/eval-gate

Conversation

@Hone125

@Hone125 Hone125 commented Sep 14, 2026

Copy link
Copy Markdown

Description

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation update
  • 🎨 Refactor
  • ⚡ Performance improvement
  • 🧪 Test
  • 🔧 Configuration / Build / CI

Related Issue

Fixes #

Testing

Checklist

  • git diff --check origin/main...HEAD passes
  • Changed source files are formatted
  • Targeted tests for the changed packages/components pass
  • Diff-scoped lint passes where applicable (for Go: golangci-lint run --new-from-rev=origin/main ./...)
  • Full-repository checks were run, or any unrelated/environment-dependent failures are documented above
  • Self-reviewed the code
  • Added/updated tests covering the change
  • Updated related documentation (README, docs/, Swagger annotations, etc.)
  • Breaking changes are clearly called out in the description above

Screenshots / Recordings

…etection

Add a dependency-free evaluation quality gate: an internal/evalgate
package that compares a run's metrics against a stored baseline and a
per-metric tolerance, a cmd/evalgate CLI, and a CI workflow that proves
the gate blocks a recall regression (exit 1) and passes a healthy run
(exit 0) with no model key required.

The package deliberately imports no types package so go test stays free
of the cgo-heavy gojieba dependency. The judge fails closed on a missing
baseline/current metric, invalid values, and non-successful tasks, and
reports regressions in deterministic (lexicographic) order.
- Extract long JSON fixtures in cmd/evalgate tests into named consts so no
  line exceeds the lll 120-column limit (tab-width 4).
- Correct the CLI doc comment that referenced scripts/eval-gate.sh, which is
  not part of this change, and note it lands in a follow-up PR.
- Fix two stale comments in internal/evalgate tests that described
  "skip, do not fail" while the code actually fails closed.
- Rework TestJudgeGate_Pass to cover metrics that drop but stay within
  tolerance, which the gate must still accept.
- Discard fmt.Fprintf/Fprintln return values (errcheck) and use the 0o600
  octal literal (gofumpt) so golangci-lint reports no issues.
@Hone125 Hone125 closed this Sep 14, 2026
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