mirror of
https://github.com/ARUP-CAS/aiscr-qgis-amcr-viewer.git
synced 2026-10-09 20:37:37 +02:00
Úkol 4.3 (ruční běh po merge do main) splněn: běh 37059874538 skončil podle návrhu červeně kvůli rozbitému oai_dc na api.aiscr.cz/2.2/oai a založil issue #89. Změna přesunuta do archivu (--skip-specs). Připraveno s pomocí AI (Claude).
3.4 KiB
3.4 KiB
Tasks
1. Contract test
- 1.1 Probe and fix the test inputs: a small bbox where
akce,lokalita,samostatny_nalezandpianall return 1–499 anonymous records, and a larger area for pagination; record the probe numbers in the script header; verify by a probe run in scratch - 1.2 Write
tests/api_contract.pywith the status model, retries and outputs from design.md (decisions 3, 4, 7) and checks for: i18ncs.json, every OAI set inamcr_codelists.slovnicek(first page shaperesumptionTokenpaging), facet fieldsf_vedouci/f_nalezceitem shape, main query per entity (keys and value types the plugin reads,numFoundint), pagination without overlap, bbox restriction, PIAN batch geometry, every filter key the dialog builds (values taken from live facets), date range, error answer for an invalid parameter (HTTP 200 withoutresponse), unknown entity, login with deliberately wrong credentials; verify a local run is all OK
- 1.3 Verify the drift detection: temporarily set the facet
expectation to the old
{"name":…}shape → DRIFT reported with the field and both shapes; revert
2. Live plugin test
- 2.1 Write
tests/api_plugin_live.py(package import ofamcr_viewer, fakeiface/ canvas, thresholds from design.md decision 6, same status model and outputs); verify it passes inqgis/qgis:ltr - 2.2 #67 regression: run it against the plugin from the commit before
the #67 fix (
git archiveinto scratch) → FAIL onvedouciandnalezce; verify and record the output
3. Workflow and reporting
- 3.1 Write
.github/workflows/api_monitor.ymlper design.md (decisions 1, 8, 9, 10): pinned action SHAs as incode_quality.yml, pinnedrequests, artifacts with result files, reporting job withissues: writeonly; verify withactionlint - 3.2 Reporting script (inline step or
tests/api_monitor_report.py) withAPI_MONITOR_DRY_RUN=1; verify the four cases (new issue, same fingerprint, changed fingerprint, recovery) and that a run with only UNAVAILABLE leaves the issue untouched - 3.3 Outage simulation (unroutable base URL override) → all UNAVAILABLE, exit 0; verify
4. Documentation and checks
- 4.1
AGENTS.md: new subsection on the API monitor (what it runs, local commands, how to read the issue, 60-day schedule disable, manual dispatch for version branches); verify by reading the diff - 4.2 Run the
AGENTS.mdcheck set (check_sources, bandit, detect-secrets--all-files, flake8--isolatedonamcr_viewer/, ruff, smoke test inqgis/qgis:ltrand:stable– unchanged plugin code, must stay green) andopenspec validate add-daily-api-monitor --strict; verify all clean - 4.3 After merge into
main: manualworkflow_dispatchonmain, inspect the summary and that no issue was opened on a clean run- Run 37059874538 on
main(02144d8), 2026-10-02: not a clean run –api.aiscr.cz/2.2/oaireturnsamcr:amcrformetadataPrefix=oai_dcsince that evening (2.0/2.1correct). Contract job FAIL on all 17 OAI sets, live job FAIL on all 17 OAIfetch_set; digiarchiv facets and downloads OK. Report opened issue #89 with labelapi-monitor, deployed version, 34 failing checks and run link; run ended red as designed. The clean-run path (no issue / issue closed) was verified by the dry run in 3.2 and waits for the API fix.
- Run 37059874538 on