Skip to content

refactor(disk-hygiene): derive the Python version floor from one origin #1008

Description

@kyle-sexton

Parent

Source: handoff-inbox item 20260722-004536-disk-hygiene-setup-audit (producer: SW2030 home-dir cleanup session, against disk-hygiene@0.4.1; finding 3, MED). Repo tree re-verified at 0.4.6 before filing.

What's wrong

The Python version floor ("3.11+") is hand-maintained in several independent places while the setup skill tells itself the clean scripts "are the single source of truth … probe what they actually require, don't recite this file":

  • hygiene.pysys.version_info < (3, 11) (the real enforcement)
  • hygiene.test.sh — its own floor probe
  • setup/SKILL.md — twice (check step 1, apply guidance)
  • clean/SKILL.md — engine-interpreter floor instruction
  • README.md — requirements section

A future floor bump changes the enforcement and silently strands the prose copies.

What to build

Derive the floor from one origin:

  • Introduce a single machine-readable origin in the engine (e.g. a module-level MIN_PYTHON constant in hygiene.py used by the runtime check), so enforcement and declaration cannot diverge.
  • setup check obtains the floor from that origin (parse the constant or query the engine) instead of reciting a hardcoded "3.11+"; its probe compares the running interpreter against the derived floor.
  • Add a test locking the constant to the enforcement path (red-first).
  • Reword the remaining prose mentions to point at the origin (or state that the check derives the floor) rather than duplicating the number where feasible; where a literal remains (README requirements), note the origin.

Acceptance criteria

  • One machine-readable origin for the floor; runtime enforcement uses it
  • setup check derives the reported/probed floor from the origin, not from its own prose
  • Test proves origin == enforcement
  • Remaining prose mentions reduced to pointers or annotated copies
  • Version bump + CHANGELOG entry; check-changed-skills.sh and check-changelog-parity.sh --check-bump pass

Blocked by

None — can start immediately. Serialize the PR with the other disk-hygiene PRs from the same inbox item (shared plugin.json version + CHANGELOG).

Metadata

Metadata

Assignees

Labels

priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions