Shay
|
2c5eb2e36b
|
feat(w019): wire core teaching propose-miner/propose-curriculum CLI commands (#266)
Closes W-019 wiring debt. Per Phase 2 operator decision (path a):
wire CLI — smallest reachability fix, no architectural commitment.
teaching/from_miner.py and teaching/from_curriculum.py (ADR-0095/ADR-0104)
correctly build source-stamped PackMutationProposals but had no CLI or
runtime caller — test-live only. Now reachable:
core teaching propose-miner \
--findings <jsonl> --miner-id <id> [--revision <rev>] [--out <jsonl>]
core teaching propose-curriculum \
--findings <jsonl> --curriculum-id <id> [--revision <rev>] [--out <jsonl>]
Changes to core/cli.py:
- _load_findings_jsonl(): deserializes ContemplationFinding records from
operator-provided JSONL (as_dict() round-trip format).
- _read_jsonl_file(): shared JSONL line reader.
- cmd_teaching_propose_miner(): calls from_miner.from_findings(); writes
proposals to --out JSONL or stdout; prints proposals/rejections summary
to stderr. Returns 0 if any proposals built, 1 otherwise.
- cmd_teaching_propose_curriculum(): same shape for curriculum path.
- _current_git_revision(): --revision default, falls back to "unknown".
- _write_miner_curriculum_batch(): shared proposal serialisation + summary.
- Two new subcommands registered: propose-miner, propose-curriculum.
tests/test_teaching_propose_cli.py: 5 tests covering round-trip loading,
stdout output, file output, and empty-findings error path.
|
2026-05-25 06:09:57 -07:00 |
|