fix(precommit): add scripts/precommit-config.sh the hook expects (#1190)#1193
Merged
Conversation
…#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>
7ba4138 to
6305d3f
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
claude-tab-2 noticed during #1186 work:
git-precommit.shsourcesscripts/precommit-config.shon 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:
PRECOMMIT_CONFIG_VERSIONschema field for future migrationPure 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