# Reports Diff And Command Log

## 1. Framework-Hardening Verification Commands

These checks were run after the contract and selector hardening work:

```powershell
python scripts\rebuild_indexes.py --check
python -m unittest discover -s tests -p "test*.py" -v
python scripts\check_card_contract.py
python scripts\validate_model_library.py
python scripts\run_selector_demo.py
python scripts\run_selector_regression.py
python scripts\check_model_card_sync.py
```

Results:

- Index check: PASS.
- Unit tests: PASS, 15 tests.
- Card contract: PASS.
- Model library validation: PASS.
- Selector demo: PASS; selected `qpi`, rejected `intellectual_archaeology`.
- Selector regression: PASS.
- Model/card sync: PASS.

## 2. Case-Promotion Verification Commands

These checks were run after the final `year-end-review-research-office.cases.md` promotion:

```powershell
python -c "import json; paths=['selector/qpi_case_digests.json','selector/selector_calibration_inputs.json','tests/qpi.regression.json','tests/regression_cases.json']; exec('for p in paths:\n    json.load(open(p, encoding=\'utf-8\'))\n    print(\'json_ok\\t\' + p)')"

python -c "import json; d=json.load(open('selector/qpi_case_digests.json', encoding='utf-8')); c=json.load(open('selector/selector_calibration_inputs.json', encoding='utf-8')); r=json.load(open('tests/qpi.regression.json', encoding='utf-8')); a=json.load(open('tests/regression_cases.json', encoding='utf-8')); print('digest research', sum(x['case_id'].startswith('qpi-year-end-research-office-') for x in d['cases'])); print('calibration research', sum(x['case_id'].startswith('selector_calibration_qpi_research_') for x in c['inputs'])); print('qpi regression research', sum(x['case_id'].startswith('case_qpi_research_') for x in r['regression_cases'])); print('all regression research', sum(x['case_id'].startswith('case_qpi_research_') for x in a['regression_cases']))"

python scripts\rebuild_indexes.py --write
python scripts\rebuild_indexes.py --check
python -m unittest discover -s tests -p "test*.py" -v
python scripts\check_card_contract.py
python scripts\validate_model_library.py
python scripts\run_selector_demo.py
python scripts\run_selector_regression.py
python scripts\check_model_card_sync.py
```

Results:

- JSON load check: PASS for all 4 relevant JSON files.
- Research-office count check: PASS, 8 digest / 8 calibration / 4 QPI regression / 4 all regression.
- Index rebuild `--write`: PASS.
- Index rebuild `--check`: PASS.
- Unit tests: PASS, 15 tests.
- Card contract: PASS.
- Model library validation: PASS.
- Selector demo: PASS; selected `qpi`, rejected `intellectual_archaeology`.
- Selector regression: PASS.
- Model/card sync: PASS.

## 3. Important Implementation Notes

During selector verification, the first `run_selector_demo.py` run selected `intellectual_archaeology` for a general complex QPI example. This exposed that IA could still cross the threshold without a heavy-depth signal. The selector config was adjusted:

- `selector_rules.json` IA `base_score` reduced from 35 to 30.
- `ia_no_heavy_gate_penalty` increased from 0.2 to 0.35.

During selector regression, `case_ia_no_call_fact_001` initially selected `qpi` for a fact lookup phrase. The hard no-call signal list was updated with:

- `只是想知道`
- `有没有提到`

After these changes, selector regression passed.

## 4. Changed File Groups

Review bundle structure:

- `ccra_review_bundle/round-02_2026-06-16_second-audit/`
- `ccra_review_bundle/round-03_2026-06-17_contract-hardening-selector-calibration/`

QPI contextual hardening:

- `models/qpi.model.json`
- `cards/qpi.md`
- `sources/source_articles.json`
- `sources/source_excerpts.json`
- `docs/QPI_CONTEXTUAL_ROUTING_RULES.md`

IA depth gate:

- `docs/INTELLECTUAL_ARCHAEOLOGY_DEPTH_GATE.md`

Contracts and validation:

- `schemas/model_card.schema.json`
- `scripts/validate_model_library.py`
- `tests/test_validate_model_library.py`
- `docs/DATA_CONTRACT.md`

Selector:

- `selector/selector_rules.json`
- `selector/selector_calibration_inputs.json`
- `selector/qpi_case_digests.json`
- `scripts/run_selector_demo.py`

Owner-reviewed QPI cases:

- `reports/model_case_preprocessing/qpi/round-01/*.cases.md`
- `reports/model_case_preprocessing/qpi/round-01/README.md`
- `tests/qpi.regression.json`
- `tests/regression_cases.json`

Reports and docs:

- `reports/content_review_report_v0.2.md`
- `reports/validation_report.md`
- `reports/index_rebuild_report.md`
- `reports/model_card_sync_report_v0.2.md`
- `reports/selector_regression_report_v0.2.md`
- `reports/GPT讨论上下文_QPI草稿案例审阅_2026-06-17.md`
- `reports/Codex新会话交接文档_QPI案例草稿审阅与第三轮后续_2026-06-17.md`
- `README.md`
- `docs/DECISIONS.md`
- `knowledge_assets/08_CCRA模型库MVP质量门与交接协议.md`

## 5. Working Tree Caveat

The workspace has not been staged or committed. There are intentionally untracked artifacts such as:

- `selector/qpi_case_digests.json`
- `reports/GPT讨论上下文_QPI草稿案例审阅_2026-06-17.md`
- `scripts/__pycache__/`
- `tests/__pycache__/`

For GPT review, use this consolidated Round 03 bundle and `optional_raw_changed_files.zip`, not `git diff` alone.

