Spaces:
Sleeping
Sleeping
Commit History
-
ci: add PR check workflow (lint, build, test) before merge to mainβ
Bibhu Mishra +1: Claude Sonnet 4.6Runs three parallel jobs on every PR targeting main: - api: eslint β nest build β jest - ui: oxlint/eslint β vite build (includes vue-tsc type-check) - python: pip install β py_compile syntax check Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b85fdb8
-
feat: distinguish scheduled vs manual agent run triggers in UIβ
Bibhu Mishra +1: Claude Sonnet 4.6Previously all workflow_dispatch calls (both NestJS cron and UI button) were indistinguishable β the Python agents always received 'manual'. Now a triggered_by input is passed through the GitHub dispatch payload so the DB stores 'scheduled' for cron-fired runs and 'manual' for UI-triggered runs, which the AdminView already displays via run.triggered_by. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6d86537
-
feat: move agent scheduling from GitHub Actions cron to NestJS in-processβ
Bibhu Mishra +1: Claude Sonnet 4.6GitHub Actions cron was unreliable (delays, skipped runs). Scheduling is now owned by the NestJS process running on HuggingFace (kept alive by keepalive.yml). All three agent workflows are now workflow_dispatch- only; the NestJS scheduler dispatches them at the correct UTC times. Changes: - Remove schedule: triggers from market_analyst, paper_trader, retrospective - Add retrospective to AgentRunsScheduler (Mon 05:00 UTC, force=false so run_retrospective.py's last-Sunday-of-month check still gates it) - Shift Market Analyst from 13:30β14:30 UTC so it falls within NYSE hours in both EDT (10:30 AM) and EST (9:30 AM) seasons - All scheduled dispatches use force=false so market_hours.py holiday and time-window checks apply; force=true is preserved for manual UI triggers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>09053ad
-
fix: show 'manual' triggered_by when agent is dispatched via workflow_dispatchβ
Bibhu Mishra +1: Claude Sonnet 4.6All three workflows hardcoded 'scheduler' as the CLI argument regardless of how they were triggered. Now uses github.event_name to pass 'manual' for workflow_dispatch (Admin panel trigger or GitHub UI) and 'scheduler' for cron. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>c7fe2e8
-
feat: reschedule paper trader to 8:30 AM, 11:00 AM, 1:45 PM CSTβ
Bibhu Mishra +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>27350cb -
feat: change market analyst trigger to 7:30 AM CST (13:30 UTC)β
Bibhu Mishra +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>cb07305 -
feat: change market analyst trigger to 8:30 AM CST (14:30 UTC)β
Bibhu Mishra +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>d088f2c -
feat: change market analyst trigger to 9:00 AM CST (15:00 UTC)β
Bibhu Mishra +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>305b61c -
feat: shift paper trader schedule to CST times (+1 hour UTC)β
Bibhu Mishra +1: Claude Sonnet 4.69:30 AM / 11:30 AM / 2:00 PM CST β 15:30 / 17:30 / 20:00 UTC. In CDT these fire at 10:30 AM / 12:30 PM / 3:00 PM β all within NYSE hours. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>001ef06 -
feat: reschedule paper trader to 9:30 AM, 11:30 AM, 2:00 PM CDTβ
Bibhu Mishra +1: Claude Sonnet 4.6All three slots (14:30, 16:30, 19:00 UTC) fall within NYSE market hours in both CDT and CST seasons β no DST edge cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4e5d92f -
feat: schedule paper trader 3x daily at 9:30, 12:30, 2:45 PM CSTβ
Bibhu Mishra +1: Claude Sonnet 4.6Replaces the previous 17-entry every-30-minute schedule with 3 targeted daily runs aligned to CST (UTC-6). market_hours.py gates all executions against NYSE open hours; in CDT summer the 2:45 PM slot (20:45 UTC = 4:45 PM EDT) fires after close and is blocked, giving 2 effective runs in summer vs 3 in winter. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>82f58b2 -
feat: enforce hard buying-power cap and prevent concurrent paper-trader runsβ
Bibhu Mishra +1: Claude Sonnet 4.6- execute_buys now queries total open-position cost basis before any buy and enforces open_cost + spent + amount β€ total_capital, so the system can never deploy more capital than is actually available - live buying_power re-read from the SQLAlchemy session identity map on each order, reflecting _update_buying_power mutations from earlier buys in the same run for accurate sequential checks - GitHub Actions concurrency group (cancel-in-progress: false) ensures only one paper-trader job runs at a time; overlapping 30-min cron triggers queue rather than execute in parallel, eliminating the double-spend race condition between sessions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>d229e54 -
feat: run paper trader every 30 mins during NYSE market hoursβ
Bibhu Mishra +1: Claude Sonnet 4.6Replaces 3 fixed daily runs with 17 runs covering 13:30β21:00 UTC (9:30 AM EDT to 4:00 PM EST β both summer and winter seasons). market_hours.py gates actual execution so off-hours triggers exit immediately. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4bff5ad
-
Add meaningful workflow names/step labels and keepalive ping workflowβ
Bibhu Mishra +1: Claude Sonnet 4.6- All workflows: add job name, descriptive step names, run step describes the full pipeline (e.g. 'trend detection β fundamentals β top 5 picks') - keepalive.yml: pings HF Space every 35 minutes to prevent sleep; tries /api/health first then falls back to root, accepts any 2xx/3xx/4xx Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6bfd783 -
Consolidate all services around root config filesβ
Bibhu Mishra +1: Claude Sonnet 4.6pyproject.toml (root) is now the single source of truth for Python deps: - Add anthropic>=0.109.0 (was only in agents/requirements.txt) - Add psycopg2-binary>=2.9.0 (missing from both β needed for PostgreSQL) - Fix scheduler entry point: agents.scheduler:scheduler was an object, now points to agents.scheduler:main (new wrapper function) agents/requirements.txt deleted β was a stale duplicate of pyproject.toml All 3 GitHub Actions workflows updated: - cache-dependency-path: pyproject.toml (was agents/requirements.txt) - pip install -e . (installs from root pyproject.toml, was -r agents/requirements.txt) .env, package.json, pyproject.toml all now live at root and are the single config source for agents, api, and ui respectively. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>43d6e5d -
Clean up env vars and fix retrospective last-Sunday checkβ
Bibhu Mishra +1: Claude Sonnet 4.6- .env/.env.example: remove JWT_EXPIRES_IN, VITE_APP_NAME, HF_SPACE_URL, HF_TOKEN (none are read by code; HF_TOKEN is a GitHub Actions secret only) - retrospective/run_retrospective.py: use America/Chicago timezone in is_last_sunday_of_month() so Mon-5AM-UTC cron is still Sunday in CST; also honour FORCE_RUN env var to let admin workflow_dispatch bypass date check - retrospective.yml: call script with --triggered-by flag (argparse, not sys.argv) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>8318a3b -
Add GitHub Actions CI/CD, HF Space deployment, market hours guard, and static servingβ
Bibhu Mishra +1: Claude Sonnet 4.6- Dockerfile (multi-stage Node build, port 7860 for HuggingFace) - .github/workflows/deploy-hf.yml β force-push to HF Space on every main push - .github/workflows/market_analyst.yml β cron 9:30 AM CST MonβFri + workflow_dispatch - .github/workflows/paper_trader.yml β crons 10 AM / 12 PM / 2:45 PM CST MonβFri - .github/workflows/retrospective.yml β cron Mon 5 AM UTC (Sun 11 PM CST), no market gate - agents/core/market_hours.py β check_or_exit() exits cleanly when market is closed; FORCE_RUN=true bypasses (set automatically on workflow_dispatch from admin) - Market Analyst and Paper Trader call check_or_exit() at startup - api/src/app.module.ts β ServeStaticModule serves ui/dist when present (production) - api/src/main.ts β add HuggingFace Space origin to CORS - api/src/agent-runs/agent-runs.service.ts β trigger() now dispatches GitHub Actions workflow_dispatch with force=true instead of spawning local shell scripts - ui/src/views/AdminView.vue β live market-hours banner + market tagβ¦abc493d