Skip to content

fix: drop the obsolete secfoo[api] extra and its misleading install hint - #156

Merged
vsn411 merged 3 commits into
mainfrom
fix/drop-obsolete-api-extra
Nov 20, 2026
Merged

vsn411 merged 3 commits into
mainfrom
fix/drop-obsolete-api-extra

Conversation

@Varunpoojari

@Varunpoojari Varunpoojari commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #120 (item 1). Deliberately not Fixes, because the other items in that issue are still open.

Problem

litellm and langgraph are regular dependencies of secfoo, but the project still carried a separate api extra with the same two packages. The api agent's import-failure message also told users to run pip install secfoo[api]. That advice is wrong: the extra duplicates base dependencies, so installing it changes nothing. The docs repeated the same hint.

Changes

  • pyproject.toml: remove the api extra and leave a short comment explaining why there isn't one.
  • src/secfoo/agents/api.py: the ImportError handler now says that litellm/langgraph ship with secfoo, so a failed import means a broken or partial install, and suggests pip install --force-reinstall secfoo.
  • docs/agents.md: the api row and the troubleshooting bullet match the new behaviour.
  • tests/test_agents/test_api.py: the existing missing-litellm test is renamed and asserts the new message and that secfoo[api] is gone.
  • tests/test_docs_consistency.py: new test_no_obsolete_api_extra. It checks that there is no api optional-dependency, that litellm and langgraph are in the base dependencies, and that secfoo[api] appears in no README, CONTRIBUTING, docs or src file. It follows the pattern of the docs-consistency tests added in docs: fix REFERENCE.md claim that releases build on tag push (#120 item 5) #151.

Checks run

  • The new test fails on main and passes on this branch.
  • tests/test_agents/test_api.py and tests/test_docs_consistency.py: 30 passed.
  • Full suite: 1803 passed, 1 skipped, 4 failed. The 4 failures are the diagram-rendering tests (test_activity_routes.py x3 and test_architecture_dashboard.py::test_dashboard_diagram_section_still_present_alongside_new_dashboard). They fail the same way on an unmodified main checkout and don't touch these files.
  • ruff check is clean on the touched files.

Notes

  • Anyone with secfoo[api] in a requirements file will now get pip's "does not provide the extra 'api'" warning rather than an error, and the install still pulls both packages in as base dependencies.

litellm and langgraph are regular dependencies, so the `api` extra installed
nothing and `pip install "secfoo[api]"` could not fix a failed import. Remove
the empty extra and make the error text, docs/agents.md and the test agree: an
import failure means a broken install, so the message says to reinstall secfoo
and includes the ImportError. Add a consistency test so the extra cannot return.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DsERxaCi7rNtqUTYked7Jd
Satyanarayana Vuppala and others added 2 commits November 20, 2026 12:11
README's first install channel is pipx, where 'pip install --force-reinstall'
would install into a different environment. The consistency test now parses
requirement names robustly and also scans action.yml, the Dockerfile, the
npm README and the CI examples.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vsn411

vsn411 commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Thanks @Varunpoojari, nicely scoped, and I appreciate the "Part of #120" rather than Fixes. Removing the extra is the right call, since litellm/langgraph are base dependencies.

I pushed two small follow-ups to your branch instead of asking for another round:

  • pipx users. The README's first install channel is pipx install secfoo, and for a pipx install pip install --force-reinstall secfoo would reinstall into a different environment. The error message and docs/agents.md now say to reinstall the way you installed it: pipx reinstall secfoo, or pip install --force-reinstall secfoo. The test asserts both.
  • The guard test.
    • Requirement names are parsed with a regex split, so ==/~= specifiers or environment markers won't break the check.
    • The secfoo[api] scan also covers action.yml, the Dockerfile, the npm README and the CI examples.
    • I checked that it fails when the string is planted back.

I also merged main in, which the branch rules require. Merging once CI is green.

@vsn411
vsn411 merged commit 97e7376 into main Nov 20, 2026
6 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.

2 participants