tests: ~19 test_module_metadata cases assert list form of requires_config after ClassVar[tuple] change #120
Labels
No labels
agentic-osint
audit
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:preflight
blocked:verify-failed
bug
chore
deferred
enhancement
feature-request
in-progress
lint-baseline
lint-cleanup
needs-decompose
needs-triage
performance
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/osint-hub#120
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Roughly 19
test_module_metadatatests across the suite still assert the oldlist[str]form ofEvidenceModule.requires_config, butbackend/app/modules/base.pynow declares it as an immutable tuple:The tests were never updated, so they fail on
main.Reproduction
Scope
Full-suite baseline on
origin/main@2930a35(Python 3.12): 83 failed, 1700 passed, 9 skipped in ~733s. Confirmed pre-existing and unrelated to #117/#119 — the rebased #119 branch produced a byte-identical failure set (common the sortedFAILEDlists is empty in both directions).Affected files include:
backend/tests/test_email_osint.pybackend/tests/test_entity_linker.pybackend/tests/test_phone_osint.pybackend/tests/test_relationship_builder.pybackend/tests/test_report_generator.pybackend/tests/test_suspect_tracker.pybackend/tests/test_threat_intel_aggregator.pybackend/tests/test_timeline_reconstruction.pybackend/tests/unit/test_modules_dehashed.pybackend/tests/unit/test_modules_reddit.pybackend/tests/unit/test_modules_twitter.pybackend/tests/unit/test_search_aggregator.pybackend/tests/unit/test_social_finder.pybackend/tests/unit/test_timeline_reconstruction.pyThe remaining failures in the 83 are separate concerns (
test_live_scrapers.pyneeds live network; severalsecurity/tests fail independently) and should be triaged on their own.Fix
Update the assertions to the tuple form, e.g.
requires_config == ("dehashed_api_key",).Why this matters beyond the tests
This debt actively breaks the automated fixer lane. kilo-gsd's Verify gate falls back to a bare whole-repo
pytestwhen an issue has no plan-specific verification checklist, so it grades this broken baseline rather than the change under test. On #118 that caused three Bugfix rounds to burn against failures the change never caused — the agent got 82 → 69 by patching unrelated tests, but could never reach green. Clearing this baseline makes the fallback gate trustworthy again.Environment note
The suite must be run with Python 3.12 (
requires-python = ">=3.12"). Under 3.11 collection dies early with a misleadingSyntaxError: expected '('atbackend/app/services/llm/parsing.py:17, which is just PEP 695 generic syntax the older interpreter cannot parse.Triaged: ~19 test assertions need list-form fix. Small scope, low risk → fixit lane.
Launcher
t_a0f329d0(kilo-gsd-runner) blocked on preflight before spawn:.gsd/gates/pre-dispatch.sh 120exit 1 — main worktree has 8 modified files inbackend/app/services/investigations/...(unrelated to this issue) plus?? .worktrees/containing 5 leftover worktrees from prior #100/#116/#117/#118 runs. Contract forbids the launcher from runninggit reset/git clean/git worktree remove; the runner / janitor / triage lane must reconcile the working tree before #120 can be claimed. Card blockedkind=capabilityfor operator / janitor follow-up.Fixed via PR #157 (commit
b2a646e).Fix scope — 15
test_module_metadatacases updated from list-literal to tuple-literal:assert self.module.requires_config == []→assert self.module.requires_config == ()== ["<key>"]→== ("<key>",)The two
test_module_metadatacases intest_base.pyandtests/unit/test_module_base.pytest syntheticConcreteEvidenceModulesubclasses that themselves declarerequires_config: ClassVar[list] = [...]; those assertions are correct as-is and were left untouched.Verification
pytest -k 'test_module_metadata or test_module_requires_api_key'→ 8/8 pass.python3.12 -m pytest --no-cov(751s): 1724 passed, 59 failed, 9 skipped (vs baseline 1700 passed / 83 failed → +24 pass / −24 fail from this change). The remaining 59 are unrelated integration/security/live-network failures called out in the issue body.ci.ymlon commitb2a646e: success (3:12).backend/app/modules/base.pyis NOT modified — this is a tests-only fix as the issue called for.Closes #120.
Landed via merge commit
d9dc0f8onmain(PR #157). Fix commit:b2a646e— test: align test_module_metadata assertions with tuple form of requires_config. Spot-checktests/unit/test_modules_dehashed.py::TestDeHashedModuleConfig::test_module_metadatapasses; broad-m 'not integration and not performance and not security'run is 1293 passed / 4 failed, with all 4 failures being pre-existing unrelated DB-fixture / FK / evidence-review cases (not from this PR). Issue closed automatically by the merge commit'scloses #120keyword.