Skip to content

forgelm purge --check-policy --config requires a complete ForgeConfig; a file with only a retention block exits 1 #1054

Closed

Description

@cemililik

Summary

forgelm purge --check-policy --config PATH loads the file as a complete ForgeConfig, so a YAML file that holds only a retention: block exits 1 with four "Field required" validation errors (model, lora, training, data). The help text says --config "supplies the retention: horizons", which suggests that the block is all the command needs.

Evidence

$ cat retention-only.yaml
retention:
  ephemeral_artefact_retention_days: 30
$ forgelm purge --check-policy --config retention-only.yaml --output-dir . --output-format json
{"success": false, "error": "--check-policy could not load --config: Configuration validation failed:\n4 validation errors for ForgeConfig\nmodel\n  Field required ...

The exit code is 1 (EXIT_CONFIG_ERROR), which is the documented behaviour for an unloadable config, so nothing is silently wrong; the friction is that a scheduled retention report needs a full training config next to it.

Acceptance criteria

  • Decide and record one behaviour: accept a file that holds only retention: (validate that block with RetentionConfig), or keep requiring a full config and say so in the --config help, the purge reference (EN/TR), the GDPR guide and the user manual.
  • A test covers the chosen behaviour, including the exit code for an invalid retention: block.

Context

Found while correcting the retention documentation for #101. Related: #554 (module sweep: purge / reverse-pii; --check-policy without --config).

Activity

  1. added
    enhancementNew feature or request
    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. cemililik commented on Oct 22, 2026

    @cemililik
    CollaboratorAuthor

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

    Reproduced on development at 735a02f: a file holding only retention: exits 1 with four "Field required" errors (model, lora, training, data). Without --config the command prints "No retention: block in the loaded config" and exits 0. --help says --config "supplies the retention: horizons".

    Do this together with #554 CR-A10-015 (refuse --check-policy without --config). Both decide how --check-policy loads its config, and one pull request keeps the rule consistent. Not blocked: CR-A10-015 is not one of Phase 16 S9's units (S9 owns CR-A10-021 and CR-A10-037 in #554).

  4. 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: operator-cmdsCode area: operator-cmdsenhancementNew feature or requestseverity: 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