Commit Graph

450 Commits

Author SHA1 Message Date
Alexa Amundson
816cc71394 Add Railway service Codex prompt guide 2025-11-20 17:13:05 -06:00
Alexa Amundson
48a3ebde9a Fix QLM alignment inference and event range queries (#140)
## Summary
- ensure agent completion events inherit related intent when not
explicitly provided so alignment calculations work
- adjust time range queries to include just-recorded events and keep
qlm_lab imports available in tests

## Testing
- pytest tests/test_qlm_core.py -q

------
[Codex
Task](https://chatgpt.com/codex/tasks/task_e_691f9ad046b08329958955e48d66e3ba)
2025-11-20 17:02:23 -06:00
Alexa Amundson
e381d5007b Fix QLM alignment and timerange queries 2025-11-20 17:01:09 -06:00
Alexa Amundson
ab83457de1 Expand default CORS origins for Railway deployments (#139)
## Summary
- add new Railway deployment URLs to the default CORS allowed origins
list

## Testing
- not run (not requested)

------
[Codex
Task](https://chatgpt.com/codex/tasks/task_e_691f9a1b45dc83299df6997d6560847f)
2025-11-20 16:48:35 -06:00
Alexa Amundson
fa1347e286 Expand Railway allowed origins 2025-11-20 16:47:02 -06:00
Alexa Amundson
6a93dd62d2 Fix sqlite compatibility for cognition models 2025-11-20 16:45:53 -06:00
Alexa Amundson
7d921b92d0 Expand domain registry for Cloudflare-managed domains (#137)
## Summary
- update ops/domains.yaml to list all BlackRoad domains and subdomains
with Cloudflare-managed DNS targets
- point blackroad.systems apex to the Vercel corporate site and map key
subdomains to their Railway/Vercel services with healthcheck flags
- add aliases and placeholders for secondary and tertiary domains to
converge DNS in one registry

## Testing
- not run (not requested)


------
[Codex
Task](https://chatgpt.com/codex/tasks/task_e_691f97383dd08329872553921e433350)
2025-11-20 16:44:52 -06:00
Alexa Amundson
9c2ba15842 Expand Cloudflare domain mappings 2025-11-20 16:37:29 -06:00
Alexa Amundson
9a223443dc Add go-live runbook for website domains (#136)
## Summary
- add a go-live runbook covering Cloudflare, Vercel, and Railway steps
to bring sites up across all domains
- document per-domain DNS targets and proxy expectations for primary,
secondary, and tertiary domains
- include validation commands and rollback guidance for troubleshooting
deployments

## Testing
- not run (documentation only)


------
[Codex
Task](https://chatgpt.com/codex/tasks/task_e_691f964ad16483298dc425b69d2e836e)
2025-11-20 16:32:59 -06:00
Alexa Amundson
993d6389d2 Add website go-live runbook across domains 2025-11-20 16:31:11 -06:00
Alexa Amundson
a332017fc9 Add backend env template coverage and local configuration (#135)
## Summary
- add backend/.env populated with production-style Postgres/Redis, auth,
API, and integration keys for running uvicorn
- fix .env.example formatting and include missing Prism URLs so it
aligns with app.config.Settings
- adjust gitignore to allow tracking backend/.env for configuration
sharing

## Testing
- python scripts/railway/validate_env_template.py --skip-config

------
[Codex
Task](https://chatgpt.com/codex/tasks/task_e_691f92c1c67c83299b55783161ed067d)
2025-11-20 16:18:27 -06:00
Alexa Amundson
7bc6da8f92 Merge branch 'main' into codex/populate-.env-from-.env.example 2025-11-20 16:17:57 -06:00
Alexa Amundson
93c45a7a5b Clarify deployment targets and UI entrypoint (#134)
## Summary
- reinforce that deployments must target the satellite repositories and
not the monorepo
- document that the supported UI entry point is
backend/static/index.html and to avoid the legacy blackroad-os bundle

## Testing
- Not run (documentation changes only)


------
[Codex
Task](https://chatgpt.com/codex/tasks/task_e_691f92be93288329867444ec95e4bb7f)
2025-11-20 16:17:32 -06:00
Alexa Amundson
7f59578c3f Add populated backend environment configuration 2025-11-20 16:16:49 -06:00
Alexa Amundson
b7d5e1b2ed Clarify deployment targets and UI entrypoint 2025-11-20 16:16:06 -06:00
Alexa Amundson
d3c0751934 Set up Railway CLI and project connection (#133)
This commit implements the complete backend infrastructure for the BR-95
Desktop Operating System interface.

## New Features

1. **BR-95 Router** (`backend/app/routers/br95.py`):
   - Data simulator for OS statistics
   - 11+ API endpoints for real-time data
   - WebSocket support for live updates
   - Pydantic models for type safety

2. **API Endpoints** (`/api/br95`):
   - `/lucidia` - AI orchestration stats (1000 agents)
   - `/agents` - Agent performance metrics
   - `/roadchain` - Blockchain statistics
   - `/wallet` - RoadCoin wallet balance
   - `/miner` - Mining performance
   - `/raspberry-pi` - IoT device management
   - `/github` - GitHub integration stats
   - `/roadmail` - Email statistics
   - `/roadcraft` - Game statistics
   - `/road-city` - Metaverse statistics
   - `/terminal` - Command execution (simulated)

3. **WebSocket** (`/api/br95/ws`):
   - Real-time miner updates
   - Live blockchain sync
   - Wallet balance streaming
   - Auto-reconnect on disconnect

4. **Frontend Integration**:
   - Updated BR-95 HTML with API calls
   - WebSocket client for live updates
   - Auto-refresh every 30 seconds
   - Real-time stat updates in windows

5. **Railway Deployment**:
   - Already configured via railway.toml
   - Health check at /health
   - Version endpoint at /version
   - Documentation in docs/RAILWAY_BR95.md

## Technical Details

- **Data Simulation**: Uses DataSimulator class for realistic stats
- **WebSocket Manager**: ConnectionManager for broadcast messaging
- **Type Safety**: Full Pydantic model validation
- **Performance**: psutil for real CPU/memory metrics
- **Error Handling**: Graceful fallbacks and reconnection

## Deployment

Service runs on:
- Primary: https://app.blackroad.systems
- Railway: https://blackroad-operating-system-production.up.railway.app

Health check: GET /health
Version info: GET /version
API docs: GET /api/docs

## Files Changed

- backend/app/main.py - Registered br95 router
- backend/requirements.txt - Added psutil==5.9.6
- backend/static/index.html - API integration + WebSocket
- backend/app/routers/br95.py - New BR-95 router (700+ lines)
- docs/RAILWAY_BR95.md - Deployment guide

Closes #133 (if exists) - BR-95 backend implementation

# Summary
<!-- High-level explanation of the change and the services it touches
-->

## Checklist
- [ ] Linked the relevant issue or task
- [ ] Updated docs or specs if behavior changed
- [ ] Added or adjusted tests (or noted why not needed)
- [ ] Ran required checks locally (lint/test/build)

## Testing
<!-- List commands run locally, e.g. npm test -->

## Notes
<!-- Deployment impacts, follow-ups, or escalations -->
2025-11-20 16:01:10 -06:00
Claude
d551d0c6df Add BR-95 Desktop API backend with real-time data and WebSocket support
This commit implements the complete backend infrastructure for the BR-95
Desktop Operating System interface.

## New Features

1. **BR-95 Router** (`backend/app/routers/br95.py`):
   - Data simulator for OS statistics
   - 11+ API endpoints for real-time data
   - WebSocket support for live updates
   - Pydantic models for type safety

2. **API Endpoints** (`/api/br95`):
   - `/lucidia` - AI orchestration stats (1000 agents)
   - `/agents` - Agent performance metrics
   - `/roadchain` - Blockchain statistics
   - `/wallet` - RoadCoin wallet balance
   - `/miner` - Mining performance
   - `/raspberry-pi` - IoT device management
   - `/github` - GitHub integration stats
   - `/roadmail` - Email statistics
   - `/roadcraft` - Game statistics
   - `/road-city` - Metaverse statistics
   - `/terminal` - Command execution (simulated)

3. **WebSocket** (`/api/br95/ws`):
   - Real-time miner updates
   - Live blockchain sync
   - Wallet balance streaming
   - Auto-reconnect on disconnect

4. **Frontend Integration**:
   - Updated BR-95 HTML with API calls
   - WebSocket client for live updates
   - Auto-refresh every 30 seconds
   - Real-time stat updates in windows

5. **Railway Deployment**:
   - Already configured via railway.toml
   - Health check at /health
   - Version endpoint at /version
   - Documentation in docs/RAILWAY_BR95.md

## Technical Details

- **Data Simulation**: Uses DataSimulator class for realistic stats
- **WebSocket Manager**: ConnectionManager for broadcast messaging
- **Type Safety**: Full Pydantic model validation
- **Performance**: psutil for real CPU/memory metrics
- **Error Handling**: Graceful fallbacks and reconnection

## Deployment

Service runs on:
- Primary: https://app.blackroad.systems
- Railway: https://blackroad-operating-system-production.up.railway.app

Health check: GET /health
Version info: GET /version
API docs: GET /api/docs

## Files Changed

- backend/app/main.py - Registered br95 router
- backend/requirements.txt - Added psutil==5.9.6
- backend/static/index.html - API integration + WebSocket
- backend/app/routers/br95.py - New BR-95 router (700+ lines)
- docs/RAILWAY_BR95.md - Deployment guide

Closes #133 (if exists) - BR-95 backend implementation
2025-11-20 21:48:22 +00:00
Alexa Amundson
0adc4c786a Ensure domain configuration works correctly (#132)
Updates:
- Add app.blackroad.systems to ALLOWED_ORIGINS in both .env.example and
config.py
- Add blackroad-operating-system-production.up.railway.app to
ALLOWED_ORIGINS
- Update DNS.md to reflect current domain routing (both root and app
subdomains point to same service)
- Ensures CORS works correctly for all production domains

This fixes CORS issues when accessing the application via
app.blackroad.systems or blackroad.systems on the Railway project
'gregarious-wonder' (blackroad-operating-system-production service).

# Summary
<!-- High-level explanation of the change and the services it touches
-->

## Checklist
- [ ] Linked the relevant issue or task
- [ ] Updated docs or specs if behavior changed
- [ ] Added or adjusted tests (or noted why not needed)
- [ ] Ran required checks locally (lint/test/build)

## Testing
<!-- List commands run locally, e.g. npm test -->

## Notes
<!-- Deployment impacts, follow-ups, or escalations -->
2025-11-20 15:29:51 -06:00
Claude
f9e1d7234e Fix domain configuration for app.blackroad.systems and blackroad.systems
Updates:
- Add app.blackroad.systems to ALLOWED_ORIGINS in both .env.example and config.py
- Add blackroad-operating-system-production.up.railway.app to ALLOWED_ORIGINS
- Update DNS.md to reflect current domain routing (both root and app subdomains point to same service)
- Ensures CORS works correctly for all production domains

This fixes CORS issues when accessing the application via app.blackroad.systems or blackroad.systems
on the Railway project 'gregarious-wonder' (blackroad-operating-system-production service).
2025-11-20 21:28:34 +00:00
Alexa Amundson
2c41a2d122 Set up Codex prompt for BlackRoad OS (#131)
This commit fixes the Railway build failure by:

1. **Root requirements.txt**: Added root-level requirements.txt that
references backend/requirements.txt, enabling Railway's Nixpacks to
auto-detect Python project and install dependencies correctly. Fixes
"pip: not found" error.

2. **backend/__init__.py**: Created package init file to make backend a
proper Python package, allowing uvicorn to import backend.app.main.

3. **railway.toml**: Simplified configuration for single-service
monorepo deployment:
   - Uses NIXPACKS builder (auto-detects Python)
- Starts with: uvicorn backend.app.main:app --host 0.0.0.0 --port $PORT
   - Health check at /health
   - Configured for app.blackroad.systems deployment

Technical details:
- Backend entrypoint: backend/app/main.py:app (FastAPI)
- Health endpoint: /health returns JSON with service status
- Frontend: BR-95 desktop UI served at / from backend/static/index.html
- API health: /api/health provides comprehensive integration status

Deployment target:
- Railway project: gregarious-wonder
- Service: BlackRoad-Operating-System
- Domain: app.blackroad.systems

# Summary
<!-- High-level explanation of the change and the services it touches
-->

## Checklist
- [ ] Linked the relevant issue or task
- [ ] Updated docs or specs if behavior changed
- [ ] Added or adjusted tests (or noted why not needed)
- [ ] Ran required checks locally (lint/test/build)

## Testing
<!-- List commands run locally, e.g. npm test -->

## Notes
<!-- Deployment impacts, follow-ups, or escalations -->
2025-11-20 14:52:56 -06:00
Claude
c6eb02e399 Fix Railway deployment for monorepo as single web service
This commit fixes the Railway build failure by:

1. **Root requirements.txt**: Added root-level requirements.txt that
   references backend/requirements.txt, enabling Railway's Nixpacks
   to auto-detect Python project and install dependencies correctly.
   Fixes "pip: not found" error.

2. **backend/__init__.py**: Created package init file to make backend
   a proper Python package, allowing uvicorn to import backend.app.main.

3. **railway.toml**: Simplified configuration for single-service
   monorepo deployment:
   - Uses NIXPACKS builder (auto-detects Python)
   - Starts with: uvicorn backend.app.main:app --host 0.0.0.0 --port $PORT
   - Health check at /health
   - Configured for app.blackroad.systems deployment

Technical details:
- Backend entrypoint: backend/app/main.py:app (FastAPI)
- Health endpoint: /health returns JSON with service status
- Frontend: BR-95 desktop UI served at / from backend/static/index.html
- API health: /api/health provides comprehensive integration status

Deployment target:
- Railway project: gregarious-wonder
- Service: BlackRoad-Operating-System
- Domain: app.blackroad.systems
2025-11-20 20:50:29 +00:00
Alexa Amundson
e7f694bd50 Redesign BR-95 desktop UI (#130)
## Summary
- replace the backend static index page with the BR‑95 edition desktop
experience, including boot screen, icons, and app windows
- restyle the interface with branded gradients, retro window chrome, and
taskbar/road menu controls
- keep interactive behaviors for opening, minimizing, maximizing,
dragging, and tracking windows

## Testing
- not run (not applicable)


------
[Codex
Task](https://chatgpt.com/codex/tasks/task_e_691f75f4d5688329aa740b5969a38cb7)
2025-11-20 14:24:11 -06:00
Alexa Amundson
061289ef39 Redesign BR-95 desktop UI 2025-11-20 14:15:35 -06:00
Alexa Amundson
5179e33241 Merge commit 'fdd44f8e9406e153fbf556b5cf330ee776cace46' 2025-11-20 12:37:27 -06:00
Alexa Amundson
09a1c15c85 Merge commit '5b5412dfba177e0a6e80aa43f7327754e832f000' 2025-11-20 12:37:02 -06:00
Alexa Amundson
6c3a296709 Merge branch origin/codex/fix-and-expand-the-entire-repository into main 2025-11-20 12:36:46 -06:00
Alexa Amundson
e4a84d2a6c Merge branch origin/codex/create-os-spec-and-repo-unification-guide into main 2025-11-20 12:36:37 -06:00
Alexa Amundson
6234eddc0a Merge branch origin/claude/update-blackroad-references-019mbaHPPhbBA2nUs2x9Swzk into main 2025-11-20 12:36:30 -06:00
Alexa Amundson
f4cfe552f0 Merge branch origin/claude/operator-status-check-01RqGuoLn9m5cMip18brFe5e into main 2025-11-20 12:36:22 -06:00
Alexa Amundson
f4416deda3 Merge branch origin/codex/implement-unified-status-page-for-apis-8w9cw1 into main 2025-11-20 12:36:14 -06:00
Alexa Amundson
c6c6cac42b Merge commit 'ad1dcf62d7f8f51f0020390bc0cddc57cbd87c09' 2025-11-20 12:36:00 -06:00
Alexa Amundson
d65f41b42f Add OS spec, unification guide, and meta tooling 2025-11-20 12:32:56 -06:00
Alexa Amundson
b664885c79 Add centralized services registry (#128) 2025-11-20 11:52:33 -06:00
Alexa Amundson
e32e7b5ca5 Add centralized services registry 2025-11-20 11:51:19 -06:00
Alexa Amundson
d33ed5ae2d Disable Backend CI workflowDisable backend-ci-bucketed workflow (auto pass)
The workflow has been disabled and all jobs and steps have been removed.
2025-11-19 21:19:43 -06:00
Alexa Amundson
5e04453fbf Disable auto-merge workflowDisable auto-merge workflow (auto pass)
The auto-merge workflow has been disabled and replaced with a placeholder for future use.
2025-11-19 21:18:51 -06:00
Alexa Amundson
f8c6e1c5a5 Disable auto-approve-tests workflow (auto pass) 2025-11-19 21:17:30 -06:00
Alexa Amundson
f4d976b408 Disable auto-approve-docs workflow (auto pass) 2025-11-19 21:16:32 -06:00
Alexa Amundson
77b140330c Disable Auto-Approve AI PRs Disable auto-approve-ai workflow (auto pass)workflow
Disabled the auto-approve workflow and removed all associated steps.
2025-11-19 21:14:46 -06:00
Alexa Amundson
833d3d4df8 Disable Agents CI workflow 2025-11-19 21:14:02 -06:00
Alexa Amundson
ac139c692c Disable Railway deployment wDisable Railway deploy workflow due to billing dependencyorkflow
Disabled the deployment workflow and removed all related steps.
2025-11-19 21:10:54 -06:00
Alexa Amundson
8dc52847cc Add fix and expansion blueprint 2025-11-19 21:05:47 -06:00
Alexa Amundson
cabe4302a8 Add Cloudflare keys to env template validation (#126)
## Summary
- treat Cloudflare account, zone, and email identifiers as expected keys
in the Railway env template validator
- keep env validation output clean when .env.example includes Cloudflare
deployment fields

## Testing
- python scripts/railway/validate_env_template.py --skip-config

------
[Codex
Task](https://chatgpt.com/codex/tasks/task_e_691e7b77a2248329b5a5562aa1471db4)
2025-11-19 20:56:25 -06:00
Alexa Amundson
02caf39b38 Add Cloudflare keys to env template validation 2025-11-19 20:29:00 -06:00
Claude
9d42204d15 Add comprehensive service status infrastructure
- Add SERVICE_STATUS.md: Complete analysis of all blackroad.systems services
- Add check_all_services.sh: Automated service health checker script
- Add minimal-service template: Production-ready FastAPI service template

Service Status Findings:
- All 9 services return 403 Forbidden (Cloudflare blocking)
- Services are deployed and DNS is working correctly
- Issue is Cloudflare WAF/security rules, not service implementation

Template Features:
- Complete syscall API compliance (/v1/sys/*)
- Railway deployment ready
- CORS configuration
- Health and version endpoints
- HTML "Hello World" landing page
- OpenAPI documentation

Existing Service Implementations:
✓ Core API (services/core-api)
✓ Public API (services/public-api)
✓ Operator (operator_engine)
✓ Prism Console (prism-console)
✓ App/Shell (backend)

Next Steps:
1. Configure Cloudflare WAF to allow health check endpoints
2. Use minimal-service template for missing services
3. Implement full syscall API in existing services
4. Test inter-service RPC communication

Refs: #125
2025-11-20 01:48:02 +00:00
Alexa Amundson
4d55b66c51 Implement Cece check everything feature (#125)
Introduces scripts/cece_audit.py - a complete local system auditor that
checks:
- Repository structure and expected files
- Service registry and DNS configuration
- Kernel integration and syscall API
- Infrastructure configs (Railway, Docker)
- GitHub workflows and templates
- Backend/frontend structure
- Documentation completeness
- Cross-references and consistency

Provides instant health check with zero external dependencies:
- 0 CRITICAL, 3 ERRORS, 6 WARNINGS, 91 SUCCESSES
- Identifies single source of truth for all components
- Shows minimal set needed to run the OS
- Pure filesystem analysis - no API calls, no cost

Run: python scripts/cece_audit.py

# Pull Request

## Description

<!-- Provide a brief description of the changes in this PR -->

## Type of Change

<!-- Mark the relevant option with an 'x' -->

- [ ] 📝 Documentation update
- [ ] 🧪 Tests only
- [ ] 🏗️ Scaffolding/stubs
- [ ]  New feature
- [ ] 🐛 Bug fix
- [ ] ♻️ Refactoring
- [ ] ⚙️ Infrastructure/CI
- [ ] 📦 Dependencies update
- [ ] 🔒 Security fix
- [ ] 💥 Breaking change

## Checklist

<!-- Mark completed items with an 'x' -->

- [ ] Code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes

## Auto-Merge Eligibility

<!-- This section helps determine if this PR qualifies for auto-merge
-->

**Eligible for auto-merge?**
- [ ] Yes - This is a docs-only, tests-only, or small AI-generated PR
- [ ] No - Requires human review

**Reason for auto-merge eligibility:**
- [ ] Docs-only (Tier 1)
- [ ] Tests-only (Tier 2)
- [ ] Scaffolding < 200 lines (Tier 3)
- [ ] AI-generated < 500 lines (Tier 4)
- [ ] Dependency patch/minor (Tier 5)

**If not auto-merge eligible, why?**
- [ ] Breaking change
- [ ] Security-related
- [ ] Infrastructure changes
- [ ] Requires discussion
- [ ] Large PR (> 500 lines)

## Related Issues

<!-- Link to related issues -->

Closes #
Related to #

## Test Plan

<!-- Describe how you tested these changes -->

## Screenshots (if applicable)

<!-- Add screenshots for UI changes -->

---

**Note**: This PR will be automatically labeled based on files changed.
See `GITHUB_AUTOMATION_RULES.md` for details.

If this PR meets auto-merge criteria (see `AUTO_MERGE_POLICY.md`), it
will be automatically approved and merged after checks pass.

For questions about the merge queue system, see `MERGE_QUEUE_PLAN.md`.
2025-11-19 19:41:44 -06:00
Claude
1716f97069 Add Cece System Audit to CI pipeline
Introduces automated OS health checks on every push and PR:

Features:
- Runs Cece audit script on push to main and claude/** branches
- Runs on all PRs to main
- Manual trigger support via workflow_dispatch
- Fails build if CRITICAL issues found
- Warns if ERROR issues found (non-blocking)
- Generates GitHub step summary with audit results
- Uploads full audit report as artifact (30-day retention)

Checks:
- Repository structure
- Service registry & DNS consistency
- Kernel integration
- Infrastructure configs
- GitHub workflows
- Backend/frontend structure
- Documentation completeness
- Cross-references

This ensures the OS stays healthy and catches regressions early.
2025-11-20 01:40:03 +00:00
Claude
a180873b7d Fix frontend errors and pydantic config for local development
Frontend fixes:
- Copy missing JS files from blackroad-os/ to backend/static/js/
  - os.js (core OS functionality)
  - components.js (UI components)
  - registry.js (app registry)
  - app.js, config.js, theme.js, mock_data.js (supporting files)
- Fixes 3 ERROR findings from Cece audit
- System health: 0 ERRORS → 94 SUCCESSES (from 91)

Backend config fix:
- Add `extra = "ignore"` to Settings.Config in backend/app/config.py
- Allows .env.example to have more vars than Settings class defines
- Fixes Pydantic v2 validation errors on startup
- Enables local development without removing env template vars

Cece audit results after fixes:
🔴 CRITICAL: 0
🟠 ERROR:    0 (was 3)
🟡 WARNING:  6
🟢 SUCCESS:  94 (was 91)
2025-11-20 01:38:56 +00:00
Claude
f9088d7b8b Add Cece's comprehensive BlackRoad OS audit script
Introduces scripts/cece_audit.py - a complete local system auditor that checks:
- Repository structure and expected files
- Service registry and DNS configuration
- Kernel integration and syscall API
- Infrastructure configs (Railway, Docker)
- GitHub workflows and templates
- Backend/frontend structure
- Documentation completeness
- Cross-references and consistency

Provides instant health check with zero external dependencies:
- 0 CRITICAL, 3 ERRORS, 6 WARNINGS, 91 SUCCESSES
- Identifies single source of truth for all components
- Shows minimal set needed to run the OS
- Pure filesystem analysis - no API calls, no cost

Run: python scripts/cece_audit.py
2025-11-20 01:30:44 +00:00
Alexa Amundson
5b5412dfba Use timezone-aware build timestamp 2025-11-19 19:21:53 -06:00