Skip to content

feat: notifications, milestone-aware resume, CLI wiring#32

Open
egerev wants to merge 3 commits intomainfrom
feat/enforcement-hardening-sprint-3
Open

feat: notifications, milestone-aware resume, CLI wiring#32
egerev wants to merge 3 commits intomainfrom
feat/enforcement-hardening-sprint-3

Conversation

@egerev
Copy link
Owner

@egerev egerev commented Mar 23, 2026

Summary

Sprint 3/6 of Supervisor Enforcement Hardening.

  • 5 new notification methods (holistic review, PAR validation, baseline, resume recovery)
  • Notification wiring in _attempt_sprint() and execute_sprint()
  • _check_pr_exists() helper with robust JSON parsing
  • Milestone-aware resume() with checkpoint reading and resume_context
  • CLI cmd_resume passes notifier

Depends on: PR #30 (Sprint 2)

Tests: 185 total (9 new), all passing.

PAR:

  • Claude Code Quality: APPROVE
  • Claude Product: ACCEPTED
  • Codex Product: NEEDS_FIXES (scope boundary — holistic wiring is Sprint 4)
  • Review fix: _check_pr_exists JSON parsing hardened

Test plan

  • 185 tests pass
  • Notification methods tested (5 tests)
  • Resume with milestones tested (2 tests)
  • CLI resume regression test (1 test)
  • _check_pr_exists robust JSON handling

🤖 Generated with Claude Code

egerev and others added 3 commits March 23, 2026 19:52
…rompt hardening

Sprint 1 of enforcement hardening. Adds foundational validation infrastructure:

- checkpoint.py: string ID support (int|str), load_checkpoint_by_name(),
  load_all_checkpoints() keeps numeric-only to protect downstream consumers
- queue.py: baseline_cmd attribute with load/save roundtrip
- supervisor.py: validation constants, _validate_evidence_verdicts(),
  _validate_par_evidence() with type guard, _validate_sprint_summary(),
  preflight .worktrees gitignore check, build_prompt() frontend injection
- supervisor-sprint-prompt.md: PAR evidence instructions, pre-verified
  baseline section, {frontend_instructions} placeholder

20 new tests (152 total). Validators are foundations — integration into
_attempt_sprint() is Sprint 2 scope.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…idation hardening

Sprint 2 of enforcement hardening. Integrates Sprint 1 validators into execution:

- Baseline test gate: _resolve_baseline_cmd() with priority chain,
  run_baseline_tests(), integrated in execute_sprint() inside try block
- PAR validation: separate par_retries counter (not shared with Claude retries),
  max 2 PAR retries before mark_failed
- Summary validation: invalid summaries treated as json_parse_error
- PR verification: 3 retries with 5s delay, empty pr_url = failure
- Milestone writes: baseline_passed, implemented, par_validated, pr_created
  in checkpoints (preserved in failure paths too)
- Parallel safety: queue reload after execute_parallel, checkpoint on worker exception
- Prompt rebuilt each iteration (no unbounded growth)
- Attempt counter independent of retry counter for log filenames

24 new tests (176 total). Review fixes applied: stale queue.save,
log counter, prompt growth, parallel checkpoint, empty pr_url, milestones.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sprint 3 of enforcement hardening. Adds notification infrastructure
and crash recovery improvements:

- 5 new notification methods: holistic review start/complete,
  par_validation_failed, baseline_failed, resume_recovery
- Notification wiring in _attempt_sprint() and execute_sprint()
- _check_pr_exists() helper with robust JSON parsing
- Milestone-aware resume(): reads checkpoints, saves resume_context,
  detects holistic review in_progress, notifies recovery stats
- CLI: cmd_resume passes notifier to resume()
- Parallel safety verified from Sprint 2 (no changes needed)

9 new tests (185 total). Review fix: _check_pr_exists JSON parsing
hardened against whitespace edge cases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant