Skip to content

Critical Patterns — Recurring Review Findings

Patterns that have appeared 3+ times across /vt-c-4-review runs and require active awareness during development. Each entry documents the anti-pattern, the correct fix, and where it has been found.


P-001: Hardcoded Airtable Infrastructure IDs

Status: Fixed in airtable_client.py (2026-03-05) Recurrence: 4 times across reviews (first flagged by pattern-recognition-specialist)

Anti-pattern

# BAD — hardcoded table IDs
CONTACT_TABLE_ID = "tblGYmwykHGUu9r3k"
COMPANY_TABLE_ID = "tbl4U3xdsw3wTdWmI"

Airtable table IDs (tbl...) and base IDs (app...) are infrastructure identifiers that differ between production, staging, and test bases. Hardcoding them makes environment switching impossible without source changes, and leaks internal schema identifiers into version control.

Correct pattern

# GOOD — env var with production default documented inline
CONTACT_TABLE_ID = os.environ.get("AIRTABLE_TABLE_CONTACT", "tblGYmwykHGUu9r3k")
COMPANY_TABLE_ID = os.environ.get("AIRTABLE_TABLE_COMPANY", "tbl4U3xdsw3wTdWmI")
  • Use AIRTABLE_TABLE_<NAME> env vars for table IDs
  • Use AIRTABLE_BASE_ID for base IDs (already parameterised in function signatures)
  • Keep verified production defaults as the fallback so existing deployments keep working
  • Comment the verification date so staleness is detectable

Affected files

File Fix applied
plugins/ufi/src/ufi_pipeline/airtable_client.py:27-30 2026-03-05

Detection signal

Code review tools consistently flag constants matching ^tbl[A-Za-z0-9]{14}$ or ^app[A-Za-z0-9]{14}$ as hardcoded Airtable infrastructure IDs.


P-002: Hardcoded User Paths in Shared Scripts

Status: Fixed in session-start.sh (2026-03-05) Recurrence: Flagged as S-01 in review

Anti-pattern

# BAD — breaks for any user other than rolf
TOOLKIT_ROOT="/Users/rolf/01-repositories/V025-claude-toolkit"

Correct pattern

# GOOD — derives root from script location, works for any user/path
TOOLKIT_ROOT="$(cd "$(dirname "$(realpath "$0")")/../../../.." && pwd)"

When a script is a peer of its containing project (installed into a known relative path), derive the project root from $0 rather than hardcoding it.

Affected files

File Fix applied
plugins/core-standards/scripts/session-start.sh:22 2026-03-05