basquetWi + New ticket
mars MARS-799

Record the node-pg error code, elapsed ms and furthest connection phase (DNS/TCP/TLS/SCRAM-start/SCRAM-done) per failed acquisition attempt - the post-failure breaker snapshot cannot attribute a layer and that is what MARS-787 is blocked on

Done normal cmcoder-mars-cc

MARS-787 is blocked on LAYER ATTRIBUTION, not on a credential: db-mars-ca already obtained Supavisor logs (incomplete SCRAM-final handshakes, client socket closures) and their verdict today is that neither those nor the breaker counters distinguish client-side stall from network/TCP/TLS/DNS/auth from Supavisor from upstream DB. The breaker snapshot is taken POST-failure, which is the structural reason it cannot attribute: by the time it is written, the attempt that failed is gone. What is missing is app-side and needs no Supabase access. Per failed acquisition attempt (there are exactly 2 before the breaker opens, and currently neither is recorded anywhere), capture: the node-pg error code and message verbatim, elapsed ms from attempt start to failure, and the furthest phase reached. The phase is the discriminator db-mars-ca named and it is observable from the client: DNS resolution completed, TCP connect completed, TLS handshake completed, SCRAM exchange started, SCRAM completed. A failure that never completes TCP is a network/DNS verdict; one that reaches SCRAM-start and dies is the Supavisor handshake class already seen in their logs; one that completes SCRAM and still times out is upstream. Each of those is a different owner, and today all three produce the identical row. Also capture the elapsed time against the configured connectionTimeoutMillis, so a timeout firing EARLY (well under its own limit) is distinguishable from one firing at its limit - those are different faults and the current row cannot tell them apart either. Constraints: this is a telemetry change only, no pool-size and no connectionTimeout change - db-mars-ca has twice declined to justify a config change and that still holds. Do not add a test-data flag or a dev-only branch; the path that needs instrumenting is the production one. Writes go through the existing shared log path, no new table. Nothing caller-supplied enters appEvents (standing ruling msvnjtzzqp5k) - error code and phase are server-side vocabularies, and the phase must be logged as a fixed code from a closed set defined in the app, never a free-text driver string. Relation to existing rows: MARS-783 (stamp breaker telemetry with deployment identity and a trip generation) is the correlation half of the same gap and should land with or before this; this row is the attribution half. Together they are what lets the NEXT trip attribute itself with no privileged read. Acceptance: a forced failure - point the pool at an unroutable host or a wrong port in a throwaway local run, NOT in production - produces a row naming the phase, and the three phase classes above are each seen to produce a DIFFERENT code before this is called done. A phase field that has only ever been observed with one value is a green line, not a control.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • support-evolutiva-cc created · 1w ago
  • support-evolutiva-cc note · 1w ago
    Unblocks MARS-787 (p1, blocked on layer attribution). Filed off db-mars-ca 2026-10-06 12:37Z verdict.
  • coder-mars-cc assigned · 1w ago
    coder-mars-ca
  • coder-mars-cc note · 1w ago
    Refused by coder-mars-cc 2026-10-06: wrong lane - Mars coder lane was handed to coder-mars-ca by Elazar order today. Reassigned to coder-mars-ca together with MARS-783 (the correlation half, which the row says lands with or before this).
  • coder-mars-ca statusChanged · 1w ago
    Source-level instrument feasibility checked against installed pg 8.23.0/pg-pool: Pool accepts custom Client constructor; Client.connection emits TCP connect, SSL upgrade and authenticationSASL/Final/readyForQuery events, and initial socket emits DNS lookup. Pool wraps connection-timeout errors with cause (phase metadata can survive via cause); pool-wait timeout has no client phase. Plan a bounded closed-set phase tracker on the production Client path and force local failures for TCP, SCRAM-start and SCRAM-done before claiming acceptance. No code or config change yet; MARS-783 trip identity committed locally first.
  • coder-mars-cc note · 1w ago
    coder-mars-cc 2026-10-06 context for the implementer: 10 of 11 breaker trips coincide with Supavisor SCRAM-first/final handshake timeouts (zero at a full-day baseline); 10-06 12:24 is a client socket close during auth_scram_first_wait 651ms before the 500. The phase field's most valuable split is therefore TLS-done vs SCRAM-started vs SCRAM-done, plus elapsed vs connectionTimeoutMillis - that separates a client that stalled before sending SCRAM from one whose SCRAM reply never came back. Breakdown per trip on MARS-769.
  • pmmaster-evolutiva-cc assigned · 1w ago
    coder-mars-cc
  • pmmaster-evolutiva-cc note · 1w ago
    pmmaster 2026-10-06: reassigned from coder-mars-ca (saturated on 736/797) to coder-mars-cc, which now holds the classification. All 11 breaker trips classified back to 09-16: 10 of 11 coincide with Supavisor SCRAM handshake timeouts; only 09-21 and 09-25 00:32 also carry statement-timeout bursts (43, 22); 09-24 14:12 shows nothing DB-side; and the Oct-5 instance-wide stall produced NO trip and no SCRAM timeouts. So the trips are a HANDSHAKE-PHASE failure and are this row's target, while the stall class is capacity and sits on MARS-769's Elazar ask. The two were one undifferentiated class until tonight.
  • coder-mars-cc note · 1w ago
    Built + rebased on 2cab867 (MARS-783 tripId kept; breaker-open detail adds connectionTimeoutMs + failures[{kind, attempt{furthestPhase,furthestPhaseAtMs,elapsedMs,timeoutMs,errorCode,errorMessage}}]; Pool uses TracedClient, connectionTimeoutMillis 10000). Local forced failures: refused->dns, silent->tcp, sasl stall->scram-start, auth-ok stall->scram-done; forced red with plain Client (5/6 fail). Push blocked by the hook, not this diff: (1) gitpush.sh exports ONLY_PATHS after the hook, so the whole-tree refdata gate fired on untracked 183/184 - reported to bin-venus-cc; (2) coder-mars-ca's untracked MARS-776 supersede-core fails self-check-registry - asked them to register or move it.
  • coder-mars-cc completed · 1w ago
    faaf0f8 / v2.85.20 live (dpl_5dTzGAdHBPxdeahNZjNqXyuyXtv2, version matches remote package.json). Class-S self-PTD. Audit diff review asked of audit-general-ca (no audit-mars live). Production pairing unexercised until the next real trip.
  • coder-mars-cc commit · 1w ago
    d1053b5 v2.85.21 fixes audit-general-ca BLOCK on faaf0f8: phase labels name the message RECEIVED (tls-started, sasl-challenge, sasl-continue, auth-ok), never a reply sent; errorMessage removed from the trace, which now carries only furthestPhase, furthestPhaseAtMs, elapsedMs, timeoutMs, errorCode. New key-set test was forced red with errorMessage re-added, then green. PTD: live /api/health 2.85.21 = remote main package.json, deploymentId dpl_5Snp3V59rLNNZAo3ywGezWGHH1WD. Deploy-status read NOT obtained: gitpushvercelstatus.sh reports no deployments for the project and Vercel MCP 404s the id - instrument fault reported to bin-venus-cc. Not exercised: TLS path, and no outbound-send or secureConnect milestone is observed. Re-review pending.
  • coder-mars-cc audit-finding · 1w ago
    audit-general-ca PASS:d1053b5 v2.85.21, source-only. Limits per reviewer: TLS and outbound-send milestones unobserved; no production breaker trip or appEvents delivery proven.
  • coder-mars-cc verified · 1w ago
    Deploy-status read obtained through GitHub, since the Vercel API path is broken (see bin-venus-cc report). The Vercel commit status for d1053b5 is success, with target_url id 5Snp3V59rLNNZAo3ywGezWGHH1WD, which equals the live /api/health deploymentId dpl_5Snp3V59rLNNZAo3ywGezWGHH1WD. The GitHub deployment record is Production 6885773298. PTD bound on deploymentId plus version 2.85.21.
bug
1w ago by support-evolutiva-cc
1w ago
2026-10-06 13:42