feat(synthesis): F-13 synthesis/lead-engine — grounded leads + conjecture quarantine #3

Merged
user2595 merged 2 commits from feat/F-13-synthesis-engine into main 2026-06-14 06:54:51 +00:00
Owner

Summary

  • codex/synthesis.py: Lead/Provenance model, find_connections / find_gaps / find_improvements (grounded, Stufe 2–4), propose_conjectures (Stufe 5, quarantined)
  • codex/cli.py: synthesis leads/conjectures/report command group
  • codex/config.py: F-13 settings (leads_dir, synthesis_llm_*, synthesis_top_k, synthesis_min_grounded_ratio, synthesis_gap_min_coverage)
  • 43 new tests in tests/synthesis/

Key invariants (both Review-Gate passes verified)

  • Conjectures → leads/conjectures/ ONLY, never wiki/ or leads/grounded/ (enforced at routing + RuntimeError guard)
  • Lead.__post_init__ rejects empty provenance list
  • status="unverified" hard-coded at sole conjecture emit site
  • Below-floor grounded ratio → Lead dropped (not silently promoted)

Gate results

  • Pass 1: REQUEST CHANGES (empty provenance in find_gaps no-chunk path)
  • Pass 2: APPROVE — all 4 CRITICAL + 5 WARN checks PASS

215 tests total · ruff + mypy clean

## Summary - `codex/synthesis.py`: Lead/Provenance model, `find_connections` / `find_gaps` / `find_improvements` (grounded, Stufe 2–4), `propose_conjectures` (Stufe 5, quarantined) - `codex/cli.py`: `synthesis leads/conjectures/report` command group - `codex/config.py`: F-13 settings (leads_dir, synthesis_llm_*, synthesis_top_k, synthesis_min_grounded_ratio, synthesis_gap_min_coverage) - 43 new tests in `tests/synthesis/` ## Key invariants (both Review-Gate passes verified) - Conjectures → `leads/conjectures/` ONLY, never `wiki/` or `leads/grounded/` (enforced at routing + RuntimeError guard) - `Lead.__post_init__` rejects empty `provenance` list - `status="unverified"` hard-coded at sole conjecture emit site - Below-floor grounded ratio → Lead dropped (not silently promoted) ## Gate results - Pass 1: REQUEST CHANGES (empty provenance in find_gaps no-chunk path) - Pass 2: **APPROVE** — all 4 CRITICAL + 5 WARN checks PASS 215 tests total · ruff + mypy clean
user2595 added 2 commits 2026-06-14 06:54:41 +00:00
- codex/synthesis.py: Lead/Provenance dataclasses, find_connections/gaps/improvements,
  propose_conjectures (status=unverified, quarantined in leads/conjectures/),
  write_leads (grounded→leads/grounded/, conjectures→leads/conjectures/ HARD invariant)
- codex/cli.py: synthesis leads/conjectures/report command group
- codex/config.py: F-13 settings (leads_dir, synthesis_llm_*, synthesis_top_k,
  synthesis_min_grounded_ratio, synthesis_gap_min_coverage)
- tests/synthesis/: 42 tests covering model, grounding, conjecture invariant, quarantine, CLI
- spike/: F-13 spike script + output (live run attempted)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Lead.__post_init__: raises ValueError on empty provenance list
- find_gaps: no-chunk path now carries topic-marker Provenance instead of []
- _update_index: docstring corrected (rebuilds, not append-only)
- test_model: test_lead_empty_provenance_raises covers the new invariant

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
user2595 merged commit 59763105a5 into main 2026-06-14 06:54:51 +00:00
user2595 deleted branch feat/F-13-synthesis-engine 2026-06-14 06:54:51 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: user2595/codex-py#3
No description provided.