Skip to content

fix(audit): remove archive storage when Audit Logging is disabled - #290

Merged
lweberru merged 3 commits into
mainfrom
fix/audit-bucket-disabled-lifecycle
Nov 21, 2026
Merged

lweberru merged 3 commits into
mainfrom
fix/audit-bucket-disabled-lifecycle

Conversation

@lweberru

Copy link
Copy Markdown
Collaborator

Disabling Audit Logging currently plans replacement of its unconditional archive bucket (object_lock: true -> false). The reported recovery plan consequently creates a new unlocked bucket while removing the audit services.

Make the archive conditional on audit_logs != null, update guarded references and return a null archive output when disabled. A declared move from the legacy unindexed resource to [0] preserves existing enabled archive identity. Disabling now plans archive deletion without recreation; default and Terraform State buckets remain unchanged. Existing object retention and bucket-content constraints remain enforced; no automatic emptying or governance bypass is added.

Register native commit 0158273593f9c99ec7bc34b46b85facf3e1f7f21 as the reviewed platform execution source and derive the packaged root from the compiled contract instead of a duplicated shell pin. Preserve historical source admission and namespace serialization for existing plans/recovery. Governance file hashes are unchanged; all four native governance plans were rerun against this exact commit. Update source-aware initial-plan assertions, bilingual documentation, Assistant knowledge and concise v2.2.4 release notes.

Validation: 54 native mock plan tests; five offline legacy-State transition tests using the real pinned provider with loopback-only endpoints (enabled no-op/move, locked/unlocked disable delete-only, no archive recreation, explicit Lock changes still replace); 86 Plan/Apply PostgreSQL tests; application lint/build/check with 2,183 passing tests and 100 environment-dependent skips; HCL adapter round trips/catalogue check; four governance qualifications; two independent targeted real-model audit-removal advice checks. Final packaging/preparation/knowledge guards also pass. Native transition regression runs in CI.

Merge with a merge commit, preserving the native source commit above. Do not squash this PR: the second commit registers the immutable native first commit. The repository permits merge commits and has no linear-history rule. The authorized rollout is Dev first and then Prod using one immutable build, with Assistant release mode skip; wider known Assistant limitations remain open.

Closes #289. A fresh preparation/Plan using the corrected reviewed source is required; existing saved Plans retain their original artifacts and are not relabelled. No customer Apply was executed.

@lweberru
lweberru merged commit c498863 into main Nov 21, 2026
16 checks passed
@lweberru
lweberru deleted the fix/audit-bucket-disabled-lifecycle branch November 21, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the audit archive bucket when Audit Logging is disabled

1 participant