← Back to issue list

Sourcecraft inspector is too restrictive

View original Github issue

Metadata

Project
fetch-service
Number
#228
Type
issue
State
closed
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged PR #229 (commit aaa40a4): Sourcecraft no longer inspects HTML responses, preventing unrelated permissive-mode artifacts from being rejected.

Resolution: closed resolved

Reason: Issue #228 was resolved by PR #229, merged as commit aaa40a4. The change removes HTML response inspection from the Sourcecraft inspector, so permissive-mode artifacts are not rejected when request-command metadata is absent.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description The sourcecraft artefact inspector is rejecting artefacts even if it's not an artefact it has authority over. Note that in permissive mode the response inspector can run for an artefact regardless of the result of the request inspection. ### To Reproduce Pull the following part in permissive mode: ``` black: plugin: python source: https://github.com/psf/black source-type: git source-depth: 1 source-tag: 24.4.2 ``` ### Relevant log output ```javascript "request-inspection": { "pip.simple-index": { "opinion": "Pending", "reason": "request matches valid URL", "annotations": { "match": "^https://pypi.org:443/simple/([\\w-]+)/$", "package-name": "pip" } } }, "response-inspection": { "craft.sourcecraft": { "opinion": "Rejected", "reason": "error inspecting artefact", "annotations": { "error-message": "cannot read request command annotation" } } }, "result": "Rejected", ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #229 (commit aaa40a4): Sourcecraft no longer inspects HTML responses, preventing unrelated permissive-mode artifacts from being rejected.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR canonical/fetch-service#229 (commit aaa40a4): Sourcecraft no longer inspects HTML responses, preventing unrelated permissive-mode artifacts from being rejected.
qwen/qwen3.6-35b-a3b — — Abandoned. The sourcecraft inspector incorrectly rejected artefacts it lacked authority over. A similar logic flaw was noted in GoModuleGitInspector, but no fix or follow-up pull request was implemented.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/fetch-service#229 (confidence 100%)

    Merged PR #229 implemented commit aaa40a4, which removes text/html inspection; the change is also recorded in the changelog.

Related issues

Issue Project State Summary Similarity
#229 fix: remove inspecting text/html in sourcecraft inspector fetch-service merged Merged PR #229 fixed accidental Sourcecraft inspection of HTML by removing text/html inspection; released in v0.2.1 via commit aaa40a4.
79%
#219 docs: document sourcecraft inspector fetch-service merged Merged PR #219 (commit f4a5dac) by dariuszd21 added docs/reference/sourcecraft.rst documenting the Sourcecraft inspector added in #217, closing CRAFT-3337. File later revised by #604.
72%
#217 feat: add sourcecraft inspector fetch-service merged Merged PR #217 as commit 4e14f93, adding Sourcecraft inspection and repository-cloning support; it declared #211 fixed and followed prerequisite PR #216.
70%