Skip to content

KMS-702: Expand audit logging for publisher events and collection checks - #136

Closed
cgokey wants to merge 1 commit into
mainfrom
KMS-702
Closed

cgokey wants to merge 1 commit into
mainfrom
KMS-702

Conversation

@cgokey

@cgokey cgokey commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Overview

What is the feature?

Expand metadata-correction auditing so every published keyword event is visible, including events that do not match any CMR collections, and provide reports grouped by published KMS version.

What is the Solution?

  • Store a no-op audit document when a published keyword event finds no collections.
  • Add /metadata_correction_audit/published and /metadata_correction_audit/published/{versionName} as the official published-version audit routes.
  • Present affected collections, keyword changes, and outcomes in version-grouped JSON and HTML reports.

What areas of the application does this impact?

  • Metadata-correction publisher-event auditing
  • Audit API and browser reports
  • DocumentDB access for the CMR keyword-events listener

Testing

Reproduction steps

  • Environment for testing: SIT
  • Collection to test with: A SIT collection containing a keyword that can be safely updated
  1. Publish a keyword update that affects a collection.
  2. Open /metadata_correction_audit/published/{versionName}?format=html and verify the collection ID, keyword change, and outcome.
  3. Publish a keyword update that matches no collections and verify the published-version report shows No collections found.
  4. Open /metadata_correction_audit/published?format=html and verify versions are grouped with the latest published version first.
  5. Perform basic metadata-correction regression testing.

Automated verification: 2,413 tests pass across 235 files. Lint and CDK type checking pass, with 100% coverage for lines changed by this PR.

Attachments

None.

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: e85225a3-08dd-4e69-88bb-ea6cb4b6840b


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cgokey cgokey closed this Sep 16, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.65%. Comparing base (2bcac33) to head (15167e2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #136   +/-   ##
=======================================
  Coverage   99.65%   99.65%           
=======================================
  Files         239      240    +1     
  Lines        6918     7007   +89     
  Branches     2090     2136   +46     
=======================================
+ Hits         6894     6983   +89     
  Misses         22       22           
  Partials        2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants