Files
msd-core/gsd-core/bin/shared
Tom Boucher 8dcdcb253e fix(#4443): register hooks.commit_types (and sibling hooks.community) in config schema (#4501)
* test(#4443): failing-first regression coverage for hooks.commit_types config key

isValidConfigKey('hooks.commit_types') currently returns false and
config-set hooks.commit_types rejects with "Unknown config key",
because the key was never added to config-schema.manifest.json's
validKeys when it shipped (#3811/#4340, 1.13.0) despite being
documented (docs/COMMANDS.md) and consumed by
hooks/gsd-validate-commit.sh. This commit adds the regression coverage
only; the manifest fix lands in the next commit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* test(#4443): avoid false-positive docs-guard registration trip

The assert message for the new hooks.commit_types test mentioned
"docs/COMMANDS.md" literally, which happened to land between two
unrelated pre-existing backticks and tripped
lint-docs-guard-registration.cjs's template-literal co-occurrence
detector (a known, documented false-positive shape for that lint).
Rephrased to drop the literal docs/ path from the message; the test's
intent (documenting why the key must be valid) is unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix(#4443): register hooks.commit_types (and sibling hooks.community) in config schema

config-schema.manifest.json's validKeys never got hooks.commit_types
added when the feature shipped (#3811/#4340, 1.13.0) despite it being
documented (docs/COMMANDS.md) and consumed by
hooks/gsd-validate-commit.sh -- so config-set hooks.commit_types
rejected with "Unknown config key", and the only way to configure a
documented feature was hand-editing .planning/config.json.

While auditing every hooks.* key actually read by shipped code against
validKeys (CLAUDE.md's no-deferrals rule: a defect found anywhere in
the tree while working an issue is fixed in the current change, not
filed separately), hooks.community -- gsd-validate-commit.sh's own
opt-in gate -- turned out to have the exact same gap. Both are added
here; an audit of every hooks.* read site confirmed these are the only
two missing entries.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* test(#4443): e2e coverage for hooks.community + changeset

Closes the coverage-rigor gap the Standards review flagged: hooks.community
had only a unit-level isValidConfigKey assertion, not the same real
config-set CLI round-trip hooks.commit_types already got. Also adds the
changeset fragment the same review flagged as a missing hard requirement.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* test(#4443): use PROBE_TIMEOUT_MS instead of a bare 15000 literal

local/no-adhoc-timeout-literal (lint:ci) correctly flagged both new
spawnSync calls' bare timeout: 15000 -- this call class (a short CLI
probe against a temp fixture) is exactly what tests/helpers/timeouts.cjs's
PROBE_TIMEOUT_MS documents.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* docs(#4443): backfill changeset PR number

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: sim <sim@local>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 17:29:22 -04:00
..