Skip to content

docs: fix packaging, URL, version, and CLI help drift - #142

Closed
kushaldave002 wants to merge 1 commit into
secfoo-com:mainfrom
kushaldave002:fix/docs-packaging-drift
Closed

kushaldave002 wants to merge 1 commit into
secfoo-com:mainfrom
kushaldave002:fix/docs-packaging-drift

Conversation

@kushaldave002

Copy link
Copy Markdown
Contributor

Closes #120

Summary

Fixes all five documentation and packaging drift items in #120 and adds regression tests plus CI checks to prevent drift from returning.

Changes

  1. Removed obsolete secfoo[api] extra: litellm and langgraph are already base dependencies in [project.dependencies]. Removed the redundant [project.optional-dependencies].api extra in pyproject.toml, updated the ImportError message in src/secfoo/agents/api.py (and tests/test_agents/test_api.py), and updated docs/agents.md.
  2. Aligned version with PyPI (0.3.1) + CI check: Updated src/secfoo/__about__.py from 0.3.0 to 0.3.1 (matching PyPI and the v0.3.1 GitHub Release) and added a CI step in .github/workflows/ci.yml verifying __version__ >= latest PyPI release.
  3. Updated stale rakfortltd/secfoo URLs to secfoo-com/secfoo: Updated install.sh, install.ps1, README.md, docs/REFERENCE.md, docs/CI.md, Dockerfile, .github/workflows/release.yml, examples/ci/gitlab-ci.yml, and npm package repository/homepage URLs to secfoo-com/secfoo (verified secfoo-com/secfoo hosts the v0.3.1 release binaries and SHA256SUMS; kept the @rakfortltd/secfoo npm scope and clarified it in docs/REFERENCE.md).
  4. Aligned CLI help & metadata: Updated secfoo --help in src/secfoo/cli.py and abstract in CITATION.cff to match the AI security review CLI description in pyproject.toml and README.md.
  5. Fixed release trigger docs: Updated docs/REFERENCE.md to state that .github/workflows/release.yml runs via manual workflow_dispatch for an existing vX.Y.Z tag instead of on every tag push.
  6. Consistency tests + CI link checker:
    • Added tests/test_docs_consistency.py verifying all of the above plus relative markdown link resolution across README.md and docs/.
    • Added a docs-links CI job using lycheeverse/lychee-action (SHA-pinned) with .lycheeignore for intentional placeholder URLs.

Verification

  • uv run pytest tests/test_docs_consistency.py tests/test_agents/test_api.py -v: 28 passed
  • uv run ruff check tests/test_docs_consistency.py tests/test_agents/test_api.py src/secfoo/agents/api.py src/secfoo/__about__.py: all checks passed

@vsn411

vsn411 commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Thank you, @kushaldave002. The URL moves to secfoo-com/secfoo are right and worth keeping: the raw install.sh / install.ps1 URLs, releases/latest and the v0.3.1 downloads all resolve, and that release has all five binaries plus SHA256SUMS, so the install scripts will work. The secfoo[api] cleanup and the README/CITATION/--help alignment are good too. I'm closing the PR because the version handling would mislabel main and make CI depend on PyPI, and that needs a different approach. #120 stays open, and you're very welcome to reopen this PR after pushing the fixes, or open a new one. Reviewed at 5d96d4e.

Blocking

  1. Main should not become 0.3.1. PyPI's 0.3.1 was built from the v0.3.1 tag, which points at commit e2967ca on release/v0.3.1; that commit was never merged to main, and main has ~77 newer commits. Labelling main 0.3.1 means secfoo --version reports the same version for two different builds. Please set __about__.py to 0.3.2.dev0; release.yml's exact tag == __about__ check still forces a real bump at release time.
  2. Please drop the per-PR "version >= latest PyPI" CI step. It ties every PR and main push to outside state: whenever a release is published from a release branch before main is bumped (exactly what happened with 0.3.1), every unrelated PR goes red. It also imports packaging, which isn't a declared dependency, and a connection reset or JSON error during the read fails the job. If a check is wanted, it belongs in release.yml or a scheduled job.
  3. Please leave the GHCR tags in release.yml alone. Hardcoding ghcr.io/secfoo-com/secfoo breaks pushes from any other owner (GITHUB_TOKEN can only push to its own namespace), and the maintainers' release-workflow changes (from chore: bump version to 0.3.1 #44) already derive the image name from $GITHUB_REPOSITORY_OWNER. Those will land separately, so keeping release.yml out of this PR avoids a conflict.
  4. install.ps1 can never pass its checksum on Windows (~L44, pre-existing, but your URL fix now makes it reachable). ($ExpectedLine -split "\s+")[0] runs on a Select-String MatchInfo, whose string form is path:lineno:line, so $Expected never equals the hash and every install stops with "Checksum mismatch". Use $ExpectedLine.Line. Please test it on Windows (a windows-latest job running the script against the release would do).

Should fix

  • Docker and npm aren't actually available yet. ghcr.io/secfoo-com/secfoo can't be pulled anonymously (the package is private), and @rakfortltd/secfoo was never published to npm. Making the package public and publishing npm are maintainer tasks, so please don't change those channels. But Docs and packaging drift: secfoo[api] extra is obsolete, public version says 0.3.0 while PyPI is 0.3.1, install scripts point at another repo #120 asked for each URL to be verified or documented, so add a short note in README and REFERENCE that the Docker and npm channels are not available yet.
  • The link checker will make CI flaky. lychee hits external sites on every PR and push with fail: true and no retries, and the .lycheeignore entries exclude nothing (the run reported 0 excluded). An outage at any linked site, or a new doc linked by its absolute blob/main URL, turns unrelated PRs red. Run --offline on PRs and the full external check on a schedule, with --max-retries.
  • test_version_is_at_least_0_3_1 parses with int(p), which errors on standard pre-releases such as 0.3.2.dev0 or 0.4.0rc1. Use packaging.version.Version, or drop it together with the CI step.
  • The description "alignment" test only checks the prefix "AI security review CLI", so pyproject, CITATION.cff and --help can still drift. Compare a shared canonical string instead. The relative-link test also duplicates what lychee checks locally and skips links with titles.
  • The api agent's ImportError message now hides the real exception and gives pip-only advice, which doesn't help users of the binary, npm, pipx or uvx builds. Include the original exception and word it for every install channel.

Looking forward to the next version.

@vsn411 vsn411 closed this Nov 18, 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.

Docs and packaging drift: secfoo[api] extra is obsolete, public version says 0.3.0 while PyPI is 0.3.1, install scripts point at another repo

2 participants