Skip to content

chore(quality): complexity refactors, stricter gates and fixes from the quality pass - #16

Merged
Dreamcoder08 merged 10 commits into
mainfrom
pr/06-quality-pass
Sep 29, 2026
Merged

Dreamcoder08 merged 10 commits into
mainfrom
pr/06-quality-pass

Conversation

@Dreamcoder08

@Dreamcoder08 Dreamcoder08 commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Measured baseline: mypy --strict clean, coverage 83%, no known dependency vulnerabilities. This slice attacks the real hotspots and closes gate gaps that let bugs through.

Changes

  • validate_palette E(34) to B(6); evaluate_contract D(26) to A(1); _parse_renderer_output D(21) to A(2), behaviour-preserving with characterization tests written first
  • Coverage gate 40% to 80% (pyproject, CI, ADR-0003); CI and pre-commit shellcheck cover lib/ and DreamcoderShell/
  • extract() default output directory fixed in bash (SC2318)
  • dreamcoder sync --help no longer runs a real sync (arguments parsed first)
  • Keyboard resize moved to SUPER+CTRL+arrows; the collision test has no exceptions

Verification

Sync output byte-identical for Dark and Light in an isolated worktree (900 tracked files + 20 HOME outputs); radon cc no longer lists the three functions; ruff, ruff format, mypy --strict clean; full suites green. Note: the fix(shell): make extract()... commit also carries the palette/design-system characterization tests, which were staged concurrently by a second writer.

Chain Context

Field Value
Chain ML4W 2.16 + Herdr 0.9.1 + Light/Dark-only stabilisation
Tracker PR Not needed (stacked PRs to main)
Position 6 of 6
Base pr/05-remove-night-profile
Depends on #15
Follow-up None
Review budget 937 / 400
Starts at the tip of pr/05-remove-night-profile
Ends with chore(quality): complexity refactors, stricter gates and fixes from the quality pass

Chain Overview

main
 └── #11 fix(ml4w)
  └── #12 fix(install)
   └── #13 fix(theme)
    └── #14 fix(shell)
     └── #15 refactor(theme)
      └── 📍 #16 chore(quality)

Scope

  • Includes: see Changes above
  • Excludes:
  • Splitting sync.py / cli_handlers.py (separate design decision)

Autonomy

  • CI is expected to pass for this PR branch
  • This PR has one deliverable scope
  • This PR can be rolled back without unrelated changes
  • Tests, docs, or manual verification cover this unit

…ze to super+ctrl+arrows

The variant resized and the profile moved windows on the same combos, so both fired. The profile
documents that it owns move-window, so the variant's resize moves to the free SUPER+CTRL+arrows. The
collision test now allows no exceptions and pins the resize binds.
Measured coverage is 83%; a floor of 40% let a 40-point regression through. Update pyproject, the CI
job and ADR-0003 together.
A single local statement expands dir before file is assigned in bash (SC2318), so extract
archive.zip used an empty directory. Split the assignments and cover the default, explicit and
unknown-type cases.
CI and pre-commit skipped lib/ and DreamcoderShell/, which is how the extract() SC2318 bug shipped.
Third-party skill scripts stay out of scope.
Compose WCAG text tokens, main text, foreground pairs, ANSI, APCA classes
and structural checks as small pure helpers in the original order.
Every error string and its position is unchanged (pinned by the
characterization test); radon cc drops from E (34) to B (6).
Split evaluate_contract into mode/role, render, parity (provenance and
required roles) and matrix helpers composed in the original order, and
replace the _parse_renderer_output if-chain with a per-target parser
table. Findings, messages and sort order are unchanged; radon cc goes
from D (26) to A (1) and from D (21) to A (2).
Cover the missing-bg KeyError, the ANSI derivation failing without text,
and the skipped WCAG check for an absent foreground-pair token.
main() ignored sys.argv, so dreamcoder sync --help ran a full sync against the live configuration.
Parse first: --help prints usage and exits 0, unknown options exit 2, and tests inject argv
explicitly.
@Dreamcoder08
Dreamcoder08 force-pushed the pr/05-remove-night-profile branch from 4db6695 to f353575 Compare September 29, 2026 18:47
@Dreamcoder08
Dreamcoder08 changed the base branch from pr/05-remove-night-profile to main September 29, 2026 20:45
@Dreamcoder08
Dreamcoder08 merged commit 443bcbb into main Sep 29, 2026
@Dreamcoder08
Dreamcoder08 deleted the pr/06-quality-pass branch September 29, 2026 20:46
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