Skip to content

feat(ingest): pure classify_url for git vs docs vs unsupported#207

Open
MohammedAnasNathani wants to merge 1 commit into
alphacrack:mainfrom
MohammedAnasNathani:feat/classify-url
Open

feat(ingest): pure classify_url for git vs docs vs unsupported#207
MohammedAnasNathani wants to merge 1 commit into
alphacrack:mainfrom
MohammedAnasNathani:feat/classify-url

Conversation

@MohammedAnasNathani

Copy link
Copy Markdown

Summary

Closes #194.

Adds a pure URL classifier (no network/fs/subprocess) as the vocabulary for docs-site ingestion (#67):

  • SourceKind + UrlVerdict in types.py
  • classify_url() in ingest.py — git / docs / unsupported
  • Deep links (/tree/…, /blob/…) reduce to the repository root
  • Embedded-URL smuggling (evil.example/https://github.com/...) is never git
  • Not wired into clone_repo / orchestrator / CLI (intentionally unused this slice)

Test plan

  • Parametrized table covering the issue’s policy rows + deep-link + evil-URL cases
  • pytest tests/test_ingest.py (49 passed)
  • clone_repo / existing rejection tests untouched

Introduce SourceKind/UrlVerdict and a side-effect-free classifier that
recognizes GitHub/GitLab roots and deep links, treats other https as
docs, and rejects ssh/http/local/embedded-URL inputs. Not wired into
the pipeline yet — vocabulary for alphacrack#67.

Closes alphacrack#194
Copilot AI review requested due to automatic review settings July 22, 2026 19:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

ingest: pure classify_url — tell a git repo URL from a hosted docs page from an unsupported input (first slice of #67)

2 participants