Skip to content

fix(precommit): add scripts/precommit-config.sh the hook expects (#1190)#1193

Merged
joelteply merged 1 commit into
canaryfrom
fix/precommit-config-loader
May 14, 2026
Merged

fix(precommit): add scripts/precommit-config.sh the hook expects (#1190)#1193
joelteply merged 1 commit into
canaryfrom
fix/precommit-config-loader

Conversation

@joelteply
Copy link
Copy Markdown
Contributor

Summary

claude-tab-2 noticed during #1186 work: git-precommit.sh sources scripts/precommit-config.sh on line 29 but the file does not exist. The hook silently falls through to inline defaults — "config-driven" was actually "hardcoded" + every commit printed "Configuration file not found".

Fix

Ship the config with the same defaults the hook was falling through to, plus:

Pure additive. No behavior change today; the hook now prints 'Loaded precommit configuration' instead of 'Configuration file not found'.

Card

continuum#1190

🤖 Generated with Claude Code

…#1190)

claude-tab-2 noticed during #1186 work: git-precommit.sh sources
scripts/precommit-config.sh on line 29 but the file does not exist
in the repo. The hook silently falls through to inline default
settings, which means the "config-driven" precommit is actually
"hardcoded-driven" + the sourcing block is dead code that prints
"Configuration file not found" on every commit.

This PR ships the config file with the same defaults the hook was
falling through to, plus:
- PRECOMMIT_CONFIG_VERSION schema-version field for future migration
- Doc comments naming the load-bearing flags + how to override locally
- Notes pointing at where each gate lives (some are flag-controlled,
  some are hard-coded for security reasons like the branch-state guard)

Pure additive — no behavior change. The hook will now print
"Loaded precommit configuration" instead of "Configuration file not
found", and the defaults are explicit in source rather than implicit
in the fall-through block.

Card: continuum#1190.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@joelteply joelteply force-pushed the fix/precommit-config-loader branch from 7ba4138 to 6305d3f Compare May 14, 2026 17:06
@github-actions github-actions Bot added size: S and removed size: M labels May 14, 2026
@joelteply joelteply merged commit 52ad91c into canary May 14, 2026
5 checks passed
@joelteply joelteply deleted the fix/precommit-config-loader branch May 14, 2026 17:20
joelteply pushed a commit that referenced this pull request May 14, 2026
Closes Joel beef: browser ping is pretty low bar (2026-05-14).

New test tests/precommit/chat-roundtrip.test.ts:
  1. Verifies at least one auto-responding user is seeded (catches BUG-105 family)
  2. Sends a unique probe via collaboration/chat/send into general
  3. Polls data/list collection=chat_messages with orderBy timestamp desc, limit 50
  4. Anchors on the probe by content match (sender-id and room captured)
  5. Asserts at least one reply appears in the same room, after the probe,
     from a different sender, with non-empty content

Wires into PRECOMMIT_TESTS so it runs alongside browser-ping. Window is 55s
to leave headroom under the 60s per-test cap that git-precommit.sh imposes.
Uses an explicit-question probe text because local personas filter
no-reply-needed messages aggressively (saves Metal cycles).

What this catches that browser-ping does not:
  - Cognition pipeline silently broken (the highest-value catch)
  - chat-send rejecting the probe (room missing, attribution broken)
  - Persona seed step regressed (no AI users to reply)
  - chat_messages write path broken

Validated live: Helper AI replied to the probe in 5s on a clean stack.
Repeated back-to-back runs can be slow due to Metal queue depth on local
inference; CI runs against a fresh stack and isn't affected.

Followups (sub-cards):
  - 1186 PR-2: path-tier dispatcher (run heavy tests only when relevant
    paths touched). Wires on top of codex #1193 precommit-config loader.
  - 1186 PR-3: adapter unit tests when widgets/chat/adapters/ touched
  - Test reliability: clean local-inference queue between tests OR
    target a dedicated cloud persona for deterministic reply latency

Refs 1186.
joelteply pushed a commit that referenced this pull request May 14, 2026
….sh source of truth

Codex shipped #1193 adding scripts/precommit-config.sh as the canonical
source for PRECOMMIT_TESTS. My #1186 PR-1 (chat-roundtrip test) edited
the legacy defaults branch in git-precommit.sh, which only fires when
the config file is missing.

This commit updates precommit-config.sh to include chat-roundtrip
alongside browser-ping. The defaults branch is left in sync as
belt-and-suspenders so the gate works on either path.

Refs #1186, follow-up to codex #1193.
joelteply pushed a commit that referenced this pull request May 14, 2026
Closes Joel beef: browser ping is pretty low bar (2026-05-14).

New test tests/precommit/chat-roundtrip.test.ts:
  1. Verifies at least one auto-responding user is seeded (catches BUG-105 family)
  2. Sends a unique probe via collaboration/chat/send into general
  3. Polls data/list collection=chat_messages with orderBy timestamp desc, limit 50
  4. Anchors on the probe by content match (sender-id and room captured)
  5. Asserts at least one reply appears in the same room, after the probe,
     from a different sender, with non-empty content

Wires into PRECOMMIT_TESTS so it runs alongside browser-ping. Window is 55s
to leave headroom under the 60s per-test cap that git-precommit.sh imposes.
Uses an explicit-question probe text because local personas filter
no-reply-needed messages aggressively (saves Metal cycles).

What this catches that browser-ping does not:
  - Cognition pipeline silently broken (the highest-value catch)
  - chat-send rejecting the probe (room missing, attribution broken)
  - Persona seed step regressed (no AI users to reply)
  - chat_messages write path broken

Validated live: Helper AI replied to the probe in 5s on a clean stack.
Repeated back-to-back runs can be slow due to Metal queue depth on local
inference; CI runs against a fresh stack and isn't affected.

Followups (sub-cards):
  - 1186 PR-2: path-tier dispatcher (run heavy tests only when relevant
    paths touched). Wires on top of codex #1193 precommit-config loader.
  - 1186 PR-3: adapter unit tests when widgets/chat/adapters/ touched
  - Test reliability: clean local-inference queue between tests OR
    target a dedicated cloud persona for deterministic reply latency

Refs 1186.
joelteply pushed a commit that referenced this pull request May 14, 2026
….sh source of truth

Codex shipped #1193 adding scripts/precommit-config.sh as the canonical
source for PRECOMMIT_TESTS. My #1186 PR-1 (chat-roundtrip test) edited
the legacy defaults branch in git-precommit.sh, which only fires when
the config file is missing.

This commit updates precommit-config.sh to include chat-roundtrip
alongside browser-ping. The defaults branch is left in sync as
belt-and-suspenders so the gate works on either path.

Refs #1186, follow-up to codex #1193.
joelteply added a commit that referenced this pull request May 15, 2026
* feat(precommit,#1186): add chat-roundtrip persona-reply smoke test

Closes Joel beef: browser ping is pretty low bar (2026-05-14).

New test tests/precommit/chat-roundtrip.test.ts:
  1. Verifies at least one auto-responding user is seeded (catches BUG-105 family)
  2. Sends a unique probe via collaboration/chat/send into general
  3. Polls data/list collection=chat_messages with orderBy timestamp desc, limit 50
  4. Anchors on the probe by content match (sender-id and room captured)
  5. Asserts at least one reply appears in the same room, after the probe,
     from a different sender, with non-empty content

Wires into PRECOMMIT_TESTS so it runs alongside browser-ping. Window is 55s
to leave headroom under the 60s per-test cap that git-precommit.sh imposes.
Uses an explicit-question probe text because local personas filter
no-reply-needed messages aggressively (saves Metal cycles).

What this catches that browser-ping does not:
  - Cognition pipeline silently broken (the highest-value catch)
  - chat-send rejecting the probe (room missing, attribution broken)
  - Persona seed step regressed (no AI users to reply)
  - chat_messages write path broken

Validated live: Helper AI replied to the probe in 5s on a clean stack.
Repeated back-to-back runs can be slow due to Metal queue depth on local
inference; CI runs against a fresh stack and isn't affected.

Followups (sub-cards):
  - 1186 PR-2: path-tier dispatcher (run heavy tests only when relevant
    paths touched). Wires on top of codex #1193 precommit-config loader.
  - 1186 PR-3: adapter unit tests when widgets/chat/adapters/ touched
  - Test reliability: clean local-inference queue between tests OR
    target a dedicated cloud persona for deterministic reply latency

Refs 1186.

* fix(precommit,#1186,#1199): wire chat-roundtrip into precommit-config.sh source of truth

Codex shipped #1193 adding scripts/precommit-config.sh as the canonical
source for PRECOMMIT_TESTS. My #1186 PR-1 (chat-roundtrip test) edited
the legacy defaults branch in git-precommit.sh, which only fires when
the config file is missing.

This commit updates precommit-config.sh to include chat-roundtrip
alongside browser-ping. The defaults branch is left in sync as
belt-and-suspenders so the gate works on either path.

Refs #1186, follow-up to codex #1193.

---------

Co-authored-by: Test <test@test.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant