Skip to content

fix(bridge): audit_log_appends test fails due to missing setup cleanup #373

@fagemx

Description

@fagemx

Problem

bg_detect::tests::audit_log_appends in edda-bridge-claude/src/bg_detect.rs:963 consistently fails:

assertion failed: left=13, right=1

Root Cause

The test only cleans up the audit log file in teardown (end of test), not in setup (start of test). When run multiple times, the audit log file accumulates entries from previous runs, causing the line count assertion to fail.

Fix

Add cleanup at the start of the test:

let _ = fs::remove_file(audit_log_path(pid));

Impact

  • CI noise: this test fails on every run after the first
  • 5-minute fix

Labels

bug, testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions