You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extract the repeated event prologue in WorkflowAuditor #6095
At pkg/audit/workflow_auditor.go lines 63-73, 115-125, 168-178, 208-218, 248-258, 286-296, 326-336, and 364-374 — LogWorkflowStarted/Completed/Failed/TimedOut and LogStepStarted/Completed/Failed/Skipped.
Why it is worth fixing
This is not just tidiness. #6046 added attachDelegation to all eight methods by hand, and only two of the eight were covered by tests — so six could have shipped without the call and the suite would have stayed green. Those six included every terminal event (failed / timed-out), which is what an investigator actually reads.
A follow-up PR closed that with a table over all eight methods, but a test table is a guardrail, not a fix: it catches the omission after the fact and has to be extended by hand every time a ninth Log* method appears.
That collapses ~40 lines of repetition to one call site per method and makes "did every method attach the delegation chain?" unanswerable by construction rather than by test. The eight-case delegation table can then shrink to a single test on the helper.
Low risk — the prologue is identical in all eight, so this is a mechanical extraction with no behavior change. Deliberately kept out of the review-fix PR to keep that one test-only.
Activity
Extract shared event prologue in WorkflowAuditor (stacklok#6122)