Repository navigation
Conversation
…the model and exits 0 Exit 0 was documented as "every gate passed", a classifier load failure as halting the pipeline with no final_model/, and classification errors as unsafe. In code an evaluation that produces no verdict (evaluation_completed=False: classifier not loaded, probes file missing or empty, most verdicts unreadable) keeps the model and exits 0 (4 with the approval gate) regardless of auto_revert. The behaviour is unchanged; making it fail closed is a breaking exit-code change left for a major version. Refs #87 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Sorry @cemililik, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 13 hours and 15 minutes by commenting |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 17 minutes. View limit details
Comment |
Reviewer's GuideThis documentation-only PR updates English and Turkish compliance, exit-code, JSON-output, audit, architecture, deployer, and risk-treatment guidance to reflect that a safety evaluation with no verdict keeps the model and exits 0 (or 4 with approval), while scored failures still revert and exit 3; it also adds a changelog entry. Flow diagram for safety evaluation verdict handlingflowchart TD
A[Safety evaluation] --> B{Verdict produced?}
B -->|Yes| C{Safety gate passed?}
C -->|Yes| D[Keep model]
C -->|No, auto_revert enabled| E[Revert model and exit 3]
B -->|No: evaluation_completed false| D
D --> F[Exit 0]
D --> G[Exit 4 with approval gate]
F --> H[Inspect safety.evaluation_completed and safety.passed]
G --> H
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Superseded by #1000: the wave-0 fixes are combined by theme into five pull requests to cut the review load. This branch's commits are included there unchanged apart from the |
… six-language site copy, described as the code behaves (#1000) ## Summary Compliance- and privacy-facing wording corrected to what the code does, plus the six-language site copy that repeated the same claims. Six earlier branches combined into one pull request, replacing #983, #986, #988 and #991 (to be closed as superseded) and two branches that were never opened. **This is compliance wording; please read the before/after tables.** ##⚠️ Localization exception `docs/standards/localization.md` keeps German, French, Spanish and Chinese as deferred tiers and says not to machine-translate them. At the owner's decision I **wrote the DE / FR / ES / ZH site strings myself**, with no native review. English and Turkish are authoritative; the other four need a native reader before they can be trusted. A follow-up issue for that is drafted, not yet filed. ## Related issues Refs #73, #99, #90, #94, #101, #87, #114, #75, #86, #89, #92, #98, #110, #112. The code halves stay open: whether the gate should ever compare trainer and approver, failing closed on a missing safety verdict (breaking), attaching SBOMs to the release. ## Changes | Theme | Said | Now says | |---|---|---| | **Segregation of duties** (ISO 27001 / SOC 2 mappings, SoA, SOP, deployer guide, manual) | the approval gate "enforces trainer ≠ approver", "dual-controlled" | it **records** trainer and approver identities and does not compare them; both are self-asserted; keeping them different people is the deployer's control. `require_human_approval` is not enforced for strict tiers by `ConfigError` (it only is when safety evaluation is off) | | **GDPR / KVKK manual page** | identifiable subjects are removed; "no specific person's data is recoverable from the model"; an `international_transfers` setting; audit report with source attribution and SHA-256 manifest; retention "auto-deletes originals" | eight identifier formats are masked, names and free text are not; the report is counts and summaries, not written to the audit log; retention is reported, not enforced; memorisation is not measured | | **No-verdict safety evaluation** (8 documents + TR) | exit 0 ⇒ every gate passed; classifier load failure halts the run; classification errors count as unsafe | a safety evaluation that produced no verdict (`evaluation_completed: false`) keeps the model and exits 0 (4 with the approval gate) regardless of `auto_revert`; code unchanged | | **SBOM** (reference, SOP, guides, manuals, mappings) | `gh release download …`; "re-emit from the git tag"; "licence extraction in SBOM" | workflow-run artifacts, 90-day retention; `gh run download`; the file is the CI runner's `pip list` (test tooling included, no dependency graph, no licences) | | **Article 12 / 14** (audit-event catalogue, audit-log and human-oversight pages) | the audit log is "mandated by Article 12"; the gate "implements" Article 14 | the log is development-time evidence that supports Annex IV; Article 12 logging and Article 14 in-use oversight belong to the deployed system | | **Site, six languages** | benchmark failure "fails (exit 3)"; "dual-controlled"; Slack/Teams/Discord; "PII redacted"; "satisfying the access-request side of the GDPR"; wizard "Enforce automatic deletion"; "SHA-256 manifest"; DeepSpeed "presets" | exit 3 only with `auto_revert: true`; records the approver; Slack-format, Teams and Discord need a relay; common formats masked, names not detected; reverse-pii finds only what is literally in the scanned files; retention mode reserved; SHA-256 sidecar; bring your own DeepSpeed JSON | The site GGUF strings describe the `.sha256` sidecar, the retention strings the reserved mode, and the DeepSpeed strings the preset caveat; they match the GGUF, code and docs pull requests, so **merge those first**. A new site test keeps the retired phrases out of English, Turkish and the HTML (mutation-checked). ### What this changes for a deployer A DPIA or audit response can no longer cite ForgeLM for: segregation of duties being enforced, personal data being removed or unrecoverable from the model, the SBOM being on the release page, or the audit log being the Article 12 mechanism. ## Type - [x] Documentation (and site copy) ## Testing - The full `CLAUDE.md` gauntlet from a clean worktree of this branch: exit 0. (An earlier run failed `tests/test_turkish_glossary_terms.py` because the Article 12 rewrite wrote "Ek IV" instead of "Annex IV", fixed here, then two timing-based regex linearity tests failed while two gauntlets ran at once; they pass alone and in this final run.) - `node --test tests/site/*.test.cjs`: 81 pass; English ↔ Turkish keys in lockstep. ## Checklist - [x] English and Turkish updated together (Turkish wording needs the owner's review) - [ ] DE / FR / ES / ZH reviewed by a native speaker — **not done** - [x] CHANGELOG entries under `[Unreleased]` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Summary
Eight documents (and their Turkish mirrors) said that exit code
0means every gate passed, that a safety-classifier load failure "halts" the pipeline and leaves nofinal_model/, and that classification errors count as unsafe. In code, a safety evaluation that produces no verdict (safety.evaluation_completed: false: the classifier failed to load, the probes file is missing or empty, or most verdicts were unreadable) keeps the model and the run exits0(4with the approval gate) regardless ofevaluation.auto_revert. This documents the real behaviour. The code is unchanged.Related issues
Refs #87 — the documentation half. Making a missing verdict fail closed would turn exit
0into a non-zero code for runs that exit0today, which is a breaking change to the public exit-code contract; the owner decided it waits for a major version.Changes — each row shows what it said and what it says now
docs/standards/error-handling.mdauto_revertdocs/usermanuals/{en,tr}/reference/exit-codes.mdsafety.passedandsafety.evaluation_completedin the JSON output"docs/usermanuals/{en,tr}/reference/json-output.mdsuccess: truewhen the run completedsafety.evaluation_completeddocs/reference/audit_event_catalog{,-tr}.mddocs/guides/safety_compliance{,-tr}.mddocs/guides/iso_soc2_deployer_guide{,-tr}.md(incident response)pipeline.failedpropagates, nofinal_model/audit.classifier_load_failedevent fires andevaluation_completed: falseis recorded, the model stays, exit 0; alert on those, not on the exit codedocs/qms/risk_treatment_plan{,-tr}.mdsafety.evaluation_completed/safety.passedor on the audit eventdocs/reference/architecture.mdChecked against the code
forgelm/safety/_orchestrator.pyand_gates.py(_MAX_UNSCORED_RATIO = 0.5): when the classifier does not load, the probes file is missing or empty, or more than half the verdicts are unscored, the result hasevaluation_completed=False.forgelm/trainer.py:if not getattr(safety_result, "evaluation_completed", True): self._log_gate_kept_no_revert(...); return True: the model is kept and the run continues to success (or to the approval gate).What this changes for a deployer
A pipeline that gates promotion on "exit 0" would promote a model whose safety evaluation never produced a verdict. The pages now tell it to read
safety.evaluation_completedandsafety.passed. This lowers what could be relied on from the exit code and matches the behaviour that has always been there.Not done here
Type
Testing
CLAUDE.mdgauntlet from a clean worktree of this branch: exit 0 (bilingual parity, code-block parity, anchors, source-path references, exit-code prose).Checklist
[Unreleased]🤖 Generated with Claude Code