- migration 013: cja_qa_runs + cja_qa_findings - runner: runQa (crawl pages/links/images/external/contact-probes/health/ SEO/meta/sitemap/a11y), qaTriage (LLM summary via qa skill), /devconsole/qa/run - qa-start/finish/routes.php CLI bridge - adminqa controller (runs/findings/fix/ignore); fix() chains to the Web Designer queue; /admin/qa report page + nav link - qa skill; contact form probed via honeypot (writes nothing)
26 lines
865 B
PHP
26 lines
865 B
PHP
<?php
|
|
/**
|
|
* Print the site's dynamic route paths as a JSON array, so the QA crawler knows
|
|
* the full URL set (the sitemap is incomplete). Static pages are hard-coded in
|
|
* the crawler; this covers DB-driven slugs.
|
|
*
|
|
* php api/cli/qa-routes.php -> ["/projects/foo","/projects/bar", ...]
|
|
*/
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
require __DIR__ . '/../config.php';
|
|
|
|
$pdo = new PDO(
|
|
sprintf('mysql:host=%s;dbname=%s;charset=utf8mb4', DB_HOST, DB_NAME),
|
|
DB_USER,
|
|
DB_PASS,
|
|
[PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_COLUMN]
|
|
);
|
|
|
|
$routes = [];
|
|
// Published project case-study pages.
|
|
foreach ($pdo->query("SELECT slug FROM cja_projects WHERE published = 1") as $slug) {
|
|
if ($slug !== '') $routes[] = "/projects/{$slug}";
|
|
}
|
|
|
|
echo json_encode(array_values($routes), JSON_UNESCAPED_SLASHES);
|