Skip to content

The setup wizards write no retention block by default, so purge --check-policy then checks nothing #1052

Open

Description

@cemililik

Summary

Neither configuration wizard writes a retention: block unless the operator acts. The in-browser wizard writes it only when a horizon or enforce differs from its default; the CLI wizard writes it only when the operator answers "yes" to "Customise retention horizons?", whose default answer is "no". forgelm purge --check-policy treats a config with no retention: block as "nothing to check", so an operator who accepts the defaults ends up with a config that reports nothing, while the wizard presents the horizons as a configured section.

Evidence

  • The in-browser wizard (site/js/wizard.js, the nonDefaultRetention branch) writes the block only when at least one of the four horizons or enforce differs from 1825 / 7 / 90 / 90 / log_only.
  • The CLI wizard (forgelm/wizard/_collectors.py::_collect_retention) asks "Customise retention horizons ...?" with default No and returns None on No, so no block is written. On "yes" it returns all five values, defaults included, and the block is written. The prompt does not say what declining means.
  • forgelm purge --check-policy --config <that file> prints that no retention: block was loaded and reports no violations (success: true, exit 0). With retention: {} the same command checks the defaults.

Why it matters

The horizons are only ever reported, never enforced, so this is not a data-loss risk. But the wizard presents "Retention horizons (GDPR Art. 5(1)(e))" as a configured section, and an operator reading a clean --check-policy report would take it as "checked and fine" when nothing was checked. The site wizard's retention hint now says that the block is written only for non-default values (pull request #1050), which documents the behaviour but does not fix it.

Acceptance criteria

  • Site wizard: when the operator chooses to include retention horizons, the block is written even if every value equals its default; when they do not, nothing is written (unchanged). The accordion's open/closed state is a display toggle, so prefer an explicit control (for example a checkbox) over "the section was opened".
  • CLI wizard: the prompt says what declining means ("without a retention block forgelm purge --check-policy checks nothing"). Answering "yes" already writes the block with default values; keep that behaviour and cover it with a test.
  • Wizard tests cover both outcomes in both wizards; tools/check_wizard_defaults_sync.py stays green.
  • The site wizard hint no longer needs the "written only when a value differs" sentence: remove it from wizard.retention.hint in all six site locales in the same change.

Context

Found while reviewing the retention documentation for #101. Related: #98 (the wizard presents retention.enforce as active enforcement), #92.

Activity

  1. added
    bugSomething isn't working
    severity: lowMinor defect, inaccuracy or rough edge
    wave: 4Roadmap wave 4: low / info / watch, when touching the module
    on Oct 22, 2026
  2. added
    needs-triageNot triaged yet: every new issue starts with it; only a maintainer removes it
    on Oct 22, 2026
  3. changed the title [-]The setup wizards omit the retention block when the horizons stay at their defaults, so purge --check-policy then checks nothing[/-] [+]The setup wizards write no retention block by default, so purge --check-policy then checks nothing[/+] on Oct 22, 2026
  4. cemililik commented on Oct 22, 2026

    @cemililik
    CollaboratorAuthor

    Triage (2026-10-22): accepted, description corrected. Low · Wave 4 · parent #875 (Wave 4 · Module sweep).

    I checked on development at 735a02f and corrected the CLI half of the description and acceptance criteria:

    • The CLI wizard does write the block with default values when the operator answers "yes" to "Customise retention horizons?". It is left out only when they keep the default "no", or skip the compliance step. The gap there is the default answer plus a prompt that does not say what declining means.
    • The "written only when a value differs" warning exists only in the site's wizard.retention.hint (six locales); the CLI has no such text, so there is nothing to remove there.
    • The site wizard keeps the accordion's open state in state.openAccordions.retention. That is a display toggle, not a decision, so the criteria now prefer an explicit control.

    Confirmed: a full config without retention: gives --check-policy → success: true, violations: [], exit 0; with retention: {} it checks the defaults.

    Not blocked, but it touches the same wizard code as #92 and #98 (Wave 0, retention.enforce presented as active). Whichever lands second rebases. Phase 16 S9 (#895) plans non-zero exits for purge states that now return 0. If that changes what --check-policy does without a block, re-check the impact here.

    Title narrowed to match.

  5. removed
    needs-triageNot triaged yet: every new issue starts with it; only a maintainer removes it
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: onboardingCode area: onboardingbugSomething isn't workingseverity: lowMinor defect, inaccuracy or rough edgewave: 4Roadmap wave 4: low / info / watch, when touching the module

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions