1f7ec15f12
feat(lean): add logarithmic viscosity coordinates to NKHodgeFAMM
...
Adds logViscosityRatio, log_viscosity_monotone, and ν_eff_monotone
to Semantics/NKHodgeFAMM.lean section 6b. The adaptive viscosity law
ν_eff = ν₀*(1+μ) is multiplicative in ν₀ and additive in scar density μ;
taking λ = log(ν_eff/ν₀) = log(1+μ) turns the multiplicative feedback into
an additive coordinate. This gives nlinarith a direct handle on viscosity
monotonicity and connects the module to Kritchevsky's "Everything Is
Logarithms" framing (SilverSight CITATION.cff).
Also marks a few pre-existing unused variables with underscores to silence
the linter.
Build: 8316 jobs, 0 errors (lake build Semantics.NKHodgeFAMM)
2026-06-22 01:21:58 -05:00
Brandon Schneider
7eda71868a
refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module
...
Creates 4-Infrastructure/shim/rds_connect.py with a single connect_rds()
function that resolves connection parameters in priority order:
1. explicit kwargs
2. DATABASE_URL env var (postgres://user:pass@host:port/dbname?sslmode=...)
3. individual RDS_* env vars (RDS_HOST, RDS_PORT, RDS_USER, etc.)
4. built-in defaults
Auth resolution (when password is empty or RDS_IAM=1):
1. RDS_IAM_TOKEN env var (pre-computed)
2. boto3 SDK generate_db_auth_token (preferred)
3. subprocess aws rds generate-db-auth-token (fallback)
4. RDS_PASSWORD env var (non-IAM)
Replaces 8 connection pattern variants across 14 active shims:
- subprocess + RDS_IAM_TOKEN fallback: pist_trace_classify_mcp, joint_classifier,
pist_prove_and_classify, ingest_57_flexures
- boto3 SDK: ene_wiki_body_reingest, ene_migrate_and_tag, dataset_ingest_rds
- subprocess + RDS_PASSWORD: batch_embed_artifacts, sync_wiki_to_rds, seed_flexure_dataset
- RDS_IAM_AUTH: pist_classify
- bashrc parsed: credential_loader
v1.4a benchmark confirmed at 100% after refactor.
2026-05-26 15:09:34 -05:00
Brandon Schneider
436e5ae8ca
feat(pist): flexure features v2 — full spectral profile per joint
...
- Each flexure now stores: spectral_gap, adjacency_eigenvalue_max/min,
laplacian_eigenvalue_max/min, laplacian_zero_count, singular_value_max,
matrix_size, rank, density, trace, frobenius_norm
- feature_version: 'flexure-spectrum-v2' in decision_signals
- v1 classifier results preserved (52.6% tactic, 50.0% joint, 84.2% RRCShape)
- Spectral features enable richer distance computation as dataset grows
- Old flexures cleared and re-ingested with full spectra
- Session: ae31d595-0535-4a0c-9d41-af9c0357dba1
2026-05-26 11:00:31 -05:00
Brandon Schneider
0f15842507
feat(pist): joint-based classifier — 84.2% RRCShape from flexure motifs
...
- Joint library classification: nearest-motif from ene.flexures
- Leave-one-flexure-out evaluation on 38 joints
- RRCShape: 84.2% (baseline 60.5%) — ★ highest accuracy seen
- Domain: 76.3% (baseline 60.5%)
- Tactic family: 52.6% (baseline 31.6%)
- Joint label: 50.0% (baseline 13.2%, 3.8× baseline)
- Simple 5-dim feature vector + nearest-neighbor
- Story: new proof traces can find similar stored joints and get predictions
2026-05-26 10:56:01 -05:00