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
Publishes the Catasto printed CLI under library/other/catasto.
The CLI bridges Italian cadastral references and WGS84 coordinates with agent-native JSON. It supports GPS -> cadastral lookup, cadastral reference -> GPS centroid lookup via the ondata/AdE geometry dataset, and syntax/comune validation helpers.
Notes
Adds catasto-pp-cli and catasto-pp-mcp sources under library/other/catasto only.
Does not touch registry.json or cli-skills/; those are left for the library post-merge generators.
Includes a local patch that clarifies when a Catasto Fabbricati unit may exist in official records but is not represented in the mapped ondata/AdE geometry dataset.
This PR introduces catasto-pp-cli and catasto-pp-mcp, a new Go-based CLI under library/other/catasto that bridges Italian cadastral references and WGS84 coordinates using the Agenzia delle Entrate public AJAX endpoint and the ondata/dati_catastali Parquet dataset.
GPS → cadastral lookup (gps command): queries the AdE AJAX endpoint for a single point or a CSV stream of lon,lat pairs; previous review thread flagged a bounding-box mismatch in the error message and an io.EOF string-compare in the streaming path.
Cadastral → GPS reverse lookup (cadastral command): resolves comune (by Belfiore code, name, or CAP) then reads the per-region Parquet file cached locally; previous thread flagged narrowComuneHits returning unfiltered hits on zero match, silently yielding the wrong comune.
Local SQLite store + sync command: WAL-mode SQLite with FTS5 full-text search, schema-versioned migrations, and a worker-pool sync loop; this review finds that --latest-only combined with --since is silently ignored in JSON/agent mode with no structured event emitted.
Confidence Score: 4/5
The core lookup paths work correctly; the main concern is that narrowComuneHits can silently return the wrong comune, and --latest-only combined with --since is silently ignored in JSON/agent mode with no structured event emitted.
Two code paths produce incorrect or surprising behavior without any error signal to the caller. narrowComuneHits falling back to unfiltered hits returns wrong parcel coordinates silently. The sync command drops the --latest-only flag without warning when the caller is using the JSON/agent mode this CLI is explicitly designed for.
internal/cli/cadastral.go (narrowComuneHits fallback), internal/cli/sync.go (--latest-only+--since interaction in agent mode), and internal/cli/gps.go (bounding-box bounds mismatch in error text).
Important Files Changed
Filename
Overview
library/other/catasto/internal/cli/sync.go
Sync command with worker pool, cursor management, and JSON event streaming. Silent --latest-only suppression in agent/JSON mode is a new finding.
library/other/catasto/internal/store/store.go
SQLite store with WAL mode, FTS5 full-text search, schema versioning, and composite-key migration. FTS5 ORDER BY rank qualification is a new style note.
library/other/catasto/internal/ondata/ondata.go
Parquet-based geocoding client with local cache. Cache has no TTL (prior thread finding). Diagnostic error messages for missing parcels are well-structured.
library/other/catasto/internal/cli/cadastral.go
Reverse-lookup command (cadastral ref to GPS centroid). The narrowComuneHits silent-wrong-result bug is the prior thread's primary finding.
library/other/catasto/internal/cli/gps.go
Single-point GPS to cadastral lookup command. Bounding-box values in error message differ from pointInItalyBBox check (prior thread).
library/other/catasto/internal/cli/gps_stream.go
Streaming GPS lookup from CSV stdin. EOF string-compare instead of errors.Is noted in prior thread; stream wrapping and error-per-row approach is correct.
library/other/catasto/internal/comuni/comuni.go
Embedded Italian comuni dataset with resolvers by Belfiore code, name, and CAP. Normalization, disambiguation, and error types are clean.
MCP tool handler that shells out to the CLI binary. blockedRootFlags prevents credential/config injection; exec.CommandContext avoids shell-injection risks.
library/other/catasto/internal/client/client.go
HTTP client with 5-minute response cache, adaptive rate limiter, and structured API error type. Cache TTL and key construction look correct.
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
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
Publishes the Catasto printed CLI under
library/other/catasto.The CLI bridges Italian cadastral references and WGS84 coordinates with agent-native JSON. It supports GPS -> cadastral lookup, cadastral reference -> GPS centroid lookup via the ondata/AdE geometry dataset, and syntax/comune validation helpers.
Notes
catasto-pp-cliandcatasto-pp-mcpsources underlibrary/other/catastoonly.registry.jsonorcli-skills/; those are left for the library post-merge generators.Verification
go test ./...passed in the Catasto CLI tree.cli-printing-press publish validate --dir /Users/robertobissanti/printing-press/library/catasto --jsonpassed.cli-printing-press publish validate --dir /Users/robertobissanti/printing-press/.publish-repo-robertobissanti-6489bbc0/library/other/catasto --jsonpassed on the staged package.Scope
All changed files are under
library/other/catasto/.