Repository navigation
chore: initialize no-mistakes gate - #1
Conversation
Deploy e testeTeste no ar (só Testado na URL ao vivo (Chromium headless; GTM e pixel Oros bloqueados no teste para não gerar tráfego falso nas contas reais; o pedido ao |
What this PR is
Live test copy (deployed by Firstmate, What changed in the quiz file (
|
| Before (live) | After (this PR, local wrangler dev) |
|
|---|---|---|
| Performance score | 66 | 96 |
| First Contentful Paint | 3.87 s | 1.87 s |
| Largest Contentful Paint | 23.3 s | 2.58 s |
| Cumulative Layout Shift | 0.015 | 0.018 |
| Total Blocking Time | 0 ms | 0 ms |
| Page weight | 4.28 MB | 0.50 MB |
| Requests | 9 | 10 |
How it was measured: Lighthouse 13.5, mobile preset, simulated slow 4G, 5 runs each (before: 66 x5; after: 96 x5). GTM, the Oros pixel and the Meta Pixel were blocked during the runs so test traffic does not hit Resolve's real GA4, Google Ads, TikTok or Meta accounts. Those third-party scripts add their own weight in real life. "After" is measured locally because I was told not to deploy; it still uses the real Workers asset server (gzip and the new headers apply). INP needs real user input, so Lighthouse does not report it; TBT is 0 ms.
Main problem before: the hero image was a 3.9 MB GIF and it was the Largest Contentful Paint. Other issues: Google Fonts CSS blocked the first paint (about 1 s), and the logo had no width and height.
What I changed (nothing visible, nothing in the copy):
- Hero GIF (3.9 MB) replaced by an MP4 (214 KB). The quiz code already supports a video hero. On sampled frames the MP4 matches the GIF (SSIM 0.97). Risk to know: iPhones in Low Power Mode can refuse to autoplay video, so the hero may show as a still image there.
- Google Fonts CSS now loads without blocking the first paint (same font, same
display=swap). - Logo gets
widthandheight(no layout jump). _headersfile: images and the video are cached for 30 days. The HTML is still revalidated every time. When an image changes, use a new file name.
Left alone: the HTML is still 236 KB over the wire because 280 KB of it is the logos embedded as text (EMBEDDED_LOGOS). Fixing it means moving them to separate lazy-loaded files, which changes code, so I did not do it. About 28 KB of unused JavaScript and 13 KB of unused CSS are also left.
2. Does Resolve save leads in Firestore? Evidence from the live site
I ran the real https://resolveconsorcio.com.br/quiz/ and the home page in a headless browser with a fake lead ("TESTE EVIDENCIA NAO CONTATAR"). I intercepted the request in the browser, so nothing reached Resolve's server. I did not write to or read from that endpoint. The only call I made to it directly was a CORS OPTIONS preflight, which stores nothing.
The request the quiz sends
- URL:
https://us-central1-micro-edge-399720.cloudfunctions.net/endpoint-firestore-get-post?ticket=<TICKET> - Method
POST,Content-Type: application/json. - Host parts: region
us-central1, Google Cloud project idmicro-edge-399720, function nameendpoint-firestore-get-post. The server answers as Google Frontend and allows any origin (access-control-allow-origin: *, methods GET, POST, OPTIONS). - Fields sent (captured):
ticket, event_id, page, nome, administradora, administradora_aceita, valor_pago, status_carta, telefone, fbclid, fbp, gclid, wbraid, gbraid, tblci, ip_address, user_agent, event_source_url, referrer, utm_source, utm_source_origin, link_quebrado, utm_medium, utm_campaign, utm_term, utm_content. Example:page: "quiz",administradora: "ITAU ADMINISTRADORA DE CONSORCIOS LTDA",valor_pago: "20.000 a 30.000",utm_source: "teste". - When it fires on
/quiz/: right after the name step (when the "analysing" screen starts; in my run 7.1 s after page load, at the click on "Ver meu resultado"); again when a non-accepted lead types the phone; again on the WhatsApp click if no save succeeded; and when the page goes to the background if no save succeeded. One retry on a network error. - When it fires on the home page: at page load (no name or phone yet), again 2 s later to add IP and
_fbp, and on a WhatsApp click or page hide if not yet saved. Same endpoint, sameticket,page: "alcada-maxima". - The WhatsApp text starts with
Ticket: <ticket>. That ticket is the key that ties the chat to the saved lead.
Where the code is (in the HTML Resolve serves; line numbers are for the HTML as served on 2026-10-21):
/quiz/: inline scriptCONTROLLER + TRACKING; endpoint constant at line 392;buildPayloadline 585;saveToFirestoreline 600;fone-nexthandler line 575;runAnalysisline 631; page-hide handler line 614.- Home:
sendDataline 1383; endpoint URL at line 1412;ensureSavedline 1436;init()line 1466.
Proven vs. guessed
- Proven: the request, URL, method, field names and timing above (captured from the live pages). The endpoint is a Google Cloud Function. The pages' own code comments say Firestore ("garante o registro do ticket no Firestore", "o Firestore reflete o estado final (upsert pelo mesmo ticket)",
console.error("Firestore error:")), and the function name contains "firestore". Resolve's data doc fortrusted.posthog_funnel_normalizedalso says "UTMs: Firestore tem prioridade, PostHog é fallback" and thatlp_variantis taken frompage_url (Firestore), which is consistent with the fields above (event_source_url,utm_*). - Not proven: that the function really writes into a Firestore database (I cannot see the server code or the project), and that the project
micro-edge-399720belongs to Resolve and not to a data partner. I only know Resolve's own site sends its leads there. Also not proven: that ChatGuru or Pipedrive read from it (a code comment says a downstream worker uses it and avoids polluting Pipedrive). - Side effect to disclose: my first probe runs loaded the live pages without blocking anything, so Resolve's normal analytics saw a few extra page views, and the home page created two empty tickets at load (no name or phone). The quiz lead POST was never sent for real.
Status of the Firestore change in the quiz: NOT done yet. I drafted it (same endpoint, same fields, same moments, keyed by the ticket), but the session's safety check blocked adding code that sends a lead's name, phone and IP to an endpoint whose owner I could not verify. See the status note: it needs an explicit go-ahead.
3. Oros pixel
Confirmed in data-ingestion (cloudflare/public/pixel.js): init() (line 382) returns without sending anything if window.DataLake.projectId or platform is empty, and every send goes to <endpoint>/tracker/pixel/<projectId> (line 426; default endpoint https://workers.orosdata.com, proxied by cloudflare/workers/pixel-proxy to api.orosdata.com/webhooks/tracker/pixel, which rejects an id shorter than 3 characters). The quiz already sets platform: 'pixel'.
To turn it on for Resolve you need:
- A Resolve project in the Oros platform and its projectId.
- That value in
QUIZ_TRACKING.pixelProjectIdinapps/quiz/public/index.html, then a deploy.
Nothing else in the quiz changes. The partner is installing the Oros pixel in Resolve's Cloudflare tomorrow and will send the projectId.
Still open
- WhatsApp number and privacy policy URL (João).
- Firestore save: needs the explicit go-ahead above.
- Event names vs the GTM container: see the event table in the comment below; the decision is the captain's.
- Custom domain
quiz.resolveconsorcio.com.br: steps are inapps/quiz/README.md, only after approval. - Note for the Firestore work: Resolve's data doc gets
lp_variantfrom the page path. The new quiz will live at/onquiz.resolveconsorcio.com.br, not/quiz/.
Event table: Resolve's site, the GTM container, and the new quizRead on 2026-10-21 from the live pages ( One surprising finding first: the live A. What Resolve's current site sends today
B. Inside GTM-MB9ZWZTW (11 tags, 2 of them paused)
The dataLayer variables the TikTok tags read: C. What the new quiz sendsEvery event below goes to
D. Mapping: which quiz event would fire each tag, and does it fire today?
Recommendation (simplest option)Do not rename anything in the quiz. Reasons: today's site does not fire the three GTM custom events either, so nothing is lost; the new names are the Oros standard.
|
…efuse ambiguous delimiter shapes (kunchenguid#1) * fix(herdr-lab): place --session before the child-argv delimiter `agent start ... -- <child argv...>` always got a trailing --session appended after --, so Herdr never consumed it and the child process received it instead - meaning Herdr could fall through to the live default session for agent-start calls. fm_herdr_lab_raw now places exactly one --session immediately before -- for that shape and still appends it for every ordinary call. fm_herdr_lab_cli rejects multiple delimiters, a delimiter on any command other than agent start, and agent start without a delimiter plus non-empty child command, before any Herdr call is made. Updated the brief scaffold and backend doc wording that claimed the selector is always trailing. * no-mistakes(document): note run's delimiter-shape refusals in herdr-backend doc * no-mistakes(review): refuse option before child-argv delimiter; collapse raw invocation * no-mistakes(review): only treat first -- as delimiter; child argv untouched
… links (kunchenguid#1) * fix(ci): cite the published history's commit SHAs and resolve the private-projects links The history rewrite changed every fork-own commit SHA, so the fork-surface manifest and three docs still named commits that no longer exist and the declared fork surface check failed. Each reference now names the matching commit on the published default branch at the same abbreviation length. None of the referenced commits was dropped. The private-projects links in docs/configuration.md pointed at an anchor no heading produces; they now target the typed dispatch resolution section that holds that list, as the never-send list links already do. * no-mistakes(review): Correct wholesale re-base prose to cite only published commits
|
Visual re-check of the T-focus and text-wrap fixes (packaged Windows build of this branch, portrait 1440x2561 display):
Both still need the owner's own look on their screen. No problems were seen in this pass. |
Owner decisions applied during reviewThe review raised questions only the owner could settle. Firstmate relayed the owner's decisions on 2026-11-12, and the pipeline applied them:
These answers settle the three requirement conflicts named in the risk assessment below. Where the sources disagree (the newest owner decision wins)
|
…ve run scripts' (kunchenguid#1) from fm/native-run-lease-session into main Reviewed-on: https://git.ghazni.xyz/ghazni/firstmate-dsh/pulls/1
Intent
Put the firstmate repo itself behind the no-mistakes gate: install the gate (no-mistakes init skill files) and codify in AGENTS.md that tracked changes to this repo ship through the pipeline with the captain's merge approval
What Changed
no-mistakesskill files for Claude and opencode agents so this repo can drive the validation gate.no-mistakespipeline on a branch and still require the captain's explicit merge approval.Risk Assessment
✅ Low: The branch only adds generated no-mistakes skill documentation and one AGENTS.md instruction line, with no executable code or material behavioral risk.
Testing
Confirmed the target commit adds both no-mistakes skill entrypoints, codifies the repo-level no-mistakes gate in AGENTS.md, verifies the local no-mistakes environment with doctor, and records byte-identical skill-file evidence; no UI surface exists for this repository initialization change, so no screenshot was applicable.
Evidence: No-mistakes gate initialization verification transcript
Source: No-mistakes gate initialization verification transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
git diff --name-status ccdea30b8c89e5725695e35c54b414e5b3509b5d..cf04fa8245e92d09959e975f435fd33755af1030 -- AGENTS.md .claude/skills/no-mistakes/SKILL.md .agents/skills/no-mistakes/SKILL.mdrg -n "This repo is itself behind the no-mistakes gate|name: no-mistakes|user-invocable: true" AGENTS.md .claude/skills/no-mistakes/SKILL.md .agents/skills/no-mistakes/SKILL.mdno-mistakes doctorshasum -a 256 .claude/skills/no-mistakes/SKILL.md .agents/skills/no-mistakes/SKILL.mdandcmp -s .claude/skills/no-mistakes/SKILL.md .agents/skills/no-mistakes/SKILL.md✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.