Skip to content

[Phase 16] S9 — Compliance evidence integrity and GDPR erasure completeness #895

Open

Description

@cemililik

Roadmap · Phase 16, step S9 · size L · 5 unit(s) · planned in docs/roadmap/phase-16-trust-surface-hardening.md:553-581

Summary

The compliance surface claims a stronger evidentiary state than it holds. purge --kind artefacts cannot find the compliance bundle ForgeLM itself writes: the exporter emits fixed basenames while the resolver looks for file names that embed the run id. It fails safe (deletes nothing, emits data.erasure_failed with NoMatchingArtefacts, exits 1), so the defect is completeness, not destruction. The trainer also writes data_governance_report.json there, and the pipeline writes compliance/pipeline_manifest.json, which belongs to the whole pipeline and must not be deleted by one run's purge.

Units

Unit Tracked by (October 2026 review)
F-W20260729-TRUST-02 #101 · #102 · #477 · #554 · #635
F-W20260729-TRUST-13, F-W20260729-TRUST-01 #386 · #651
F-W20260729-TRUST-14 #386 · #554
F-W20260729-TRUST-07 #386 · #679 · #680 · #681 · #715

Plan

  • Rewrite _artefact_targets_for_run to the allow-list + ownership-proof model the design document already specifies, mirroring the _legacy_staging_owned_by marker pattern in the same file.
  • Breaking changes planned here: AuditLogger.log_event becomes fail-closed; reverse-pii and purge move to non-zero exits on states that returned 0.

Exit criteria

  • A real bundle produced by generate_training_manifest() + export_compliance_artifacts() is fully removed by a matching run id and untouched by a wrong one, while pipeline_manifest.json and audit_log.jsonl survive — a writer → reader integration test, not a synthetic-filename fixture; the fabricated docstring examples in _purge.py are deleted.
  • A malformed line sharing an identifier blocks the completion record.
  • reverse-pii returns non-zero when AuditLogger initialisation raises.
  • An OSError injected separately at the manifest open, fsync and os.replace steps never yields silent success.
  • A required → rejected → required chain is served by one shared ordered-state helper across the listing and mutation surfaces.

How to deliver

  • One root-cause family, committed on its own; then an Opus review round and a Sonnet review round, each with verified findings fixed and committed before the next step begins.
  • A reproducer that is red before the fix and green after; the full gauntlet from CLAUDE.md passes under ./.venv/bin/python.
  • Every English documentation edit ships with its Turkish mirror in the same commit; a new or renamed audit event gets its EN and TR catalog rows in the same PR.
  • A step that grows a deferred module carries its budget_history justification in the same diff; a widened guard rolls out non-strict first, then flips.
  • Commit bodies cite Absorbs F-W20260729-…; the CHANGELOG [Unreleased] section gets an entry only for a change a user or library consumer can observe (decision C-20).

Planned in docs/roadmap/phase-16-trust-surface-hardening.md (read at f94595f). Unit IDs (F-W20260729-…) come from the 2026-07-29/30 full-project review; the issue numbers next to them are the October 2026 review's records of the same defects.

Activity

  1. added
    phase: 16Roadmap Phase 16: trust surface hardening (docs/roadmap/phase-16-trust-surface-hardening.md)
    source: roadmapPlanned or deferred work recorded in docs/roadmap/
    on Oct 9, 2026
  2. added
    blockedWaits for another issue (see Blocked by); set and removed automatically, never by hand
    on Oct 20, 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

    blockedWaits for another issue (see Blocked by); set and removed automatically, never by handphase: 16Roadmap Phase 16: trust surface hardening (docs/roadmap/phase-16-trust-surface-hardening.md)source: roadmapPlanned or deferred work recorded in docs/roadmap/

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions