Skip to content

v0.6.1 — Add optional xAI harvest automation adapter#2

Open
forgedynamicsai wants to merge 3 commits intomainfrom
release/v0.6.1
Open

v0.6.1 — Add optional xAI harvest automation adapter#2
forgedynamicsai wants to merge 3 commits intomainfrom
release/v0.6.1

Conversation

@forgedynamicsai
Copy link
Copy Markdown
Owner

Summary

  • Adds optional harvest-xai CLI command for xAI/Grok-powered evidence harvesting
  • Adds oneclick alias for harvest-xai --auto-score
  • New module tools/csi/xai_harvest.py (standard library only, no pip installs)
  • Full auto-score pipeline: harvest → import-md → validate → score → report → observe
  • Cost logging to data/csi/xai_costs.jsonl
  • Raw response saved to harvests/xai/ (gitignored)

Non-Advisory Boundary

  • xAI is entirely optional — core workflow unchanged, zero paid APIs required
  • Harvest prompt explicitly instructs Grok: no buy/sell/hold advice, no price targets, no alpha claims
  • All new outputs use analysis-ready / monitor / reject
  • Crowd Signal Quality ≠ Security Risk ≠ Trade Decision preserved throughout

Test plan

  • 159/159 tests pass (22 new, all mocked — zero real API calls in CI)
  • Private data audit clean
  • No real tickers in examples (fictional Company X / Chip Supplier Y / Bank B)
  • Endpoint URL fix verified: https://api.x.ai/v1/responses (not /responses)
  • XAI_API_KEY never stored, logged, or printed

🤖 Generated with Claude Code

forgedynamicsai and others added 3 commits May 1, 2026 18:21
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Core CSI requires no paid APIs, no xAI, no external services.
harvest-xai is optional for users who supply their own XAI_API_KEY.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- input field fix: use "input" not "messages" (Responses API schema)
- response parsing: search full output[] array for type=message item
  (message is last item after tool calls, not output[0])
- raw response: save immediately after API call, before table extraction
- timeout: increase 60s → 180s for reasoning models with tool calls
- error handling: explicit 422 and timeout messages
- add regression tests: input/messages schema, output[] message search

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant