Skip to content

Fail CI when hotspots, dead code, or mutation survivors grow - #174

Merged
jmjava merged 2 commits into
mainfrom
verify/docgen-ratchets
Sep 27, 2026
Merged

jmjava merged 2 commits into
mainfrom
verify/docgen-ratchets

Conversation

@jmjava

@jmjava jmjava commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Hotspot gate fails only when a changed Python file is both complex and frequently edited. The existing complexity diff stays in place.
  • Vulture and mutmut compare to committed baselines and do not rewrite them. The mutation ceiling is the finished path_filters.py run (11 killed, 0 survived).
  • One fitness test checks that the library does not import a consumer package.

Test plan

  • Confirm the pull-request CI jobs pass
  • Confirm CI does not rewrite the vulture or mutation baselines

Made with Cursor

jmjava and others added 2 commits September 26, 2026 23:22
…urvivors grow.

Keep the existing pull-request complexity diff. Hotspots fail only when a changed Python file is both complex and frequently changed. Vulture and mutmut compare to committed baselines and do not rewrite them.

Co-authored-by: Cursor <cursoragent@cursor.com>
The CI mutmut job was executing the full suite, including a narration test that calls the live API.
@jmjava
jmjava merged commit 287a212 into main Sep 27, 2026
8 checks passed
jmjava added a commit that referenced this pull request Oct 8, 2026
* Ground image-generate prompts in documentation and fail unaligned artwork.

Image elements now share the same fail-closed contract as subject-beat
coverage: scene-spec-generate feeds source snippets into the LLM, image
prompts must use documented terms, and image-generate wraps the Images
API call with narration/source plus a validate gate.

Co-authored-by: jmjava <jmjava@gmail.com>

* Fix the scene-spec-generate alignment test to use a spoken image label.

The image stem was treated as an invented subject-beat label and failed
coverage before the new prompt-alignment gate could run.

Co-authored-by: jmjava <jmjava@gmail.com>

* Review generated image pixels against the documentation.

Prompt grounding only checked the caption. image-generate now OCRs the
PNG for invented labels and vision-reviews it (OpenAI / Grok / Claude),
retries once with the critique, and deletes a failing asset. validate
adds image_asset_alignment (OCR on by default; vision opt-in).

Co-authored-by: jmjava <jmjava@gmail.com>

* Fail CI when hotspots, dead code, or mutation survivors grow (#174)

* Add maintainability ratchets that fail when hotspots, dead code, or survivors grow.

Keep the existing pull-request complexity diff. Hotspots fail only when a changed Python file is both complex and frequently changed. Vulture and mutmut compare to committed baselines and do not rewrite them.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Run path_filters mutation against its own tests.

The CI mutmut job was executing the full suite, including a narration test that calls the live API.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>

* Prove timestamps --engine whisper exits 1 when the provider has no speech-to-text. (#178)

Co-authored-by: Cursor <cursoragent@cursor.com>

* Prove docgen tts exits 1 when a listed segment has no narration. (#177)

Co-authored-by: Cursor <cursoragent@cursor.com>

* Prove docgen concat exits 1 when a segment recording is missing. (#176)

Co-authored-by: Cursor <cursoragent@cursor.com>

* Prove docgen benchmark exits 1 when a quality score falls below baseline. (#175)

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fail stale-helper checks when helpers are inlined (#172)

* Fail closed when scenes.py inlines or renames _TimedScene helpers.

The stale-helper check returned no issues when none of the canonical helpers were top-level defs, so inlined or renamed helpers skipped staleness.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Keep inlined-helper detection without raising cyclomatic complexity.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fail timing checks when ffprobe cannot read a duration (#170)

* Fail closed when an ffprobe duration probe fails or returns an unusable duration.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Keep the ffprobe failure path without raising cyclomatic complexity.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fail closed when a benchmark baseline case is missing from the current scores.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Keep baseline-id checks without raising cyclomatic complexity.

* Keep the benchmark case filter out of cli.py.

The hotspot gate fails any edit to that file, so a filtered run marks its scores and compare_to_baseline scopes the missing-id check.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Ground image-generate prompts in documentation and fail unaligned artwork.

Image elements now share the same fail-closed contract as subject-beat
coverage: scene-spec-generate feeds source snippets into the LLM, image
prompts must use documented terms, and image-generate wraps the Images
API call with narration/source plus a validate gate.

Co-authored-by: jmjava <jmjava@gmail.com>

* Fix the scene-spec-generate alignment test to use a spoken image label.

The image stem was treated as an invented subject-beat label and failed
coverage before the new prompt-alignment gate could run.

Co-authored-by: jmjava <jmjava@gmail.com>

* Review generated image pixels against the documentation.

Prompt grounding only checked the caption. image-generate now OCRs the
PNG for invented labels and vision-reviews it (OpenAI / Grok / Claude),
retries once with the critique, and deletes a failing asset. validate
adds image_asset_alignment (OCR on by default; vision opt-in).

Co-authored-by: jmjava <jmjava@gmail.com>

* Keep image-doc alignment under the complexity gates.

Move the new checks into quiet modules and thin wrappers so hotspot files match main and new functions stay within the existing CCN and NLOC limits.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.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