From a2628413e39e854f5a70702801ff635162ec77bc Mon Sep 17 00:00:00 2001 From: Lukas <99466120+diecasting@users.noreply.github.com> Date: Sun, 29 Nov 2026 16:17:34 +0800 Subject: [PATCH] feat: establish phase 2c release readiness --- .github/workflows/hugo.yml | 3 + README.md | 4 + assets/css/main.css | 1 + assets/js/analytics-events.js | 124 ++++++++ config/_default/params.toml | 3 + content/quality-documentation/index.md | 138 ++++++++ docs/seo-growth/README.md | 3 + .../phase-2c/01-release-dependency-audit.md | 74 +++++ .../phase-2c/02-production-readiness-audit.md | 78 +++++ .../03-analytics-rfq-attribution-readiness.md | 98 ++++++ .../phase-2c/04-verified-evidence-hub.md | 85 +++++ .../05-release-verification-automation.md | 70 ++++ .../phase-2c/06-phase-2d-release-runbook.md | 177 +++++++++++ .../07-post-release-measurement-plan.md | 100 ++++++ .../phase-2c/08-backlink-geo-readiness.md | 84 +++++ .../phase-2c/09-verification-report.md | 70 ++++ docs/seo-growth/phase-2c/CHANGELOG.md | 42 +++ docs/seo-growth/phase-2c/README.md | 53 ++++ .../seo-growth/phase-2c/evidence-register.csv | 13 + layouts/_default/baseof.html | 1 + layouts/partials/analytics-events.html | 9 + scripts/release-check.py | 299 ++++++++++++++++++ 22 files changed, 1529 insertions(+) create mode 100644 assets/js/analytics-events.js create mode 100644 content/quality-documentation/index.md create mode 100644 docs/seo-growth/phase-2c/01-release-dependency-audit.md create mode 100644 docs/seo-growth/phase-2c/02-production-readiness-audit.md create mode 100644 docs/seo-growth/phase-2c/03-analytics-rfq-attribution-readiness.md create mode 100644 docs/seo-growth/phase-2c/04-verified-evidence-hub.md create mode 100644 docs/seo-growth/phase-2c/05-release-verification-automation.md create mode 100644 docs/seo-growth/phase-2c/06-phase-2d-release-runbook.md create mode 100644 docs/seo-growth/phase-2c/07-post-release-measurement-plan.md create mode 100644 docs/seo-growth/phase-2c/08-backlink-geo-readiness.md create mode 100644 docs/seo-growth/phase-2c/09-verification-report.md create mode 100644 docs/seo-growth/phase-2c/CHANGELOG.md create mode 100644 docs/seo-growth/phase-2c/README.md create mode 100644 docs/seo-growth/phase-2c/evidence-register.csv create mode 100644 layouts/partials/analytics-events.html create mode 100644 scripts/release-check.py diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 639e33e..857fde0 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -53,6 +53,9 @@ jobs: - name: Run Growth Audit run: python scripts/growth-audit.py ./public + - name: Run Cumulative Release Check + run: python scripts/release-check.py ./public + - name: Verify hreflang tags run: | echo "Checking hreflang tags in built output..." diff --git a/README.md b/README.md index 45aae1e..25159d0 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,7 @@ verification evidence is indexed in Phase 2B content-cluster, engineering-guide and cannibalization boundaries are documented in [`docs/seo-growth/phase-2b/`](docs/seo-growth/phase-2b/README.md). + +Phase 2C release readiness, measurement infrastructure, evidence register and +release runbook are in +[`docs/seo-growth/phase-2c/`](docs/seo-growth/phase-2c/README.md). diff --git a/assets/css/main.css b/assets/css/main.css index b05fa86..532a685 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -329,4 +329,5 @@ img { max-width: 100%; height: auto; display: block; } @media (max-width: 480px) { .hero-title { font-size: 1.65rem; line-height: 1.15; } + .article-header h1 { font-size: 1.8rem; line-height: 1.15; } } diff --git a/assets/js/analytics-events.js b/assets/js/analytics-events.js new file mode 100644 index 0000000..3518e6a --- /dev/null +++ b/assets/js/analytics-events.js @@ -0,0 +1,124 @@ +(() => { + "use strict"; + + const config = window.__TCW_ANALYTICS__; + if (!config || !config.enabled || typeof window.gtag !== "function") { + return; + } + + const storage = (() => { + try { + return window.sessionStorage; + } catch (_error) { + return null; + } + })(); + + const read = (key) => { + try { + return storage ? storage.getItem(key) : null; + } catch (_error) { + return null; + } + }; + + const write = (key, value) => { + try { + if (storage) { + storage.setItem(key, value); + } + } catch (_error) { + // Measurement must never interrupt form submission. + } + }; + + const path = window.location.pathname; + const pageLanguage = document.documentElement.lang || "unknown"; + const sourcePage = + document.querySelector('input[name="source_page"]')?.value || path; + + const getUtm = (name) => { + const value = new URLSearchParams(window.location.search).get(name); + return value ? value.slice(0, 100) : ""; + }; + + const referrerDomain = (() => { + try { + if (!document.referrer) return ""; + const referrer = new URL(document.referrer); + return referrer.origin === window.location.origin ? "" : referrer.hostname; + } catch (_error) { + return ""; + } + })(); + + if (!read("tcw_attribution")) { + write( + "tcw_attribution", + JSON.stringify({ + landing_page: path, + page_language: pageLanguage, + referrer_domain: referrerDomain, + utm_source: getUtm("utm_source"), + utm_medium: getUtm("utm_medium"), + utm_campaign: getUtm("utm_campaign"), + }), + ); + } + + let attribution = {}; + try { + attribution = JSON.parse(read("tcw_attribution") || "{}"); + } catch (_error) { + attribution = {}; + } + + const send = (name, params = {}) => { + window.gtag("event", name, { + page_language: pageLanguage, + source_page: sourcePage, + landing_page: attribution.landing_page || path, + referrer_domain: attribution.referrer_domain || "", + utm_source: attribution.utm_source || "", + utm_medium: attribution.utm_medium || "", + utm_campaign: attribution.utm_campaign || "", + ...params, + }); + }; + + const confirmationPath = + /\/(?:de\/|es\/|fr\/|ja\/)?thank-you\/?$/.test(path); + if ( + confirmationPath && + read("tcw_rfq_submit") && + !read("tcw_rfq_confirmation") + ) { + write("tcw_rfq_confirmation", "1"); + send("rfq_confirmation"); + } + + const forms = Array.from(document.querySelectorAll("form.rfq-form")); + forms.forEach((form, index) => { + let started = false; + const formLocation = form.closest("[id='rfq']") ? "rfq_section" : "page"; + const formKey = `${path}:${index}`; + + form.addEventListener( + "focusin", + () => { + if (started || read(`tcw_rfq_started:${formKey}`)) return; + started = true; + write(`tcw_rfq_started:${formKey}`, "1"); + send("rfq_start", { form_location: formLocation }); + }, + { once: true }, + ); + + form.addEventListener("submit", () => { + if (read(`tcw_rfq_submit:${formKey}`)) return; + write(`tcw_rfq_submit:${formKey}`, "1"); + write("tcw_rfq_submit", "1"); + send("rfq_submit", { form_location: formLocation }); + }); + }); +})(); diff --git a/config/_default/params.toml b/config/_default/params.toml index 72c4864..fa91002 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -32,6 +32,9 @@ keywords = ["carbon fiber parts manufacturer", "custom carbon fiber parts", "OEM # Google Analytics (gtag.js) [analytics] google_analytics_id = "G-0ZJ5T5H42Z" + # Phase 2C event instrumentation is staged but intentionally inactive until + # analytics QA and consent/account approval are complete. + enable_rfq_events = false # Homepage configuration [homepage] diff --git a/content/quality-documentation/index.md b/content/quality-documentation/index.md new file mode 100644 index 0000000..6a89b0f --- /dev/null +++ b/content/quality-documentation/index.md @@ -0,0 +1,138 @@ +--- +title: "Quality Documentation Request Guide" +date: 2026-11-29 +draft: false +description: "A buyer guide to the quality and manufacturing documents to request before approving a custom carbon fiber component supplier." +robots: "noindex, follow" +layout: "single" +--- + +This page is a controlled draft of the TechCarbonWorks evidence hub. It is +currently `noindex` because certificate scope, validity, equipment records and +project evidence in the repository have not yet completed management +verification. + +It explains what a buyer should request. It does not replace current +project-specific documents. + +## Purpose of the evidence hub + +Carbon fiber supplier evaluation should be based on traceable evidence rather +than a general quality statement. The useful evidence set depends on the +application, but a buyer should be able to identify: + +- the legal supplier entity; +- the quality management system and its current scope; +- the manufacturing and inspection processes relevant to the part; +- the material certificates and batch controls; +- the dimensional or first-article inspection approach; +- the location or facility that will perform the work; +- the commercial terms for confidentiality and document control. + +This page will become a public evidence hub only after each claim has an +approved source and scope. + +## Current publication status + +| Evidence category | Current public status | Limitation | +| --- | --- | --- | +| Legal entity and address | PENDING MANAGEMENT VERIFICATION | Existing website data requires underlying company confirmation | +| Manufacturing process descriptions | PENDING MANAGEMENT VERIFICATION | Existing website content requires process-owner confirmation | +| Quality-management certification | PENDING MANAGEMENT VERIFICATION | Certificate number, registrar, scope and validity are not present in the repository | +| Environmental or materials compliance claims | PENDING MANAGEMENT VERIFICATION | Current evidence and applicability must be confirmed | +| Equipment and facility capabilities | PENDING MANAGEMENT VERIFICATION | Approved equipment or facility records were not supplied | +| Inspection and traceability workflows | PENDING MANAGEMENT VERIFICATION | Current records must be checked against actual procedures | +| Customer projects, references and case studies | NOT APPROVED FOR PUBLICATION | No approved customer evidence was supplied | +| Production capacity, lead times and tolerances | PENDING MANAGEMENT VERIFICATION | These must also be confirmed for each drawing and program | + +No certificate ID, customer relationship, production capacity or measurable +performance claim is added through this page. + +## Documents a buyer should request + +### Legal and organizational evidence + +- current legal company name and registration details; +- manufacturing location proposed for the work; +- authorized commercial contact; +- confidentiality or non-disclosure process where drawings will be shared. + +### Quality system evidence + +- current certificate and full registration scope where a certification is + claimed; +- issuing body and validity dates; +- quality manual or controlled procedure summary relevant to the purchased + work; +- corrective-action and nonconformance process; +- change-notification expectations. + +### Material evidence + +- material specification for the approved fiber and resin system; +- supplier certificate of conformance or batch certificate where applicable; +- storage, out-time and traceability records; +- approved substitute policy; +- shelf-life and handling requirements. + +### Manufacturing evidence + +- released drawing and revision used for manufacture; +- approved tooling and maintenance approach; +- laminate or layup record requirements; +- cure cycle and equipment records appropriate to the process; +- process deviations and disposition method; +- in-process inspection points. + +### Dimensional and inspection evidence + +- drawing datums and ballooned critical dimensions; +- inspection plan and measuring method; +- first-article inspection report; +- CMM or other dimensional report where required; +- surface and cosmetic acceptance criteria; +- non-destructive inspection requirements where the program specifies them; +- packaging and shipping inspection. + +## Questions to ask before approving a supplier + +1. Which exact legal entity will manufacture the part? +2. Which facility and process route will be used? +3. Do any certificates cover the proposed location and process? +4. Which material certificates travel with the shipment? +5. Which features will be measured, on which equipment, and against which + datum scheme? +6. Which records will be retained and for how long? +7. How are design changes, process deviations and nonconformances controlled? +8. How will proprietary drawings and production records be protected? +9. Which lead-time or tolerance assumptions in the quotation require + first-article confirmation? +10. Which validation remains the responsibility of the customer? + +## What this page does not establish + +- It does not certify TechCarbonWorks. +- It does not confirm a certificate number, scope or validity period. +- It does not establish a customer relationship or project history. +- It does not confirm equipment, capacity, lead time or tolerance for a + particular job. +- It does not substitute for supplier audit, sample testing or customer + qualification. + +## Evidence hub release criteria + +The page can move from `noindex` to indexable only when: + +1. Every public claim has an evidence identifier and source. +2. Certificate scans or verification links are approved for publication. +3. Equipment and facility statements are matched to approved records. +4. Inspection-process claims are approved by the quality owner. +5. Customer evidence has written publication consent. +6. Legal and management review approves the final wording. +7. The page passes schema, canonical, privacy and release-automation checks. + +## Request current documentation + +Use the [request-a-quote page](/request-a-quote/) to explain which documents +your project requires. Mention any supplier-qualification, NDA, material +certification, first-article or inspection requirements in the project brief. diff --git a/docs/seo-growth/README.md b/docs/seo-growth/README.md index 3692556..e28057f 100644 --- a/docs/seo-growth/README.md +++ b/docs/seo-growth/README.md @@ -56,6 +56,9 @@ Phase 2A execution evidence and commercial growth records are in Phase 2B cluster expansion and technical content evidence is in `phase-2b/README.md`. +Phase 2C release readiness, measurement and evidence controls are in +`phase-2c/README.md`. + ## Non-negotiable evidence rule Do not state that traffic, rankings, AI citations, backlinks or inquiries diff --git a/docs/seo-growth/phase-2c/01-release-dependency-audit.md b/docs/seo-growth/phase-2c/01-release-dependency-audit.md new file mode 100644 index 0000000..02fa511 --- /dev/null +++ b/docs/seo-growth/phase-2c/01-release-dependency-audit.md @@ -0,0 +1,74 @@ +# Release Dependency Audit + +## Verified remote state + +| Branch | Commit | Predecessor | Ancestry | PR status | Build | Validation | Release risk | Required action | Rollback | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| `main` | `60dbe0b` | production baseline | production | — | current | live | baseline | Keep unchanged until review | production rollback | +| `codex/seo-geo-phase-1-20261129` | `9ce9b02` | `main` | VERIFIED | none | PASS | PASS | Medium: broad template/content changes | Review and merge first | revert merge or Phase 1 commit | +| `codex/seo-geo-phase-2a-commercial-growth` | `ce779dc` | Phase 1 | VERIFIED | none | PASS | PASS | Medium: new pages and translated metadata | Review after Phase 1 | revert Phase 2A commit | +| `codex/seo-geo-phase-2b-content-clusters` | `188eb6c` | Phase 2A | VERIFIED | none | PASS | PASS | Medium: four new content pages | Review after Phase 2A | revert Phase 2B commit | +| `codex/seo-geo-phase-2c-release-readiness` | current candidate | Phase 2B | In progress | none | PASS | PASS | Medium: staged analytics and noindex evidence page | Review after Phase 2B | revert Phase 2C commit | + +The remote branch inventory was read from the GitHub API. All three predecessor +candidate commits were present and their local ancestry was verified. No PRs +existed when Phase 2C started. `main` remained unchanged at `60dbe0b`. + +## Compatibility assessment + +- Phase 2A cleanly extends Phase 1. +- Phase 2B cleanly extends Phase 2A. +- Phase 2C cleanly extends Phase 2B. +- No competing edits to the same branches were detected. +- The local working tree was clean at the start. +- No forced update, reset or rebase was performed. + +## Release risk review + +### Phase 1 + +Changes canonical handling, schema, sitemap, multilingual links, RFQ localization +and mobile CSS. These are foundational and must merge before later phases. + +### Phase 2A + +Adds commercial pages and changes translated metadata. It depends on Phase 1's +solution layout, localized thanks pages, schema graph and sitemap template. + +### Phase 2B + +Adds four pages and substantial internal links. It depends on Phase 2A's +solution layout and commercial child pages. + +### Phase 2C + +Adds staged JavaScript that is not loaded while `enable_rfq_events = false`. +Adds a noindex evidence page excluded from sitemaps. Adds release checks and +documentation. No production external-state change is included. + +## Integration command sequence for Phase 2D + +The reviewer should use PR review/merge controls rather than local rewrite +commands. If local verification is required: + +```powershell +git fetch origin +git switch codex/seo-geo-phase-2c-release-readiness +git merge-base --is-ancestor 9ce9b022bfae3b0d277413002ec3d7230c3d46d6 HEAD +git merge-base --is-ancestor ce779dc42cb4ee2ccd1a8711870a0bfa170375dd HEAD +git merge-base --is-ancestor 188eb6c2e0cb4ec2b58c6062d441e4bb4efbc508 HEAD +``` + +Expected exit status for each ancestry check: `0`. + +## Pull requests + +No PRs currently exist. Create and merge in this order: + +1. Phase 1 +2. Phase 2A +3. Phase 2B +4. Phase 2C + +Do not squash in a way that changes semantic ancestry until the release owner +has confirmed the deployment workflow and rollback process. diff --git a/docs/seo-growth/phase-2c/02-production-readiness-audit.md b/docs/seo-growth/phase-2c/02-production-readiness-audit.md new file mode 100644 index 0000000..dde6d78 --- /dev/null +++ b/docs/seo-growth/phase-2c/02-production-readiness-audit.md @@ -0,0 +1,78 @@ +# Production Readiness Audit + +## Production state + +The live site was read on 2026-11-29 without authentication or state change. + +| URL | Status | Effective URL | +| --- | ---: | --- | +| `/` | 200 | `/` | +| `/robots.txt` | 200 | `/robots.txt` | +| `/sitemap.xml` | 200 | `/sitemap.xml` | +| `/thank-you/` | 200 | `/thank-you/` | +| `/carbon-fiber-design-for-manufacturability/` | 404 | unchanged | +| `/carbon-fiber-robotic-arm-components/` | 404 | unchanged | +| `/carbon-fiber-uav-frames-and-structures/` | 404 | unchanged | +| `/blog/carbon-fiber-robot-arm-design/` | 404 | unchanged | + +The six Phase 2A/2B new URLs are not present in production, which confirms that +the candidate has not been silently deployed. + +## Production versus candidate metadata + +| Item | Production | Cumulative candidate | +| --- | --- | --- | +| Homepage title | `TechCarbonWorks` | `Custom Carbon Fiber Parts Manufacturer | TechCarbonWorks` | +| Quote page title | Existing quote title | Existing concept retained with improved language metadata | +| Homepage canonical | self-referencing | self-referencing | +| Quote canonical | self-referencing | self-referencing | +| Quote form source-page field | absent | present | +| Quote form language field | absent | present | +| Company required | need browser/backend review | required | +| Localized confirmation pages | English plus older behavior | five language confirmation routes | + +## Production sitemap versus candidate + +The live sitemap index and five language sitemaps contained 93 page URLs. +The cumulative candidate sitemaps contain 79 URLs. + +Candidate additions: + +- `/carbon-fiber-robotic-arm-components/` +- `/carbon-fiber-uav-frames-and-structures/` +- `/carbon-fiber-design-for-manufacturability/` +- `/blog/carbon-fiber-robot-arm-design/` +- `/blog/carbon-fiber-drone-frame-design/` +- `/blog/carbon-fiber-material-selection-guide/` + +Intentional removals: + +- tag and category archive URLs; +- thank-you pages; +- the noindex quality-documentation page. + +These removals follow the Phase 1 decision to keep thin taxonomy and +confirmation pages out of the sitemap. They are not page deletions; the HTML +routes still exist. + +## Production risks to verify after deployment + +1. Hugo Pages deployment must publish the exact candidate artifact. +2. Existing legacy URLs must retain aliases or valid redirects. +3. New canonical URLs must use `https://techcarbonworks.com/`, not localhost. +4. Sitemap index child URLs must resolve. +5. Thank-you and evidence pages must remain noindex. +6. RFQ submission must redirect to the correct localized confirmation page. +7. The Formspree endpoint must remain available; no test submission is authorized. +8. GA4 should not receive the staged RFQ events until activation approval. +9. Existing analytics configuration must remain unchanged. +10. Mobile layout and tables must remain free of page-level horizontal scroll. + +## Confirmations + +- HTTPS: PASS in live URL checks. +- robots.txt: available. +- sitemap: available. +- canonical production host: PASS in live and generated candidate HTML. +- Candidate new URLs: correctly absent from live production. +- No deployment status is claimed. diff --git a/docs/seo-growth/phase-2c/03-analytics-rfq-attribution-readiness.md b/docs/seo-growth/phase-2c/03-analytics-rfq-attribution-readiness.md new file mode 100644 index 0000000..3d8871e --- /dev/null +++ b/docs/seo-growth/phase-2c/03-analytics-rfq-attribution-readiness.md @@ -0,0 +1,98 @@ +# Analytics and RFQ Attribution Readiness + +## Current production state + +- A GA4 `gtag.js` configuration is present in the site template. +- No RFQ-specific event implementation is present in production HTML. +- The form posts to a Formspree endpoint configured in the repository. +- The current production form lacks `_language` and `source_page` hidden fields. +- The existing thank-you route is noindex. +- GA4 account access remains unavailable through GSC Wizard. +- CRM qualification and closed-business data are unavailable. + +No external analytics configuration or account setting was changed. + +## Staged implementation + +- Added `assets/js/analytics-events.js`. +- Added an optional partial that loads the event script only when + `analytics.enable_rfq_events` is true and a GA4 ID exists. +- Set `enable_rfq_events = false` by default. +- The script records no form-field values, file names or message content. +- The release checker fails if the staged script appears in generated HTML while + the feature flag is disabled. +- JavaScript syntax passed Node's `--check`. + +## Event specification + +| Event | Trigger | Parameters | Duplicate prevention | +| --- | --- | --- | --- | +| `rfq_start` | First focus inside an RFQ form | page language, source page, landing page, referrer domain, UTM source/medium/campaign, form location | Session key per form index | +| `rfq_submit` | Valid form submit event | same attribution fields plus form location | Session key per form index and broad submit marker | +| `rfq_confirmation` | Thank-you page when a preceding submit marker exists | same attribution fields | Session confirmation marker | + +No conversion or lead event is sent at submit. `rfq_confirmation` only proves +that the browser reached a project confirmation page. It does not prove +Formspree delivery or sales qualification. + +## Attribution stored in session + +The browser stores the current landing path, page language, external referrer +hostname and three UTM values in `sessionStorage`. These values are not sent as +page-view fields until the staged events are activated. + +The implementation does not store names, email addresses, phone numbers, +company names, project details, attachment names or file contents. + +## Recommended reporting dimensions + +- landing page path; +- source page path; +- page language; +- external referrer domain; +- UTM source, medium and campaign; +- form location; +- RFQ started, submitted and confirmation reached; +- later CRM stage, kept outside GA4 PII fields. + +## Duplicate and reliability rules + +- Start and submit are deduplicated per form in the browser session. +- Confirmation requires the submit marker from the same origin and session. +- A user who submits in two browser sessions may produce two events. +- Browser blockers, storage restrictions or page abandonment can prevent event + capture. +- Formspree acceptance is not directly visible to the static frontend. +- CRM qualification must join on a separate non-PII inquiry identifier or + provider record, not on message text. + +## Consent and privacy considerations + +Activation requires: + +1. confirmation of the site's consent and privacy approach; +2. agreement on UTM/referrer retention; +3. confirmation that no personal form values are included; +4. review of applicable consent mode or regional behavior; +5. documented retention and access controls; +6. human approval to activate the flag. + +## QA test cases + +| Test | Expected | +| --- | --- | +| Flag false | No event script and no `__TCW_ANALYTICS__` in HTML | +| Flag true with GA4 ID | Script loads once after page content | +| First field focus | One `rfq_start` event | +| Repeat focus | No duplicate start event | +| Invalid required submission | Browser blocks submit; no submit event | +| Valid submit attempt | One `rfq_submit` event | +| Redirect to thank-you | One `rfq_confirmation` event | +| Direct thank-you visit | No confirmation event | +| Complete form values | No names, email, phone, company, project text or file names in event payload | +| UTM visit followed by internal navigation | Original session attribution retained | +| Same form reopened in same session | Start/submit not duplicated | + +The staged script was syntax-checked. A live event QA was not run because that +would be an external analytics activation and would require an actual form +submission. diff --git a/docs/seo-growth/phase-2c/04-verified-evidence-hub.md b/docs/seo-growth/phase-2c/04-verified-evidence-hub.md new file mode 100644 index 0000000..53c9cd4 --- /dev/null +++ b/docs/seo-growth/phase-2c/04-verified-evidence-hub.md @@ -0,0 +1,85 @@ +# Verified Evidence Hub + +## Decision + +A public indexed certification/evidence claim cannot be released from the +available repository evidence. Certificate numbers, registration scope, +validity, equipment records and customer approvals were not supplied. + +Phase 2C therefore implements: + +- a noindex `/quality-documentation/` buyer guide; +- a structured evidence register with explicit verification statuses; +- a list of documents buyers should request; +- release criteria for moving the page to indexable. + +## Candidate page + +URL: `/quality-documentation/` + +Status: `noindex, follow` + +Included: + +- evidence purpose; +- current publication-status table; +- legal, quality, material, manufacturing and dimensional document checklist; +- supplier-evaluation questions; +- explicit non-claims; +- criteria for becoming an indexed evidence hub. + +Excluded: + +- certificate numbers; +- validity dates; +- equipment counts or capacity; +- tolerance guarantees; +- customer names or case studies; +- production-volume claims; +- performance or certification badges that cannot be substantiated. + +## Evidence register + +`evidence-register.csv` records the claim, repository source, publication status, +approved scope, limitation and required verifier. + +Status counts: + +| Status | Count | +| --- | ---: | +| VERIFIED | 0 | +| VERIFIED WITH LIMITATIONS | 0 | +| PENDING MANAGEMENT VERIFICATION | 11 | +| UNVERIFIED | 0 | +| NOT APPROVED FOR PUBLICATION | 1 | + +Tolerance and lead-time items remain pending management verification because +their approved public conditions have not been supplied; any quotation still +requires project-specific confirmation. + +## Required evidence package + +1. Legal registration and current manufacturing address. +2. Current ISO 9001 certificate, registrar, scope and validity. +3. Current ISO 14001 certificate and scope, if the claim remains. +4. RoHS/REACH declarations and exact product/process applicability, if retained. +5. Approved equipment register or publishable equipment statement. +6. Approved process descriptions with facility ownership. +7. Representative first-article and inspection records with customer data + removed. +8. Certification or qualification evidence for any aerospace claim. +9. Approved facility photographs with dates and captions. +10. Written consent for customer or project references. + +## Publication rule + +The page remains noindex until every intended claim is: + +- tied to a register ID; +- supported by a current source; +- approved by the responsible business owner; +- scoped to the correct company, facility and process; +- rechecked by the release owner. + +Existing pages may still contain broader claims. Those should be reconciled +against the same evidence register before any claim is strengthened. diff --git a/docs/seo-growth/phase-2c/05-release-verification-automation.md b/docs/seo-growth/phase-2c/05-release-verification-automation.md new file mode 100644 index 0000000..ecfe264 --- /dev/null +++ b/docs/seo-growth/phase-2c/05-release-verification-automation.md @@ -0,0 +1,70 @@ +# Release Verification Automation + +## Existing automation + +The GitHub Actions Hugo workflow already runs: + +- Hugo production build; +- JSON-LD/schema check; +- multilingual SEO check; +- growth audit; +- hreflang/canonical summaries; +- sitemap presence checks. + +Phase 2C does not duplicate those checks. + +## Added cumulative release check + +`scripts/release-check.py` adds release-specific checks: + +- required commercial routes exist; +- required commercial URLs are in sitemaps; +- required pages are indexable; +- every expected RFQ route contains one form; +- Formspree action is recognized; +- multipart encoding is present; +- required attribution and contact fields exist; +- name, company, email and project details remain required; +- localized `_next` confirmation URLs are correct; +- attachment accepts PDF, STEP, IGES and DXF; +- confirmation pages exist and remain noindex; +- confirmation pages are excluded from sitemaps; +- the evidence page remains noindex and excluded from sitemaps; +- taxonomy URLs do not re-enter sitemaps; +- RFQ analytics remain inactive by default; +- staged analytics is not emitted while disabled; +- tracked files are checked for common credential/private-key patterns. + +## Command + +```powershell +python scripts/release-check.py public --json public/release-check.json +``` + +Expected summary: + +- 79 sitemap URLs; +- 13 required routes; +- 6 RFQ routes; +- 5 confirmation routes; +- 0 errors; +- 0 warnings; +- `STATUS: PASS`. + +## CI + +The workflow runs the release checker after the growth audit and before artifact +upload. A failure stops the build job and therefore prevents deployment from the +existing GitHub Pages workflow. + +## Scope + +The script verifies the generated static candidate and repository text. It +does not replace: + +- GitHub PR review; +- browser-based visual inspection; +- live Formspree delivery testing; +- external analytics QA; +- Search Console recrawl evidence; +- legal, privacy or management approval. diff --git a/docs/seo-growth/phase-2c/06-phase-2d-release-runbook.md b/docs/seo-growth/phase-2c/06-phase-2d-release-runbook.md new file mode 100644 index 0000000..01e920f --- /dev/null +++ b/docs/seo-growth/phase-2c/06-phase-2d-release-runbook.md @@ -0,0 +1,177 @@ +# Phase 2D Controlled Release Runbook + +## Authorization gates + +Do not begin until the release owner approves: + +1. Phase 1, 2A, 2B and 2C PR order. +2. Production merge authority. +3. RFQ analytics activation decision. +4. Evidence-register publication scope. +5. Rollback owner and monitoring window. + +## Pre-release checks + +1. Verify the release branch and remote commit. +2. Verify ancestry in order. +3. Confirm working tree clean. +4. Run the full local suite: + +```powershell +hugo --environment production --gc --minify --cleanDestinationDir +python scripts/schema-check.py public +python scripts/seo-check.py public +python scripts/growth-audit.py public +python scripts/release-check.py public +node --check assets/js/analytics-events.js +git diff --check ...HEAD +``` + +5. Review GitHub Actions build output. +6. Check for unexpected file, image, configuration or permission changes. +7. Confirm `enable_rfq_events = false` unless analytics activation is explicitly + approved. +8. Confirm the evidence page remains noindex. +9. Confirm no secret is present in tracked files. +10. Record the candidate commit and artifact checksum if available. + +## PR review and merge + +1. Create Phase 1 PR. +2. Review and merge Phase 1. +3. Wait for the post-merge GitHub Actions build and deployment to complete. +4. Create Phase 2A PR from its branch; confirm it now has the expected base. +5. Review and merge Phase 2A. +6. Verify deployment and spot-check its new routes. +7. Create Phase 2B PR. +8. Review and merge Phase 2B. +9. Verify its three guides and one DFM page. +10. Create Phase 2C PR. +11. Review and merge Phase 2C. +12. Verify noindex evidence page and inactive analytics state. + +If the repository uses squash merges, confirm that ancestry checks are redefined +against merged commits rather than assuming original branch commits remain in +history. + +## Deployment verification + +Record: + +- deployment timestamp and GitHub Actions run URL; +- merged commit SHA; +- production sitemap timestamp; +- HTTP status for critical URLs; +- canonical URL; +- title and meta description; +- robots directive; +- H1 count; +- JSON-LD types; +- RFQ form field list; +- confirmation destination; +- static asset status. + +Critical URLs: + +- `/` +- `/custom-carbon-fiber-parts-manufacturer/` +- `/carbon-fiber-manufacturing-services/` +- `/cnc-machining-carbon-fiber-parts/` +- `/carbon-fiber-prototyping-services/` +- `/carbon-fiber-design-for-manufacturability/` +- `/robotics-carbon-fiber-parts-manufacturer/` +- `/carbon-fiber-robotic-arm-components/` +- `/uav-carbon-fiber-components-manufacturer/` +- `/carbon-fiber-uav-frames-and-structures/` +- `/request-a-quote/` +- `/quality-documentation/` — noindex +- five localized thank-you pages — noindex + +## SEO and indexing verification + +1. Confirm root sitemap returns 200. +2. Confirm language sitemap URLs return 200. +3. Confirm new indexable URLs appear exactly once. +4. Confirm no tag, category, confirmation or evidence-noindex page is in the + sitemap. +5. Check canonical host and path. +6. Use Search Console URL Inspection on representative new URLs. +7. Submit or resubmit sitemap only after release-owner approval. +8. Do not interpret a new transient status as an indexing failure before Google + has recrawled. + +## RFQ verification + +- Open each relevant RFQ route on desktop and mobile. +- Confirm one form is visible. +- Confirm required fields and file types. +- Confirm localized hidden `_next`. +- Confirm `_language` and `source_page`. +- Do not submit a real or test inquiry without explicit external-action approval. +- If a submission is later authorized, use an approved internal test recipient + and a non-confidential file. + +## Analytics QA + +If activation is approved: + +1. Set the flag on a non-production preview first. +2. Verify tag loading and consent behavior. +3. Run the QA cases in `03-analytics-rfq-attribution-readiness.md`. +4. Confirm no personal form value appears in any event. +5. Confirm direct thank-you visits do not create confirmation events. +6. Confirm duplicate sessions do not emit repeated start/submit events. +7. Activate production only after approval. + +If activation is not approved, leave the flag false and verify no event script is +loaded. + +## Mobile and desktop QA + +- Test homepage, commercial pages, guides, shapes table and RFQ. +- Confirm no page-level horizontal overflow. +- Confirm CTA and form fields remain reachable. +- Confirm images reserve layout space. +- Confirm localized long headings wrap without clipping. + +## Rollback triggers + +Roll back or disable the affected release if: + +- production returns 5xx for critical routes; +- canonical or robots output is wrong across multiple pages; +- sitemap is malformed; +- RFQ form posts to the wrong endpoint or confirmation; +- analytics begins transmitting unapproved data; +- evidence noindex changes unexpectedly; +- new URLs create severe redirect or internal-link failures; +- mobile navigation/form is unusable. + +## Rollback procedure + +1. Use GitHub Pages or repository rollback controls to restore the previous + known-good commit. +2. If only analytics is affected, set `enable_rfq_events = false` and redeploy. +3. If only the evidence page is affected, preserve `noindex` or disable the page. +4. Do not use destructive history rewriting. +5. Record the incident, commit, timestamp and verification evidence. +6. Re-run the release checker after rollback. + +## Post-release monitoring + +- Day 0: inventory, status, canonical, RFQ and analytics baseline. +- First 24 hours: uptime, 404/5xx, forms, mobile and analytics errors. +- Day 7: indexing/crawl and technical stability. +- Day 28: search and conversion comparison. +- Day 56: cluster and cannibalization evaluation. + +## Ownership + +| Area | Required owner | +| --- | --- | +| Merge/deployment | Repository release owner | +| Search Console | Site owner | +| Form endpoint | Sales/operations owner | +| Analytics activation | Analytics/privacy owner | +| Evidence register | Quality/management owner | +| Content facts | Relevant business process owner | diff --git a/docs/seo-growth/phase-2c/07-post-release-measurement-plan.md b/docs/seo-growth/phase-2c/07-post-release-measurement-plan.md new file mode 100644 index 0000000..817b969 --- /dev/null +++ b/docs/seo-growth/phase-2c/07-post-release-measurement-plan.md @@ -0,0 +1,100 @@ +# Post-Release Search Measurement Plan + +## Evidence rules + +- Search Console query rows are top rows and omit anonymised queries. +- GSC Wizard metrics are unavailable until the connector accepts the property. +- GA4 and CRM data are currently unavailable. +- Observed data, derived calculations and interpretations must be labelled + separately. +- Low-volume query movement should not drive sweeping conclusions. + +## Day 0 release baseline + +Capture: + +- merged commit and deployment timestamp; +- production sitemap URL and last-modified response; +- status/canonical/robots for every critical URL; +- sitemap URL count by language; +- new indexable URL count; +- noindex URL list; +- representative JSON-LD types; +- RFQ field state and confirmation destination; +- GA4 measurement ID and analytics flag state; +- Search Console 28-day and 56-day pre-release baseline; +- stored form lead count only if available from an authorized internal report. + +## Day 7 technical window + +Review: + +- 4xx/5xx requests from hosting or logs where available; +- Search Console URL Inspection for representative new pages; +- sitemap discovery and language child sitemap health; +- robots and canonical regressions; +- crawl anomalies; +- RFQ rendering; +- analytics event syntax/load errors if activated; +- unexpected content or redirect changes. + +Do not infer ranking success from initial crawl status. + +## Day 28 search window + +Compare the same settled 28-day length before and after: + +- impressions; +- clicks; +- CTR; +- average position; +- query count; +- landing-page clicks and impressions; +- non-brand visibility if branded keywords are configured; +- new query-to-page mappings; +- commercial-page RFQ starts; +- confirmed RFQ pages; +- qualified inquiries from CRM if available. + +Cluster reporting: + +- DFM and engineering review; +- custom parts; +- manufacturing and material selection; +- CNC; +- prototyping; +- robotics; +- UAV; +- shapes/forged/finishing. + +## Day 56 evaluation + +- Compare each cluster with the Day 0 baseline and Day 28 period. +- Check whether new guides acquire queries distinct from commercial pages. +- Check commercial pages for increased impressions without corresponding clicks. +- Review the shapes and factory/custom query overlap. +- Review robotics and UAV query-to-page ownership. +- Review material-selection query quality. +- Compare DFM page queries with custom-parts and prototyping queries. +- Review RFQ starts and confirmed pages without claiming qualified lead growth. +- Record any Google update or site change that overlaps the measurement window. + +## Recommended interpretation + +| Observation | Interpretation | Next action | +| --- | --- | --- | +| Impressions rise, position stable, CTR falls | Snippet or SERP-feature issue | Rewrite title/description and compare | +| Guide gets clicks but commercial page does not | Weak handoff | Strengthen contextual path | +| Guide and service both rank for same query | Intent overlap | Differentiate or consolidate | +| Commercial page rises but RFQ starts do not | Message/trust/conversion issue | Review page and form | +| New URL remains not indexed after reasonable recrawl | Technical or crawl issue | Inspect before changing content | +| Analytics events missing | Tracking/consent/implementation issue | Run QA cases | + +## Reporting units + +- Search Console CTR is a percentage, not a fraction. +- Position lower is better. +- GA4 engagement and bounce rates are fractions. +- Lead quality remains a CRM/business metric, not a GA4 event. +- AI assistant referrals are separately measured only where a distinct referrer + exists; Google AI surfaces do not. diff --git a/docs/seo-growth/phase-2c/08-backlink-geo-readiness.md b/docs/seo-growth/phase-2c/08-backlink-geo-readiness.md new file mode 100644 index 0000000..ad08b39 --- /dev/null +++ b/docs/seo-growth/phase-2c/08-backlink-geo-readiness.md @@ -0,0 +1,84 @@ +# Backlink and GEO Readiness + +## Assets ready for legitimate citation + +- carbon fiber DFM review framework; +- robot-arm design guide; +- drone-frame design guide; +- material-selection guide; +- shapes tube/plate/profile selection table; +- prepreg versus wet layup guide; +- forged carbon selection guide. + +These are substantive editorial assets, not pages created solely for links. + +## Opportunity priorities + +| Priority | Target | Asset | Angle | Requirement | +| --- | --- | --- | --- | --- | +| P1 | CompositesWorld Supplier SourceBook | DFM and material selection | Supplier resource listing or technical reference | Verify current listing terms and cost | +| P1 | AUVSI organizational resources | Drone frame guide | Educational frame-design resource | Membership or placement requires human approval | +| P1 | Verified customer/partner pages | Relevant component guide | Approved supplier reference | Written consent required | +| P2 | University composites/robotics programs | DFM and robot-arm guides | Course/resource citation | No paid or automated outreach | +| P2 | Engineering publications | Material-selection guide | Editorial technical reference | Verify editorial fit and any cost | +| P2 | JEC and industry event resources | Technical guide or diagram | Conference or editorial contribution | Event timing and terms unverified | +| P3 | Qualified manufacturing directories | DFM or material guide | Supplier discovery | Avoid low-quality or paid-link networks | + +## Outreach drafts + +### Technical resource suggestion + +Subject: Carbon fiber DFM and component-design resource + +Hello, + +We published a technical resource covering carbon fiber DFM, robot-link design +and UAV frame architecture, with separate material-selection guidance. The pages +distinguish design considerations from application-specific validation and +include procurement checklists. + +If your engineering resource section would benefit from a direct technical +reference, I can provide the URL and a short summary for editorial review. We +are not requesting reciprocal placement. + +Regards, +TechCarbonWorks + +### Association/directory inquiry + +Subject: Current supplier-resource eligibility + +Hello, + +Please confirm the current eligibility, category and cost requirements for a +carbon fiber component manufacturer that provides custom manufacturing, DFM, +prototyping and CNC machining for robotics, UAV and industrial OEM programs. + +I have not assumed membership or listing eligibility. + +Regards, +TechCarbonWorks + +No message was sent. + +## GEO readiness + +The new pages provide: + +- explicit definitions; +- process and material distinctions; +- engineering limits; +- decision tables; +- visible FAQs matching structured data; +- contextual links to commercial pages. + +The evidence page remains noindex until claims are verified. There is still no +approved named author, certificate-source page, customer case evidence or +external citation data. + +## AI observability + +- No AI citation monitoring is connected. +- No assistant-referral GA4 data is available. +- Google AI Overview/AI Mode traffic cannot be separated from organic Google. +- No GEO improvement is claimed until post-release data exists. diff --git a/docs/seo-growth/phase-2c/09-verification-report.md b/docs/seo-growth/phase-2c/09-verification-report.md new file mode 100644 index 0000000..8256b52 --- /dev/null +++ b/docs/seo-growth/phase-2c/09-verification-report.md @@ -0,0 +1,70 @@ +# Phase 2C Verification Report + +## Candidate verification + +| Check | Result | Status | +| --- | --- | --- | +| Hugo production build | PASS, 70 English pages and 19 per translated language | PASS | +| SEO metadata/canonical check | 107 non-redirect pages, 0 issues, 514 hreflang tags | PASS | +| Expected language warning | English-only blog creates page-count disparity | VERIFICATION GAP | +| Schema check | 144 HTML files, 0 schema errors | PASS | +| Growth audit | 107 indexable routes, 485 JSON-LD blocks, 0 errors, 0 warnings | PASS | +| Cumulative release check | 79 sitemap URLs, 13 required routes, 6 RFQ routes, 5 confirmation routes, 0 errors | PASS | +| Sitemap XML | six XML sitemaps parse | PASS | +| Evidence register | 12 tracked evidence items with explicit statuses | PASS | +| Analytics JS syntax | Node `--check` passed | PASS | +| Analytics disabled check | No staged event script in generated HTML | PASS | +| Tracked secret scan | no matching credential/private-key patterns | PASS | +| Static images | all 28 images and 3,588,246 bytes preserved | PASS | +| Existing aliases | 25 English aliases and 3 per translated language generated | PASS | +| Mobile layout | 319px viewport, 304px document width, no page-level overflow | PASS | +| Desktop layout | 1280px viewport, 1265px document width, no page-level overflow | PASS | +| Evidence page noindex | `noindex, follow` observed in browser and HTML | PASS | +| Evidence page sitemap exclusion | absent from all sitemap candidates | PASS | +| RFQ form regression | required pages contain one form with attribution fields, correct endpoint and file types | PASS | +| Confirmation noindex | five confirmation routes noindex and absent from sitemap | PASS | +| Production availability | home, robots, sitemap, thank-you return 200 | PASS | +| New candidate URLs in production | six Phase 2A/2B URLs return 404 before release | EXPECTED PRE-RELEASE | + +## Browser checks + +The in-app browser was used against the local candidate: + +- DFM page and all three Phase 2B guides render with their expected H1 and form. +- Quality documentation page renders, is noindex, and contains no staged + analytics script. +- At 319px, the quality-documentation heading was adjusted for readability + without changing content. +- No mobile horizontal overflow was found. + +## Production versus candidate + +- The production homepage still uses the brand-only title. +- The production quote form lacks source-page and language attribution fields. +- Six planned Phase 2A/2B URLs are absent from production. +- The candidate sitemap adds six URLs and removes thin taxonomy/confirmation + routes. +- No production deployment occurred. + +## Analytics limitations + +The implementation is inactive by default. No event was sent to GA4. Real +analytics QA requires an approved preview environment, consent review, and +external activation authority. + +## Evidence limitations + +No certificate, equipment register, approved facility record or customer +evidence was supplied. The evidence page is deliberately noindex and must not +be released as an indexed proof asset until management verification. + +## Remaining verification gaps + +- Formspree delivery was not tested with a real submission. +- Search Console has not recrawled the candidate. +- GA4 data remains unavailable through GSC Wizard. +- CRM lead qualification is unavailable. +- AI referral and citation data are unavailable. +- Search performance and conversion change cannot yet be measured. +- Existing company claims outside the evidence register still require + owner-level verification. diff --git a/docs/seo-growth/phase-2c/CHANGELOG.md b/docs/seo-growth/phase-2c/CHANGELOG.md new file mode 100644 index 0000000..2f8e93d --- /dev/null +++ b/docs/seo-growth/phase-2c/CHANGELOG.md @@ -0,0 +1,42 @@ +# Phase 2C Change Log + +## Release readiness + +- Created the Phase 2C evidence package. +- Documented dependency, production, release and rollback readiness. +- Added cumulative release automation. + +## Measurement + +- Added an inactive-by-default RFQ event configuration. +- Added isolated RFQ event JavaScript with: + - start, submit and confirmation events; + - session-level duplicate prevention; + - non-PII attribution fields; + - localized confirmation recognition. +- Added a conditional analytics partial that loads only when explicitly enabled. +- Added a release check preventing accidental analytics activation. + +## Evidence + +- Added noindex `/quality-documentation/`. +- Added `evidence-register.csv` with 12 evidence entries and explicit statuses. +- Added buyer document checklists and supplier qualification questions. +- Added release criteria for future indexing. + +## Automation + +- Added `scripts/release-check.py`. +- Added the cumulative release check to GitHub Actions. +- Verified release check, growth audit, schema check and build. + +## UX + +- Reduced article-H1 size on narrow mobile screens to prevent awkward word + breaks in the evidence page. + +## Documentation updates + +- Updated repository and SEO index documentation. +- Documented production-to-candidate differences, event QA, release runbook, + post-release measurement and backlink/GEO readiness. diff --git a/docs/seo-growth/phase-2c/README.md b/docs/seo-growth/phase-2c/README.md new file mode 100644 index 0000000..6bf35e3 --- /dev/null +++ b/docs/seo-growth/phase-2c/README.md @@ -0,0 +1,53 @@ +# Phase 2C - Release Readiness + +## Status + +**COMPLETE WITH VERIFICATION GAPS** + +The cumulative candidate is release-ready for human review, but it is not +deployed. Measurement instrumentation is staged and inactive by default. The +company evidence page is implemented as `noindex` until management supplies +traceable proof. + +## Branch + +- Base: Phase 2B `188eb6c2e0cb4ec2b58c6062d441e4bb4efbc508` +- Working branch: `codex/seo-geo-phase-2c-release-readiness` + +## Required dependency order + +1. Phase 1: `9ce9b02` +2. Phase 2A: `ce779dc` +3. Phase 2B: `188eb6c` +4. Phase 2C: this branch + +## Phase 2C deliverables + +- `01-release-dependency-audit.md` +- `02-production-readiness-audit.md` +- `03-analytics-rfq-attribution-readiness.md` +- `04-verified-evidence-hub.md` +- `evidence-register.csv` +- `05-release-verification-automation.md` +- `06-phase-2d-release-runbook.md` +- `07-post-release-measurement-plan.md` +- `08-backlink-geo-readiness.md` +- `09-verification-report.md` + +## Implemented repository changes + +- Added an inactive-by-default RFQ analytics event layer. +- Added a cumulative release checker and CI step. +- Added a noindex buyer documentation and evidence-readiness page. +- Added the verified-evidence register. +- Added the Phase 2D runbook and post-release measurement framework. +- Updated repository and SEO index documentation references. + +## Non-actions + +- No production deployment. +- No branch merge. +- No external form submission. +- No analytics configuration activation. +- No external account, credential or permission change. +- No outreach, paid service or link purchase. diff --git a/docs/seo-growth/phase-2c/evidence-register.csv b/docs/seo-growth/phase-2c/evidence-register.csv new file mode 100644 index 0000000..b790d3b --- /dev/null +++ b/docs/seo-growth/phase-2c/evidence-register.csv @@ -0,0 +1,13 @@ +evidence_id,category,claim_or_item,repository_source,candidate_publication_status,approved_scope,limitation,required_verifier +EV-001,identity,Legal company name and Huizhou address,data/schema/organization.toml; config/_default/params.toml,PENDING MANAGEMENT VERIFICATION,Company identity and address existing in website data,No underlying registration document supplied,Management/legal +EV-002,process,"Published prepreg molding, layup, vacuum bagging and autoclave descriptions",content/carbon-fiber-manufacturing-services/index.md,PENDING MANAGEMENT VERIFICATION,General published process description,Process-owner and facility record not supplied,Production/quality +EV-003,quality,"Published ISO 9001 claim",content/_index.md and service content,PENDING MANAGEMENT VERIFICATION,"If confirmed, current certificate and declared scope","Certificate number, registrar, issue and expiry dates not in repository",Quality/management +EV-004,environment,"Published ISO 14001 claim",content/_index.md,PENDING MANAGEMENT VERIFICATION,"If confirmed, current certificate and declared scope","Certificate number, registrar, issue and expiry dates not in repository",Quality/management +EV-005,materials,"Published RoHS and REACH compliance descriptions",content/_index.md and certification data,PENDING MANAGEMENT VERIFICATION,"If confirmed, exact products and regulatory scope","No test reports, declarations or approved product scope supplied",Quality/compliance +EV-006,equipment,"Published autoclave, 5-axis CNC, prepreg cutting and CMM equipment descriptions",content/_index.md and data/schema/manufacturing.toml,PENDING MANAGEMENT VERIFICATION,"If confirmed, approved public equipment wording","No accepted equipment register or facility record supplied",Production/management +EV-007,tolerance,"Published ±0.05 mm and ±0.1 mm capability ranges",content/cnc-machining-carbon-fiber-parts/index.md and custom-parts content,PENDING MANAGEMENT VERIFICATION,"If confirmed, feature-specific conditions and inspection method","No capability study or approved public tolerance statement supplied",Engineering/quality +EV-008,lead_time,"Published prototype and production lead-time ranges",content/carbon-fiber-prototyping-services/index.md and manufacturing content,PENDING MANAGEMENT VERIFICATION,"If confirmed, clearly qualified planning ranges","No current capacity or scheduling record supplied",Operations +EV-009,facility,"Published facility and process photographs",static/images/* and content image references,PENDING MANAGEMENT VERIFICATION,"Approved current facility photography with caption","Image ownership, date and actual location require approval",Management/marketing +EV-010,customers,"Customer or project evidence",none,NOT APPROVED FOR PUBLICATION,"No publication approved","No approved customer names or project evidence supplied",Management/customer +EV-011,inspection,"Published material certificate, layup record, first-article and CMM documentation descriptions",manufacturing/custom-parts/CNC content,PENDING MANAGEMENT VERIFICATION,"If confirmed, template and retained-record process","No approved sample record supplied",Quality +EV-012,contact,"hank@techcarbonworks.com public contact",config/_default/params.toml and footer,PENDING MANAGEMENT VERIFICATION,Public sales contact existing on website,No additional scope approved,Management diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 8525be8..c796bd5 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -9,5 +9,6 @@ {{ block "main" . }}{{ end }} {{ partial "footer.html" . }} + {{ partial "analytics-events.html" . }} diff --git a/layouts/partials/analytics-events.html b/layouts/partials/analytics-events.html new file mode 100644 index 0000000..7c662ef --- /dev/null +++ b/layouts/partials/analytics-events.html @@ -0,0 +1,9 @@ +{{- with .Site.Params.analytics -}} + {{- if and .enable_rfq_events .google_analytics_id -}} + {{- $events := resources.Get "js/analytics-events.js" | minify | fingerprint -}} + + + {{- end -}} +{{- end -}} diff --git a/scripts/release-check.py b/scripts/release-check.py new file mode 100644 index 0000000..318b08e --- /dev/null +++ b/scripts/release-check.py @@ -0,0 +1,299 @@ +#!/usr/bin/env python3 +""" +release-check.py - cumulative release checks for the TechCarbonWorks candidate. + +Complements the general SEO/schema/growth audits with checks that are specific +to commercial release safety: required candidate URLs, RFQ attribution fields, +confirmation-page indexability, staged analytics state, sitemap membership, and +obvious tracked-secret patterns. +""" + +from __future__ import annotations + +import argparse +import json +import re +import subprocess +import sys +import tomllib +from dataclasses import asdict, dataclass +from html.parser import HTMLParser +from pathlib import Path + + +REQUIRED_INDEXABLE = { + "/": "index.html", + "/carbon-fiber-manufacturing-services/": "carbon-fiber-manufacturing-services/index.html", + "/custom-carbon-fiber-parts-manufacturer/": "custom-carbon-fiber-parts-manufacturer/index.html", + "/carbon-fiber-prototyping-services/": "carbon-fiber-prototyping-services/index.html", + "/cnc-machining-carbon-fiber-parts/": "cnc-machining-carbon-fiber-parts/index.html", + "/carbon-fiber-design-for-manufacturability/": "carbon-fiber-design-for-manufacturability/index.html", + "/carbon-fiber-robotic-arm-components/": "carbon-fiber-robotic-arm-components/index.html", + "/carbon-fiber-uav-frames-and-structures/": "carbon-fiber-uav-frames-and-structures/index.html", + "/robotics-carbon-fiber-parts-manufacturer/": "robotics-carbon-fiber-parts-manufacturer/index.html", + "/uav-carbon-fiber-components-manufacturer/": "uav-carbon-fiber-components-manufacturer/index.html", + "/blog/carbon-fiber-robot-arm-design/": "blog/carbon-fiber-robot-arm-design/index.html", + "/blog/carbon-fiber-drone-frame-design/": "blog/carbon-fiber-drone-frame-design/index.html", + "/blog/carbon-fiber-material-selection-guide/": "blog/carbon-fiber-material-selection-guide/index.html", +} + +RFQ_ROUTES = { + "/": "index.html", + "/request-a-quote/": "request-a-quote/index.html", + "/carbon-fiber-design-for-manufacturability/": "carbon-fiber-design-for-manufacturability/index.html", + "/blog/carbon-fiber-robot-arm-design/": "blog/carbon-fiber-robot-arm-design/index.html", + "/blog/carbon-fiber-drone-frame-design/": "blog/carbon-fiber-drone-frame-design/index.html", + "/blog/carbon-fiber-material-selection-guide/": "blog/carbon-fiber-material-selection-guide/index.html", +} + +CONFIRMATION_ROUTES = { + "/thank-you/": "thank-you/index.html", + "/de/thank-you/": "de/thank-you/index.html", + "/es/thank-you/": "es/thank-you/index.html", + "/fr/thank-you/": "fr/thank-you/index.html", + "/ja/thank-you/": "ja/thank-you/index.html", +} + +EVIDENCE_ROUTE = "/quality-documentation/" +EVIDENCE_FILE = "quality-documentation/index.html" + +SECRET_PATTERNS = [ + re.compile(r"AKIA[0-9A-Z]{16}"), + re.compile(r"gh[pousr]_[A-Za-z0-9]{20,}"), + re.compile(r"-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----"), + re.compile(r"(?i)(?:api[_-]?key|client[_-]?secret|password)\s*[:=]\s*['\"][^'\"]{8,}['\"]"), +] + + +@dataclass(frozen=True) +class Finding: + severity: str + category: str + message: str + + +class ReleaseParser(HTMLParser): + def __init__(self): + super().__init__(convert_charrefs=True) + self.robots = "" + self.canonical = "" + self.forms = [] + self._form = None + + def handle_starttag(self, tag, attrs): + attr = {name.lower(): (value or "") for name, value in attrs} + if tag == "meta" and attr.get("name", "").lower() == "robots": + self.robots = attr.get("content", "") + elif tag == "link" and attr.get("rel", "").lower() == "canonical": + self.canonical = attr.get("href", "") + elif tag == "form" and "rfq-form" in attr.get("class", "").split(): + self._form = { + "action": attr.get("action", ""), + "enctype": attr.get("enctype", ""), + "inputs": [], + } + elif tag in {"input", "textarea"} and self._form is not None: + self._form["inputs"].append(attr) + + def handle_endtag(self, tag): + if tag == "form" and self._form is not None: + self.forms.append(self._form) + self._form = None + + +def parse_page(path: Path) -> ReleaseParser: + parser = ReleaseParser() + parser.feed(path.read_text(encoding="utf-8", errors="replace")) + return parser + + +def sitemap_urls(public_dir: Path) -> set[str]: + urls = set() + for sitemap in public_dir.glob("sitemap*.xml"): + content = sitemap.read_text(encoding="utf-8", errors="replace") + urls.update(re.findall(r"(.*?)", content)) + for sitemap in public_dir.glob("*/sitemap.xml"): + content = sitemap.read_text(encoding="utf-8", errors="replace") + urls.update(re.findall(r"(.*?)", content)) + return urls + + +def tracked_text_files(repo_root: Path): + try: + output = subprocess.check_output( + ["git", "-C", str(repo_root), "ls-files", "-z"], + stderr=subprocess.DEVNULL, + ) + except (OSError, subprocess.CalledProcessError): + return [] + + files = [] + for raw in output.split(b"\0"): + if not raw: + continue + path = repo_root / raw.decode("utf-8", errors="replace") + if not path.is_file() or path.stat().st_size > 1_000_000: + continue + if path.suffix.lower() in {".webp", ".jpg", ".jpeg", ".png", ".gif", ".woff", ".woff2"}: + continue + files.append(path) + return files + + +def check(repo_root: Path, public_dir: Path) -> dict: + findings = [] + + def add(severity, category, message): + findings.append(Finding(severity, category, message)) + + urls = sitemap_urls(public_dir) + + for route, rel_path in REQUIRED_INDEXABLE.items(): + page_path = public_dir / rel_path + if not page_path.is_file(): + add("error", "required-page", f"Missing required route {route}") + continue + page = parse_page(page_path) + if "noindex" in page.robots.lower(): + add("error", "required-page", f"Required commercial route is noindex: {route}") + url = f"https://techcarbonworks.com{route}" + if url not in urls: + add("error", "sitemap", f"Required commercial route is absent from sitemap: {route}") + + for route, rel_path in RFQ_ROUTES.items(): + page_path = public_dir / rel_path + if not page_path.is_file(): + add("error", "rfq", f"RFQ page missing: {route}") + continue + page = parse_page(page_path) + if len(page.forms) != 1: + add("error", "rfq", f"{route} should contain exactly one RFQ form, found {len(page.forms)}") + continue + form = page.forms[0] + if not form["action"].startswith("https://formspree.io/f/"): + add("error", "rfq", f"{route} has an unexpected form endpoint") + if form["enctype"] != "multipart/form-data": + add("error", "rfq", f"{route} form is missing multipart encoding") + + by_name = {item.get("name", ""): item for item in form["inputs"]} + for required in ("_next", "_language", "source_page", "name", "company", "email", "project_details", "attachment"): + if required not in by_name: + add("error", "rfq", f"{route} form is missing field {required}") + for required in ("name", "company", "email", "project_details"): + if required in by_name and "required" not in by_name[required]: + add("error", "rfq", f"{route} field {required} is not required") + if "_next" in by_name and not by_name["_next"].get("value", "").endswith("/thank-you/"): + add("error", "rfq", f"{route} form has an invalid localized confirmation URL") + if "attachment" in by_name: + accepted = by_name["attachment"].get("accept", "") + for extension in (".pdf", ".step", ".iges", ".dxf"): + if extension not in accepted: + add("error", "rfq", f"{route} attachment field does not accept {extension}") + + for route, rel_path in CONFIRMATION_ROUTES.items(): + page_path = public_dir / rel_path + if not page_path.is_file(): + add("error", "confirmation", f"Missing confirmation page {route}") + continue + page = parse_page(page_path) + if "noindex" not in page.robots.lower(): + add("error", "confirmation", f"Confirmation page is not noindex: {route}") + if f"https://techcarbonworks.com{route}" in urls: + add("error", "confirmation", f"Confirmation page is in sitemap: {route}") + + evidence_path = public_dir / EVIDENCE_FILE + if not evidence_path.is_file(): + add("error", "evidence", "Evidence documentation page is missing") + else: + evidence_page = parse_page(evidence_path) + if "noindex" not in evidence_page.robots.lower(): + add("error", "evidence", "Candidate evidence page must remain noindex until verified") + if f"https://techcarbonworks.com{EVIDENCE_ROUTE}" in urls: + add("error", "evidence", "Noindex evidence page appears in a sitemap") + + config_path = repo_root / "config" / "_default" / "params.toml" + try: + config = tomllib.loads(config_path.read_text(encoding="utf-8")) + enabled = config.get("analytics", {}).get("enable_rfq_events") + if enabled is not False: + add("error", "analytics", "RFQ event instrumentation must remain inactive by default") + except Exception as exc: + add("error", "analytics", f"Could not validate analytics configuration: {exc}") + + for html_file in public_dir.rglob("*.html"): + content = html_file.read_text(encoding="utf-8", errors="replace") + if "analytics-events" in content or "__TCW_ANALYTICS__" in content: + add("error", "analytics", f"Staged analytics loaded while disabled: {html_file.relative_to(public_dir)}") + + for forbidden in ("/tags/", "/categories/", "/thank-you/", EVIDENCE_ROUTE): + candidates = [url for url in urls if forbidden in url] + if candidates: + add("error", "sitemap", f"Noindex route pattern present in sitemap: {forbidden}") + + for path in tracked_text_files(repo_root): + name = path.name.lower() + if name == ".env" or path.suffix.lower() in {".pem", ".key"}: + add("error", "secrets", f"Sensitive file type is tracked: {path.relative_to(repo_root)}") + continue + try: + content = path.read_text(encoding="utf-8", errors="ignore") + except OSError: + continue + for pattern in SECRET_PATTERNS: + if pattern.search(content): + add("error", "secrets", f"Potential secret pattern in {path.relative_to(repo_root)}") + break + + summary = { + "sitemap_urls": len(urls), + "required_routes": len(REQUIRED_INDEXABLE), + "rfq_routes": len(RFQ_ROUTES), + "confirmation_routes": len(CONFIRMATION_ROUTES), + "errors": sum(f.severity == "error" for f in findings), + "warnings": sum(f.severity == "warning" for f in findings), + "findings": [asdict(f) for f in findings], + } + return summary + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("public_dir", nargs="?", default="public") + parser.add_argument("--repo-root", default=".") + parser.add_argument("--json") + args = parser.parse_args() + + public_dir = Path(args.public_dir) + repo_root = Path(args.repo_root) + if not public_dir.is_dir(): + print(f"ERROR: Public directory not found: {public_dir}", file=sys.stderr) + return 2 + + report = check(repo_root.resolve(), public_dir.resolve()) + print("=" * 72) + print("TechCarbonWorks Cumulative Release Check") + print("=" * 72) + print(f"Sitemap URLs: {report['sitemap_urls']}") + print(f"Required routes: {report['required_routes']}") + print(f"RFQ routes: {report['rfq_routes']}") + print(f"Confirmation pages: {report['confirmation_routes']}") + print(f"Errors: {report['errors']}") + print(f"Warnings: {report['warnings']}") + + for finding in report["findings"]: + print( + f" [{finding['severity'].upper()}] {finding['category']}: " + f"{finding['message']}" + ) + print("\nSTATUS:", "FAIL" if report["errors"] else "PASS") + + if args.json: + Path(args.json).write_text( + json.dumps(report, indent=2, ensure_ascii=False) + "\n", + encoding="utf-8", + ) + return 1 if report["errors"] else 0 + + +if __name__ == "__main__": + sys.exit(main())