Skip to content

test_autonomous_log_retention_487.py's fast-path test has no positive evidence the fast path actually ran #951

Closed

Description

@fdaviddpt

From self-review on #933 (fast-path/fallback retention boundary fix), re-checked against current HEAD while curating trap.d/ (2026-10-07) -- still true.

tests/test_autonomous_log_retention_487.py::TestHousekeepingSweepFallbackAndEdgeCases::test_must_not_fire_fast_path_keeps_a_log_between_n_and_n_plus_one_days names itself as exercising the fast path specifically, but nothing in the test confirms _remember_auto_ref was actually built by mktemp/touch -d on the runner it executes on -- there is no filesystem-evidence or captured-output check proving the fast path, rather than the fallback, ran. The sibling fallback test two functions below (added for #933, lines ~1041-1068) does exercise this by overriding mktemp via a broken_bin PATH prefix that forces failure -- but the fast-path test itself has no equivalent positive check.

mktemp failing is swallowed silently (|| _remember_auto_ref="", scripts/save-session.sh, no warning logged), so if it ever failed on some CI runner, this test would silently re-run as a duplicate of its sibling fallback test, and a green run would not reveal that the fast path itself was never exercised.

Not unique to this one test: every pre-existing (#914-era) fast-path test in this file follows the identical convention of relying on the real environment's mktemp succeeding, with no positive check that it did.

What would settle it: an assertion (or a captured marker written by the extracted housekeeping block itself) proving _remember_auto_ref was non-empty / the reference file existed during the specific test run, for every fast-path test in this file, not just a single one -- worth doing as a class across the file rather than a one-off patch.

Original fragment: trap.d/933.fast-path-test-does-not-confirm-fast-path-ran.md (deleted by this same curate pass).

[AI-generated]

Activity

  1. added
    priority:low
    filed-by-loop
    lane-storage
    on Oct 7, 2026
  2. self-assigned this
    on Oct 7, 2026
  3. added 5 commits that reference this issue on Oct 7, 2026
  4. removed their assignment
    on Oct 7, 2026
  5. added 2 commits that reference this issue on Oct 7, 2026
  6. added a commit that references this issue on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    filed-by-looplane-storagepriority:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions