Skip to content

fix(dog-intelligence): hygiene items #2, #4, #5 from issue #598#599

Open
arc0btc wants to merge 7 commits into
BitflowFinance:mainfrom
arc0btc:fix/dog-intelligence-hygiene
Open

fix(dog-intelligence): hygiene items #2, #4, #5 from issue #598#599
arc0btc wants to merge 7 commits into
BitflowFinance:mainfrom
arc0btc:fix/dog-intelligence-hygiene

Conversation

@arc0btc

@arc0btc arc0btc commented May 8, 2026

Copy link
Copy Markdown

Closes items #2, #4, #5 from #598. Depends on #14 (targets same file — rebase or merge after #14 lands).

Changes

Item #5get() catch preserves error class
Before: catch { return { ..., data: null } } swallowed the underlying error, making timeout vs DNS vs TLS failures indistinguishable.
After: catch (err) { return { ..., data: err instanceof Error ? err.message : String(err) } } — error message surfaced in response payload.

Item #4 — structured retry_after_seconds in rate-limit responses
Before: retry info was only in the prose error string ("Rate limited on /endpoint. Retry after 60s."), requiring regex to parse.
After: retry_after_seconds added as a top-level numeric field in the data object on both fetchMultiple and the bitcoin() direct-call handler.

Item #2 — comment on totalSupply constant
Added // DOG total supply is fixed at etching (rune 840000:3). Cannot change. above the constant in whales() to document why it's safe to hardcode.

Not in this PR

Test notes

No new dependencies. Changes are purely to error paths and a documentation comment — no behavior change on the happy path. Smoke-tested locally against the existing doctor + run --action pulse commands.

LimaDevBTC and others added 7 commits March 25, 2026 18:49
On-chain intelligence hub for DOG•GO•TO•THE•MOON rune powered by
DOG DATA's Bitcoin Core + Ord full node. 5 sub-commands: pulse,
whales (>1M DOG threshold), diamond, airdrop, lth-sth.
Read-only, no chain writes, zero dependencies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove unused variable in catch block
- Fix misleading comment: 1B → 1M DOG in whales()
- Author: LimaDevBTC (operator) + Xored Pike (AIBTC agent)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… bitcoin)

Registry compliance fixes (all requested by reviewers):
- SKILL.md: migrate frontmatter to nested metadata: block
- SKILL.md: fix author_agent -> author-agent (hyphen), user-invocable as string
- SKILL.md: fix requires and tags from array to comma-separated string
- SKILL.md: add missing Output contract section
- AGENT.md: add required YAML frontmatter (name, skill, description)

Skill improvements:
- whales: migrate to /whale-alerts (multi-chain, severity CRITICAL/HIGH, USD value)
- whales: use /dog-rune/top-holders dedicated endpoint
- pulse: use /markets for aggregated price across all exchanges
- doctor: smoke-test new endpoints (markets, whale-alerts, multichain)
- New action: markets — 20+ exchanges with volume, spread, trust score
- New action: multichain — DOG on Stacks + Solana (bridged supply)
- New action: bitcoin — BTC network status, mempool, fees, difficulty

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…blockers

- Migrate main() from manual Bun.argv switch to Commander.js
  (rule CLI_USES_COMMANDER + CLI_HAS_DOCTOR_SUBCOMMAND — BLOCKS MERGE)
- Add skills/dog-intelligence/package.json with commander ^12.1.0 dep
- Drop requires: "settings" from SKILL.md — skill doesn't exist on
  aibtcdev/skills:main or BitflowFinance/bff-skills:main (BLOCKS MERGE)
- Drop tag "multichain" from SKILL.md — not in allowed values list
  (FRONTMATTER_TAGS_VALID_VALUES — BLOCKS MERGE on strict checks)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Addresses arc0btc 2026-05-08 review:

1. Truthy-null traps: replace `x ? +x.toFixed(N) : null` with a `num()` helper
   that uses `typeof x === "number" && Number.isFinite(x)` so legitimate 0
   values are preserved instead of being silently coerced to null.
   Affected: lth_pct, sth_pct, change_24h, gini, top_10/100/1000, in_profit,
   in_loss, retention/accumulator/dumper rates, hashrate_eh_s, difficulty,
   progress_pct, estimated_change_pct, price_spread_pct, price_change_24h,
   median_age_days, avg_age_days, total_market_cap_usd, total_volume_24h_usd,
   liquidity_usd, market_cap_usd, volume_24h_usd.

2. bitcoin handler: emit `status: "blocked"` on HTTP 429 (matching the other
   7 actions) so agents running backoff logic detect rate limits consistently.

3. hodl_waves: store numeric percentages (`+(...).toFixed(2)`) instead of
   string suffixes ("12.34%"), aligning with every other percentage field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, BitflowFinance#5 from issue BitflowFinance#598

- get() catch now captures err and returns message string so timeout vs
  DNS vs TLS errors are distinguishable in the response payload
- rate_limited out() calls now include retry_after_seconds as a top-level
  numeric field (fetchMultiple and bitcoin action handlers)
- totalSupply constant in whales() gets a comment explaining the fixed
  etching supply (rune 840000:3 cannot mint)
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown

✅ Validation Passed

Skill: dog-intelligence
Errors: 0
Warnings: 2

All checks passed. This submission is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants