Skip to content

test: correct mislabelled test in src/audit/analyzers/jobs.rs#883

Merged
jamesadevine merged 1 commit into
mainfrom
test-reducer/fix-jobs-parses-real-ado-shape-e8d442dda0c9c12b
Jun 7, 2026
Merged

test: correct mislabelled test in src/audit/analyzers/jobs.rs#883
jamesadevine merged 1 commit into
mainfrom
test-reducer/fix-jobs-parses-real-ado-shape-e8d442dda0c9c12b

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Test Suite Reduction: src/audit/analyzers/jobs.rs

What was wrong

timeline_to_jobs_parses_real_ado_shape — the test name promises to validate "real ADO shape" parsing, but the body only asserted jobs.len() == 3 and the order of job names. Those two assertions are already covered by:

  • timeline_to_jobs_filters_non_job_records (count check)
  • timeline_to_jobs_sorts_by_start_time (ordering check)

The test sets up rich, realistic data — completed jobs with result, startTime, finishTime, id, and parentId — but none of the parsed field values were verified. A regression in result, duration, status, started_at, or finished_at parsing would go undetected.

Changes

Test Action Reason
timeline_to_jobs_parses_real_ado_shape Corrected Mislabelled — name claimed full field parsing validation, body only checked count and order

Added assertions for the first parsed job:

  • status == "completed"
  • result == Some("succeeded")
  • duration == Some("1m 0s")
  • started_at == Some("2026-01-01T00:00:00Z")
  • finished_at == Some("2026-01-01T00:01:00Z")

Also added a comment clarifying that extra ADO fields (id, parentId) must be silently ignored.

Verification

  • cargo test: all 1748 tests pass ✅
  • cargo clippy --all-targets --all-features: no warnings ✅

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • spsprodeus21.vssps.visualstudio.com
  • spsprodweu4.vssps.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "spsprodeus21.vssps.visualstudio.com"
    - "spsprodweu4.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by Test Reducer · sonnet46 1.9M ·

timeline_to_jobs_parses_real_ado_shape claimed to validate "real ADO
shape" parsing but only asserted on jobs.len() and name ordering — both
already covered by the filtering and sorting tests. The test setup
provides complete job data (result, startTime, finishTime, id, parentId)
but none of those fields were verified, meaning regressions in field
parsing would go undetected.

Add assertions for status, result, duration, started_at, and finished_at
on the first parsed job, and add a comment clarifying that extra ADO
fields (id, parentId) are silently ignored.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review June 7, 2026 08:00
@jamesadevine jamesadevine merged commit c7226fe into main Jun 7, 2026
@jamesadevine jamesadevine deleted the test-reducer/fix-jobs-parses-real-ado-shape-e8d442dda0c9c12b branch June 7, 2026 08:01
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.

1 participant