Audit purge proposals
The purge proposal generator raises one purge proposal per audit-store partition that holds rows past retention. It only proposes. It never approves, certifies or deletes; a second person approves each proposal through workflow, and the purge execution batch deletes.
At a glance
| Batch class | MGCWardenAuditPurgeProposalGenerator, which calls MGCWardenAuditPurgeEngine::propose once per partition |
| Menu item | MGCWardenAuditPurgeProposeMenuItem, label Propose audit store purge |
| Menu path | System administration → Setup → Propose audit store purge, and the Propose audit store purge button on the Purge workbench |
| Who may run it | MGCWardenAuditAdministrationPriv (granted at Update) → MGCWardenAuditAdministrationDuty → Warden audit administrator (MGCWardenAuditAdministrator). The API operation MGCWardenBatchService.runAuditPurgePropose is granted on the same privilege and re-checks the same menu item |
| Feature toggle | Warden Auditor (MGCWardenAuditFeature). When it is off the run is recorded as Skipped and nothing is examined |
| Company scope | Installation-wide. Proposals, proposal runs and the store are shared tables; one run in any company covers every partition. The governance event-log rows it writes land in the company it runs in |
| Scheduled by default | No. Nothing in the product creates a batch job for it |
| Recurrence | You choose. A scheduled run proposes only for partitions with no undecided proposal, so a short recurrence does not stack proposals |
| Setup-gap rules watching it | None. PurgeExecutionNotScheduled watches the next step |
| Run record | MGCWardenAuditPurgeProposalRun (one per run, including refused runs), and the proposals it raised |
| Overlap guard | Yes. MGCWardenBatchOverlapGuard::blockingTask is asked last, after the configuration refusals, for any company. A refused run is recorded as Skipped |
Purpose and business justification
Retention means deleting evidence once its obligation ends, as well as keeping it until then. The audit store is append-only, so nothing removes a row except the dual-control purge. Without proposals, nothing is ever purged, which is a data-minimization failure.
Dual control needs a human proposer. A batch has none: the account a task runs under is a service account. So the generator carries a named accountable proposer, stamped on every proposal it raises, and that person (and the account that inserted the proposal) can never approve it.
The named proposer authorises the rule (scope, cutoff, cap and schedule), not each proposal. The
proposal's Origin column (Scheduled or Manual) tells the approver which kind they are looking at.
How and when it is triggered
- Scheduled from the menu item, with a recurrence, in any one company. The proposals carry Origin Scheduled.
- Run now from the menu item or the workbench button. Origin Manual.
canRunInNewSession()returns true;pack()carries all four dialog values. - API:
MGCWardenBatchService.runAuditPurgePropose(proposedBy, partitionFilter, cutoffOverride, maxProposals). Origin Manual. The API refuses while a batch task of this class is executing.
A proposal is not submitted to workflow automatically. Someone submits it from the Purge workbench with Submit for purge approval (workflow Warden dual-control purge approval).
Configuration and scheduling options
| Dialog field | Default | Rules |
|---|---|---|
| Accountable proposer | The user at the dialog | Required. validate() refuses a blank value, an unknown user or a disabled user |
| Store partition | Blank (every partition) | One partition (company ID) narrows the run |
| Cutoff date | Blank (derived) | Blank uses today less the shortest configured retention class. A date may only be earlier than that |
| Maximum proposals | 25 | 1 to 500. Reaching it makes the run Partial |
Settings the run depends on:
| Setting | Where | Effect |
|---|---|---|
| Retention classes | Audit retention classes (MGCWardenAuditRetentionClass) | With none, every run is refused. The shortest class sets the latest cutoff; each row is then screened against its own class, and a row carrying no class is held to the longest |
| Export before purge on a class | Same | When any class sets it, the export destination must be complete or every run is refused |
| Export container, Export secret name, Export secret company | Warden audit parameters | The archive destination; see Audit purge execution |
Choosing a recurrence. Each partition can hold one undecided proposal at a time (Proposed, Approved or Certified). A daily or weekly run raises a proposal for each partition whose previous one has been executed, canceled or closed. A partition whose proposal waits for approval is skipped and counted separately, so a stalled approval queue shows in the run summary.
Not confirmed: run() checks only that a proposer is named. The check that the proposer is an
enabled user is in validate(), which the dialog and the API call. Nothing in the class re-checks it when
a scheduled task runs, so a proposer disabled after the job was saved appears to stay named on later
runs.
What it does
- Refusals, each recorded as a Skipped run with the reason as its summary and a governance
event-log row, in this order:
- Warden Auditor is off;
- no accountable proposer;
- no retention classes;
- the export gate (
MGCWardenAuditPurgeScope::exportGateRefusal): a class demands export and the destination is unset, half set or not a valid container name; - no positive retention floor;
- a stored cutoff later than the latest allowable one (the shortest class was lengthened after the job was saved);
- another task of this class is executing in any company.
- Run record. Inserts a Running proposal run carrying the proposer (as a subject reference), the partition filter, the derived, override and effective cutoffs, the longest class in years and the cap.
- Partition selection (
selectPartitions). Groups store rows older than the cutoff by partition. Skips a partition with an undecided proposal (not charged to the cap). Stops at the cap. - One proposal per partition (
proposeOne):-
screens the partition (
MGCWardenAuditPurgeScope::screen); a partition where every old row is protected is counted as nothing purgeable, not as a failure; -
otherwise calls
MGCWardenAuditPurgeEngine::propose, which screens again inside its own transaction and inserts a ProposedMGCWardenAuditPurgeProposalwith the row count, the excluded count, a written basis, and oneMGCWardenAuditPurgeExclusionrow per carve-out. The carve-outs are:Carve-out Rows kept Control evidence SelfAudit,PurgeCertificate,VerificationResultandUngovernedActionrows, at any ageUnanchored Rows above the partition's highest anchored sequence Legal hold Rows whose record is under an active Warden hold in any company Retention window Rows still inside their own class's window The exclusion rows must add up to the excluded count, or the proposal is not committed;
-
after the commit, writes a
PurgeProposedself-audit row and a governance event-log row naming the proposer by reference; -
a partition that throws files an Error execution exception naming the partition, and the run carries on.
-
- Close. Marks the run Completed, or Partial if the cap was reached, with counts
(examined, raised, nothing purgeable, could not be proposed, already proposed, rows proposed, rows
carved out) and a summary that states which end of the retention setup each cutoff came from. Writes a
governance event-log row, a
PurgeProposalRunself-audit row (best effort) and, for a Partial run, a Warning ControlOutage execution exception. - Failure. Any other failure marks the run Failed and files an Error ControlOutage execution
exception.
run()never throws.
Idempotency. A second run skips every partition the first one proposed for, until those proposals are decided.
Dependencies and prerequisites
- Warden Auditor switched on.
- At least one audit retention class with a positive retention period.
- A complete export destination if any class sets Export before purge.
- The integrity batch running, so rows are anchored; unanchored rows are never proposed. See Audit chain integrity: anchoring, publication and verification.
- The Warden dual-control purge approval workflow configured, so someone can submit a proposal.
Inputs and outputs
| Direction | Table | What |
|---|---|---|
| Reads | MGCWardenAuditEvent, MGCWardenAuditHashAnchor, MGCWardenHold (all companies), MGCWardenAuditRetentionClass, MGCWardenAuditParameters | Screening |
| Inserts, updates | MGCWardenAuditPurgeProposalRun | One run |
| Inserts | MGCWardenAuditPurgeProposal, MGCWardenAuditPurgeExclusion | Proposals and their carve-out rows |
| Inserts | MGCWardenAuditEvent, MGCWardenAuditDetailParam | PurgeProposed and PurgeProposalRun self-audit rows |
| Inserts | MGCWardenEventLog | One row per proposal and one per run |
| Reads, inserts | MGCWardenIdentityVault | Through refFor |
| Inserts | MGCWardenExecutionException | Per-partition errors, Partial and Failed runs |
Logging and monitoring
- Audit purge proposal runs (System administration → Setup → Audit purge proposal runs): every run with its status and summary.
- Purge workbench (System administration → Setup → Purge workbench, also on the Warden Audit workspace): proposals, their exclusions and state.
- Execution exceptions: Partial runs (Warning), failed partitions and failed runs (Error).
Screenshot to add: the Purge workbench with one Proposed proposal selected and its exclusion rows visible.
Errors, recovery and troubleshooting
| Symptom | Cause and recovery |
|---|---|
| Run Skipped: Warden Auditor is switched off ... | Switch the feature on |
| Run Skipped: no retention classes, or no positive floor | Configure Audit retention classes |
| Run Skipped: Retention class(es) ... require their audit evidence to be exported ... | Complete the export destination on Warden audit parameters, or clear Export before purge on those classes |
| Run Skipped: stored cutoff later than the latest allowable | The shortest class was lengthened. Edit the job's cutoff or clear it |
| Run Skipped naming a running task | Another generator task is running. Remove the duplicate schedule |
| Run Partial | The cap was reached. Run again; it continues with partitions it did not reach |
| Error ... could not raise a proposal for partition P ... | That partition was not proposed. Most often the exclusion rows did not reconcile; report it |
| Many partitions skipped because an undecided proposal already exists | Proposals are waiting for approval or execution. Check the workbench and that the execution batch is scheduled |
Impact on other functionality
- Approval. Each proposal goes to a second person through Warden dual-control purge approval. Approval marks it Approved, awaiting execution and records the approver; it deletes nothing.
- Execution. Audit purge execution deletes approved purges.
- Retention cleanup ages out proposal run headers past the evidence window, but never a run left Running and never a run with a proposal still Proposed, Approved or Certified. Proposals themselves are not deleted. See Warden retention cleanup.
- Evidence packs. The SOX ITGC pack lists approved purges not yet executed.