fix(scarab): correct WHERE clause in heartbeat UPDATE#67
Open
gHashTag wants to merge 8 commits into
Open
Conversation
- Add tokio-postgres-rustls, rustls, webpki-roots to Cargo.toml - Fix Dockerfile.scarab: remove invalid -p flag - Fix scarab.rs: MakeTlsConfig -> MakeRustlsConnect (v0.13 API)
scarabs table uses 'id' as PK, not 'scarab_id'. This was causing heartbeats to fail and current_exp_id to stay NULL. Refs: current fleet shows 0 heartbeats despite running workers.
CI failures on PR #67 were: 1. cargo fmt -- --check : 15-line drift in src/bin/scarab.rs 2. smoke_train end-to-end : Cargo.lock out of sync with new tokio-postgres-rustls / rustls / webpki-roots deps; 'cargo build --locked' refused to update lockfile. This commit: cargo fmt applied + Cargo.lock regenerated. No behavioural change. Build verified locally: cargo build --release --bin scarab : clean Refs: trios-trainer-igla#67 (heartbeat schema fix + TLS support)
- Add --neon CLI argument for passing Neon database URL - Set NEON_DATABASE_URL env var when --neon is provided - Enables bpb_samples writes when called from scarab worker Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
trios-train now checks NEON_DATABASE_URL environment variable before falling back to --neon CLI flag. This allows scarab workers to pass the Neon DB URL via ENV inheritance instead of requiring the --neon argument. Previously, trios-train only read NEON_DATABASE_URL from the --neon flag, but scarab passes it via ENV. This caused results to not be written to the database (bpb_samples table). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace NoTls with MakeRustlsConnect for Neon TLS support - Add RootCertStore and TLS_SERVER_ROOTS for certificate validation - Install rustls crypto provider for rustls 0.23+ compatibility - Fixes scarab deployment failures due to TLS connection issues Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem: Heartbeats failing because heartbeat() uses
WHERE scarab_id = $2but the PK column isid.Impact:
current_exp_idstays NULL in scarabs tableFix:
scarab_id→idin WHERE clause (line 211).Diff: