Uh oh!
There was an error while loading. Please reload this page.
Claude/website seo bot audit repair 3iahyr - #182
Conversation
…e artifacts, validate rendered site Repairs from the 2026-09-01 Quantum AI Partners run forensic audit: - GAP-1: new design-reference-acquisition stage fetches every accepted client reference URL (SSRF-safe), stores evidence, derives deterministic observed characteristics, analyzes them relative to the client's reaction through the governed LLM, guards output against raw-expression and copy transfer, and feeds derived principles into DesignReferenceIntelligence and the sealed BlueprintV2. competitive-intelligence fails closed on declared-but-unacquired reference URLs (DESIGN_REFERENCE_UNACQUIRED). - GAP-3: run-bound redesign intelligence store persists CompetitiveLandscape, SEOContentBlueprint, StructuredContentPackage, ClientVision, reference set/intelligence, donors, PCC determinism and counters with an index of digests and sealed identities; reload verifies digest, integrity, identity and lineage; --resume reuses the persisted chain without re-spending. - rendered-site-validation stage (mandatory in local-proof and above) serves dist/ and renders every route at desktop and mobile widths in headless Chromium; any failing check or missing browser fails the build. - GAP-2 was already repaired at HEAD (7346b1e); round-trip tests added. Tests: 13 acquisition, 5 persistence, 4 render unit, 2 real-browser integration; plan topology expectation updated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013x81VaFa98pPv4yVncQ7JB
…l-build validator option - ADR-0019 records the design-reference acquisition stage, the run-bound redesign intelligence store, and mandatory rendered-site validation. - Repair brief for the 2026-09-01 Quantum AI Partners run: gap verdicts, SEO-Bot runtime receipt, dependency classification, blockers and unknowns with exact unblock actions, and what was NOT executed. - CI Gate 5 and the local-proof workflow install Playwright Chromium; the new render stage and browser test treat a missing browser as failure. - scripts/validate-site-factory.ts --build (npm run site:validate:build) runs the real astro build and browser render on the fixture spec. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013x81VaFa98pPv4yVncQ7JB
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| ); | ||
| const animationRules = countMatches(css, /\banimation(?:-name)?\s*:/gi) + countMatches(css, /@keyframes\b/gi); | ||
| const transitionRules = countMatches(css, /\btransition(?:-property)?\s*:/gi); | ||
| const buttonLike = countMatches( |
There was a problem hiding this comment.
🟡 Changes recommended
There are a couple of concrete fail-closed correctness issues (notably resource cleanup during Playwright launch and persistence edge-cases) that should be fixed before merge.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Introduces a redesign-focused “evidence-first” pipeline upgrade: client-supplied design reference URLs become executable inputs (acquired + analyzed with guards), paid redesign intelligence artifacts are persisted run-bound with integrity/lineage checks for safe resume, and post-build rendered-site validation becomes a mandatory gate (real browser render across routes/viewports).
Changes:
- Add
design-reference-acquisitionstage + supporting intelligence module to fetch/observe/analyze client reference URLs with raw-transfer and copy-transfer guards. - Add run-bound persistence for redesign intelligence artifacts with digest/integrity/identity/lineage verification and resume hydration.
- Add
rendered-site-validation(Playwright Chromium) as a mandatory post-site-buildgate; wire into CI/local-proof and provide asite:validate:buildscript.
File summaries
| File | Description |
|---|---|
| tests/unit/rendered-site-validation.test.ts | Unit coverage for dist path resolution, static server behavior, route/site checks, and stage fail-closed behavior. |
| tests/unit/redesign-intelligence-artifacts.test.ts | Verifies redesign artifact persistence, tamper detection, identity/lineage enforcement, and resume behavior. |
| tests/unit/normalize-spec.test.ts | Adds regression coverage ensuring redesign intent + raw client vision survive normalization and validate. |
| tests/unit/factory-execution-plan.test.ts | Updates plan expectations to include rendered-site-validation. |
| tests/unit/design-reference-acquisition.test.ts | End-to-end unit coverage for design reference acquisition, deterministic observation, analysis guards, persistence, and stage policy. |
| tests/integration/local/rendered-site-browser.test.ts | Real Playwright Chromium integration test validating PASS/FAIL behavior over a built dist fixture. |
| src/validation/rendered-site.ts | New rendered-site validation engine: dist server, route/site checks, and Playwright renderer with screenshot capture. |
| src/stages/RenderedSiteValidationStage.ts | New pipeline stage to run rendered-site validation after build, persist report, and fail closed on any failures. |
| src/stages/RedesignIntegrityReceiptStage.ts | Persists the redesign integrity receipt into the redesign intelligence artifact store. |
| src/stages/RedesignContentAuthorityStage.ts | Persists content-authority artifacts and supports resume by hydrating verified persisted chain. |
| src/stages/DesignReferenceAcquisitionStage.ts | New stage to resolve/persist design authorities and acquire/analyze URL-bearing references (with resume reuse). |
| src/stages/CompetitiveIntelligenceStage.ts | Persists competitive artifacts, supports resume hydration, and enforces “URL references must be acquired” invariant. |
| src/pipeline/FactoryExecutionPlan.ts | Inserts new stages into redesign topology and adds rendered-site-validation as mandatory for build modes. |
| src/pipeline/evidence/RedesignIntelligenceArtifacts.ts | New run-bound persistence store with index/digests + sealed integrity/identity checks + lineage verification + hydration. |
| src/pipeline/BuildError.ts | Adds new BuildError codes and policies for design-reference acquisition, redesign artifact invalidation, and render validation failures. |
| src/pipeline/BuildContext.ts | Extends context with design reference acquisition manifest + rendered-site validation report path. |
| src/intelligence/improve-llm-policy.ts | Adds governed LLM policy entry for DESIGN_REFERENCE_ANALYSIS. |
| src/intelligence/DesignReferenceAcquisition.ts | New intelligence module implementing acquisition/observation/analysis/guards + manifest writing and set application. |
| src/intelligence/design-authority.ts | Extends reference structures with acquisition/analysis metadata and adds acquirableReferences() helper. |
| scripts/validate-site-factory.ts | Adds --build option to run real build + rendered-site validation for the structural fixture spec. |
| scripts/run-pipeline.ts | Prints redesign intelligence artifact directory and rendered-site validation report path when present. |
| reports/test-runs/quantum-ai-partners-20260901/WEBSITE_BOT_SEO_BOT_FULL_PIPELINE_REPAIR_BRIEF.md | Adds a run brief documenting gaps, repairs, evidence, and external blockers. |
| package.json | Adds site:validate:build script to invoke structural validation plus real build/render. |
| docs/adr/ADR-0019-client-design-reference-acquisition-and-run-bound-intelligence-persistence.md | ADR documenting the acquisition stage, persistence store, and rendered-site validation gate. |
| .github/workflows/site-factory-local-proof.yml | Installs Playwright Chromium to support rendered-site validation in local-proof workflow. |
| .github/workflows/ci.yml | Installs Playwright Chromium to support rendered-site validation in CI Gate 5. |
Review details
- Files reviewed: 26/26 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } catch (error) { | ||
| const reason = error instanceof UrlPolicyError ? error.reason : String(error); | ||
| return { | ||
| ...base, | ||
| status: reason === "invalid-url" ? "invalid_url" : "forbidden_host", | ||
| failure_reason: error instanceof Error ? error.message : String(error), | ||
| }; | ||
| } |
| if (ctx.dryRun) return undefined; | ||
| const dir = redesignIntelligenceDir(ctx); | ||
| mkdirSync(dir, { recursive: true }); | ||
| const file = `${name}.json`; | ||
| const content = `${JSON.stringify(value, null, 2)}\n`; | ||
| atomicWrite(resolve(dir, file), content); |
| const viewports = [...(options.viewports ?? DEFAULT_RENDER_VIEWPORTS)]; | ||
| const served = await this.server.start(options.distDir); | ||
| const browser = await mod.chromium.launch({ headless: true }); | ||
| mkdirSync(options.screenshotDir, { recursive: true }); | ||
| const routes: RouteRenderResult[] = []; |
Held from the merge train — evidenced regression
So the gate permits the merge. I am not taking it, because the gate scores Gate 5 delta vs |
| tests | pass | fail | |
|---|---|---|---|
main | 466 | 459 | 7 |
| this PR | 476 | 465 | 11 |
Four new failures, none fixed. All four are in files this PR adds:
tests/unit/design-reference-acquisition.test.ts
tests/unit/redesign-intelligence-artifacts.test.ts
a well-formed built site renders and validates on desktop and mobile
a site with overflow, a broken image, a dangling link and no sitemap fails with those checks named
Two are not this PR's fault.design-reference-acquisition andredesign-intelligence-artifacts crash at module load
(location: …test.ts:1:1, at async ModuleLoader.import) on the repo-wideundici@8 / Node 20 mismatch — filed as #183. They are new only because this PR adds
test files whose import chain reaches undici.
Two are. The new tests/integration/local/rendered-site-browser.test.ts reportsroute_renders: FAIL — "page facts unavailable" on every route whileroute_exists_in_dist: PASS and chromium 151 launched. The dist files exist; fact
extraction returns nothing. That needs diagnosis before this lands.
What would unblock it
Fixing the browser test is this PR's own work. The two import crashes clear when #183
is resolved. Neither should be fixed by skipping a test or by pinning undici inside
this PR — that hides a real platform mismatch.
Also worth a second look independent of CI: this PR addsdocs/adr/ADR-0019-client-design-reference-acquisition-and-run-bound-intelligence-persistence.md,
while #181 (now merged) added docs/adr/ADR-0019-retire-five-push-campaign-pack.md.
Two different ADRs now claim number 0019. No git conflict, since the filenames differ.
Generated by Claude Code
Uh oh!
There was an error while loading. Please reload this page.



Summary
Type of change
type:feature— new feature or capabilitytype:bugfix— bug fixtype:refactor— refactor, no behavior changetype:docs— documentation onlytype:ci— CI / workflow changestype:security— security fix or hardeningArea
area:backend— src/, packages/area:frontend— UIarea:infrastructure— docker, deployment, configarea:workflows— .github/, CIarea:llm-router— @quantum-l9/llm-router consumption (src/services/llm.ts)Checklist
npm run verify:allpasses locallynpx tsc --noEmitpasses (no type errors)VALIDATION.mdupdated if validation artifacts changedDECISION_LOG.mdupdated if relevantRelated issues / ADRs / contracts