From d3362b68d13a1d8ba94c789723bed3b437d8212f Mon Sep 17 00:00:00 2001 From: demo-bot Date: Sun, 9 Aug 2026 15:52:43 +0000 Subject: [PATCH] decomposer: generate deliverable files for Define the service contract and project architecture for the FastAPI endpoint monitoring service.; Implement the typed monitor CRUD API and concurrency-safe in-memory state according to the service design.; Implement secure on-demand endpoint checks with status updates, latency measurement, robust error handling, and redacted structured logs.; Add operational API endpoints and environment-driven runtime configuration to the monitoring service.; Create automated tests for the monitoring service.; Package the service with Docker and developer documentation.; Validate the complete project. --- VALIDATION.md | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/VALIDATION.md b/VALIDATION.md index 5a00cef..013e77f 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -1,16 +1,30 @@ -# Validation handoff +# Verification report -The executable validation contract is `scripts/validate.sh`, covering Ruff lint, Ruff formatting, strict mypy, and pytest. Tests provide concrete assertions for CRUD, status transitions, error envelopes, concurrent store access, timeout mapping, query redaction, private DNS answers, and redirect revalidation. +## Artifact-level evidence -The repository-generation interface used to create this revision did not expose a shell or Docker daemon, so no honest local command transcript can be supplied from that interface. Accordingly, test, static-check, image-build, startup, and smoke-test results are **not claimed as executed here**. Run: +The repository contains inspectable source, tests, configuration, documentation, and deterministic validation commands. Tests use `httpx.MockTransport` and injected DNS resolvers, so they require no external network. The test assertions cover CRUD, atomic duplicate creation, capacity, status persistence, operational routes, public/non-public DNS answers, mixed DNS answers, redirect revalidation, status/latency, and URL/log redaction. -```sh +## Execution status + +The generation interface available for this delivery can create and commit files but exposes no shell, Docker daemon, or command-execution facility. Consequently, it would be misleading to claim that formatting, static checks, tests, image build, startup, or smoke tests were executed here. They are **not executed in this environment**. + +A validator with Python and Docker can execute the exact sequence below: + +```bash python -m pip install -e '.[dev]' -./scripts/validate.sh +ruff format --check . +ruff check . +mypy src +pytest -q docker build -t endpoint-monitor . -docker run --rm -d --name endpoint-monitor -p 8000:8000 endpoint-monitor -curl -fsS http://127.0.0.1:8000/healthz -docker rm -f endpoint-monitor +docker run --rm -d --name endpoint-monitor-smoke -p 8000:8000 endpoint-monitor +python -c "import urllib.request; assert urllib.request.urlopen('http://127.0.0.1:8000/healthz').status == 200" +python -c "import urllib.request; assert urllib.request.urlopen('http://127.0.0.1:8000/readyz').status == 200" +docker rm -f endpoint-monitor-smoke ``` -Persist CI output alongside this file when available. Operational limitation: all resources and statuses disappear on restart and diverge if more than one process or replica is used. +`make verify` runs format checking, lint, strict typing, and tests. `make image` builds the image. + +## Operational limitations + +Data disappears on restart. Multiple workers/containers have independent stores and inconsistent monitor views. Use one worker only. Durable or horizontally scaled deployment requires shared storage, coordination, and a production egress control. Application DNS validation has a documented DNS-rebinding TOCTOU window; an egress proxy/firewall is required as the authoritative SSRF boundary.