From aae6ac3c2e03498c4ebf70488baade8f72c7994b Mon Sep 17 00:00:00 2001 From: "Josef M. Gallmetzer" <64498081+galjos@users.noreply.github.com> Date: Mon, 7 Sep 2026 07:58:13 +0000 Subject: [PATCH 1/2] Prepare v0.6.2 Patch release for traffic search word boundaries and ranked datasets guide matching so agents get the honesty fixes on the published install path. --- CHANGELOG.md | 2 +- README.md | 4 ++-- docs/development.md | 4 ++-- docs/release.md | 22 +++++++++++----------- docs/skills.md | 2 +- internal/version/version.go | 2 +- skills/open-data-hub-cli/SKILL.md | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8abeec..2993283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ SPDX-License-Identifier: CC0-1.0 All notable changes to `odh-cli` are documented here. -## Unreleased +## v0.6.2 - 2026-09-07 - `datasets guide` ranks catalogue matches by how many query terms hit instead of requiring every word. Natural phrases like `roadworks on a state road` no diff --git a/README.md b/README.md index 46fe352..4c40dee 100644 --- a/README.md +++ b/README.md @@ -33,13 +33,13 @@ Not included: authenticated write flows, live transit rerouting, historical GTFS curl -fsSL https://raw.githubusercontent.com/galjos/odh-cli/main/scripts/install.sh | sh ``` -The installer detects macOS/Linux and `amd64`/`arm64`, verifies the published SHA-256 checksum, and installs to `~/.local/bin`. Pass `--version v0.6.1 --dir "$HOME/bin"` to pin a version or directory. +The installer detects macOS/Linux and `amd64`/`arm64`, verifies the published SHA-256 checksum, and installs to `~/.local/bin`. Pass `--version v0.6.2 --dir "$HOME/bin"` to pin a version or directory. Alternatives: ```bash brew install galjos/odh/odh -sudo apt install ./odh_v0.6.1_linux_amd64.deb # from GitHub Releases +sudo apt install ./odh_v0.6.2_linux_amd64.deb # from GitHub Releases go build -o odh ./cmd/odh # from source ``` diff --git a/docs/development.md b/docs/development.md index dd2f66d..563c268 100644 --- a/docs/development.md +++ b/docs/development.md @@ -74,11 +74,11 @@ The generic HTTP cache is only for low-risk discovery surfaces such as OpenAPI s ## Build Metadata -Development builds default to `0.6.1-dev` with best-effort VCS metadata. Release builds can stamp metadata through Go linker flags: +Development builds default to `0.6.2-dev` with best-effort VCS metadata. Release builds can stamp metadata through Go linker flags: ```bash go build \ - -ldflags "-X github.com/galjos/odh-cli/internal/version.Version=0.6.1 -X github.com/galjos/odh-cli/internal/version.Commit=$(git rev-parse --short HEAD) -X github.com/galjos/odh-cli/internal/version.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \ + -ldflags "-X github.com/galjos/odh-cli/internal/version.Version=0.6.2 -X github.com/galjos/odh-cli/internal/version.Commit=$(git rev-parse --short HEAD) -X github.com/galjos/odh-cli/internal/version.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \ -o odh ./cmd/odh ``` diff --git a/docs/release.md b/docs/release.md index bc24576..062d162 100644 --- a/docs/release.md +++ b/docs/release.md @@ -6,7 +6,7 @@ SPDX-License-Identifier: CC0-1.0 # Release -Releases are built from Git tags named `v*`, for example `v0.6.1`. +Releases are built from Git tags named `v*`, for example `v0.6.2`. Before tagging, update `CHANGELOG.md` with the release date and the user-facing milestone summary. @@ -23,20 +23,20 @@ go build ./... && go vet ./... && go test ./... && gofmt -l . && golangci-lint r Build a stamped archive for the current platform: ```bash -VERSION=v0.6.1 scripts/build-release.sh +VERSION=v0.6.2 scripts/build-release.sh ``` Cross-compile by setting `GOOS` and `GOARCH`: ```bash -VERSION=v0.6.1 GOOS=linux GOARCH=amd64 scripts/build-release.sh +VERSION=v0.6.2 GOOS=linux GOARCH=amd64 scripts/build-release.sh ``` Artifacts are written to `dist/` as archives plus per-asset SHA-256 checksum files. Linux targets can also produce Debian packages: ```bash -VERSION=v0.6.1 GOOS=linux GOARCH=amd64 scripts/build-deb.sh +VERSION=v0.6.2 GOOS=linux GOARCH=amd64 scripts/build-deb.sh ``` Generate the aggregate release manifest locally when testing release assets: @@ -50,8 +50,8 @@ scripts/build-checksums.sh Push a version tag: ```bash -git tag v0.6.1 -git push origin v0.6.1 +git tag v0.6.2 +git push origin v0.6.2 ``` The release workflow builds Linux and macOS binaries for `amd64` and `arm64`, @@ -73,11 +73,11 @@ The installer in `scripts/install.sh` depends on that asset naming and the adjac ## Verify A Published Release ```bash -gh release view v0.6.1 --repo galjos/odh-cli -gh release download v0.6.1 --repo galjos/odh-cli --pattern SHA256SUMS --pattern 'odh_v0.6.1_darwin_arm64.tar.gz' -grep 'odh_v0.6.1_darwin_arm64.tar.gz' SHA256SUMS -shasum -a 256 odh_v0.6.1_darwin_arm64.tar.gz -gh attestation verify odh_v0.6.1_darwin_arm64.tar.gz --repo galjos/odh-cli +gh release view v0.6.2 --repo galjos/odh-cli +gh release download v0.6.2 --repo galjos/odh-cli --pattern SHA256SUMS --pattern 'odh_v0.6.2_darwin_arm64.tar.gz' +grep 'odh_v0.6.2_darwin_arm64.tar.gz' SHA256SUMS +shasum -a 256 odh_v0.6.2_darwin_arm64.tar.gz +gh attestation verify odh_v0.6.2_darwin_arm64.tar.gz --repo galjos/odh-cli ``` The checksum printed by `shasum` must match `SHA256SUMS`. The attestation check diff --git a/docs/skills.md b/docs/skills.md index 0dd3dfd..2c1bae5 100644 --- a/docs/skills.md +++ b/docs/skills.md @@ -30,7 +30,7 @@ The skill frontmatter also declares the `odh` runtime binary through `metadata.o ClawHub publishing uses the ClawHub CLI: ```bash -clawhub skill publish "$(pwd)/skills/open-data-hub-cli" --version 0.6.1 --clawscan-note "Uses network access only through the odh CLI to query public Open Data Hub endpoints. Declares odh as a required binary and provides an OpenClaw Go installer hint; manual setup uses Go or Homebrew." +clawhub skill publish "$(pwd)/skills/open-data-hub-cli" --version 0.6.2 --clawscan-note "Uses network access only through the odh CLI to query public Open Data Hub endpoints. Declares odh as a required binary and provides an OpenClaw Go installer hint; manual setup uses Go or Homebrew." ``` The skill carries its own version line, which has run ahead of the CLI's since 0.4.1 — check `clawhub inspect open-data-hub-cli --versions` for the last published version and increment from there, rather than assuming it matches the CLI release. diff --git a/internal/version/version.go b/internal/version/version.go index 3575737..bc84f30 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -12,7 +12,7 @@ import ( // These variables can be overridden at build time with -ldflags. var ( - Version = "0.6.1-dev" + Version = "0.6.2-dev" Commit = "unknown" Date = "unknown" ) diff --git a/skills/open-data-hub-cli/SKILL.md b/skills/open-data-hub-cli/SKILL.md index f14b8eb..60ad651 100644 --- a/skills/open-data-hub-cli/SKILL.md +++ b/skills/open-data-hub-cli/SKILL.md @@ -13,7 +13,7 @@ metadata: { "id": "go", "kind": "go", - "module": "github.com/galjos/odh-cli/cmd/odh@v0.6.1", + "module": "github.com/galjos/odh-cli/cmd/odh@v0.6.2", "bins": ["odh"], "label": "Install odh CLI (go)", }, @@ -33,12 +33,12 @@ odh version odh doctor --timeout 10s ``` -Need `odh v0.6.1+` for the current command contracts, dataset guidance, source/provenance fields, traffic helpers, GTFS/transit, filtered latest measurements, comma-safe `--param`, `transit journey --with-realtime`, and MCP server mode. +Need `odh v0.6.2+` for the current command contracts, dataset guidance, source/provenance fields, traffic helpers, GTFS/transit, filtered latest measurements, comma-safe `--param`, `transit journey --with-realtime`, and MCP server mode. Preferred manual install options: ```bash -go install github.com/galjos/odh-cli/cmd/odh@v0.6.1 +go install github.com/galjos/odh-cli/cmd/odh@v0.6.2 brew install galjos/odh/odh ``` From bcfeada57eb112cbbee6e7df92031c1d8adc6f1b Mon Sep 17 00:00:00 2001 From: "Josef M. Gallmetzer" <64498081+galjos@users.noreply.github.com> Date: Mon, 7 Sep 2026 08:03:05 +0000 Subject: [PATCH 2/2] Return no datasets guide matches for all-stopword queries Ranking treated an empty term list as matching everything, so phrases like "on the road" dumped the first --limit catalogue entries onto agents. --- CHANGELOG.md | 5 +++-- internal/commands/datasets.go | 6 +++--- internal/commands/runner_test.go | 4 ++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2993283..8534fe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,8 +13,9 @@ All notable changes to `odh-cli` are documented here. - `datasets guide` ranks catalogue matches by how many query terms hit instead of requiring every word. Natural phrases like `roadworks on a state road` no longer return nothing while the bare topic still matched; filler words reuse - the traffic search stopword list. `datasets search` keeps the stricter - all-terms filter. Refs #14. + the traffic search stopword list. Queries that are only stopwords return no + matches rather than dumping the catalogue. `datasets search` keeps the + stricter all-terms filter. Refs #14. - `traffic search` no longer matches alphabetic terms inside other words. Searching `auer` used to hit every `Stützmauern` notice; terms now match at a word boundary (prefix still allowed, so cycle aliases like `radweg` keep diff --git a/internal/commands/datasets.go b/internal/commands/datasets.go index 465ac55..1377da7 100644 --- a/internal/commands/datasets.go +++ b/internal/commands/datasets.go @@ -197,9 +197,9 @@ func filterDatasetsByQuery(entries []datasetEntry, query string) []datasetEntry func rankDatasetsByQuery(entries []datasetEntry, query string) []datasetEntry { terms := datasetGuideQueryTerms(query) if len(terms) == 0 { - out := make([]datasetEntry, len(entries)) - copy(out, entries) - return out + // All tokens were stopwords or the query was empty. Returning the full + // catalogue would send agents down arbitrary paths for "on the road". + return nil } type scored struct { entry datasetEntry diff --git a/internal/commands/runner_test.go b/internal/commands/runner_test.go index 2ce2896..6c58ecb 100644 --- a/internal/commands/runner_test.go +++ b/internal/commands/runner_test.go @@ -341,6 +341,10 @@ func TestRankDatasetsByQueryPrefersMoreTermHits(t *testing.T) { if len(ranked) != 1 || ranked[0].ID != "a" { t.Fatalf("expected roadworks to survive filler words, got %#v", ranked) } + // An all-stopword phrase must not dump the whole catalogue on the agent. + if got := rankDatasetsByQuery(entries, "on the road"); len(got) != 0 { + t.Fatalf("all-stopword query must return no matches, got %#v", got) + } } func TestDatasetCatalogCommandStringsParse(t *testing.T) {