8000 Fix bugs found in #511 by blueheron786 · Pull Request #595 · mwmbl/mwmbl · GitHub
[go: up one dir, main page]

Skip to content

Fix bugs found in #511 - #595

Merged
daoudclarke merged 2 commits into
mainfrom
fix_bugs_in_511
Nov 5, 2026
Merged

daoudclarke merged 2 commits into
mainfrom
fix_bugs_in_511

Conversation

@blueheron786
Copy link
Copy Markdown
Collaborator

Manual checks

Missing-row 404s (API). Against a running server with a valid JWT:

  • DELETE /api/v1/platform/users/doesnotexist should return 404, not 500.
  • DELETE /api/v1/platform/domain-submissions/ids/999999 should return 404.
  • POST /api/v1/platform/domain-submissions/ids/999999 with a valid body should return 404.

Confirm that deleting someone else's returns 400.

Moderation flow

Submit a domain, then approve it as a moderator, then reject another. Confirm both decisions are saved and appear in the right list. The code path changed from .get() to .filter().first(), so the success path should be identical, but it's worth one pass.

Domain link groups

The fix matters only where crawled pages link to github.com, en.wikipedia.org or news.ycombinator.com. Crawl or index a batch containing such links, then check that get_domain_score for a linked domain is non-zero. Before the fix those links were silently dropped. Verifying this needs the bloom filter files, so it's a data check rather than a unit check.

jusText extraction

Fetch a page with a <select> dropdown and check that the extract doesn't contain the option text. The removed branch was unreachable, so the output should not change. A quick comparison on a few real pages would confirm that.

Ranking predictor

RankingPredictor is used only by the offline LTR evaluation in evaluate.py, so it doesn't affect live search. Before the fix, predict would have raised on the string index. Running that evaluation end to end is the right check. Scores for pages with few matching terms should now be zero.

The -include .env line is not part of the #511 fixes and would load local
secrets into make. The domains.py and justext/core.py changes are crawler
code, so the version is raised as release_check requires.
@blueheron786
Copy link
Copy Markdown
Collaborator Author

Reviewed independently. Two fixes pushed in 46a8077:

  1. mwmbl/crawler/domains.py and mwmbl/justext/core.py are part of the crawler image, so CI's release check fails without a CRAWLER_VERSION bump. Raised to 1.0.5.
  2. The -include .env line in the Makefile is unrelated to Bugs found in unit testing #511 and would load local secrets into make. Removed.

make check passes and the 31 tests in the affected files pass. The select-branch test also passes on the original code, so it documents behaviour rather than guarding the removed branch.

@codecov
codecov Bot commented Nov 5, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@daoudclarke
daoudclarke merged commit 430588e into main Nov 5, 2026
7 checks passed
@daoudclarke
daoudclarke deleted the fix_bugs_in_511 branch November 5, 2026 18:21
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.

2 participants

0