feat: in-app WORM Audit Settings and GOVERNANCE lock mode #10

Merged
KofTwentyTwo merged 1 commits from feature/settings into develop 2026-10-14 17:26:52 +00:00
KofTwentyTwo commented 2026-10-14 17:24:00 +00:00 (Migrated from github.com)

Summary

For the kof22 go-live (owner decisions 2026-10-14). RC.1 hard-coded COMPLIANCE with 6-year retention on every exported object; this makes it a setting.

  • worm_audit_settings (WORM Audit Settings):
    • one editable row, FIELD-audited, so every change is a core audit row and is chained;
    • changeset worm-audit:10 creates and seeds it insert-only; earlier changesets are unchanged;
    • fields: audit retention years (6), export lock mode GOVERNANCE or COMPLIANCE (default GOVERNANCE), export retention days (30), checkpoint every links / minutes, chain interval, settle horizon, late-detail lookback, export and verify cron (UTC, validated);
    • a second row, delete, bad cron and out-of-range values are refused with plain messages; editing needs worm_audit.settings;
    • schedules apply after restart; everything else applies on the next run (30 s cache).
  • Exporter and verifier: export with the mode and retain-until = now + export_retention_days; the head check and verification use each export's recorded mode and date. Under GOVERNANCE, a missing sealed object is a break that names the object.
  • Home: export lock mode and retention. Warnings while GOVERNANCE is set, when export retention is shorter than audit retention, and when audit_retention_years differs from the purge function's compiled interval.
  • Docs: README "Settings" and "Switching sealed exports to COMPLIANCE"; DESIGN addendum "Owner decisions (2026-10-14)"; CHANGELOG.
  • Screenshots: home and Settings record at 390 and 1440, light and dark; no overflow.

Tests: CI=true ./mvnw verify with Docker, 86 pass. That includes Postgres (settings seed is insert-only and survives a re-run of the DDL; setup warnings) and the MinIO round trips in both GOVERNANCE (30 days; delete without bypass refused) and COMPLIANCE. I fixed three Postgres tests that changed config instead of the seeded settings row, which overrides config.

Release: needed as 0.1.0-RC.2 for kof22 (Website-Backend#187).

🤖 Generated with Claude Code

## Summary For the kof22 go-live (owner decisions 2026-10-14). RC.1 hard-coded COMPLIANCE with 6-year retention on every exported object; this makes it a setting. - **`worm_audit_settings`** (WORM Audit Settings): - one editable row, FIELD-audited, so every change is a core audit row and is chained; - changeset `worm-audit:10` creates and seeds it **insert-only**; earlier changesets are unchanged; - fields: audit retention years (6), export lock mode **GOVERNANCE** or COMPLIANCE (default GOVERNANCE), export retention days (30), checkpoint every links / minutes, chain interval, settle horizon, late-detail lookback, export and verify cron (UTC, validated); - a second row, delete, bad cron and out-of-range values are refused with plain messages; editing needs `worm_audit.settings`; - schedules apply after restart; everything else applies on the next run (30 s cache). - **Exporter and verifier:** export with the mode and `retain-until = now + export_retention_days`; the head check and verification use each export's recorded mode and date. Under GOVERNANCE, a missing sealed object is a break that names the object. - **Home:** export lock mode and retention. Warnings while GOVERNANCE is set, when export retention is shorter than audit retention, and when `audit_retention_years` differs from the purge function's compiled interval. - **Docs:** README "Settings" and "Switching sealed exports to COMPLIANCE"; DESIGN addendum "Owner decisions (2026-10-14)"; CHANGELOG. - **Screenshots:** home and Settings record at 390 and 1440, light and dark; no overflow. **Tests:** `CI=true ./mvnw verify` with Docker, 86 pass. That includes Postgres (settings seed is insert-only and survives a re-run of the DDL; setup warnings) and the MinIO round trips in both GOVERNANCE (30 days; delete without bypass refused) and COMPLIANCE. I fixed three Postgres tests that changed config instead of the seeded settings row, which overrides config. Release: needed as **0.1.0-RC.2** for kof22 (Website-Backend#187). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.