Skip to content

Make groom publisher fixture date-relative instead of hard-coded - #1262

Open
qapdex-maker wants to merge 1 commit into
dotnet:mainfrom
qapdex-maker:fix/groom-fixture-retention
Open

qapdex-maker wants to merge 1 commit into
dotnet:mainfrom
qapdex-maker:fix/groom-fixture-retention

Conversation

@qapdex-maker

Copy link
Copy Markdown

The token-failover job of evaluation-workflow-tests went red on
2026-10-02 (run 37046657914) in test_groom_publisher_preserves_resolved_dispatched_rows.

Cause

devops-health-groom.md drops a resolved outbox row once it is older than
14 days, using Date.now():

const resolvedOutboxExpired = prior => {
  ...
  const ageDays = Math.floor(
    (Date.now() - Date.parse(`${date}T00:00:00Z`)) / 86400000
  );
  return ageDays > 14;
};

The fixture in run_groom_publisher_without_rows pinned correlation_date to
the literal 2026-09-16. Once real time passed that date the row was treated
as expired, silently omitted from the rendered dashboard, and the assertion
assertIn("🔄 Dispatched", ...) failed with an empty island table.

This is a time-bomb fixture, not a product bug. It will fail again for anyone
running the suite later than 14 days after the pinned date.

Fix

Default correlation_date to yesterday, so the row is always inside the
retention window, and derive first_seen and the table's First Seen column
from the same value. The expiry test still passes 2000-01-01 explicitly, so
the expiry path stays covered.

Verification

Same worktree, before vs after the patch:

  • baseline: FAILED (failures=1, errors=23)
  • patched: FAILED (errors=23)

The 23 errors are all FileNotFoundError: 'pwsh' from the local machine having
no PowerShell, unrelated to this change. The single failure this fixes is gone.

The resolved-dispatched fixture pinned correlation_date to 2026-09-16. The
groom publisher expires resolved outbox rows older than 14 days using
Date.now(), so the fixture silently started failing once real time passed
that date (observed red on 2026-10-02, test_groom_publisher_preserves_
resolved_dispatched_rows).

Default the correlation to yesterday so the row stays inside the retention
window; the expiry test still pins 2000-01-01 explicitly.
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Note

This PR is from a fork and modifies infrastructure files (eng/ or .github/).

Changes to infrastructure typically need to be submitted from a branch in dotnet/skills (not a fork) so that CI workflows run with the correct permissions and secrets.

Please consider recreating this PR from an upstream branch. If you don't have push access to dotnet/skills, ask a maintainer to push your branch for you.

@AbhitejJohn

Copy link
Copy Markdown
Collaborator

Thanks a bunch for catching and fixing this, @qapdex-maker. I preserved your original commit and credit in the trusted follow-up PR #1264. I also added a small follow-up so the status-parser test checks the new date-relative correlation instead of the old fixed value.

(Copilot, commenting on Abhitej's behalf.)

This branch has not been deployed

No deployments
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