Files
gaokao-volunteer-system/tests
Hermes 56cf2c3ee2
Some checks failed
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
feat(rules): land hunan 2026 evidence layer (phase 4)
Landing the first province sample of the rules/_evidence/ tree.
Locks down the hunan-2026 本科批 院校专业组 rule set so audit
output and downstream consumers can cite the source摘录 instead
of just 'trust me, the loader says so'.

What's in the box:
- rules/_evidence/README.md: directory contract, evidence-file
  template (4 required sections), coverage table, and a note on
  RuleLoader's future strict_evidence toggle.
- rules/_evidence/hunan/<11 rule keys>.md: one Markdown
  摘录 per source_evidence_id declared in hunan.yaml
  (mode / batch / max_volunteers / max_majors_per_group /
   has_adjustment / adjustment_scope / retrieval_rule /
   collection_count / subject_mode / official_url /
   exam_subject_total). Each file carries the official quote,
  the machine-readable YAML form, key edge cases, and the
  next-review date.
- tests/test_rules_evidence_layer.py: 4 invariants
  * README exists and documents the contract
  * every active hunan.yaml source_evidence_id has a matching
    .md file
  * 11 evidence files contain the keywords that prove they
    actually carry the rule (parameterised, one test per file)
  * every evidence file has all 4 required template sections
  * no orphan evidence files (file exists but no rule
    references it)

Verification:
- focused: 27 passed (15 evidence-layer + 12 cli doctor)
- dev-verify full gate: all checks passed (ruff / mypy /
  coverage / pytest / benchmark)

Follow-up (not in this commit):
- Wire RuleLoader.from_truth_root(strict_evidence=True) so
  callers can opt in to fail-loud on missing evidence
- Extend the same pattern to national.yaml + 2-3 more
  provinces
- Add a 'last_verified_at' field to each rule and surface
  >90-day-old evidence via 'gaokao-cli rules status'
2026-06-17 22:39:56 +08:00
..
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00
2026-06-13 14:49:58 +08:00