Goal
Give the common status/serialization/rendering mechanics one Base-owned implementation, with thin adapters for DevCheck and ArtifactCheck. Preserve current styling choices via explicit renderer options so the extraction need not change CLI output.
Background
Repository-wide duplication review against f9c18f3294873cbbcda9acc7af7f1bc6b17eed45 (2026-09-17).
Both modules independently implement check serialization, effective status, severity aggregation and doctor-line rendering. Severity function bodies are AST-identical. A TTY fixture demonstrated rendering divergence: setup emits colored/icon status while developer profiles emit plain status. This is observable duplication-driven policy drift, not a claim that either output is inherently invalid.
Verified source locations:
Closed #1418 centralized prerequisite probing, while #582 removed a serializer duplicate in a different scope. The current status/rendering copies remain outside those completed changes.
This is a maintainability refactor. Similarity alone is not evidence of a production failure; any demonstrated differences are called out above.
Scope
Give the common status/serialization/rendering mechanics one Base-owned implementation, with thin adapters for DevCheck and ArtifactCheck. Preserve current styling choices via explicit renderer options so the extraction need not change CLI output.
Acceptance Criteria
- Share effective status and error/warn/ok aggregation, including empty input.
- Preserve ArtifactCheck details and DevCheck default finding IDs.
- Keep warnings/errors on stderr and successful findings on stdout.
- Preserve each caller's current TTY/non-TTY presentation through explicit options; no silent UX change.
- Respect NO_COLOR and existing setup color controls where currently supported.
Validation
Run developer-profile, setup diagnostic and workspace-report tests. Use captured stdout/stderr and fake TTY streams for ok/warn/error, fixes, empty checks, optional details and color controls.
Run focused checks first, then the repository-required broader checks for the actual implementation. Preserve public command contracts and review .ai-context/ impact in the PR.
Non-Goals
No unification of domain-specific check models; no new public output schema; no changes to severity semantics.
Project Fields
- Status: Ready
- Priority: P2
- Area: Setup
- Initiative: Contract Hardening
- Size: S
- Milestone: Unscheduled; no release commitment is implied by this audit.
Agent Assignment
Implementation-ready scoped follow-up, assigned to codeforester. Follow AGENTS.md and docs/github-workflow.md: start through basectl gh issue start, use the canonical issue worktree, characterize current behavior before extraction, and open an issue-linked PR. Keep each refactor independently reviewable.
Goal
Give the common status/serialization/rendering mechanics one Base-owned implementation, with thin adapters for DevCheck and ArtifactCheck. Preserve current styling choices via explicit renderer options so the extraction need not change CLI output.
Background
Repository-wide duplication review against
f9c18f3294873cbbcda9acc7af7f1bc6b17eed45(2026-09-17).Both modules independently implement check serialization, effective status, severity aggregation and doctor-line rendering. Severity function bodies are AST-identical. A TTY fixture demonstrated rendering divergence: setup emits colored/icon status while developer profiles emit plain status. This is observable duplication-driven policy drift, not a claim that either output is inherently invalid.
Verified source locations:
cli/python/base_dev/checks.py:17-48cli/python/base_setup/checks.py:28-47cli/python/base_setup/checks.py:69-102Closed #1418 centralized prerequisite probing, while #582 removed a serializer duplicate in a different scope. The current status/rendering copies remain outside those completed changes.
This is a maintainability refactor. Similarity alone is not evidence of a production failure; any demonstrated differences are called out above.
Scope
Give the common status/serialization/rendering mechanics one Base-owned implementation, with thin adapters for DevCheck and ArtifactCheck. Preserve current styling choices via explicit renderer options so the extraction need not change CLI output.
Acceptance Criteria
Validation
Run developer-profile, setup diagnostic and workspace-report tests. Use captured stdout/stderr and fake TTY streams for ok/warn/error, fixes, empty checks, optional details and color controls.
Run focused checks first, then the repository-required broader checks for the actual implementation. Preserve public command contracts and review
.ai-context/impact in the PR.Non-Goals
No unification of domain-specific check models; no new public output schema; no changes to severity semantics.
Project Fields
Agent Assignment
Implementation-ready scoped follow-up, assigned to
codeforester. FollowAGENTS.mdanddocs/github-workflow.md: start throughbasectl gh issue start, use the canonical issue worktree, characterize current behavior before extraction, and open an issue-linked PR. Keep each refactor independently reviewable.