Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Credential redaction can expose secrets and corrupt saved evidence, and verification reliability issues remain unresolved.
5 open issues
What changed in this PR
Standardizes local and CI verification for the OpenAPI library, with shared runners and saved evidence for issue #811.
Changes:
- Defines canonical Makefile commands and separates offline tests, managed integration, and Azure certification.
- Adds verification helpers for process cleanup, reporting, redaction, and wheel smoke checks.
- Updates CI artifact uploads, regression tests, and contributor documentation.
| File | Description |
|---|---|
tools/verification.py |
Orchestrates verification lanes and aggregate results. |
tools/verification_wheel.py |
Adds installed-wheel smoke verification. |
tools/verification_process.py |
Manages subprocess timeouts, cleanup, and logs. |
tools/verification_host.py |
Runs managed Functions-host and Azurite checks. |
tools/verification_evidence.py |
Collects, redacts, saves, and renders evidence. |
tools/verification_environment.py |
Adds prerequisite diagnostics and artifact cleanup. |
tools/__init__.py |
Establishes the tools package. |
tests/test_verification_evidence.py |
Tests evidence classification, serialization, and redaction. |
tests/test_verification_commands.py |
Tests command contracts and process lifecycle. |
tests/test_validate_http_shorthand_conflict.py |
Adds a typed helper for optional validator imports. |
tests/test_ci_workflow_hardening.py |
Checks shared runners and always-run uploads. |
pyproject.toml |
Routes tests through the runner and expands type checking. |
Makefile |
Defines canonical commands and delegates orchestration. |
docs/testing.md |
Explains test lanes and CI evidence. |
docs/development.md |
Documents commands and evidence layout. |
docs/contributing.md |
Updates contributor validation guidance. |
docs/agent-playbook.md |
Updates automated-development verification guidance. |
CONTRIBUTING.md |
Documents setup, verification, and evidence contracts. |
AGENTS.md |
Updates canonical commands and the local merge gate. |
.gitignore |
Excludes generated verification evidence. |
.github/workflows/publish-pypi.yml |
Uses the shared library-test runner and uploads evidence. |
.github/workflows/e2e-azure.yml |
Integrates Azure verification evidence and JUnit paths. |
.github/workflows/ci-test.yml |
Adopts shared runners and evidence uploads across CI lanes. |
Review effort: Balanced
| text = re.sub(r"(?im)(authorization[\"']?\s*[:=]\s*)[^\r\n<\"]+", r"\1[REDACTED]", text) | ||
| text = re.sub(r"(https?://)[^/@\s]+:[^/@\s]+@", r"\1[REDACTED]@", text) | ||
| text = re.sub( | ||
| r"(?i)(?<![\w-])((?:[\w-]*(?:token|password|secret|connectionstring)|AccountKey|" | ||
| r"SharedAccessSignature|AzureWebJobsStorage|x-functions-key|code|sig)" | ||
| r"[\"']?\s*[:=]\s*[\"']?)[^\s;&<\"']+", | ||
| r"\1[REDACTED]", |
There was a problem hiding this comment.
Verified already fixed by a94d522; additional regression coverage in 7f64309. Existing parametrized tests cover quoted Authorization/Proxy-Authorization, whitespace passwords, delimiters, escaped quotes, connection-string keys, XML validity, JSON serialization, binary preservation and symlink safety. test_overlapping_escaped_environment_secrets_are_replaced_longest_first additionally proves longest-first replacement of overlapping JSON-escaped environment secrets and nested tuple/string-leaf serialization. Full suite passes at 95.11% coverage; CI green at b1cc3ed. No thread resolved.
| check: format-check typecheck security lint-workflows | ||
| @$(RUN) -m ruff check src tests tools/verification*.py | ||
| @$(RUN) scripts/lint_mermaid.py | ||
| @$(RUN) scripts/check_screenshots.py --strict |
There was a problem hiding this comment.
Fixed in 926eba6. make check now enters the shared evidence runner before invoking make check-commands, so all prerequisites run inside the recorded check lane. summary.json, redacted logs and Job Summary survive prerequisite failure and the original nonzero result propagates. test_check_saves_prerequisite_evidence covers both success and a failing prerequisite containing a credential canary (failed before the fix). CI green at b1cc3ed, including the quality job.
| @echo "Azure Function Core Tools version:" && func --version || echo "func not found" | ||
| @echo "Pre-commit hook installed:" | ||
| @if [ -f .git/hooks/pre-commit ]; then echo yes; else echo no; fi | ||
| @$(RUN) -m tools.verification doctor |
There was a problem hiding this comment.
Fixed in 926eba6 for doctor, report and clean. Maintenance resolves an existing interpreter read-only (active environment, .venv, hatch env find, then compatible system Python) without hatch run/create/sync. Missing required modules produce development environment not created: run make install. test_maintenance_never_bootstraps_hatch executes all three commands in fresh checkout mirrors with CI unset, empty HATCH_DATA_DIR and a pip-free environment; it asserts no provisioning and no pyvenv.cfg under Hatch data. These cases failed before the fix. CI green at b1cc3ed.
| assert process.poll() is not None | ||
|
|
||
|
|
||
| def test_verify_runs_every_required_lane_even_after_failure( |
There was a problem hiding this comment.
Fixed in 7555b1d with an autouse fixture redirecting GITHUB_STEP_SUMMARY for every verification test module. Regression test_verification_tests_leave_outer_summary_untouched in 926eba6 launches the deliberately failing/missing-prerequisite tests in a subprocess with an outer summary sentinel and proves it remains byte-for-byte unchanged. Tests that explicitly inspect summaries still use their own temporary destination. CI green at b1cc3ed.
| with urlopen(url, timeout=1) as response: | ||
| if response.status < 500: | ||
| return | ||
| except URLError: |
There was a problem hiding this comment.
Fixed in 926eba6. The bounded readiness loop retries OSError (including TimeoutError, ConnectionError and URL errors) and http.client.HTTPException rather than aborting startup. The other readiness loop already catches OSError. test_readiness_retries_transient_failure covers each transient failure followed by success; all four failed before the fix. Both real-host CI jobs pass at b1cc3ed.
|
All five inline findings replied with commit and test evidence; overview adds no other findings. CI green at b1cc3ed. Integration note for #817: preserve this branch’s check wrapper/check-commands and maintenance interpreter; add its separate security Make target block and security: security-bandit dependency, plus both tool typecheck sets. security.yml needs this branch’s selected-interpreter setup and #817’s always-run evidence collectors. No threads resolved and no PR merged. |
|
Superseded by #843 (CI test evidence retention) and #844 (integration, wheel-smoke and verify targets), which implement the remaining #811 items minimally on current main. This draft now conflicts with main in 7 files and adds tooling the issue lists as out of scope. Leaving it open for the maintainer to close. |


Summary
Use consistent verification commands locally and in CI, with structured test reports for troubleshooting.
Changes
check-allas an alias forverify.tools/and add regression tests.test-results/, with explicit pass, fail, incomplete, and not-applicable states.Validation
make doctor,make check,make test,make lint-workflows,make perf,make build,make docs,make integration,make verify,make report, andmake clean.make e2e-azurecorrectly returnedINCOMPLETE.Related Issues
Closes #811