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
3d67689 Post-mortem fixes: float formatting, version flag, Binance guard Description: Fix issues identified in post-mortem for liquidity-pulse:
1994511 lp-7: Add E2E test for liquidity-pulse CLI Fix infrastructure gap: buildMetricRunE now fetches endpoint data via api.Fetcher before calling Compute(). Previously passed nil. Add liquidity_pulse_e2e_test.go with 5 tests: - TestLiquidityPulseCommand: validates full CLI flow - TestLiquidityPulseAlias: tests lp alias - TestLiquidityPulseOutputJSON: tests --output json - TestLiquidityPulseDetailExtended/Full: validates meta present
7e6ad86 lp-6: Assemble MetricResult with data and conditional meta MetricResult correctly assembled with Data and Meta fields. Detail-level filtering handled at output layer, not in Compute().
4d7c78a lp-5: Wire DetectStatus to set MetricResult.Status Compute() now uses metrics.DetectStatus() for status: - confidenceToFloat(): high=0.9, medium=0.6, low=0.3 - thinData: market
e8ca180 lp-4: Add Binance BTC volume cross-source validation Added cross-source validation against Binance US BTC spot volume: - Meta struct: primary_source, validator_source, discrepancy_detected, discrepancy_note, confidence - Compares Binance volume vs CoinGecko volume - Confidence levels: >20% = low, >10% = medium, else high
6228c92 lp-3: Parse CoinGecko response, compute ratio and classify Compute() parses CoinGecko /global endpoint, computes volume/mcap ratio. Classification thresholds: high >= 0.15
9a423b5 lp-2: Declare both primary and validator endpoints in Def() Updated Def() in internal/metrics/liquiditypulse/v1/provider.go: - Primary endpoint: api.CoinGeckoGlobalMarket - Validator endpoint: api.BinanceSpotCVD_BTC_1h
f6fdf11 lp-1: Define Data and Classification types for liquidity-pulse Added types to internal/metrics/liquiditypulse/v1/provider.go: - Classification constants: ClassificationHigh, ClassificationNormal, ClassificationLow - Classification struct with Label and Description JSON fields - Data struct with VolumeToMcapRatio, VolumeUSD, MarketCapUSD, Classification, Summary
bf4347f Add tasks for implementing liquidity-pulse
2424e93 Delete stale PRE-MORTEM.md (wrong code references)
84c5599 fix: enforce mandatory Version field, remove redundant Namespace - envelope.go: remove omitempty from Version - Remove Namespace from MetricResult (Redundant — always cryptospect) - Update list-metrics to include Version - Update tests to match new schema - Design-Decisions.md: document removal
65c60ae fix: remove docs/llm/ references from CLAUDE.md and Design-Decisions.md Directory was empty (only .gitkeep). LLM docs redundant — docs/metrics/ serves same purpose.
b509a7c feat: implement CLI command infrastructure (root, cache‑clear, list‑metrics) - Add root.go with Cobra root command, viper config binding, and flag parsing - Add cache.go with cache clear subcommand using config cache directory - Add list.go with list‑metrics subcommand outputting metric registry - Update main.go with version variable for ldflags - Fix go.mod to make cobra a direct dependency and resolve vendoring - Update Makefile with GOMODCACHE workaround for root‑owned module cache - Correct project documentation (CLAUDE.md, Design‑Decisions.md) to reflect actual state Permission situation note: The Go module cache (/home/afshin/go/pkg/mod/) is owned by root, causing go build to fail with “permission denied”. The workaround (GOMODCACHE=/tmp/go‑mod‑cache) is now baked into the Makefile. The binary builds and CLI commands (list‑metrics, cache clear) function correctly.
43be064 fix: resolve all golangci-lint errors (71 issues) - CI passes with zero warnings
20725e0 feat: complete CLI command infrastructure with viper config and cache-clear - Add viper config integration with CLI flag precedence (CLI → env → config file) - Implement cache-clear subcommand using config cache directory - Write command-level integration tests (_e2e_test.go) - All tests pass with make test, make lint, make build
a5d9c0b 🔴 Endpoint parameterization – distinct constants for breadth/momentum, Binance CVD with explicit parameters 🟢 Go 1.25 caching patterns – sharded maps (16 shards) + unique.Handle zero‑allocation keying Changes: - Endpoint constants: Split into and ; renamed → with explicit symbol/interval/limit. - Registry mapping: Updated source mapping for , , , to use new endpoint keys. - Sharded maps: Replaced single with 16 shards, each with its own mutex and . uses FNV‑1a hash. - Zero‑allocation keying: Added global to canonicalize endpoint strings to ; memory‑cache lookups compare pointer‑sized integers. - Concurrency test: Added () with ; verifies parallelism (elapsed ≤ ). - Documentation: Updated , , and with completion status. - Backward compatibility: All existing tests pass with ; public API unchanged.
3fdc3f3 🔴 Blockers Fixed 1. Cache file permissions (internal/cache/cache.go:99) – 0644 → 0600 (owner‑only) 2. Context propagation (internal/httpclient/client.go) – http.NewRequest → http.NewRequestWithContext 3. Race condition (internal/api/fetcher.go) – Coarse‑grained locking eliminates duplicate API calls 🟡 Suggestions Addressed - TTL validation – Added bounds: negative→default 300, zero→60, >86400→cap at 1 day (internal/api/fetcher.go:190‑198) - Unused variable – Named suffix in endpoint parsing (internal/api/fetcher.go:158) - Random seeding – rand.Seed(time.Now().UnixNano()) added for jitter (internal/httpclient/client.go) - Permission check – Group permissions now enforced (&0077 vs &0177) (internal/config/config.go:69‑71)
f41b7cf scaffold: add .gitignore and missing internal directories - Add .gitignore with standard Go exclusions (bin/, dist/, coverage, logs, cache) - Create internal/output/, internal/config/, internal/cache/, internal/httpclient/ per Step 12 build order in Design‑Decisions.md - Each directory includes testdata/.gitkeep placeholder for future fixtures Why: Prepares the project for implementation of the core packages (output envelope, config, cache, HTTP client) as defined in the build‑order plan. Ensures build artifacts and local cache are excluded from version control.