Skip to content

Instantly share code, notes, and snippets.

View panchicore's full-sized avatar
👽

Luis Pallares panchicore

👽
View GitHub Profile

Missing Dependency Check on Artifact (Finding) Custom Field Deletion

Summary

Deleting an Artifact Field (finding custom field) skips dependency checking entirely. A user can delete a field that is actively referenced in workflow nodes, breaking running executions. Model Fields have full dependency protection; Artifact Fields have none.

Impact (prod data — vmprod_17feb)

Metric Count

ModelStageParams — add .name back + null-safe

Problem

  1. Demo and HLD show params.model_stage.name but pushed code removed .name (only .cuid)
  2. params.model_stage is None when no status → AttributeError on .name/.cuid access (Luis's null pointer concern)

Fix

@panchicore
panchicore / gist_content.md
Last active February 21, 2026 17:25
TLC Transport TMS - Test Quality & Optimization Audit

TLC Transport TMS - "Mental Peace" Testing Plan

📊 Projected Metrics (Production-Grade)

Category Current State Projected State Impact
Core Service Coverage 22.4% >95% Critical: Fixes blind spots in Cost/Price engine.
Isolation Coverage ~0% 100% Critical: Proves cross-tenant data leaks are impossible.
Soft-Delete Coverage <10% 100% High: Ensures deleted data is hidden from all UIs.
Action Redundancy High Low Medium: Leaner, faster, more maintainable test suite.
@panchicore
panchicore / memoized-tickling-map.md
Created February 21, 2026 16:54
TMS: Deploy to PROD plan — /setup bootstrapper + Vercel + Supabase

Plan: Production Deploy — /setup bootstrapper + Vercel + Supabase

Goal

Deploy TMS to Vercel prod with Supabase prod DB. Provide a one-time /setup UI to create the first admin user + organization on a blank database.

Files to modify/create

Action File Purpose
Create src/app/(auth)/setup/page.tsx Server component: checks if any org exists → redirect to /login if yes, else render form
@panchicore
panchicore / outline-editing-content-blocks-v2.md
Last active February 20, 2026 23:16
Plan v2: Wire Document Outline Editor to Existing Content Block APIs

Plan v2: Wire Document Outline Editor to Existing Content Block APIs

Discovery

The backend APIs for content block mutations already exist — no new backend code needed.

Existing Backend Endpoints (routes/ui_model_document_blocks.py)

Method Endpoint Action Handler
@panchicore
panchicore / gist:90cd337d9eb09accccc38a5ec941579c
Created February 6, 2026 19:55
ValidMind Email Usage Count by Pattern

ValidMind Email Usage Count by Pattern

Summary

Pattern Count % Description
1. Celery task .delay() 13 76% Async from routes/handlers
2. Direct from route 1 6% Sync, blocks request
3. Direct from Celery task 3 18% Already async context
@panchicore
panchicore / gist:c27330409aca708f4321f8a69ca1e07d
Created February 6, 2026 19:49
ValidMind Async Email Pattern

Async Email Pattern - ValidMind

Pattern for sending emails that follows best practices and is async by default.

Flow

Route/Service                    Celery Task                      Email Notification
────────────                     ───────────                      ──────────────────
1. Call task with .delay()  →   2. Fetch entities by CUID    →   3. Build template data
@panchicore
panchicore / vmconfig-export-env-migration.md
Created February 4, 2026 21:29
VMConfig: Phasing out export_env - migration guide for #infra

VMConfig: Phasing out export_env

Why it exists

Bridge for gradual migration. Lets vmconfig be source of truth while legacy code still reads env vars.

Real example: Our email config has two code paths:

# NEW (vmconfig)
var category priority status usage_type vmconfig_key notes
FLASK_ENV core HIGH SKIPPED read 17 usages across codebase
RUN_MODE core HIGH SKIPPED read 5 usages - wsgi/api/auth_policy_updater
FLASK_DEBUG core MEDIUM SKIPPED read gunicorn_config only
PG_ENCRYPTION_KEY database HIGH PENDING read 8 usages in db/ modules
REDIS_URL database HIGH PENDING read 2 usages - messaging and events/handlers
LOG_LEVEL logging HIGH SKIPPED read structlog.py
VM_PRETTY_LOGS logging MEDIUM SKIPPED read structlog.py
EXCLUDED_LOG_MODULES logging LOW SKIPPED read structlog.py
DD_TRACE_ENABLED datadog MEDIUM DONE read datadog.trace_enabled wsgi.py and api.py
@panchicore
panchicore / _script.py
Last active July 27, 2025 00:56
extracted from https://popometer.io/ https://popometer.io/acc/setups/73 BMW M4 GT3 Snetterton https://popometer.io/acc/setups/8783 McLaren 720s GT3 Evo Laguna Seca https://popometer.io/acc/setups/9147 Nissan GT-R Nismo GT3 2018 Barcelona
from bs4 import BeautifulSoup
import quopri
import json
def extract_setups_bundle():
"""
Extract the div with class 'setups-bundle mb-5' from the HTML file
"""
# Read the HTML file