prometeu-studio/docs/packer/agendas/01.4. Diagnostics, Doctor, Quarantine, and Workspace Hygiene Agenda.md
2026-03-24 13:42:38 +00:00

2.3 KiB

Diagnostics, Doctor, Quarantine, and Workspace Hygiene Agenda

Status

Closed

Resolved by 004-diagnostics-doctor-quarantine-and-workspace-hygiene-decision.md.

Purpose

Define the packer as a "sanity guardian" with explicit diagnostics, workspace scanning, quarantine, and garbage collection behavior.

Context

One of the strongest ideas in the draft is that packer should help users survive a messy assets/ workspace.

The document already sketches:

  • structured diagnostics,
  • doctor modes,
  • orphan and duplicate detection,
  • quarantine,
  • garbage collection.

This deserves a dedicated decision because it strongly shapes user trust in the tool.

Source Sections

  • 10. Diagnostics and the "Sanity Guardian" Chain
  • 12. Quarantine and Garbage Collection

Key Questions

  1. Which diagnostics are build-blocking versus advisory?
  2. What is the normative distinction between registry validation and workspace hygiene scanning?
  3. Which automatic fixes are considered safe?
  4. What operations require explicit consent?
  5. How should quarantine be modeled: reversible staging area or semi-managed trash bin?
  6. How aggressive should duplicate and orphan detection be?

Options

Option A

Keep a strict separation:

  • registry errors block builds,
  • workspace hygiene warnings inform users,
  • destructive or moving operations always require explicit consent.

Option B

Let doctor apply broader automatic remediation by default.

Tradeoffs

  • Option A is safer and easier to trust.
  • Option A aligns with the draft's explicit-user-consent direction.
  • Option B may save time in some cases, but it raises risk of surprising workspace mutations.

Recommendation

Adopt Option A and make reversibility plus explicit consent core packer invariants.

Expected Decisions to Produce

  1. Diagnostic classes and severities.
  2. Scope and modes of doctor.
  3. Safety model for --fix, gc, and quarantine.
  4. Workspace hygiene responsibilities of the packer.

Expected Spec Follow-up

  • Diagnostics contract spec.
  • Doctor and workspace scan spec.
  • Quarantine and garbage collection spec.

Non-Goals

  • Detailed asset format validation rules.
  • Final watch mode design.
  • Runtime-facing artifact schemas.