Skip to content

refactor: review & simplify nsc/cli/writes/ pipeline #53

@thomaschristory

Description

@thomaschristory

Scope

The write/mutation pipeline — all files under nsc/cli/writes/.

Goal

Code review + simplify pass:

  • nsc/cli/writes/input.py (358 lines) — field collection and validation
  • nsc/cli/writes/bulk.py (231 lines) — CSV/bulk write orchestration
  • nsc/cli/writes/preflight.py (182 lines) — pre-flight checks before write
  • nsc/cli/writes/apply.py (177 lines) — HTTP write dispatch
  • nsc/cli/writes/confirmation.py (96 lines) — interactive confirmation prompt

Check for:

  • Shared state threading through too many parameters (consider a context object)
  • Validation logic that belongs in model/ not cli/
  • Duplicated error handling across the pipeline stages
  • Clarity of the preflight → confirm → apply flow

Files

  • nsc/cli/writes/*.py
  • Related tests: tests/cli/writes/

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorCode cleanup, simplification, review

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions