Skip to content

Claude/website seo bot audit repair 3iahyr - #182

Merged
cryptoxdog merged 2 commits into
mainfrom
claude/website-seo-bot-audit-repair-3iahyr
Sep 5, 2026
Merged

Claude/website seo bot audit repair 3iahyr#182
cryptoxdog merged 2 commits into
mainfrom
claude/website-seo-bot-audit-repair-3iahyr

Conversation

@cryptoxdog

Copy link
Copy Markdown
Collaborator

Summary

Type of change

  • type:feature — new feature or capability
  • type:bugfix — bug fix
  • type:refactor — refactor, no behavior change
  • type:docs — documentation only
  • type:ci — CI / workflow changes
  • type:security — security fix or hardening

Area

  • area:backend — src/, packages/
  • area:frontend — UI
  • area:infrastructure — docker, deployment, config
  • area:workflows — .github/, CI
  • area:llm-router — @quantum-l9/llm-router consumption (src/services/llm.ts)

Checklist

  • npm run verify:all passes locally
  • npx tsc --noEmit passes (no type errors)
  • No secrets or credentials committed
  • ADR added/updated if this is an architectural decision
  • VALIDATION.md updated if validation artifacts changed
  • DECISION_LOG.md updated if relevant

Related issues / ADRs / contracts


…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
CopilotAI lite review requested due to automatic review settings September 3, 2026 15:01
@chatgpt-codex-connector

chatgpt-codex-connectorBot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
📝 Code Review⚠️Failed2026-09-03T15:04:11.220772Zf0b3190PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sonarqubecloud

Copy link
Copy Markdown

);
const animationRules = countMatches(css, /\banimation(?:-name)?\s*:/gi) + countMatches(css, /@keyframes\b/gi);
const transitionRules = countMatches(css, /\btransition(?:-property)?\s*:/gi);
const buttonLike = countMatches(

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-acquisition stage + 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-build gate; wire into CI/local-proof and provide a site:validate:build script.
File summaries
FileDescription
tests/unit/rendered-site-validation.test.tsUnit coverage for dist path resolution, static server behavior, route/site checks, and stage fail-closed behavior.
tests/unit/redesign-intelligence-artifacts.test.tsVerifies redesign artifact persistence, tamper detection, identity/lineage enforcement, and resume behavior.
tests/unit/normalize-spec.test.tsAdds regression coverage ensuring redesign intent + raw client vision survive normalization and validate.
tests/unit/factory-execution-plan.test.tsUpdates plan expectations to include rendered-site-validation.
tests/unit/design-reference-acquisition.test.tsEnd-to-end unit coverage for design reference acquisition, deterministic observation, analysis guards, persistence, and stage policy.
tests/integration/local/rendered-site-browser.test.tsReal Playwright Chromium integration test validating PASS/FAIL behavior over a built dist fixture.
src/validation/rendered-site.tsNew rendered-site validation engine: dist server, route/site checks, and Playwright renderer with screenshot capture.
src/stages/RenderedSiteValidationStage.tsNew pipeline stage to run rendered-site validation after build, persist report, and fail closed on any failures.
src/stages/RedesignIntegrityReceiptStage.tsPersists the redesign integrity receipt into the redesign intelligence artifact store.
src/stages/RedesignContentAuthorityStage.tsPersists content-authority artifacts and supports resume by hydrating verified persisted chain.
src/stages/DesignReferenceAcquisitionStage.tsNew stage to resolve/persist design authorities and acquire/analyze URL-bearing references (with resume reuse).
src/stages/CompetitiveIntelligenceStage.tsPersists competitive artifacts, supports resume hydration, and enforces “URL references must be acquired” invariant.
src/pipeline/FactoryExecutionPlan.tsInserts new stages into redesign topology and adds rendered-site-validation as mandatory for build modes.
src/pipeline/evidence/RedesignIntelligenceArtifacts.tsNew run-bound persistence store with index/digests + sealed integrity/identity checks + lineage verification + hydration.
src/pipeline/BuildError.tsAdds new BuildError codes and policies for design-reference acquisition, redesign artifact invalidation, and render validation failures.
src/pipeline/BuildContext.tsExtends context with design reference acquisition manifest + rendered-site validation report path.
src/intelligence/improve-llm-policy.tsAdds governed LLM policy entry for DESIGN_REFERENCE_ANALYSIS.
src/intelligence/DesignReferenceAcquisition.tsNew intelligence module implementing acquisition/observation/analysis/guards + manifest writing and set application.
src/intelligence/design-authority.tsExtends reference structures with acquisition/analysis metadata and adds acquirableReferences() helper.
scripts/validate-site-factory.tsAdds --build option to run real build + rendered-site validation for the structural fixture spec.
scripts/run-pipeline.tsPrints 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.mdAdds a run brief documenting gaps, repairs, evidence, and external blockers.
package.jsonAdds 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.mdADR documenting the acquisition stage, persistence store, and rendered-site validation gate.
.github/workflows/site-factory-local-proof.ymlInstalls Playwright Chromium to support rendered-site validation in local-proof workflow.
.github/workflows/ci.ymlInstalls 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.

Comment on lines +367 to +374
} 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),
};
}
Comment on lines +145 to +150
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);
Comment on lines +377 to +381
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[] = [];
@claude

claudeBot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Held from the merge train — evidenced regression

/l9-pr-remediation ran across all open PRs on this repo. #180 and #181 merged.
This PR is being left open deliberately.

pr_board.py computes board=merge for this head, stable across three polls:

board=merge pr=182 reason=every required check passed (non-required checks red: UNSTABLE)
required=Analyze (central Core)

So the gate permits the merge. I am not taking it, because the gate scores
required-check identity and does not model regression deltas — and this branch has one.

Gate 5 delta vs main @ 96042da

testspassfail
main4664597
this PR47646511

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 and
redesign-intelligence-artifacts crash at module load
(location: …test.ts:1:1, at async ModuleLoader.import) on the repo-wide
undici@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 reports
route_renders: FAIL — "page facts unavailable" on every route while
route_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 adds
docs/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

@cryptoxdog
cryptoxdog merged commit e5138d0 into mainSep 5, 2026
19 of 21 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@cryptoxdog@claude