Skip to content

bacterial-genome-assembly: convert asserts to list form and fix resurrected assertion#1276

Draft
jmchilton wants to merge 2 commits into
galaxyproject:mainfrom
jmchilton:convert-asserts-bacterial-genome-assembly
Draft

bacterial-genome-assembly: convert asserts to list form and fix resurrected assertion#1276
jmchilton wants to merge 2 commits into
galaxyproject:mainfrom
jmchilton:convert-asserts-bacterial-genome-assembly

Conversation

@jmchilton

@jmchilton jmchilton commented Jul 10, 2026

Copy link
Copy Markdown
Member

Opened by Claude (AI assistant) on behalf of @jmchilton — not authored by them personally.

Summary

Convert the tooldistillator_summarize_assembly asserts: block to list form and fix the assertion that this exposed.

The "Assembly": "shovill_contigs_fasta" assertion never actually ran: it was authored (wf 1.1.9, 0925cf747) as a duplicate has_text: mapping key stacked above has_text: contig00146. YAML collapses duplicate mapping keys (last wins), so only contig00146 was ever evaluated — the Assembly assertion was dead from the day it was written and never validated. Converting to list form ran it for the first time and it failed: tooldistillator's JSON has no Assembly key and no shovill_contigs_fasta value.

Fix: replace it with a substring that is actually present and preserves the intent (confirm the summary is of the shovill assembly): "analysis_software_name": "shovill". contig00146 is genuinely in the output and is kept.

Caveat / possible follow-up

has_text substring matching over a serialized JSON document is a fragile way to validate structured output — it silently depends on key ordering and whitespace and asserts nothing structural. A follow-up could migrate these to a proper JSON-property assertion.

Split from the passing-subset PR; belongs on its own because it changes an assertion's meaning, not just its form.

YAML silently collapses duplicate mapping keys, so repeated has_text/has_line/has_text_matching entries only ran the last assertion per type. Convert to list form so each assertion runs.

This test is currently RED — the previously-dropped assertion(s) do not match tool output. Split out from galaxyproject#1217 to track down individually.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Test Results (powered by Planemo)

Test Summary

Test State Count
Total 1
Passed 0
Error 0
Failure 1
Skipped 0
Failed Tests
  • ❌ bacterial_genome_assembly.ga_0

The `"Assembly": "shovill_contigs_fasta"` assertion never actually ran.
It was added (wf 1.1.9, 0925cf7) as a second `has_text:` key in the
same `asserts:` mapping, directly above `has_text: contig00146`. YAML
collapses duplicate mapping keys (last wins), so only `contig00146` was
ever evaluated — the Assembly assertion was dead from the moment it was
written and was never checked against real tool output. Converting the
block to list form (this PR series) ran it for the first time, and it
failed: tooldistillator's JSON has no `Assembly` key and no
`shovill_contigs_fasta` value. The author appears to have guessed the
output shape (expecting the input dataset label echoed under `Assembly`).

Replace it with a substring that is actually present and preserves the
intent — confirming the summary is of the shovill assembly:
`"analysis_software_name": "shovill"`. `contig00146` is genuinely in the
output and is kept.

Caveat: `has_text` substring matching over a serialized JSON document is
a poor way to validate structured output — it silently depends on key
ordering and whitespace in the serializer and asserts nothing about
structure. A structured JSON-property assertion would be more robust; a
follow-up could migrate these to that.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jmchilton jmchilton changed the title bacterial-genome-assembly: convert duplicate-keyed asserts to list form (currently red) bacterial-genome-assembly: convert asserts to list form and fix resurrected assertion Jul 10, 2026
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