Skip to content

Internal Implementation CQ Checks #226

Description

@spxrogers

Tracking issue for the internal code-quality review of internal/cli and the core model (internal/source, internal/adapter, internal/state, internal/render boundaries).

Overall verdict from the review: the interface hardening (secret fencing, Resolved/Canonical type split, guard tests, fail-closed defaults) is in excellent shape. The implementation behind it has one systemic weakness: domain logic accreting in internal/cli as hand-rolled, duplicated walks over under-modeled data — stringly state keys, sniffed FileOps, parallel structs for single artifacts — held together by comments and pinning tests where types and shared functions should be.

Each fix is a sub-issue below. The first six are in the review's priority order (highest leverage first); the remaining ones cover a verified latent bug and consolidation work the review also surfaced.

  1. Typed state keys in internal/state
  2. Unify [secrets] validation (live check/doctor disagreement)
  3. Shared plan→drift-classification walk for status/diff/reconcile/explain
  4. FileOp modeling: typed Action + explicit cleanup-op kind
  5. Route plugin upgrade re-apply through the real apply pipeline
  6. Restructure reconcileRun into a session type
  7. Bug: addMarketplaceSource swallows cache-rename failure
  8. Unify pluginTOMLSpec with source.PluginSpec
  9. CLI duplication & boundary cleanup batch

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions