Cyclium.DryRun.FindingPrefixer (Cyclium v0.1.14)

Copy Markdown View Source

Rewrites finding actions with prefixed keys for dry run persistence.

When dry_run_opts["persist_findings"] is set, findings are persisted to the DB with prefixed finding_key and actor_id values so they don't collide with live findings.

Prefix resolution

  • true → default prefix "dry_run"
  • "custom" → uses "custom" as the prefix

Example

# finding_key "po_stalled:PO-123" becomes "dry_run:po_stalled:PO-123"
FindingPrefixer.prefix_actions([{:raise, %{finding_key: "po_stalled:PO-123"}}], "dry_run")

Summary

Functions

Returns the persist prefix from an episode's dry_run_opts, or nil if dry run finding persistence is disabled.

Rewrites finding actions with prefixed keys.

Functions

persist_prefix(arg1)

Returns the persist prefix from an episode's dry_run_opts, or nil if dry run finding persistence is disabled.

prefix_actions(findings, prefix)

Rewrites finding actions with prefixed keys.