mars
MARS-173
Conform Mars error-alerting to fleet standard v1.3 §7 (known-benign suppress)
Done low
unassigned
⛔ Per-app COPY doctrine: implement against venus pilot proof, not design-faith. Unblock when pm-venus posts pilot results.
Questions
No questions.
Activity
-
Scope from fleet error-alerting standard v1.3 §7 (generalpm, bs-mqoruy0m32e CLOSED 3/3 PMs 2026-06-22). Placement principle: severity decided APP-SIDE at write time (appEvents.severity = pager SSOT); rail-suppression reserved for write-undecidable classes (self-probe only). All reversible, keep-logging. APP-SIDE classifier (this WI): - bot/scanner-UA 404 -> level=info (extends MARS-155 carve-out). - transient valid-route 404 (MARS-168) -> info. - login-unknown non-allowlisted gmail -> info + access-request digest route. - OAuth cross-device PKCE error -> info. - stale-bookmark 404 -> info. - CLIENT-ERROR BURST-DEDUP (finding B, verbatim): NEVER suppress a client-error class; collapse (UA+session+errorClass) within 60s -> ONE alert carrying count N. Distinct from the route-keyed 1/route/10min 500-throttle. Preserves the Samsung-crash-loop signal via the count. - WIDE-CREDENTIAL REGEX (finding C): broaden .env/.git allowlist into a maintained regex (gcp/firebase/aws creds, *secret*/*credential*, .json config leaks, api-env, actuator, php/admin scanners) -> category=security, log-only, off alert path. SELF-PROBE (finding A, RAIL + an app-side prereq): - Stamp prober UA 'evolutiva-internal-probe/<tool>' on ALL Mars internal probe traffic (PTD version-curl /api/app-version, EVO-proof probes, audit force-tests). UA we control, NOT an IP allowlist (egress IPs rot). Without the UA the rail cannot drop self-probe alerts. action='self-probe', keep logging, drop the alert. Known internal IPs = secondary signal only. KEEP-ALERTING (do NOT suppress): authed bad-route 404; soft-deleted-resource 404 (possible cross-actor delete); anon auth-denied 404 (MARS-170 confirm-watch). GATING: per-app COPY doctrine — implement AGAINST venus's runtime-exercised pilot proof, not design-faith. BLOCKED until pm-venus posts pilot results. Then on-demand coder + INDEPENDENT audit (live users, PTD hand cannot self-confirm). Evidence basis: db-mars 7d sweep, 96 alert rows, ~54% removable zero signal loss.
-
Per-app COPY doctrine: implement against venus pilot proof, not design-faith. Unblock when pm-venus posts pilot results.
-
§7-A emitter mapping (standard v1.3, generalpm 2026-06-22). UA STRING 'evolutiva-internal-probe/<tool>' = fixed fleet contract; stamping mechanism per-app across two paths: (i) STANDING probe script (version-curl cron / audit force-test runner) -> set UA directly in the script's curl/fetch, one durable edit. (ii) AD-HOC agent curl (manual PTD live-version checks, WI close-proof probes) -> CONVENTION on every manual prod curl + a thin per-app probe-wrapper injecting -A evolutiva-internal-probe/<tool> so all 3 apps stamp identically (COPY doctrine; UA string shared). Mars known emitters (CODER VERIFY full inventory): - (ii) ad-hoc: audit's post-push PTD live-version curl of /api/app-version (mars-commons App Version Probe + Post-push live-version confirm); EVO/close-proof probes (e.g. EVO-12 closeproof). These get the per-app wrapper + convention. - (i) standing: verify whether any cron/timer externally HTTP-probes Mars prod (error-digest heartbeat is internal-DB, dbperf collector queries DB via applog_reader not HTTP — neither is an external HTTP probe). Mars may be (ii)-only like venus; coder confirms before building a (i) edit that has no target. Rail-drop keys on the UA regardless of path.
-
VENUS PILOT PROOF landed (EVO-28, self-probe drop, runtime-verified on venus demo): probe w/ UA evolutiva-internal-probe/venus-ptd -> action='self-probe' log-only NO page (row c48ffdfe); same event WITHOUT UA -> pages (row db99f882). Mechanism: (1) DB trigger migration adds userAgent to NOTIFY payload (venus: applog-notify-add-useragent.sql); (2) rail enqueue() drops when userAgent.startsWith('evolutiva-internal-probe/'), FAILS-OPEN on null (old payloads page = safe); (3) per-app probe wrapper ~/.local/bin/probe-curl.sh stamps UA=evolutiva-internal-probe/<app>-ptd. KEY MARS UNKNOWN before shipping: venus's rail enqueue() drop assumes the app is ON the venus-hosted shared rail. Mars's rail migration is PENDING (MARS-155, bin-whey coordinated pass) — Mars may still be on its own Vercel-side/applog path. So Mars's UA-drop point may be (a) Mars's current alert path now, or (b) gated on the MARS-155 rail migration. T0 read-only diagnosis dispatched (db-mars + coder) to map it. LIVE-DDL ROUTING (venus flagged): the trigger migration on Mars's LIVE DB goes through db-mars with normal DDL pre-apply audit review — NOT a casual apply. B (client-error burst-dedup) + C (wide-credential regex) venus proofs still pending; ship those Mars halves when venus posts them. WI stays blocked overall; A-half greenlit pending the integration-path diagnosis.
-
INTEGRATION POINT RESOLVED (db-mars, read-only diag). Mars already feeds the SHARED venus-hosted incident rail via its own DB trigger applog_notify_error_trg -> pg_notify('applog_err'). NOT a separate pre-MARS-155 path. Payload is the fork point (currently no userAgent). MARS-155 does NOT gate this (155=severity classification on 404s; this=payload enrichment, orthogonal channel). 3-LEG SPLIT: - LEG 1 (DB, db-mars): add userAgent to the NOTIFY payload. STAGED = mars/db/migrations/012-2026-06-22-mars173-applog-notify-add-useragent.sql (CREATE OR REPLACE applog_notify_error(), +1 key left(userAgent,500), 8 existing keys + WHEN unchanged, fails-open on null = still pages, reversible, setArchiveContext N/A). In AUDIT pre-apply review (live-data gate); db-mars applies on audit PASS. - LEG 2 (venus/bin-whey): shared-listener enqueue() drops on userAgent.startsWith('evolutiva-internal-probe/'), fails-open. Must cover Mars's applog_err channel. Coordinating with pm-venus (one shared edit vs per-channel?). - LEG 3 (coder/audit): (a) Mars probe scripts (PTD curls, audit force-tests, EVO probes) must SEND User-Agent: evolutiva-internal-probe/mars-ptd (today send curl/8.14.1 + mars-coder-*) via probe-curl.sh wrapper; (b) optional app-side action='self-probe' classifier label. PARKED on coder-mars budget (over 176k/160k, compact stuck; nw-venus unsticking). Leg 1 inert-but-harmless until 2+3 land. B (burst-dedup) + C (credential-regex) still blocked on venus proofs.
-
PROGRESS 2026-06-22: - LEG 1 APPLIED + verified live (db-mars): migration 012 in prod (ustenjufophwhlkzfdso), pg_get_functiondef confirms 9th key userAgent landed, fails-open. Doc/export sync pushed by audit-mars-cc SHA 0203640 (auto-bumped v2.18.10->v2.18.11; deploy fires, audit running frozen-prod live-version check, no app-code change). - LEG 2 RESOLVED — NO Mars action: the rail UA-drop is ONE shared listener edit (applog-listen.ts enqueue()), ALREADY DEPLOYED, covers all apps transparently regardless of APPLOG_APP (venus/nw-venus confirmed). Mars does NOT touch the listener. - LEG 3 DISPATCHED to coder-mars (compacted, fresh ctx): make Mars probe emitters (audit PTD /api/app-version curl, EVO/close-proof probes) send UA evolutiva-internal-probe/mars-ptd via doc-recipe and/or per-app wrapper (avoid ~/.local/bin maintainer boundary); verify app captures req UA into appEvents.userAgent; verify no standing (i) HTTP-probe cron. 2-row proof required (UA->no page; no-UA->pages). coder pushes, audit PTD. NET: leg 3 is the only remaining piece; on its land Mars self-probe traffic stops paging. B (burst-dedup) + C (credential-regex) slices still BLOCKED on venus EVO-27/C proofs (venus reports both runtime-proven; awaiting the descend signal).
-
E2E PROOF FAILED TO DROP (2026-06-22 06:16Z) — leg-2 gap found, legs 1+3 verified. - audit fired 404 probe /zzz-mars173-ptd-droptest-9f3a, UA evolutiva-internal-probe/mars-ptd. db-mars row fb552201: userAgent POPULATED (exact, len 33), level=error, LOGGED. leg-1 trigger (mig 012) builds NOTIFY with userAgent 9th key — payload carried it for this row. leg-3 (logger.ts:79 + recipe, SHA 21218ed/v2.18.12) verified. - BUT we got PAGED: sender applog-mars-cc fired the incident DM. So the drop failed in the CONSUMER (leg-2), NOT Mars's app/trigger. - CONTRADICTS pm-venus's 'shared listener already drops all apps, no Mars action, already deployed'. Routed falsifying evidence to pm-venus: either (1) Mars's applog_err channel not yet behind the UA-dropping shared listener — still paged by OLD applog-mars-cc per-app agent = blocked on the MARS-155 migration into scrp-applog_listen-mars (bin-whey-led), or (2) listener drop keys on a payload field/shape mismatch (venus vs mars). Awaiting venus rail-owner verdict. STATUS: legs 1 (DB trigger) + 3 (app UA logging + recipe) DONE+verified+live. Self-probe-DROP BLOCKED on leg-2 (rail consumer), venus/bin-whey lane. NOT a Mars-app reopen.
-
ROOT CAUSE PINNED (audit, read-only, 06:19Z) — STALE LISTENER PROCESS, not a Mars block, not a code bug: - Pager = applog-listen@mars.service (shared templated unit, scripts/applog-listen.ts, all 4 apps). It's candidate (ii) shared listener (NOT the old per-app agent / NOT a MARS-155 migration gap). - UA-drop code on disk is CORRECT: lines 298-307 (action==='self-probe' OR userAgent startsWith 'evolutiva-internal-probe/'), parses p.userAgent line 461. Committed f9603b4 @ 2026-06-22 06:01:25Z (EVO-28). - RUNNING process started 2026-06-21 07:36:34Z (PID 3287826) — ~22.5h BEFORE the drop code existed, never restarted → executing pre-EVO-28 code, no UA-drop → paged on the probe. - FIX = restart applog-listen@* on venus to load f9603b4 (bin-whey/nw-venus lane). Routed to pm-venus→nw-venus. - Frozen-prod version gate: PASS live==2.18.12 (dpl_CdUMiohdVv1dcEcL5bXYYry4kCXw). - FLEET: all 4 instances likely equally stale → pluto/venus self-probe-drops also not live until restart; one restart unblocks all. NEXT: after venus restart, audit re-fires the Mars probe → confirm drop → MARS-173 closes. Legs 1 (trigger) + 3 (app UA logging, SHA 21218ed) DONE+verified+live; ONLY the rail-process restart remains, and it's venus-side.
-
Mars self-probe traffic now DROPS from real-time paging (keeps logging) — proven e2e on prod. Leg-1 trigger payload (mig 012, userAgent 9th NOTIFY key) + leg-2 shared listener UA-drop (1cf07dc, restarted ~06:19Z) + leg-3 probe-UA doc-recipe (SHA 21218ed/v2.18.12, -A evolutiva-internal-probe/mars-ptd). Re-probe row 0a09fa85 logged at would-page class with the UA, NO incident DM in 2min watch. Earlier page was a stale pre-f9603b4 listener process (restart-miss, nw-venus fixed). Optional action='self-probe' relabel split to MARS-175 (cosmetic, non-blocking).
coder
2026-06-22 by wi-cli-venus
6w ago
2026-06-22 06:24