Skip to content

feat: honest 'not analyzed' marker for media-dominant posts (#124, #136) - #133

Merged
Olawoyin007 merged 1 commit into
mainfrom
fix/media-low-text-skip
Jul 26, 2026
Merged

feat: honest 'not analyzed' marker for media-dominant posts (#124, #136)#133
Olawoyin007 merged 1 commit into
mainfrom
fix/media-low-text-skip

Conversation

@Olawoyin007

@Olawoyin007 Olawoyin007 commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

Reshapes the minimum-signal gate so the extension is honest about media it cannot read yet instead of guessing a manipulation label from scraped image alt-text / video metadata (closes #124, implements #136).

Three outcomes per post:

  1. Enough readable text (contentSignal() strips metadata brackets, URLs, @Handles) -> classified normally on the text, whether or not media is attached.
  2. Thin text but has image/video, and no vision model configured -> a dim, non-judgemental "Media - not analyzed yet" badge. No manipulation verdict.
  3. Thin text and no media -> silent skip (nothing to classify).

Fails open throughout - no fabricated verdicts.

Pluggable vision slot: /health now reports vision: bool (whether OLLAMA_VISION_MODEL is set). When a real vision model is plugged in, case-2 posts flow through it to be classified with image context instead of getting the placeholder. One config flip, no code change - the seam for Phase 9.1.

Files: extension/core/classifier.js (gate + applyNotAnalyzed), extension/styles.css (dim badge), server/api.py (/health.vision), plus CHANGELOG / ROADMAP / docs/architecture.md.

Testing

  • cd extension && npm test -> 88 Jest pass (incl. 7 contentSignal tests).
  • ./venv/bin/python -m pytest tests/ -> 98 pass, 86% coverage (incl. 2 new /health.vision tests).
  • cd extension && npm run build -> builds dist/chrome + dist/firefox clean; new code present in both.
  • Manual smoke test (human): load dist/chrome, start the local server, browse Twitter/X. Confirm: a video/image post with little text shows the dim "not analyzed yet" badge; a normal text post still gets a real label; a text post with an image still gets a real label.

Measure a post's readable text - adapter metadata brackets, URLs, and
@Handles stripped - and skip classification when it falls below the length
threshold, instead of spending a classify call on content we cannot read.
Fails open (no treatment), per the manifesto.

Posts carrying media URLs are never skipped here: the server's vision model
may still read the image, so we let it decide. The full text (handles and
all) is still what gets classified when a post is not skipped.

New contentSignal() helper + 7 Jest tests. Jest 88 pass, pytest 97 pass.
Docs (architecture.md classification flow) and CHANGELOG updated.
@Olawoyin007
Olawoyin007 force-pushed the fix/media-low-text-skip branch from a54f23d to b755431 Compare July 26, 2026 08:14
@Olawoyin007
Olawoyin007 merged commit 3525593 into main Jul 26, 2026
10 checks passed
@Olawoyin007 Olawoyin007 changed the title fix: skip media-dominant / low-text posts (issue #124) feat: honest 'not analyzed' marker for media-dominant posts (#124, #136) Jul 31, 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.

Handle media-dominant / low-text posts (skip classification, fail open)

1 participant