Skip to content

Share setup and developer-profile diagnostic status and rendering primitives #2307

Description

@codeforester

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or product improvement

Type

No type

Projects

  • Status
    In Review

Relationships

None yet

Development

No branches or pull requests

Issue actions