You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bump ghook 0.2.2 -> 0.3.0. Add install_method and install_source_url to
--diagnose output, sourced from an optional .ghook-install.json sidecar
next to the binary. Adds the v2 schema; v1 stays as a frozen historical
schema. Adds a release-time guard that fails the workflow if the pushed
ghook-v{X} tag version does not match crates/ghook/Cargo.toml, closing
the drift mode in #4 that broke the public installer GitHub-asset
lookup. Also folds in the unreleased 0.2.2 #141 fix (preserve non-stop
block JSON.
Refs #4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
EOF
)
Copy file name to clipboardExpand all lines: CHANGELOG.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,26 @@ All notable changes to gobby-cli are documented in this file.
7
7
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
8
8
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
9
10
+
## [0.3.0] — gobby-hooks
11
+
12
+
### Added
13
+
14
+
#### gobby-hooks
15
+
16
+
-**Diagnose schema v2 with install provenance** — `ghook --diagnose` now emits two new fields, `install_method` and `install_source_url`, and stamps the output with `schema_version: 2`. Both fields are sourced from an optional sidecar file, `.ghook-install.json`, written by the installer next to the `ghook` binary. When no sidecar is present (e.g. plain `cargo install gobby-hooks`), both fields are `null` — so consumers can identify which install path produced a given binary in bug reports. The new schema lives at `crates/ghook/schemas/diagnose-output.v2.schema.json`; the v1 schema file is preserved unchanged as a frozen historical schema for tools that pinned to v1. The Gobby installer is the canonical sidecar writer; see `docs/guides/ghook-development-guide.md` for the full contract. (#4)
17
+
18
+
### Changed
19
+
20
+
#### CI/CD
21
+
22
+
-**Release-time tag/version alignment guard** — the `release-ghook` workflow now fails fast if the pushed `ghook-v{X}` tag's version suffix doesn't match the version in `crates/ghook/Cargo.toml`. This closes the drift mode that produced [GobbyAI/gobby-cli#4](https://github.com/GobbyAI/gobby-cli/issues/4), where the public installer's `ghook-v{version}` GitHub-asset lookup could silently miss because the tag, crate version, and release name had diverged. The guard runs before clippy/tests so a misaligned tag never reaches crates.io or the GitHub release. (#4)
23
+
24
+
### Fixed
25
+
26
+
#### gobby-hooks
27
+
28
+
-**Preserve non-stop block JSON** — folded forward from the unreleased 0.2.2 prep: `ghook` no longer collapses non-Stop block responses to a bare `Blocked by hook` message; the original block JSON is preserved for downstream consumers. (#141)
Copy file name to clipboardExpand all lines: crates/ghook/README.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,13 @@ Exit codes:
25
25
## Schemas
26
26
27
27
-`schemas/inbox-envelope.v1.schema.json` — what lands in the inbox.
28
-
-`schemas/diagnose-output.v1.schema.json` — what `--diagnose` prints.
28
+
-`schemas/diagnose-output.v2.schema.json` — what `--diagnose` prints. Adds `install_method` and `install_source_url` fields sourced from an installer-written sidecar (`.ghook-install.json`, next to the binary).
29
+
-`schemas/diagnose-output.v1.schema.json` — frozen historical schema for the 0.1.x and 0.2.x diagnose output. Kept for tooling that pinned to v1.
29
30
30
-
Both are validated in unit tests.
31
+
The active schemas (envelope v1, diagnose v2) are validated in unit tests.
32
+
33
+
## Install provenance
34
+
35
+
`ghook --diagnose` reads an optional sidecar file named `.ghook-install.json` from the same directory as the running binary. When present, its `install_method` and `install_source_url` fields surface in the diagnose output so bug reports can identify how a given binary got installed (GitHub release, `cargo-binstall`, `cargo install`, etc.).
36
+
37
+
The Gobby installer writes this sidecar atomically every time it places a `ghook` binary. Manual installs (e.g. plain `cargo install gobby-hooks`) leave both fields as `null`. See `docs/guides/ghook-development-guide.md` for the contract.
"description": "Output of `ghook --diagnose --cli=<c> --type=<t>`. Schema version 2 — adds install_method and install_source_url for install-provenance reporting. v1 fields are unchanged.",
6
+
"type": "object",
7
+
"required": [
8
+
"schema_version",
9
+
"ghook_version",
10
+
"cli",
11
+
"hook_type",
12
+
"critical",
13
+
"terminal_context_enabled",
14
+
"daemon_url",
15
+
"daemon_host",
16
+
"daemon_port",
17
+
"cli_recognized"
18
+
],
19
+
"additionalProperties": false,
20
+
"properties": {
21
+
"schema_version": {
22
+
"type": "integer",
23
+
"const": 2
24
+
},
25
+
"ghook_version": {
26
+
"type": "string",
27
+
"minLength": 1
28
+
},
29
+
"cli": {
30
+
"type": "string",
31
+
"minLength": 1
32
+
},
33
+
"hook_type": {
34
+
"type": "string",
35
+
"minLength": 1
36
+
},
37
+
"source": {
38
+
"type": ["string", "null"]
39
+
},
40
+
"critical": {
41
+
"type": "boolean"
42
+
},
43
+
"terminal_context_enabled": {
44
+
"type": "boolean"
45
+
},
46
+
"daemon_url": {
47
+
"type": "string",
48
+
"minLength": 1
49
+
},
50
+
"daemon_host": {
51
+
"type": "string",
52
+
"minLength": 1
53
+
},
54
+
"daemon_port": {
55
+
"type": "integer",
56
+
"minimum": 1,
57
+
"maximum": 65535
58
+
},
59
+
"project_root": {
60
+
"type": ["string", "null"]
61
+
},
62
+
"project_id": {
63
+
"type": ["string", "null"]
64
+
},
65
+
"terminal_context_preview": {
66
+
"type": ["object", "null"]
67
+
},
68
+
"cli_recognized": {
69
+
"type": "boolean"
70
+
},
71
+
"install_method": {
72
+
"type": ["string", "null"],
73
+
"description": "How ghook was installed, sourced from the install sidecar (.ghook-install.json) next to the binary. Conventional values: github-release, crates-binstall, cargo-install, manual, unknown. null when no sidecar is present (e.g. cargo install without a sidecar-writing installer)."
74
+
},
75
+
"install_source_url": {
76
+
"type": ["string", "null"],
77
+
"description": "URL the binary was fetched from (typically a GitHub release asset URL), sourced from the install sidecar. null when unknown or not applicable."
0 commit comments