Skip to content

Verify the reco counts report against real Vuforia - #3366

Merged
adamtheturtle merged 3 commits into
mainfrom
adamtheturtle/create-vws-web-tools-issue
Aug 8, 2026
Merged

Verify the reco counts report against real Vuforia#3366
adamtheturtle merged 3 commits into
mainfrom
adamtheturtle/create-vws-web-tools-issue

Conversation

@adamtheturtle

Copy link
Copy Markdown
Member

Probing the endpoint against a real database found two mock bugs, both fixed here: real Vuforia serves the report from S3 with a text/plain content type rather than text/csv, and ends the header row with a carriage return and a line feed rather than a line feed alone (#3363).

The probe also confirmed the guesses made when the endpoint was added in #3357 — every rejected month returns 400 Fail, the columns are target_id,reco_count, an empty report is header-only, and a database ID which does not belong to the signing keys gives a 401 AuthenticationFailure, including when the database name is passed in its place — so differences-to-vws.rst now states these as observations rather than as unverified guesses, and records the differences which remain: real report file names derive from the requested month (2026-08-08-21.csv for the current month, 2026-07.csv for the previous), real URLs expire after just under seven days, and the mock's 404-until-ready is still unverified because no probe caught a report before it was generated (#3364).

To make those tests run rather than skip, vws-web-tools is bumped to 2026.8.7 for its new database ID, VUFORIA_DATABASE_ID is written by admin/create_secrets_files.py and added to all 100 encrypted secrets files and the example, and a _WorkingCloudDatabaseSettings subclass carries the field so that _InactiveCloudDatabaseSettings does not inherit a requirement no secrets file satisfies.

verify_mock_vuforia now yields its backend, as the Model Target equivalent already did, so TestRecoCountsReport can send the real ID to real Vuforia and a random one to the mocks, which accept any.

All nine real-Vuforia cases pass; remaining follow-ups are #3359, #3360, #3362 and #3365.

🤖 Generated with Claude Code

adamtheturtleand others added 3 commits August 8, 2026 21:35
vws-web-tools 2026.8.7 exposes the database ID which
`POST /imagetargets/databases/{database_id}/reports/recoCounts` names in its
path, so write it into the secrets files as `VUFORIA_DATABASE_ID` and send it
on the real backend. The mocks accept any ID, so they keep getting a random
one.
`verify_mock_vuforia` now yields its backend, as the Model Target equivalent
already does, so that a test can tell which one it is running against.
Secrets files created before this change have no database ID, so the field
defaults to empty and the real-Vuforia tests skip when it is. A green run
therefore does not mean the endpoint has been verified until the secrets files
are regenerated, which the differences documentation now says.
Towards #3359.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The guard runs only when the secrets file has no `VUFORIA_DATABASE_ID`, so
whichever way the secrets files are, one branch is unreachable in a given run
and coverage cannot reach the required 100%.
Exclude it, and say in a comment that it should be deleted once the secrets
files are regenerated, after which a missing ID should be a failure.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Probing the endpoint with a real database found two mock bugs. Real Vuforia
serves the report from S3 with a `text/plain` content type, not `text/csv`,
and ends the header row with a carriage return and a line feed, not a line
feed alone.
The probe also confirmed the guesses made when the endpoint was added: every
rejected `month` returns 400 `Fail`, the columns are `target_id,reco_count`,
an empty report is header-only, and the 401 for a mismatched database ID
carries the `AuthenticationFailure` result code.
Add `VUFORIA_DATABASE_ID` to all 100 encrypted secrets files, so the tests run
against real Vuforia rather than skipping. Only the working database has an
ID, because only endpoints which name a database in their path need one, so
the setting lives on a subclass rather than on the shared one.
Record the URL differences which remain: real report file names are derived
from the requested month, and real URLs expire.
Closes#3363. Towards #3359.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for freeto 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

@adamtheturtle