GAUNTLET (Titan phase 15 audit) flagged two FAIL-level rule-1 violations in src/db/connection.ts that are out of scope for phase 15's commit (which is narrowly scoped to the openReadonlyWithNative resource-leak ordering bug + engine-resolution dedup, per sync.json's phase-15 label):
findDbPath (lines 263-327): halstead.effort=30574.33 (exceeds FAIL threshold of 15000); cognitive=24, cyclomatic=15 (exceed WARN).
openRepo (lines 387-437): halstead.effort=20067.26 (exceeds FAIL threshold of 15000); cognitive=16, cyclomatic=12 (exceed WARN).
Neither function is targeted by any other phase in the current sync.json execution plan (connection.ts appears only once, at phase 15). Filing this so the FAIL-level complexity findings aren't silently lost.
Recommendation: decompose findDbPath's directory-walk/ceiling logic and openRepo's native-fallback branching into smaller named helpers, verified against codegraph complexity --file src/db/connection.ts --health -T --json before/after.
GAUNTLET (Titan phase 15 audit) flagged two FAIL-level rule-1 violations in
src/db/connection.tsthat are out of scope for phase 15's commit (which is narrowly scoped to the openReadonlyWithNative resource-leak ordering bug + engine-resolution dedup, per sync.json's phase-15 label):findDbPath(lines 263-327): halstead.effort=30574.33 (exceeds FAIL threshold of 15000); cognitive=24, cyclomatic=15 (exceed WARN).openRepo(lines 387-437): halstead.effort=20067.26 (exceeds FAIL threshold of 15000); cognitive=16, cyclomatic=12 (exceed WARN).Neither function is targeted by any other phase in the current sync.json execution plan (connection.ts appears only once, at phase 15). Filing this so the FAIL-level complexity findings aren't silently lost.
Recommendation: decompose
findDbPath's directory-walk/ceiling logic andopenRepo's native-fallback branching into smaller named helpers, verified againstcodegraph complexity --file src/db/connection.ts --health -T --jsonbefore/after.