Day Log: Upgrading to Warborn OS V0.50 — Full Copilot Control Plane, Unified Trash, and 50 End-to-End Tests — July 14, 2026
1 commit. 14 files changed. 2064 insertions, 151 deletions.
Today, we successfully designed and deployed Warborn OS V0.50. This major upgrade transforms the global Copilot chat into a true dashboard control plane supporting verified action execution, soft deletion/restore loops, role-based safety gates, and 50 end-to-end tests.
Here is a full breakdown of the V0.50 engineering implementation.
1. Context & Architecture Overview
To provide a production-grade action execution environment where anything that can be done manually in the dashboard can also be performed via Copilot, we built a comprehensive three-layered reliability grid:
- Unified Action Registry & Policies: All 49 dashboard actions are explicitly registered in
CopilotActionRegistrywith their validation schemas andActionPolicyTiersafety rules (safe_auto,confirm_first,destructive_confirmed,admin_only,read_only). - Unified Soft Delete & Trash Design: To handle destructive delete actions safely, we introduced a centralized
TrashItemdatabase model and Alembic migration86dbc97ce9ed. Soft delete actions serialize original row data into a JSON column and delete the original record, while restore deserializes the data back to its original table. - 50 End-To-End Tests: A complete verification test suite in
tests/test_v050_control_plane.pyexecutes every single registered dashboard control action, verifying routing, parameter matching, and database persistence.
graph TD
User[Developer] -->|Copilot Prompt| Copilot[Copilot Drawer]
Copilot -->|Send Message| ChatAPI[FastAPI Chat Endpoint]
ChatAPI -->|Plan Steps| Planner[Copilot Router Service]
Planner -->|Run Action| ActionExec[Action Execution Service]
ActionExec -->|Verify Schema| SchemaVal[Copilot Action Registry]
SchemaVal -->|Execute DB Trans| DBStore[(Postgres Database)]
DBStore -->|Soft Delete / Restore| TrashDB[(Trash Items Table)]
DBStore -->|Read State| DBVerifier[Module Executors]
DBVerifier -->|Confirm Record Created| FormatFilter[Professional Response Formatter]
FormatFilter -->|Return Structured JSON| Copilot
Copilot -->|Render UI Component| ActionResultCard[Next.js ActionResultCard Component]
2. Technical Implementation Details
2.1 Unified Copilot Action registries & Schema Contracts
We built a centralized registry architecture:
- Copilot Action Registry: Maps all 49 control plane actions to their respective FastAPI schemas, roles, and categories.
- Action Policy Registry: Configures execution safety policies, assigning tiers like
safe_auto,confirm_first, anddestructive_confirmedfor delete actions. - Action Schema Registry: Declares explicit Pydantic parameter schemas for every single dashboard action.
2.2 Dashboard Module Executors
To persist changes across the database, we wrote 40 new executors grouped under v050_executors.py:
- Notes: Supports search, delete (trash), and restore operations.
- Tasks: Handles pinned status prioritization, deletion, and restoration.
- Projects: Supports project creation, state updates, completion, and deletion.
- Books: Manages reading list adds, progress logs, archiving, and trashing.
- Other Modules: Includes executors for asset managers, media metadata upload, storage check/clean, calendar event edits, habits, quit addiction trackers, personalization memories, and administrative telemetry syncs.
2.3 Unified Soft Delete & Trash Design
We introduced a database migration (86dbc97ce9ed) to add the trash_items table:
- When a user deletes an item, the original record is deleted and its payload is serialized to JSON in the trash table.
- A user can request to restore items or permanently purge them via the trash executors.
2.4 50 End-to-End Validation Tests
We wrote exactly 50 tests verifying the entire API action layer:
- Checked all 49 control plane actions under positive scenarios.
- Checked validation schema boundaries for negative invalid inputs.
- All 50 tests passed successfully!
3. Bug Fixes & Refinements
3.1 Ngrok Tunnel & Ollama Host Headers
We bypassed Ollama's strict host header verification in remote tunnels by configuring header rewrites (Host: localhost:11434) and bypassing ngrok's browser-warning screen via user-agent header injection.
3.2 Action Capability Audit
Created audit unit tests to ensure that all actions declared in the database register match their class definitions and that payload structures match backend validation schemas.
4. Upgrade to V0.50.1 — Permanent Approval Layer for Copilot Action Execution
To prevent blind execution of state-changing operations and enforce production-grade safety, we upgraded the platform to V0.50.1 by implementing a permanent, token-authorized approval layer:
- Security Policy Matrix: Classified all 60 actions into
SAFE_AUTO,CONFIRM_FIRST,DESTRUCTIVE_CONFIRMED, andADMIN_ONLYtiers. Built a dynamic classifier (action_risk_classifier.py) that escalates credentials modifications toADMIN_ONLY. - Single-Use Cryptographic Tokens: Implemented
ApprovalTokenServiceusing secure token caches that validate and burn tokens immediately upon execution to prevent replay attacks. - FastAPI / React Bridge: Built the
/api/copilot/approveendpoint and React components (ApprovalPromptCard.tsx,DestructiveActionWarning.tsx,ApprovalDecisionBar.tsx) to allow user Allow/Deny decisions inline in the Copilot drawer. - Cleansed Persona & Spacing: Created
CopilotPersonaPolicyto scrub casual chatbot phrases, strip LLM planning tag leaks, and normalize spacing.
5. Verification & Final Results
We verified the entire upgrade by expanding our test coverage to 278 passing unit tests (adding 28 new tests for approvals, expiries, denier workflows, and tone formatting). All tests pass with a 100% success rate.