feat: honest 'not analyzed' marker for media-dominant posts (#124, #136) - #133
Merged
Conversation
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
force-pushed
the
fix/media-low-text-skip
branch
from
July 26, 2026 08:14
a54f23d to
b755431
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
contentSignal()strips metadata brackets, URLs, @Handles) -> classified normally on the text, whether or not media is attached.Fails open throughout - no fabricated verdicts.
Pluggable vision slot:
/healthnow reportsvision: bool(whetherOLLAMA_VISION_MODELis 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. 7contentSignaltests)../venv/bin/python -m pytest tests/-> 98 pass, 86% coverage (incl. 2 new/health.visiontests).cd extension && npm run build-> buildsdist/chrome+dist/firefoxclean; new code present in both.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.