Skip to content

Add clarifying comment and test for unknown target in VuMark#2985

Merged
adamtheturtle merged 1 commit intomainfrom
adamtheturtle/unknown-target
Feb 21, 2026
Merged

Add clarifying comment and test for unknown target in VuMark#2985
adamtheturtle merged 1 commit intomainfrom
adamtheturtle/unknown-target

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 21, 2026

Add clarifying comment in test_invalid_given_id explaining that the shared check only covers endpoints ending in target_id, with endpoint-specific tests covering trailing segments. Add test_unknown_target to verify that the VuMark generation API correctly returns UnknownTarget for non-existent targets.

🤖 Generated with Claude Code


Note

Low Risk
Test-only changes (comment + new assertion coverage) with no production logic modifications.

Overview
Clarifies in test_invalid_given_id that the shared invalid-ID check only applies to endpoints whose paths end with {target_id}, leaving trailing-segment endpoints to their own tests.

Adds a new VuMark generation API test (test_unknown_target) that requests an instance for a non-existent target_id and asserts a 404 NOT_FOUND with ResultCodes.UNKNOWN_TARGET.

Written by Cursor Bugbot for commit 7cab819. This will update automatically on new commits. Configure here.

- Add comment in test_invalid_given_id explaining the scope of the shared check
- Add test_unknown_target to verify UnknownTarget response for VuMark generation API

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

server_secret_key=vumark_vuforia_database.server_secret_key,
target_id=uuid4().hex,
instance_id=uuid4().hex,
accept=VuMarkAccept.PNG,
Copy link

Choose a reason for hiding this comment

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

Enum passed to str-typed beartype-checked parameter

Low Severity

VuMarkAccept.PNG is passed as the accept argument to _make_vumark_request, which declares accept: str and is decorated with @beartype. Every other caller of _make_vumark_request in this file passes a plain MIME-type string like "image/png". If VuMarkAccept is not a str subclass (i.e., not a StrEnum), beartype will reject the call at runtime, causing the test to fail with a type violation rather than actually exercising the unknown-target code path.

Fix in Cursor Fix in Web

@adamtheturtle adamtheturtle merged commit 88b2a8e into main Feb 21, 2026
106 checks passed
@adamtheturtle adamtheturtle deleted the adamtheturtle/unknown-target branch February 21, 2026 17:07
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.

1 participant