many: limit inspector access to artefact metadata
Metadata
Current evaluation
Merged after two approvals and CI. Refactored inspector access to artefact metadata via interfaces to prevent arbitrary modifications and enforce single-call setting. Enhances API safety and readability without functional changes.
Suggested action: —
No scores available.
Issue body
Pass interfaces corresponding to requests and response artefacts
to inspector methods to prevent inspectors from modifying arbitrary
data and setting invalid states in inspection opinions.
This also enforces artefact metadata to be set in a single call,
making it harder to unintentionally fill metadata fields for an
artefact the inspector has no authority over.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged after two approvals and CI. Refactored inspector access to artefact metadata via interfaces to prevent arbitrary modifications and enforce single-call setting. Enhances API safety and readability without functional changes. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #82 metadata,inspectors: refactor artefact inspection interface | fetch-service | merged | Merged after refactoring the artefact inspection interface. Redundant methods were removed, separate request and response inspection methods were added, and opinions were moved to a dedicated package. Approved and passed CI. | |
| #143 inspectors: reorganize artefact file interface | fetch-service | merged | Merged after two approvals and passing CI. The artefact file interface was renamed to distinguish it from the implementation struct and clarify its read-only status, modifying 26 files with 57 additions and 56 deletions. | |
| #606 refactor: set inspector opinion and artifact metadata | fetch-service | merged | Merged a refactor updating inspector opinion and artifact metadata in one call to prevent data loss. Approved by two reviewers, passed CI except CLA verification, and implemented after prior discussion. | |
| #302 refactor(inspectors): reduce cyclomatic complexity | fetch-service | merged | Merged after approval and CI. Refactored inspector code to reduce cyclomatic complexity by extracting common calls and moving artifact operations to the Artefact struct. Git protocol decoding errors now trigger artifact rejection, resolving #292. | |
| #158 metadata,inspectors: fix inspection result and add tests | fetch-service | merged | Merged following two reviewer approvals and passing CI. Fixed inspection result logic required for artifact approval, added clarifying comments, and improved test coverage for artifact metadata. |