Skip to content

fix: validate rendered README media in audit - #33

Merged
AnayDhawan merged 1 commit into
CreativesLibrary:mainfrom
floze-the-genius:fix/32-readme-media-audit
Aug 16, 2026
Merged

AnayDhawan merged 1 commit into
CreativesLibrary:mainfrom
floze-the-genius:fix/32-readme-media-audit

Conversation

@floze-the-genius

Copy link
Copy Markdown
Contributor

What and why

Closes #32.

audit.sh currently scans raw README text, so words inside comments or fenced examples can incorrectly satisfy the demo check. It also misses valid image-based badges from providers outside its small hostname list, and prints a warning marker for a scored badge failure.

This change:

  • filters multiline HTML comments and backtick/tilde code fences before checking README media
  • recognizes rendered Markdown/HTML images and provider-agnostic linked-image badges
  • reports a missing scored badge with the same red failure marker as other scored misses
  • keeps a missing README safe instead of relying on a failed read

Type

  • New or improved template (templates/)
  • Script fix or improvement (scripts/)
  • Reference / docs (references/, SKILL.md)
  • Other

Testing

  • Added regression fixtures first: the raw-text false positive, red failure marker, and provider-agnostic badge cases failed against the previous implementation; the real Markdown image fixture already passed.
  • docker run --rm --network none -v "$PWD:/repo:ro" -w /repo bash:5.2 bash tests/run.sh — all audit fixtures pass, including the full 16/16 case.
  • git ls-files -z 'scripts/*.sh' 'tests/*.sh' 'demo/*.sh' | xargs -0 shellcheck — passes.
  • Explicit missing-README audit — passes without an error.

The full suite was run in Linux Bash 5.2, matching CI. Some existing fixture helpers use GNU sed syntax and do not run correctly with macOS BSD sed; this patch does not change those helpers.

Checklist

  • shellcheck scripts/*.sh passes (if scripts changed)
  • Templates still use generic {{PLACEHOLDERS}}, no hardcoded names or paths (templates are untouched)
  • No secrets or personal paths committed
  • SKILL.md / references reviewed; their existing real-asset and badge guidance remains accurate

@AnayDhawan

Copy link
Copy Markdown
Collaborator

Looks good, tests pass, will merge once rebased. This now conflicts with main (other PRs landed since you opened it) — could you rebase onto main and force-push?

@AnayDhawan

Copy link
Copy Markdown
Collaborator

Thanks so much for digging into the README-media false positive and putting together such a thorough, well-tested fix, contributions like this are exactly what make this project better. If oss-launch has been useful to you, a star on the repo would go a long way in helping more people find it!

@AnayDhawan
AnayDhawan force-pushed the fix/32-readme-media-audit branch from 13f36b4 to de6e439 Compare August 16, 2026 12:23
@AnayDhawan

Copy link
Copy Markdown
Collaborator

Rebased this onto current main myself (it had drifted out of a couple other fixes that landed in the meantime, all in the same area of audit.sh/tests/run.sh) and reran the full local suite plus CI, both clean. Solid fix, appreciated the regression fixtures for the raw-text false positive, the failure-marker mismatch, and the provider-agnostic badge case, exactly the kind of coverage that keeps this from regressing quietly. Merging.

@AnayDhawan
AnayDhawan merged commit ce3d5df into CreativesLibrary:main Aug 16, 2026
2 checks passed
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.

audit.sh false negative: README demo/badge checks are word-greps, so a TODO comment scores the point

2 participants