safety-stats 0.16.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- safety_stats-0.16.0/.gitattributes +11 -0
- safety_stats-0.16.0/.github/ISSUE_TEMPLATE/bug_report.yml +49 -0
- safety_stats-0.16.0/.github/ISSUE_TEMPLATE/change_request.yml +40 -0
- safety_stats-0.16.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- safety_stats-0.16.0/.github/ISSUE_TEMPLATE/statistical_method.yml +39 -0
- safety_stats-0.16.0/.github/PULL_REQUEST_TEMPLATE.md +41 -0
- safety_stats-0.16.0/.github/workflows/ci.yml +128 -0
- safety_stats-0.16.0/.github/workflows/formal.yml +33 -0
- safety_stats-0.16.0/.github/workflows/release.yml +95 -0
- safety_stats-0.16.0/.gitignore +35 -0
- safety_stats-0.16.0/AGENTS.md +73 -0
- safety_stats-0.16.0/CHANGELOG.md +1602 -0
- safety_stats-0.16.0/CITATION.cff +24 -0
- safety_stats-0.16.0/CLAUDE.md +6 -0
- safety_stats-0.16.0/CONTRIBUTING.md +399 -0
- safety_stats-0.16.0/LICENSE +22 -0
- safety_stats-0.16.0/PKG-INFO +666 -0
- safety_stats-0.16.0/README.md +617 -0
- safety_stats-0.16.0/SECURITY.md +61 -0
- safety_stats-0.16.0/docs/agent-guide.md +122 -0
- safety_stats-0.16.0/docs/api-reference.md +842 -0
- safety_stats-0.16.0/docs/archive/generative-hierarchy-evaluation-plan.md +1428 -0
- safety_stats-0.16.0/docs/archive/v1-design.md +2007 -0
- safety_stats-0.16.0/docs/decision-policy.md +203 -0
- safety_stats-0.16.0/docs/design-based-sampling.md +365 -0
- safety_stats-0.16.0/docs/diagnostics.md +1800 -0
- safety_stats-0.16.0/docs/generative-design-decisions.md +324 -0
- safety_stats-0.16.0/docs/generative-evaluation.md +632 -0
- safety_stats-0.16.0/docs/getting-started.md +142 -0
- safety_stats-0.16.0/docs/hierarchy-simultaneous-inference.md +275 -0
- safety_stats-0.16.0/docs/independence-profiles.md +345 -0
- safety_stats-0.16.0/docs/installation.md +137 -0
- safety_stats-0.16.0/docs/interpretation.md +385 -0
- safety_stats-0.16.0/docs/judge-misclassification.md +1434 -0
- safety_stats-0.16.0/docs/limitations.md +90 -0
- safety_stats-0.16.0/docs/media/demo/dark/1-plan.gif +0 -0
- safety_stats-0.16.0/docs/media/demo/dark/2-eval.gif +0 -0
- safety_stats-0.16.0/docs/media/demo/light/1-plan.gif +0 -0
- safety_stats-0.16.0/docs/media/demo/light/2-eval.gif +0 -0
- safety_stats-0.16.0/docs/model-comparisons.md +478 -0
- safety_stats-0.16.0/docs/plan-reference.md +1552 -0
- safety_stats-0.16.0/docs/quickstart.md +161 -0
- safety_stats-0.16.0/docs/releasing.md +87 -0
- safety_stats-0.16.0/docs/rollout-files.md +111 -0
- safety_stats-0.16.0/docs/running-inspect.md +144 -0
- safety_stats-0.16.0/docs/sequential-design.md +373 -0
- safety_stats-0.16.0/docs/statistical-methods.md +3150 -0
- safety_stats-0.16.0/docs/what-results-establish.md +180 -0
- safety_stats-0.16.0/examples/attack_confirmation/README.md +258 -0
- safety_stats-0.16.0/examples/attack_confirmation/attack_confirmation.py +645 -0
- safety_stats-0.16.0/examples/attack_confirmation/behaviours.csv +101 -0
- safety_stats-0.16.0/examples/attack_confirmation/design.csv +101 -0
- safety_stats-0.16.0/examples/attack_confirmation/plan.yaml +155 -0
- safety_stats-0.16.0/examples/attack_confirmation/run_offline.py +76 -0
- safety_stats-0.16.0/examples/demo/README.md +98 -0
- safety_stats-0.16.0/examples/demo/demo_eval.py +103 -0
- safety_stats-0.16.0/examples/demo/design.csv +13 -0
- safety_stats-0.16.0/examples/demo/plan.yaml +243 -0
- safety_stats-0.16.0/examples/demo/run_demo.py +39 -0
- safety_stats-0.16.0/examples/demo/show_results.py +65 -0
- safety_stats-0.16.0/examples/fixed_design/README.md +92 -0
- safety_stats-0.16.0/examples/fixed_design/comparison-plan.yaml +121 -0
- safety_stats-0.16.0/examples/fixed_design/design.csv +5 -0
- safety_stats-0.16.0/examples/fixed_design/safety-plan.yaml +131 -0
- safety_stats-0.16.0/examples/fixed_design/safety_eval.py +46 -0
- safety_stats-0.16.0/examples/fixed_design/variant-design.csv +7 -0
- safety_stats-0.16.0/examples/fixed_design/variant-plan.yaml +145 -0
- safety_stats-0.16.0/examples/fixed_design/variant_eval.py +73 -0
- safety_stats-0.16.0/examples/generative_live/README.md +246 -0
- safety_stats-0.16.0/examples/generative_live/auditor-template.txt +43 -0
- safety_stats-0.16.0/examples/generative_live/generative_live.py +152 -0
- safety_stats-0.16.0/examples/generative_live/plan-auditor.yaml +131 -0
- safety_stats-0.16.0/examples/generative_live/plan-local.yaml +110 -0
- safety_stats-0.16.0/examples/generative_live/plan.yaml +105 -0
- safety_stats-0.16.0/examples/generative_live/review_prompts.py +109 -0
- safety_stats-0.16.0/examples/generative_live/rewrite-template.txt +37 -0
- safety_stats-0.16.0/examples/generative_live/rewriter.py +406 -0
- safety_stats-0.16.0/examples/generative_live/semantic-seeds.csv +9 -0
- safety_stats-0.16.0/examples/generative_live/wrapper-arms.csv +4 -0
- safety_stats-0.16.0/examples/generative_multilingual/README.md +230 -0
- safety_stats-0.16.0/examples/generative_multilingual/compile_tree.py +89 -0
- safety_stats-0.16.0/examples/generative_multilingual/plan-direct.yaml +105 -0
- safety_stats-0.16.0/examples/generative_multilingual/plan-stratified.yaml +106 -0
- safety_stats-0.16.0/examples/generative_multilingual/rewrite-template.txt +10 -0
- safety_stats-0.16.0/examples/generative_multilingual/run_evaluation.py +200 -0
- safety_stats-0.16.0/examples/generative_multilingual/semantic-seeds.csv +9 -0
- safety_stats-0.16.0/examples/generative_multilingual/simulated_target.py +145 -0
- safety_stats-0.16.0/examples/generative_multilingual/validate_coverage.py +142 -0
- safety_stats-0.16.0/examples/generative_multilingual/wrapper-arms.csv +4 -0
- safety_stats-0.16.0/examples/harness_versions/README.md +78 -0
- safety_stats-0.16.0/examples/harness_versions/design.csv +13 -0
- safety_stats-0.16.0/examples/harness_versions/harness_eval.py +106 -0
- safety_stats-0.16.0/examples/harness_versions/plan.yaml +113 -0
- safety_stats-0.16.0/examples/harness_versions/run_example.py +75 -0
- safety_stats-0.16.0/examples/judge_flip/README.md +119 -0
- safety_stats-0.16.0/examples/judge_flip/design.csv +6 -0
- safety_stats-0.16.0/examples/judge_flip/flip_manifest.py +113 -0
- safety_stats-0.16.0/examples/judge_flip/judge_flip.py +239 -0
- safety_stats-0.16.0/examples/judge_flip/plan.yaml +99 -0
- safety_stats-0.16.0/examples/judge_flip/run_offline.py +69 -0
- safety_stats-0.16.0/examples/open_weights/README.md +226 -0
- safety_stats-0.16.0/examples/open_weights/chart_cards.py +634 -0
- safety_stats-0.16.0/examples/open_weights/judge_check.py +285 -0
- safety_stats-0.16.0/examples/open_weights/label_queue.py +876 -0
- safety_stats-0.16.0/examples/open_weights/open_weights_task.py +597 -0
- safety_stats-0.16.0/examples/open_weights/plan-template.yaml +219 -0
- safety_stats-0.16.0/examples/open_weights/provider_guard.py +297 -0
- safety_stats-0.16.0/examples/open_weights/run_open_weights.py +448 -0
- safety_stats-0.16.0/examples/open_weights/storyboard_numbers.py +388 -0
- safety_stats-0.16.0/examples/real_harmbench/README.md +197 -0
- safety_stats-0.16.0/examples/real_harmbench/design.csv +401 -0
- safety_stats-0.16.0/examples/real_harmbench/harmbench_behaviors_text_all.csv +1530 -0
- safety_stats-0.16.0/examples/real_harmbench/harmbench_live.py +203 -0
- safety_stats-0.16.0/examples/real_harmbench/harmbench_text_val_ids.txt +81 -0
- safety_stats-0.16.0/examples/real_harmbench/live-plan-template.yaml +161 -0
- safety_stats-0.16.0/examples/real_harmbench/run_openai.py +166 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/MULTILINGUAL.md +233 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/README.md +256 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/add_multilingual_language.py +280 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/analyze_multilingual_run.py +26 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/analyze_run.py +26 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/jailbreakbench_live.py +209 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/jailbreakbench_multilingual.py +410 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/jbb_behaviors_harmful.csv +101 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/live-comparison-plan-template.yaml +136 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/multilingual-comparison-plan-template.yaml +136 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/run_jailbreakbench.py +290 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/run_multilingual_jailbreakbench.py +219 -0
- safety_stats-0.16.0/examples/real_jailbreakbench/translate_jailbreakbench.py +184 -0
- safety_stats-0.16.0/examples/real_simpleqa/README.md +79 -0
- safety_stats-0.16.0/examples/real_simpleqa/design.csv +9 -0
- safety_stats-0.16.0/examples/real_simpleqa/make_subset.py +39 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/checksums.json +14 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/comparison-sets.csv +0 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/comparisons.csv +0 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/design.resolved.csv +9 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/hierarchy-risks.csv +10 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/index.json +155 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/index.md +46 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/observations.csv +9 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/plan.resolved.yaml +171 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/report-full.md +151 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/report.html +1269 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/report.json +3103 -0
- safety_stats-0.16.0/examples/real_simpleqa/report/report.md +68 -0
- safety_stats-0.16.0/examples/real_simpleqa/safety-plan.yaml +108 -0
- safety_stats-0.16.0/examples/real_simpleqa/simpleqa-8-real.eval +0 -0
- safety_stats-0.16.0/examples/real_simpleqa/wrong-scorer-plan.yaml +113 -0
- safety_stats-0.16.0/examples/real_xstest/README.md +257 -0
- safety_stats-0.16.0/examples/real_xstest/current-log/2026-08-18T15-35-10-00-00_xstest-published-gpt4-replay_MZJ2y2aiYWt9ibuJhUNFTN.eval +0 -0
- safety_stats-0.16.0/examples/real_xstest/design.csv +9 -0
- safety_stats-0.16.0/examples/real_xstest/live-plan-template.yaml +123 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/checksums.json +14 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/comparison-sets.csv +0 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/comparisons.csv +0 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/design.resolved.csv +17 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/hierarchy-risks.csv +16 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/index.json +176 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/index.md +47 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/observations.csv +9 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/plan.resolved.yaml +188 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/report-full.md +171 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/report.html +1269 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/report.json +5408 -0
- safety_stats-0.16.0/examples/real_xstest/report-current/report.md +76 -0
- safety_stats-0.16.0/examples/real_xstest/run_openai.py +135 -0
- safety_stats-0.16.0/examples/real_xstest/safety-plan.yaml +123 -0
- safety_stats-0.16.0/examples/real_xstest/source_subset.csv +9 -0
- safety_stats-0.16.0/examples/real_xstest/xstest_eval.py +88 -0
- safety_stats-0.16.0/examples/real_xstest/xstest_live.py +147 -0
- safety_stats-0.16.0/examples/sampled_harmbench/README.md +129 -0
- safety_stats-0.16.0/examples/sampled_harmbench/draw_sample.py +83 -0
- safety_stats-0.16.0/examples/sampled_harmbench/frame.csv +301 -0
- safety_stats-0.16.0/examples/sampled_harmbench/plan-poisson.yaml +77 -0
- safety_stats-0.16.0/examples/sampled_harmbench/plan-stratified.yaml +79 -0
- safety_stats-0.16.0/examples/sampled_harmbench/validate_coverage.py +156 -0
- safety_stats-0.16.0/examples/sampled_harmbench/variance_budget.py +120 -0
- safety_stats-0.16.0/examples/statistics_api.py +36 -0
- safety_stats-0.16.0/formal/.gitignore +1 -0
- safety_stats-0.16.0/formal/README.md +58 -0
- safety_stats-0.16.0/formal/SafetyStatsFormal/RiskMeasures.lean +220 -0
- safety_stats-0.16.0/formal/SafetyStatsFormal.lean +1 -0
- safety_stats-0.16.0/formal/lake-manifest.json +96 -0
- safety_stats-0.16.0/formal/lakefile.toml +10 -0
- safety_stats-0.16.0/formal/lean-toolchain +1 -0
- safety_stats-0.16.0/llms-full.txt +514 -0
- safety_stats-0.16.0/llms.txt +58 -0
- safety_stats-0.16.0/pyproject.toml +114 -0
- safety_stats-0.16.0/research/adaptive_attacker_coverage.py +102 -0
- safety_stats-0.16.0/research/comparison_planning_scope.py +127 -0
- safety_stats-0.16.0/research/generative_budget_allocation.py +90 -0
- safety_stats-0.16.0/research/generative_model_assisted.py +207 -0
- safety_stats-0.16.0/research/generative_paired_comparison.py +106 -0
- safety_stats-0.16.0/research/generative_sampling_tradeoff.py +215 -0
- safety_stats-0.16.0/research/generative_smc.py +149 -0
- safety_stats-0.16.0/research/judge_correction_lang_reiczigel.py +173 -0
- safety_stats-0.16.0/research/judge_correction_widths.py +93 -0
- safety_stats-0.16.0/research/judge_flip_clustering.py +56 -0
- safety_stats-0.16.0/research/noisy_valid_power.py +91 -0
- safety_stats-0.16.0/research/optstop_coverage.py +132 -0
- safety_stats-0.16.0/research/sequential_cost.py +184 -0
- safety_stats-0.16.0/research/sequential_peeking.py +58 -0
- safety_stats-0.16.0/scripts/_artifact_cases.py +652 -0
- safety_stats-0.16.0/scripts/_source_trees.py +164 -0
- safety_stats-0.16.0/scripts/artifact_inputs/demo/demo_eval.py +99 -0
- safety_stats-0.16.0/scripts/artifact_inputs/demo/design.csv +13 -0
- safety_stats-0.16.0/scripts/artifact_inputs/demo/plan.yaml +138 -0
- safety_stats-0.16.0/scripts/check_wheel.sh +50 -0
- safety_stats-0.16.0/scripts/compare_artifacts.py +335 -0
- safety_stats-0.16.0/scripts/prove_red.py +184 -0
- safety_stats-0.16.0/scripts/release-rehearsal.sh +127 -0
- safety_stats-0.16.0/scripts/release_version.py +136 -0
- safety_stats-0.16.0/scripts/render_catalogue.py +223 -0
- safety_stats-0.16.0/skills/safety-stats/SKILL.md +114 -0
- safety_stats-0.16.0/src/safety_stats/__init__.py +81 -0
- safety_stats-0.16.0/src/safety_stats/analysis/__init__.py +1 -0
- safety_stats-0.16.0/src/safety_stats/analysis/adaptive_claims.py +221 -0
- safety_stats-0.16.0/src/safety_stats/analysis/anytime.py +430 -0
- safety_stats-0.16.0/src/safety_stats/analysis/assumptions.py +128 -0
- safety_stats-0.16.0/src/safety_stats/analysis/claims.py +865 -0
- safety_stats-0.16.0/src/safety_stats/analysis/comparison_intervals.py +953 -0
- safety_stats-0.16.0/src/safety_stats/analysis/comparison_judges.py +573 -0
- safety_stats-0.16.0/src/safety_stats/analysis/comparison_regions.py +450 -0
- safety_stats-0.16.0/src/safety_stats/analysis/comparisons.py +450 -0
- safety_stats-0.16.0/src/safety_stats/analysis/core.py +496 -0
- safety_stats-0.16.0/src/safety_stats/analysis/design_effect.py +440 -0
- safety_stats-0.16.0/src/safety_stats/analysis/direct_mean.py +1073 -0
- safety_stats-0.16.0/src/safety_stats/analysis/estimates.py +214 -0
- safety_stats-0.16.0/src/safety_stats/analysis/inputs.py +84 -0
- safety_stats-0.16.0/src/safety_stats/analysis/interval_assumptions.py +180 -0
- safety_stats-0.16.0/src/safety_stats/analysis/judge_calibration.py +1341 -0
- safety_stats-0.16.0/src/safety_stats/analysis/judge_correction.py +713 -0
- safety_stats-0.16.0/src/safety_stats/analysis/judge_flip.py +148 -0
- safety_stats-0.16.0/src/safety_stats/analysis/judge_panel.py +613 -0
- safety_stats-0.16.0/src/safety_stats/analysis/measures.py +174 -0
- safety_stats-0.16.0/src/safety_stats/analysis/policy.py +281 -0
- safety_stats-0.16.0/src/safety_stats/analysis/regions.py +243 -0
- safety_stats-0.16.0/src/safety_stats/analysis/report.py +302 -0
- safety_stats-0.16.0/src/safety_stats/analysis/results.py +30 -0
- safety_stats-0.16.0/src/safety_stats/analysis/risks.py +441 -0
- safety_stats-0.16.0/src/safety_stats/analysis/tail_precision.py +289 -0
- safety_stats-0.16.0/src/safety_stats/analysis/unclassified_share.py +274 -0
- safety_stats-0.16.0/src/safety_stats/api.py +511 -0
- safety_stats-0.16.0/src/safety_stats/claim_planning.py +636 -0
- safety_stats-0.16.0/src/safety_stats/cli.py +1681 -0
- safety_stats-0.16.0/src/safety_stats/config/__init__.py +4 -0
- safety_stats-0.16.0/src/safety_stats/config/canonicalize.py +38 -0
- safety_stats-0.16.0/src/safety_stats/config/decision_policy.py +158 -0
- safety_stats-0.16.0/src/safety_stats/config/loader.py +269 -0
- safety_stats-0.16.0/src/safety_stats/config/methods.py +49 -0
- safety_stats-0.16.0/src/safety_stats/config/models.py +1476 -0
- safety_stats-0.16.0/src/safety_stats/config/registration.py +78 -0
- safety_stats-0.16.0/src/safety_stats/decision/__init__.py +3 -0
- safety_stats-0.16.0/src/safety_stats/decision/engine.py +123 -0
- safety_stats-0.16.0/src/safety_stats/generative/__init__.py +322 -0
- safety_stats-0.16.0/src/safety_stats/generative/comparisons.py +327 -0
- safety_stats-0.16.0/src/safety_stats/generative/contrasts.py +550 -0
- safety_stats-0.16.0/src/safety_stats/generative/execution.py +802 -0
- safety_stats-0.16.0/src/safety_stats/generative/inference.py +617 -0
- safety_stats-0.16.0/src/safety_stats/generative/inspect_bridge.py +109 -0
- safety_stats-0.16.0/src/safety_stats/generative/join.py +207 -0
- safety_stats-0.16.0/src/safety_stats/generative/judge.py +350 -0
- safety_stats-0.16.0/src/safety_stats/generative/kernels.py +335 -0
- safety_stats-0.16.0/src/safety_stats/generative/ledger.py +329 -0
- safety_stats-0.16.0/src/safety_stats/generative/logs.py +152 -0
- safety_stats-0.16.0/src/safety_stats/generative/planning.py +216 -0
- safety_stats-0.16.0/src/safety_stats/generative/report.py +246 -0
- safety_stats-0.16.0/src/safety_stats/generative/runner.py +989 -0
- safety_stats-0.16.0/src/safety_stats/generative/sampling.py +215 -0
- safety_stats-0.16.0/src/safety_stats/generative/schema.py +611 -0
- safety_stats-0.16.0/src/safety_stats/generative/taxonomy.py +420 -0
- safety_stats-0.16.0/src/safety_stats/generative/visualization.py +41 -0
- safety_stats-0.16.0/src/safety_stats/generative/visualization_template.html +468 -0
- safety_stats-0.16.0/src/safety_stats/ingest/__init__.py +59 -0
- safety_stats-0.16.0/src/safety_stats/ingest/files.py +19 -0
- safety_stats-0.16.0/src/safety_stats/ingest/inspect_logs.py +545 -0
- safety_stats-0.16.0/src/safety_stats/ingest/judge_flip.py +49 -0
- safety_stats-0.16.0/src/safety_stats/ingest/manifest.py +422 -0
- safety_stats-0.16.0/src/safety_stats/ingest/normalize.py +1401 -0
- safety_stats-0.16.0/src/safety_stats/ingest/outcomes.py +92 -0
- safety_stats-0.16.0/src/safety_stats/ingest/pilot.py +211 -0
- safety_stats-0.16.0/src/safety_stats/ingest/records.py +174 -0
- safety_stats-0.16.0/src/safety_stats/ingest/rollout_files.py +252 -0
- safety_stats-0.16.0/src/safety_stats/ingest/validation.py +265 -0
- safety_stats-0.16.0/src/safety_stats/py.typed +1 -0
- safety_stats-0.16.0/src/safety_stats/registry.py +2851 -0
- safety_stats-0.16.0/src/safety_stats/report/__init__.py +3 -0
- safety_stats-0.16.0/src/safety_stats/report/artifacts.py +114 -0
- safety_stats-0.16.0/src/safety_stats/report/claims.py +166 -0
- safety_stats-0.16.0/src/safety_stats/report/index.py +297 -0
- safety_stats-0.16.0/src/safety_stats/report/rounding.py +69 -0
- safety_stats-0.16.0/src/safety_stats/report/summary.py +1053 -0
- safety_stats-0.16.0/src/safety_stats/report/visualization.py +216 -0
- safety_stats-0.16.0/src/safety_stats/report/visualization_template.html +1269 -0
- safety_stats-0.16.0/src/safety_stats/report/writer.py +2300 -0
- safety_stats-0.16.0/src/safety_stats/scaffold.py +715 -0
- safety_stats-0.16.0/src/safety_stats/schema/__init__.py +27 -0
- safety_stats-0.16.0/src/safety_stats/schema/claims.py +159 -0
- safety_stats-0.16.0/src/safety_stats/schema/observations.py +70 -0
- safety_stats-0.16.0/src/safety_stats/schema/pointers.py +199 -0
- safety_stats-0.16.0/src/safety_stats/schema/reports.py +928 -0
- safety_stats-0.16.0/src/safety_stats/schema/scopes.py +124 -0
- safety_stats-0.16.0/src/safety_stats/schema/summary.py +307 -0
- safety_stats-0.16.0/src/safety_stats/stats/__init__.py +256 -0
- safety_stats-0.16.0/src/safety_stats/stats/adaptive.py +95 -0
- safety_stats-0.16.0/src/safety_stats/stats/binomial.py +127 -0
- safety_stats-0.16.0/src/safety_stats/stats/clusters.py +85 -0
- safety_stats-0.16.0/src/safety_stats/stats/comparisons.py +419 -0
- safety_stats-0.16.0/src/safety_stats/stats/design_based.py +317 -0
- safety_stats-0.16.0/src/safety_stats/stats/direct_mean.py +1068 -0
- safety_stats-0.16.0/src/safety_stats/stats/hierarchy_region.py +411 -0
- safety_stats-0.16.0/src/safety_stats/stats/independence.py +403 -0
- safety_stats-0.16.0/src/safety_stats/stats/judge_calibration.py +353 -0
- safety_stats-0.16.0/src/safety_stats/stats/judge_flip.py +136 -0
- safety_stats-0.16.0/src/safety_stats/stats/judge_stress.py +186 -0
- safety_stats-0.16.0/src/safety_stats/stats/judges.py +264 -0
- safety_stats-0.16.0/src/safety_stats/stats/misclassification.py +1002 -0
- safety_stats-0.16.0/src/safety_stats/stats/multiplicity.py +33 -0
- safety_stats-0.16.0/src/safety_stats/stats/paired.py +565 -0
- safety_stats-0.16.0/src/safety_stats/stats/planning.py +764 -0
- safety_stats-0.16.0/src/safety_stats/stats/risk.py +235 -0
- safety_stats-0.16.0/src/safety_stats/stats/sequential.py +222 -0
- safety_stats-0.16.0/src/safety_stats/stats/single_valued.py +85 -0
- safety_stats-0.16.0/src/safety_stats/stats/tree_calibration.py +114 -0
- safety_stats-0.16.0/src/safety_stats/validate/__init__.py +3 -0
- safety_stats-0.16.0/src/safety_stats/validate/decision_policy.py +69 -0
- safety_stats-0.16.0/src/safety_stats/validate/plan.py +707 -0
- safety_stats-0.16.0/src/safety_stats/version.py +1 -0
- safety_stats-0.16.0/tests/__init__.py +0 -0
- safety_stats-0.16.0/tests/claims_export.py +211 -0
- safety_stats-0.16.0/tests/cli_output.py +20 -0
- safety_stats-0.16.0/tests/conformance.py +345 -0
- safety_stats-0.16.0/tests/conftest.py +55 -0
- safety_stats-0.16.0/tests/diagnostic_codes/__init__.py +6 -0
- safety_stats-0.16.0/tests/diagnostic_codes/generation_cases.py +566 -0
- safety_stats-0.16.0/tests/diagnostic_codes/harness.py +274 -0
- safety_stats-0.16.0/tests/diagnostic_codes/interval_cases.py +455 -0
- safety_stats-0.16.0/tests/diagnostic_codes/judge_analysis_cases.py +1053 -0
- safety_stats-0.16.0/tests/diagnostic_codes/logs_cases.py +1134 -0
- safety_stats-0.16.0/tests/diagnostic_codes/plan_cases.py +704 -0
- safety_stats-0.16.0/tests/generative_fixtures.py +166 -0
- safety_stats-0.16.0/tests/integration/__init__.py +0 -0
- safety_stats-0.16.0/tests/integration/test_adaptive_claims.py +761 -0
- safety_stats-0.16.0/tests/integration/test_analysis.py +6903 -0
- safety_stats-0.16.0/tests/integration/test_anytime_bounds.py +858 -0
- safety_stats-0.16.0/tests/integration/test_claim_planning.py +810 -0
- safety_stats-0.16.0/tests/integration/test_claims_export.py +560 -0
- safety_stats-0.16.0/tests/integration/test_cluster_design_effect.py +359 -0
- safety_stats-0.16.0/tests/integration/test_content_filter_stops_real_logs.py +289 -0
- safety_stats-0.16.0/tests/integration/test_decision_policy.py +963 -0
- safety_stats-0.16.0/tests/integration/test_degradation_diagnostics.py +187 -0
- safety_stats-0.16.0/tests/integration/test_diagnostic_scopes_end_to_end.py +191 -0
- safety_stats-0.16.0/tests/integration/test_diagnostics_name_source_values.py +286 -0
- safety_stats-0.16.0/tests/integration/test_empty_cohort.py +399 -0
- safety_stats-0.16.0/tests/integration/test_excluded_rollouts.py +119 -0
- safety_stats-0.16.0/tests/integration/test_generative_cli.py +884 -0
- safety_stats-0.16.0/tests/integration/test_generative_diagnostics.py +212 -0
- safety_stats-0.16.0/tests/integration/test_generative_fidelity.py +377 -0
- safety_stats-0.16.0/tests/integration/test_generative_judge.py +324 -0
- safety_stats-0.16.0/tests/integration/test_generative_judge_scope.py +198 -0
- safety_stats-0.16.0/tests/integration/test_generative_log_diagnostics.py +180 -0
- safety_stats-0.16.0/tests/integration/test_generative_real_logs.py +347 -0
- safety_stats-0.16.0/tests/integration/test_generative_resume.py +539 -0
- safety_stats-0.16.0/tests/integration/test_generative_validation.py +591 -0
- safety_stats-0.16.0/tests/integration/test_ingest_diagnostics.py +262 -0
- safety_stats-0.16.0/tests/integration/test_init.py +429 -0
- safety_stats-0.16.0/tests/integration/test_input_errors.py +269 -0
- safety_stats-0.16.0/tests/integration/test_interval_diagnostics.py +624 -0
- safety_stats-0.16.0/tests/integration/test_judge_correction_policy_classified.py +576 -0
- safety_stats-0.16.0/tests/integration/test_judge_correction_scope.py +903 -0
- safety_stats-0.16.0/tests/integration/test_judge_error_stress.py +318 -0
- safety_stats-0.16.0/tests/integration/test_judge_error_stress_reasons.py +430 -0
- safety_stats-0.16.0/tests/integration/test_judge_error_stress_rows.py +382 -0
- safety_stats-0.16.0/tests/integration/test_judge_excluded_share.py +283 -0
- safety_stats-0.16.0/tests/integration/test_judge_flip_rate.py +429 -0
- safety_stats-0.16.0/tests/integration/test_judge_unknown_outcomes.py +381 -0
- safety_stats-0.16.0/tests/integration/test_labelling_protocol.py +690 -0
- safety_stats-0.16.0/tests/integration/test_lang_reiczigel_rows.py +495 -0
- safety_stats-0.16.0/tests/integration/test_live_rewrite_kernel.py +331 -0
- safety_stats-0.16.0/tests/integration/test_manifest_labels.py +515 -0
- safety_stats-0.16.0/tests/integration/test_manifest_missing_columns.py +167 -0
- safety_stats-0.16.0/tests/integration/test_minimal_plan.py +213 -0
- safety_stats-0.16.0/tests/integration/test_rollout_files_conformance.py +287 -0
- safety_stats-0.16.0/tests/integration/test_run_configuration_privacy.py +280 -0
- safety_stats-0.16.0/tests/integration/test_sampled_design.py +862 -0
- safety_stats-0.16.0/tests/integration/test_score_exclusion_wording.py +194 -0
- safety_stats-0.16.0/tests/integration/test_single_rollout_tail_claims.py +230 -0
- safety_stats-0.16.0/tests/integration/test_stage_results.py +155 -0
- safety_stats-0.16.0/tests/integration/test_stops_in_eval_logs.py +112 -0
- safety_stats-0.16.0/tests/integration/test_stratified_judge_calibration.py +541 -0
- safety_stats-0.16.0/tests/integration/test_summary_agrees_with_report.py +653 -0
- safety_stats-0.16.0/tests/integration/test_summary_report.py +153 -0
- safety_stats-0.16.0/tests/integration/test_summary_rounding.py +238 -0
- safety_stats-0.16.0/tests/integration/test_tail_precision.py +459 -0
- safety_stats-0.16.0/tests/integration/test_variant_design.py +533 -0
- safety_stats-0.16.0/tests/integration/test_visualization_coverage_text.py +102 -0
- safety_stats-0.16.0/tests/integration/test_visualization_page.py +108 -0
- safety_stats-0.16.0/tests/integration/test_where_effects_sit.py +156 -0
- safety_stats-0.16.0/tests/mock_inspect_logs.py +98 -0
- safety_stats-0.16.0/tests/page_script.py +253 -0
- safety_stats-0.16.0/tests/plan_fields.py +62 -0
- safety_stats-0.16.0/tests/planted_configuration.py +112 -0
- safety_stats-0.16.0/tests/property/__init__.py +0 -0
- safety_stats-0.16.0/tests/property/test_direct_mean_properties.py +119 -0
- safety_stats-0.16.0/tests/property/test_interval_engine_conformance.py +956 -0
- safety_stats-0.16.0/tests/property/test_risk_measure_conformance.py +233 -0
- safety_stats-0.16.0/tests/property/test_risk_properties.py +312 -0
- safety_stats-0.16.0/tests/report_rendering.py +24 -0
- safety_stats-0.16.0/tests/summary_fixtures.py +306 -0
- safety_stats-0.16.0/tests/template_functions.py +16 -0
- safety_stats-0.16.0/tests/test_agent_context.py +473 -0
- safety_stats-0.16.0/tests/test_attack_confirmation_example.py +667 -0
- safety_stats-0.16.0/tests/test_dev_scripts.py +461 -0
- safety_stats-0.16.0/tests/test_diagnostic_codes.py +104 -0
- safety_stats-0.16.0/tests/test_diagnostics_catalogue.py +71 -0
- safety_stats-0.16.0/tests/test_example_reports.py +188 -0
- safety_stats-0.16.0/tests/test_generative_multilingual_example.py +189 -0
- safety_stats-0.16.0/tests/test_harmbench_live_example.py +130 -0
- safety_stats-0.16.0/tests/test_jailbreakbench_live_example.py +365 -0
- safety_stats-0.16.0/tests/test_jailbreakbench_multilingual_example.py +326 -0
- safety_stats-0.16.0/tests/test_judge_flip_example.py +99 -0
- safety_stats-0.16.0/tests/test_offline_examples.py +530 -0
- safety_stats-0.16.0/tests/test_open_weights_example.py +1296 -0
- safety_stats-0.16.0/tests/test_open_weights_label_queue.py +320 -0
- safety_stats-0.16.0/tests/test_quickstart_commands.py +116 -0
- safety_stats-0.16.0/tests/test_readme_walkthrough.py +404 -0
- safety_stats-0.16.0/tests/test_release_version.py +168 -0
- safety_stats-0.16.0/tests/test_repository_consistency.py +427 -0
- safety_stats-0.16.0/tests/test_results_establish_page.py +41 -0
- safety_stats-0.16.0/tests/test_xstest_live_example.py +48 -0
- safety_stats-0.16.0/tests/unit/__init__.py +0 -0
- safety_stats-0.16.0/tests/unit/test_adaptive_bound.py +147 -0
- safety_stats-0.16.0/tests/unit/test_assumptions_used.py +161 -0
- safety_stats-0.16.0/tests/unit/test_betting.py +527 -0
- safety_stats-0.16.0/tests/unit/test_binomial.py +128 -0
- safety_stats-0.16.0/tests/unit/test_claims_schema.py +100 -0
- safety_stats-0.16.0/tests/unit/test_cli.py +861 -0
- safety_stats-0.16.0/tests/unit/test_clusters.py +23 -0
- safety_stats-0.16.0/tests/unit/test_comparison_planning.py +336 -0
- safety_stats-0.16.0/tests/unit/test_comparison_sets.py +63 -0
- safety_stats-0.16.0/tests/unit/test_comparisons.py +518 -0
- safety_stats-0.16.0/tests/unit/test_confidence_sequence.py +263 -0
- safety_stats-0.16.0/tests/unit/test_content_filter_stops.py +234 -0
- safety_stats-0.16.0/tests/unit/test_decision.py +47 -0
- safety_stats-0.16.0/tests/unit/test_decision_policy.py +209 -0
- safety_stats-0.16.0/tests/unit/test_decision_policy_roll_up.py +293 -0
- safety_stats-0.16.0/tests/unit/test_delta_correction.py +138 -0
- safety_stats-0.16.0/tests/unit/test_dependency_direction.py +181 -0
- safety_stats-0.16.0/tests/unit/test_design_based.py +245 -0
- safety_stats-0.16.0/tests/unit/test_design_effect.py +232 -0
- safety_stats-0.16.0/tests/unit/test_diagnostic_fields.py +112 -0
- safety_stats-0.16.0/tests/unit/test_diagnostic_items.py +200 -0
- safety_stats-0.16.0/tests/unit/test_diagnostic_scopes.py +115 -0
- safety_stats-0.16.0/tests/unit/test_direct_mean.py +626 -0
- safety_stats-0.16.0/tests/unit/test_effect_localisation.py +607 -0
- safety_stats-0.16.0/tests/unit/test_generative_bridge.py +298 -0
- safety_stats-0.16.0/tests/unit/test_generative_comparisons.py +226 -0
- safety_stats-0.16.0/tests/unit/test_generative_contrasts.py +436 -0
- safety_stats-0.16.0/tests/unit/test_generative_conversations.py +471 -0
- safety_stats-0.16.0/tests/unit/test_generative_inference.py +384 -0
- safety_stats-0.16.0/tests/unit/test_generative_judge_coverage.py +81 -0
- safety_stats-0.16.0/tests/unit/test_generative_kernels_ledger.py +314 -0
- safety_stats-0.16.0/tests/unit/test_generative_planning.py +190 -0
- safety_stats-0.16.0/tests/unit/test_generative_public_api.py +102 -0
- safety_stats-0.16.0/tests/unit/test_generative_sampling.py +138 -0
- safety_stats-0.16.0/tests/unit/test_generative_taxonomy.py +347 -0
- safety_stats-0.16.0/tests/unit/test_hierarchy_region.py +203 -0
- safety_stats-0.16.0/tests/unit/test_include_decisions_default.py +37 -0
- safety_stats-0.16.0/tests/unit/test_independence_profiles.py +362 -0
- safety_stats-0.16.0/tests/unit/test_inspect_extra.py +118 -0
- safety_stats-0.16.0/tests/unit/test_inspect_extra_import.py +70 -0
- safety_stats-0.16.0/tests/unit/test_interval_assumptions.py +77 -0
- safety_stats-0.16.0/tests/unit/test_interval_roles.py +23 -0
- safety_stats-0.16.0/tests/unit/test_judge_calibration.py +98 -0
- safety_stats-0.16.0/tests/unit/test_judge_cohort_boxes.py +131 -0
- safety_stats-0.16.0/tests/unit/test_judge_flip.py +303 -0
- safety_stats-0.16.0/tests/unit/test_judge_group_scopes.py +161 -0
- safety_stats-0.16.0/tests/unit/test_judge_policy_correction.py +232 -0
- safety_stats-0.16.0/tests/unit/test_judge_stress.py +300 -0
- safety_stats-0.16.0/tests/unit/test_judge_unclassified_share.py +656 -0
- safety_stats-0.16.0/tests/unit/test_judges.py +159 -0
- safety_stats-0.16.0/tests/unit/test_labelling_protocol.py +303 -0
- safety_stats-0.16.0/tests/unit/test_lang_reiczigel.py +137 -0
- safety_stats-0.16.0/tests/unit/test_manifest.py +344 -0
- safety_stats-0.16.0/tests/unit/test_method_planning.py +324 -0
- safety_stats-0.16.0/tests/unit/test_method_registry.py +66 -0
- safety_stats-0.16.0/tests/unit/test_misclassification.py +666 -0
- safety_stats-0.16.0/tests/unit/test_multiplicity.py +10 -0
- safety_stats-0.16.0/tests/unit/test_noisy_valid.py +147 -0
- safety_stats-0.16.0/tests/unit/test_numpy_counts.py +64 -0
- safety_stats-0.16.0/tests/unit/test_outcome_mapping_sensitivities.py +671 -0
- safety_stats-0.16.0/tests/unit/test_package_imports.py +112 -0
- safety_stats-0.16.0/tests/unit/test_paired.py +449 -0
- safety_stats-0.16.0/tests/unit/test_panel_correction.py +202 -0
- safety_stats-0.16.0/tests/unit/test_pilot.py +284 -0
- safety_stats-0.16.0/tests/unit/test_plan_defaults.py +203 -0
- safety_stats-0.16.0/tests/unit/test_plan_floats.py +122 -0
- safety_stats-0.16.0/tests/unit/test_plan_integers.py +73 -0
- safety_stats-0.16.0/tests/unit/test_plan_reference_diagnostics.py +257 -0
- safety_stats-0.16.0/tests/unit/test_plan_schema_3.py +252 -0
- safety_stats-0.16.0/tests/unit/test_plan_schema_version.py +74 -0
- safety_stats-0.16.0/tests/unit/test_planning.py +104 -0
- safety_stats-0.16.0/tests/unit/test_pooled_calibration_gap.py +81 -0
- safety_stats-0.16.0/tests/unit/test_precision_planning.py +58 -0
- safety_stats-0.16.0/tests/unit/test_public_docstrings.py +93 -0
- safety_stats-0.16.0/tests/unit/test_registration_receipt.py +437 -0
- safety_stats-0.16.0/tests/unit/test_registry.py +605 -0
- safety_stats-0.16.0/tests/unit/test_report_index.py +277 -0
- safety_stats-0.16.0/tests/unit/test_report_paths.py +50 -0
- safety_stats-0.16.0/tests/unit/test_report_presentation.py +43 -0
- safety_stats-0.16.0/tests/unit/test_report_summary.py +277 -0
- safety_stats-0.16.0/tests/unit/test_results_establish_link.py +143 -0
- safety_stats-0.16.0/tests/unit/test_risk.py +189 -0
- safety_stats-0.16.0/tests/unit/test_rollout_files.py +188 -0
- safety_stats-0.16.0/tests/unit/test_scoped_judge_calibration_coverage.py +199 -0
- safety_stats-0.16.0/tests/unit/test_sequential.py +317 -0
- safety_stats-0.16.0/tests/unit/test_single_valued.py +115 -0
- safety_stats-0.16.0/tests/unit/test_stratified_calibration.py +461 -0
- safety_stats-0.16.0/tests/unit/test_token_limit.py +65 -0
- safety_stats-0.16.0/tests/unit/test_tree_calibration.py +120 -0
- safety_stats-0.16.0/tests/unit/test_validation_manifest.py +84 -0
- safety_stats-0.16.0/tests/unit/test_verdict_range.py +266 -0
- safety_stats-0.16.0/tests/unit/test_visualization_json.py +21 -0
- safety_stats-0.16.0/tools/hygiene.conf +6 -0
- safety_stats-0.16.0/upstream/inspect-ai/0001-eval-retry-reruns-a-sample-whose-input-changed.patch +199 -0
- safety_stats-0.16.0/upstream/inspect-ai/0001-eval-retry-runs-logs-concurrently-under-max-tasks.patch +401 -0
- safety_stats-0.16.0/upstream/inspect-ai/README.md +119 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Store and check out text with LF on every platform, so byte-pinned fixtures, golden
|
|
2
|
+
# outputs and shell scripts are identical on Linux, macOS and Windows (where Git defaults
|
|
3
|
+
# to core.autocrlf=true).
|
|
4
|
+
* text=auto eol=lf
|
|
5
|
+
|
|
6
|
+
# Data fixtures are compared byte for byte, some by SHA-256, and several are committed
|
|
7
|
+
# with the CRLF line endings that the csv module writes. Never convert them.
|
|
8
|
+
*.csv -text
|
|
9
|
+
|
|
10
|
+
# Inspect logs are zip archives.
|
|
11
|
+
*.eval binary
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: A command or function gave a wrong result, failed, or did not do what its documentation says.
|
|
3
|
+
labels: [bug]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
A suspected security problem goes through the repository's **Security** tab instead (SECURITY.md).
|
|
9
|
+
Do not attach logs, reports or prompts from private evaluations, or harmful content beyond what is
|
|
10
|
+
public in the source benchmark: reduce the problem to a small offline case.
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: what-happened
|
|
13
|
+
attributes:
|
|
14
|
+
label: What happened
|
|
15
|
+
description: The command or call, and what it printed or returned. Paste diagnostics with their codes.
|
|
16
|
+
render: text
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: expected
|
|
21
|
+
attributes:
|
|
22
|
+
label: What you expected
|
|
23
|
+
description: What should have happened instead, and where the documentation says so, if it does.
|
|
24
|
+
validations:
|
|
25
|
+
required: true
|
|
26
|
+
- type: textarea
|
|
27
|
+
id: reproduce
|
|
28
|
+
attributes:
|
|
29
|
+
label: How to reproduce it
|
|
30
|
+
description: >-
|
|
31
|
+
The smallest plan, manifest and rollout files, or Python code, that show the problem without a
|
|
32
|
+
model provider or the network. `safety-stats init` and the files under `examples/` are
|
|
33
|
+
good starting points.
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
- type: input
|
|
37
|
+
id: version
|
|
38
|
+
attributes:
|
|
39
|
+
label: Version
|
|
40
|
+
description: The output of `safety-stats version`.
|
|
41
|
+
validations:
|
|
42
|
+
required: true
|
|
43
|
+
- type: input
|
|
44
|
+
id: environment
|
|
45
|
+
attributes:
|
|
46
|
+
label: Python and operating system
|
|
47
|
+
placeholder: Python 3.12 on Ubuntu 24.04
|
|
48
|
+
validations:
|
|
49
|
+
required: true
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: Change or feature
|
|
2
|
+
description: Propose a behaviour change or a new capability, before writing the pull request.
|
|
3
|
+
labels: [enhancement]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
CONTRIBUTING.md section 3: a change a user can observe (class B) or a new capability (class C) needs an
|
|
9
|
+
issue a maintainer has agreed to before its pull request is merged. A new estimator, bound or risk
|
|
10
|
+
measure has its own template, "Statistical method".
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: problem
|
|
13
|
+
attributes:
|
|
14
|
+
label: Problem
|
|
15
|
+
description: What a user cannot do, or gets wrong, today. A real evaluation that runs into it helps most.
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: proposal
|
|
20
|
+
attributes:
|
|
21
|
+
label: Proposal
|
|
22
|
+
description: What should change, and what a user would see afterwards, in the report, the CLI or the API.
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
- type: dropdown
|
|
26
|
+
id: change-class
|
|
27
|
+
attributes:
|
|
28
|
+
label: Change class
|
|
29
|
+
description: CONTRIBUTING.md section 3. Anything that changes an output byte is B.
|
|
30
|
+
options:
|
|
31
|
+
- "B. Behaviour change"
|
|
32
|
+
- "C. New capability"
|
|
33
|
+
- "A. Behaviour-neutral"
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: alternatives
|
|
38
|
+
attributes:
|
|
39
|
+
label: Alternatives considered
|
|
40
|
+
description: Other ways to solve it, including doing nothing, and why this one is better.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Statistical method
|
|
2
|
+
description: Propose a new estimator, interval, bound or risk measure (CONTRIBUTING.md section 8).
|
|
3
|
+
labels: [enhancement]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
CONTRIBUTING.md section 8 says what a statistical contribution needs: the derivation in
|
|
9
|
+
docs/statistical-methods.md, the method registered everywhere methods are accepted, coverage tests, and
|
|
10
|
+
review by someone with the relevant statistical background. This issue states what the method claims.
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: estimand
|
|
13
|
+
attributes:
|
|
14
|
+
label: Estimand
|
|
15
|
+
description: What quantity the method estimates or bounds, and for which design.
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: assumptions
|
|
20
|
+
attributes:
|
|
21
|
+
label: Assumptions
|
|
22
|
+
description: Every assumption the guarantee rests on, independence and the design included.
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
- type: textarea
|
|
26
|
+
id: guarantee
|
|
27
|
+
attributes:
|
|
28
|
+
label: Guarantee
|
|
29
|
+
description: >-
|
|
30
|
+
In one sentence, for example "under independent blocks, P(true risk ≤ U) ≥ 1 − α simultaneously over
|
|
31
|
+
all declared nodes".
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
- type: textarea
|
|
35
|
+
id: source
|
|
36
|
+
attributes:
|
|
37
|
+
label: Citation or proof sketch
|
|
38
|
+
validations:
|
|
39
|
+
required: true
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
CONTRIBUTING.md is the contract for every change; AGENTS.md is the short version.
|
|
3
|
+
Delete the comments as you fill this in.
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
## What and why
|
|
7
|
+
|
|
8
|
+
<!-- One concern per pull request. -->
|
|
9
|
+
|
|
10
|
+
Closes #
|
|
11
|
+
|
|
12
|
+
## Change class
|
|
13
|
+
|
|
14
|
+
<!-- CONTRIBUTING section 3. Anything that changes an output byte is B, a bug fix included. -->
|
|
15
|
+
|
|
16
|
+
- [ ] A. Behaviour-neutral
|
|
17
|
+
- [ ] B. Behaviour change (issue agreed by a maintainer, changelog entry, regenerated outputs in a separate commit)
|
|
18
|
+
- [ ] C. New capability (everything in B, plus CONTRIBUTING section 8)
|
|
19
|
+
|
|
20
|
+
## Gate
|
|
21
|
+
|
|
22
|
+
<!-- Run locally; say on which operating system. Run `ruff check` only, never `ruff format`. -->
|
|
23
|
+
|
|
24
|
+
- [ ] `ruff check src tests examples research scripts`
|
|
25
|
+
- [ ] `mypy src/safety_stats`
|
|
26
|
+
- [ ] `pytest`
|
|
27
|
+
|
|
28
|
+
Operating system:
|
|
29
|
+
|
|
30
|
+
## Evidence
|
|
31
|
+
|
|
32
|
+
<!--
|
|
33
|
+
Paste the verdict:
|
|
34
|
+
- bug fix: `python scripts/prove_red.py <tests>` reports PROVEN;
|
|
35
|
+
- class A: `python scripts/compare_artifacts.py` reports IDENTICAL.
|
|
36
|
+
Once the change is committed, pass `--base <commit>`.
|
|
37
|
+
-->
|
|
38
|
+
|
|
39
|
+
## Golden outputs and docs
|
|
40
|
+
|
|
41
|
+
<!-- Which expected outputs, fixtures, docs and CHANGELOG.md entries change, and why. -->
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
# Weekly, so that new releases of unpinned dependencies (inspect-ai above all) that break
|
|
9
|
+
# the package are noticed before users hit them, and so that the macOS leg runs at least
|
|
10
|
+
# once a week.
|
|
11
|
+
schedule:
|
|
12
|
+
- cron: "0 5 * * 1"
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
env:
|
|
19
|
+
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
lint:
|
|
23
|
+
name: ruff
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
- uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.12"
|
|
30
|
+
cache: pip
|
|
31
|
+
cache-dependency-path: pyproject.toml
|
|
32
|
+
- run: python -m pip install -e '.[dev]'
|
|
33
|
+
- run: ruff check src tests examples research scripts
|
|
34
|
+
|
|
35
|
+
types:
|
|
36
|
+
name: mypy (strict)
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- uses: actions/setup-python@v5
|
|
41
|
+
with:
|
|
42
|
+
# tool.mypy pins python_version 3.12; running it once is enough.
|
|
43
|
+
python-version: "3.12"
|
|
44
|
+
cache: pip
|
|
45
|
+
cache-dependency-path: pyproject.toml
|
|
46
|
+
- run: python -m pip install -e '.[dev]'
|
|
47
|
+
- run: mypy src/safety_stats
|
|
48
|
+
|
|
49
|
+
test:
|
|
50
|
+
name: pytest (${{ matrix.os }}, ${{ matrix.python-version }})
|
|
51
|
+
# Runner minutes on this private repository are the owner's. A push to main is a merge
|
|
52
|
+
# whose tree its pull request already tested on this whole matrix, so it runs the single
|
|
53
|
+
# smoke job below instead. The weekly and manual runs still run everything.
|
|
54
|
+
if: github.event_name != 'push'
|
|
55
|
+
runs-on: ${{ matrix.os }}
|
|
56
|
+
strategy:
|
|
57
|
+
fail-fast: false
|
|
58
|
+
matrix:
|
|
59
|
+
os: [ubuntu-latest]
|
|
60
|
+
# Every version the package claims to support. The development
|
|
61
|
+
# environment is 3.12, so the older two are only ever exercised here.
|
|
62
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
63
|
+
# Windows on one Python version: path, encoding and line-ending problems are
|
|
64
|
+
# platform-specific, not version-specific.
|
|
65
|
+
include:
|
|
66
|
+
- os: windows-latest
|
|
67
|
+
python-version: "3.12"
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@v4
|
|
70
|
+
- uses: actions/setup-python@v5
|
|
71
|
+
with:
|
|
72
|
+
python-version: ${{ matrix.python-version }}
|
|
73
|
+
cache: pip
|
|
74
|
+
cache-dependency-path: pyproject.toml
|
|
75
|
+
- run: python -m pip install -e '.[dev]'
|
|
76
|
+
- run: pytest -ra
|
|
77
|
+
|
|
78
|
+
test-main:
|
|
79
|
+
name: pytest (ubuntu-latest, 3.12, after merge)
|
|
80
|
+
# A smoke run for a push to main. The full matrix ran on the pull request's tree.
|
|
81
|
+
if: github.event_name == 'push'
|
|
82
|
+
runs-on: ubuntu-latest
|
|
83
|
+
steps:
|
|
84
|
+
- uses: actions/checkout@v4
|
|
85
|
+
- uses: actions/setup-python@v5
|
|
86
|
+
with:
|
|
87
|
+
python-version: "3.12"
|
|
88
|
+
cache: pip
|
|
89
|
+
cache-dependency-path: pyproject.toml
|
|
90
|
+
- run: python -m pip install -e '.[dev]'
|
|
91
|
+
- run: pytest -ra
|
|
92
|
+
|
|
93
|
+
test-macos:
|
|
94
|
+
name: pytest (macos-latest, 3.12)
|
|
95
|
+
# macOS runner minutes cost ten times Linux minutes on private repositories, so this leg
|
|
96
|
+
# runs weekly and on demand only. Run it on a branch with
|
|
97
|
+
# "gh workflow run CI --ref <branch>" when a change is platform-sensitive.
|
|
98
|
+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
99
|
+
runs-on: macos-latest
|
|
100
|
+
steps:
|
|
101
|
+
- uses: actions/checkout@v4
|
|
102
|
+
- uses: actions/setup-python@v5
|
|
103
|
+
with:
|
|
104
|
+
python-version: "3.12"
|
|
105
|
+
cache: pip
|
|
106
|
+
cache-dependency-path: pyproject.toml
|
|
107
|
+
- run: python -m pip install -e '.[dev]'
|
|
108
|
+
- run: pytest -ra
|
|
109
|
+
|
|
110
|
+
build:
|
|
111
|
+
name: build wheel and sdist
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
steps:
|
|
114
|
+
- uses: actions/checkout@v4
|
|
115
|
+
- uses: actions/setup-python@v5
|
|
116
|
+
with:
|
|
117
|
+
python-version: "3.12"
|
|
118
|
+
cache: pip
|
|
119
|
+
cache-dependency-path: pyproject.toml
|
|
120
|
+
- run: python -m pip install build
|
|
121
|
+
- run: python -m build
|
|
122
|
+
- name: Install the built wheel into a clean environment
|
|
123
|
+
# The release workflow runs the same checks on the distributions it publishes.
|
|
124
|
+
run: bash scripts/check_wheel.sh "$(ls dist/*.whl)" /tmp/check
|
|
125
|
+
- uses: actions/upload-artifact@v4
|
|
126
|
+
with:
|
|
127
|
+
name: distributions
|
|
128
|
+
path: dist/
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Formal proofs
|
|
2
|
+
|
|
3
|
+
# Lean proofs of the statements the statistics rely on. Python contributors never need Lean, so
|
|
4
|
+
# this runs only when formal/ changes, weekly against the pinned Mathlib, and on demand.
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
paths: ["formal/**", ".github/workflows/formal.yml"]
|
|
9
|
+
pull_request:
|
|
10
|
+
paths: ["formal/**", ".github/workflows/formal.yml"]
|
|
11
|
+
schedule:
|
|
12
|
+
- cron: "0 5 * * 1"
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
|
|
15
|
+
concurrency:
|
|
16
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
17
|
+
cancel-in-progress: true
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build:
|
|
21
|
+
name: lake build and axiom audit
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
- uses: leanprover/lean-action@v1.6.1
|
|
26
|
+
with:
|
|
27
|
+
lake-package-directory: formal
|
|
28
|
+
# Fails if any theorem depends on sorry or on an axiom beyond the standard three. It
|
|
29
|
+
# audits the modules of the lakefile's first library, SafetyStatsFormal.
|
|
30
|
+
axiom-audit: "true"
|
|
31
|
+
# Mathlib's own cache server supplies the build; saving it again to the GitHub cache
|
|
32
|
+
# runs the runner out of disk.
|
|
33
|
+
use-github-cache: "false"
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Publishes the package when a version tag is pushed. docs/releasing.md has the steps and the
|
|
4
|
+
# one-time setup.
|
|
5
|
+
# v0.16.0 must equal the package version; published to PyPI.
|
|
6
|
+
# v0.16.0rc1 a release candidate of the package version, built as 0.16.0rc1 from the same
|
|
7
|
+
# commit and published to TestPyPI only.
|
|
8
|
+
# A tag must point at a commit on main. Publishing uses PyPI trusted publishing (OpenID
|
|
9
|
+
# Connect): no API token is stored in the repository.
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
push:
|
|
13
|
+
tags: ["v*"]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
concurrency:
|
|
19
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
20
|
+
cancel-in-progress: false
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
build:
|
|
24
|
+
name: build and check
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
outputs:
|
|
27
|
+
version: ${{ steps.release.outputs.version }}
|
|
28
|
+
index: ${{ steps.release.outputs.index }}
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
with:
|
|
32
|
+
fetch-depth: 0
|
|
33
|
+
- uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
python-version: "3.12"
|
|
36
|
+
- name: Check that the tagged commit is on main
|
|
37
|
+
run: |
|
|
38
|
+
git fetch --quiet origin main
|
|
39
|
+
if ! git merge-base --is-ancestor "$(git rev-parse HEAD)" origin/main; then
|
|
40
|
+
echo "tag ${GITHUB_REF_NAME} points at a commit that is not on main" >&2
|
|
41
|
+
exit 1
|
|
42
|
+
fi
|
|
43
|
+
- name: Check the tag against the package version
|
|
44
|
+
id: release
|
|
45
|
+
run: python scripts/release_version.py "$GITHUB_REF_NAME" --apply >> "$GITHUB_OUTPUT"
|
|
46
|
+
- run: python -m pip install build twine
|
|
47
|
+
- run: python -m build
|
|
48
|
+
- run: python -m twine check --strict dist/*
|
|
49
|
+
- name: The distributions carry the tag's version
|
|
50
|
+
run: |
|
|
51
|
+
ls dist/
|
|
52
|
+
test -f "dist/safety_stats-${{ steps.release.outputs.version }}-py3-none-any.whl"
|
|
53
|
+
test -f "dist/safety_stats-${{ steps.release.outputs.version }}.tar.gz"
|
|
54
|
+
- name: Install the built wheel into a clean environment
|
|
55
|
+
run: bash scripts/check_wheel.sh "$(ls dist/*.whl)" /tmp/check
|
|
56
|
+
- uses: actions/upload-artifact@v4
|
|
57
|
+
with:
|
|
58
|
+
name: distributions
|
|
59
|
+
path: dist/
|
|
60
|
+
|
|
61
|
+
testpypi:
|
|
62
|
+
name: publish a release candidate to TestPyPI
|
|
63
|
+
needs: build
|
|
64
|
+
if: needs.build.outputs.index == 'testpypi'
|
|
65
|
+
runs-on: ubuntu-latest
|
|
66
|
+
environment:
|
|
67
|
+
name: testpypi
|
|
68
|
+
url: https://test.pypi.org/project/safety-stats/${{ needs.build.outputs.version }}/
|
|
69
|
+
permissions:
|
|
70
|
+
id-token: write
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/download-artifact@v4
|
|
73
|
+
with:
|
|
74
|
+
name: distributions
|
|
75
|
+
path: dist/
|
|
76
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
77
|
+
with:
|
|
78
|
+
repository-url: https://test.pypi.org/legacy/
|
|
79
|
+
|
|
80
|
+
pypi:
|
|
81
|
+
name: publish the release to PyPI
|
|
82
|
+
needs: build
|
|
83
|
+
if: needs.build.outputs.index == 'pypi'
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
environment:
|
|
86
|
+
name: pypi
|
|
87
|
+
url: https://pypi.org/project/safety-stats/${{ needs.build.outputs.version }}/
|
|
88
|
+
permissions:
|
|
89
|
+
id-token: write
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/download-artifact@v4
|
|
92
|
+
with:
|
|
93
|
+
name: distributions
|
|
94
|
+
path: dist/
|
|
95
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.coverage
|
|
2
|
+
.hypothesis/
|
|
3
|
+
.mypy_cache/
|
|
4
|
+
.pytest_cache/
|
|
5
|
+
.ruff_cache/
|
|
6
|
+
.venv/
|
|
7
|
+
.vscode/
|
|
8
|
+
.env
|
|
9
|
+
.env.*
|
|
10
|
+
!.env.example
|
|
11
|
+
.inspect-data/
|
|
12
|
+
.inspect-trace.log
|
|
13
|
+
__pycache__/
|
|
14
|
+
*.py[cod]
|
|
15
|
+
*.egg-info/
|
|
16
|
+
build/
|
|
17
|
+
dist/
|
|
18
|
+
reports/
|
|
19
|
+
examples/real_xstest/live-runs/
|
|
20
|
+
examples/real_harmbench/live-runs/
|
|
21
|
+
examples/real_jailbreakbench/live-runs/
|
|
22
|
+
examples/real_jailbreakbench/multilingual-live-runs/
|
|
23
|
+
examples/real_jailbreakbench/translations/
|
|
24
|
+
|
|
25
|
+
# Local run output (not source)
|
|
26
|
+
logs/
|
|
27
|
+
# Generative materialization writes prompt text here -- datasets, the restricted
|
|
28
|
+
# prompt store, eval logs and reports. None of it belongs in version control.
|
|
29
|
+
run/
|
|
30
|
+
.inspect-trace.log.gz
|
|
31
|
+
|
|
32
|
+
# uv writes this when it resolves the environment locally. CI installs with pip
|
|
33
|
+
# straight from pyproject.toml and never reads it, so committing it would pin
|
|
34
|
+
# nothing that is actually enforced.
|
|
35
|
+
uv.lock
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Notes for coding agents
|
|
2
|
+
|
|
3
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) is the contract for every change, whoever or whatever writes
|
|
4
|
+
it. This file is the short version to read first: the checks to run before you finish, and the
|
|
5
|
+
mistakes that have already broken this repository once, each with what now catches it. It
|
|
6
|
+
applies to people too.
|
|
7
|
+
|
|
8
|
+
## Before you finish
|
|
9
|
+
|
|
10
|
+
- **Change class.** Decide whether the change is class A, B or C (CONTRIBUTING section 3)
|
|
11
|
+
before writing code. Anything that changes an output byte is class B, a bug fix included.
|
|
12
|
+
- **Gate.** Run all three:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
ruff check src tests examples research scripts
|
|
16
|
+
mypy src/safety_stats
|
|
17
|
+
pytest
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Run `ruff check` only. `ruff format` rewrites hundreds of untouched lines.
|
|
21
|
+
- **Evidence.** Paste the verdict into the pull request.
|
|
22
|
+
- Bug fix: `python scripts/prove_red.py <tests>` must report `PROVEN`. A test that passes
|
|
23
|
+
without the fix proves nothing. For a fix outside `src/`, such as in `examples/` or
|
|
24
|
+
`scripts/`, add `--tree`.
|
|
25
|
+
- Class A: `python scripts/compare_artifacts.py` must report `IDENTICAL`.
|
|
26
|
+
- Both scripts compare against `HEAD` by default. Once the change is committed, pass
|
|
27
|
+
`--base <commit>`.
|
|
28
|
+
|
|
29
|
+
## Mistakes that have happened here
|
|
30
|
+
|
|
31
|
+
| Mistake | What catches it now | Rule |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `pytest.approx(3e-17, rel=1e-9)` accepted 0.0, so a precision test passed against the bug it was written for | `test_approx_tolerances_cannot_make_small_comparisons_vacuous` | `approx` adds `abs=1e-12` unless told otherwise. Pass `abs=` whenever you pass `rel=` or compare small values, and `abs=0` for a purely relative check. |
|
|
34
|
+
| A CLI test passed locally and failed on CI, where typer colours `--weights` into `-` and `-weights` | `tests/conftest.py`, which renders the CI way in every run | Assert on `tests.cli_output.plain(result.output)`, not on the raw output. |
|
|
35
|
+
| Report bytes and checksums differed on Windows, because text was written with CRLF | `test_text_artifacts_have_the_same_bytes_on_every_platform`, on Windows CI | `newline="\n"` for text files, `lineterminator="\n"` for pandas CSVs (CONTRIBUTING section 6). |
|
|
36
|
+
| Tests reading real logs failed on Windows when the temporary directory and the checkout were on different drives | the autouse fixture in `tests/integration/test_generative_real_logs.py` | Inspect drops the drive letter of such logs (#35). Run from the drive that holds them. |
|
|
37
|
+
| `k: true` in a plan was accepted as `k = 1` | `test_plans_reject_a_boolean_k` | Pydantic's lax mode turns booleans into integers. Reject them in a `mode="before"` validator. |
|
|
38
|
+
| `1 - (1 - p) ** k` returned 0 for tiny `p` | `test_worst_of_k_stays_accurate_for_tiny_probabilities` | Use `-expm1(k * log1p(-p))` and similar forms, and test tiny inputs with `abs=0`. |
|
|
39
|
+
| A missing `block_by` value changed how prompts were blocked, depending on pandas' dtype inference | `test_missing_manifest_block_values_are_rejected` | Reject missing values in declared grouping columns. Never let dtype inference decide. |
|
|
40
|
+
| `import safety_stats` took seconds | `tests/unit/test_package_imports.py` | No module-level imports of pandas, Inspect or the pipeline in `__init__.py` or `cli.py` (CONTRIBUTING section 5.1). |
|
|
41
|
+
|
|
42
|
+
## Working in the tree
|
|
43
|
+
|
|
44
|
+
- **Order-dependent code.** Search for `ORDER MATTERS` before reordering statements that look
|
|
45
|
+
independent. When you create such a dependency, leave a note that says what must come first
|
|
46
|
+
and what breaks otherwise.
|
|
47
|
+
- **Expected outputs and fixtures.** Never edit expected outputs or CSV fixtures to make a test
|
|
48
|
+
pass.
|
|
49
|
+
- Class A changes never touch them.
|
|
50
|
+
- Class B changes regenerate them in a separate commit that explains every difference.
|
|
51
|
+
- **The committed version of a file.** Never run `git checkout -- <path>` or `git stash` just to
|
|
52
|
+
see or test the committed code. Either can discard uncommitted work, and once lost a fix that
|
|
53
|
+
had to be redone. Both scripts above export committed source to a temporary directory and
|
|
54
|
+
leave the working tree alone.
|
|
55
|
+
- **Test helpers.** Shared helpers live in modules without a `test_` prefix, such as
|
|
56
|
+
`tests/cli_output.py` and `tests/generative_fixtures.py`. Do not import one test module from
|
|
57
|
+
another.
|
|
58
|
+
- **Network.** Tests never call a model provider or the network.
|
|
59
|
+
- **Platforms.** Linux, macOS and Windows are all first-class (CONTRIBUTING section 6). Pull
|
|
60
|
+
requests run on Linux and Windows. macOS runs weekly and on demand.
|
|
61
|
+
- **CI minutes.** Runner minutes on this private repository are billed to its owner. Run the
|
|
62
|
+
gate locally, and push a branch when it is ready for review, not after every commit.
|
|
63
|
+
|
|
64
|
+
## Commits and pull requests
|
|
65
|
+
|
|
66
|
+
- **Commits.** One logical change per commit. Write the subject in the imperative and in
|
|
67
|
+
sentence case, and put the reasoning and evidence in the body. Do not mix moves and edits.
|
|
68
|
+
- **One concern per pull request.** Class B and C changes need an issue that a maintainer
|
|
69
|
+
agreed to before merge (CONTRIBUTING section 3).
|
|
70
|
+
- **Merging.** Contributors do not merge their own pull requests. Do not push directly to
|
|
71
|
+
`main`.
|
|
72
|
+
- **Accountability.** AI-assisted contributions meet the same bar. The human author is
|
|
73
|
+
accountable for every line (CONTRIBUTING section 10).
|