Implement discovery-driven StarIntel client (contract registry only) #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rage/1-discovery-client"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes starintel-labs/starintel-client#1 (Auto-RAGE run log:
rage/1-discovery-client.org).Public API
starintel_client— discovery-driven client built exclusively from the server's machine-readable contract:StarIntelClient(base_url, api_key=...)sync facade over an httpx async transport primitive; bounded timeouts; conservative retry (idempotent GETs only, never 4xx)star_sk_v1_...auth; per-requestX-Correlation-IDgeneration + server echo captureStarIntelApiErrornormalizing server envelopes (status,msg,correlation_id, stablecode)Legacy-route ban enforced by test
tests/test_no_legacy_routes.pyfails the suite if/new/document/:dtype,/documents/bulk,/document/:id,/new/target/:actor,GET /search, or view-route strings appear undersrc/.Verification
pytest -q— 84 passed, 2 skipped (hermetic stdlib-http.server mock; live tests opt-in viaSTARINTEL_LIVE_TEST=1)ruff check .— clean;mypy(strict, 8 files) — cleanSTARINTEL_LIVE_TEST=1the client validated against the real server — 19 contracted ops at the time, adapted with zero code changes when the registry grew (stats.get,public.search.get,targets.create), demonstrating the discovery-driven designBlocked elsewhere
Document publication surfaces automatically from the manifest once starintel-server#5 (versioned document routes) merges — no client change expected; the RAGE run log records this decision.