← Dashboard
📋 Build Summary · Last 24 Hours · Auto-Generated
What Was Built · 02–03 Jun 2026
Timestamp: 03 Jun 2026 · Build #157 → #159 · CircularOS Sovereign Platform
8 Tasks Merged
4 New Pages
79 Vulnerabilities Patched
Grant Engine Live DB
42 Entities Official
2,076 Total Jobs
A full record of every build, merge, and feature shipped in the last 24 hours — each section explains what changed, why it was needed, and where to navigate to see it live. Use the contents table below to jump straight to any area.
🧭 How to Navigate This Page
📋 Contents Table
Jump-links to every section. Click any item to scroll directly to that build area. Numbered 01–08 in delivery order.
🟢 Why It Was Needed
Each section has a teal "Why needed" box — explains the business or operational reason behind the build, not just what was done.
🔗 Page Links
Coloured buttons at the bottom of each section link directly to the live pages. Click to verify the work is live.
⬤ Dot Colours
Green = shipped & live · Amber = in progress / ready · Red = security fix · Violet = new architecture · Teal = data connected
📌 Merged vs Built
"Merged" means a task agent built it and it was accepted into the codebase. "Built" means it was built directly in this session.
↕ Scroll Order
Sections run newest → oldest within the 24hr window, so the most recent work is at the top of each category.
📑 Contents · Jump to Section
Why it was needed: The jobs page previously showed each agent's status as a static label (ACTIVE / DORMANT / STANDBY) — but there was no way to show which agents were actually being worked in the current sprint. The toggle board turns this into a live ops control: flip any agent OFF to stand them down, flip ON to re-engage. The counter bar shows at a glance how many of the 19 are active right now. Build #157 context (RTH jobs, governance hub, security sprint) was also missing from every agent's job description — that's now updated.
Per-agent ON/OFF toggle switch
Green sliding pill = ON (glowing coloured border, full opacity). Grey pill = OFF (32% opacity, greyscale filter, grey border). Instantly clear at a glance which agents are stood down.
"Turn ALL ON" / "Turn ALL OFF" batch controls
Single button flips all 19 agents at once. Useful at the start of a sprint (all on) or end of day (stand down non-critical agents).
Live counter bar — "X / 19 AGENTS ON"
Updates instantly with every toggle. Stat cards (On count / Off count) in the row below also update live. Hero badge reflects current count.
Session persistence (sessionStorage)
Toggle state survives navigation — if you leave the page and come back in the same browser session, all your settings are remembered. Resets on new session/browser close.
3 new Build #157 job rows added
RTH Income Engine (18 READY jobs), Governance Hub (7 categories / 35 pages), Security Sprint (79 CVEs) — each with its own toggle.
All 8 core agent descriptions updated to Build #157
Conductor, Guardian, Alchemist, Oracle, Vampire, SIS, Architect, H.BLUE all reflect current sprint context — not Build #154 as before.
Why it was needed: The Grant Hub (/grant-command) previously had a tracker and a pipeline counter, but nowhere for an operator to actually submit a grant application. Without a form, every application was tracked manually — high error risk, no audit trail, nothing for investors to see. This gives the system a proper intake point: submit → DB → ref number → confirmation page. The grant pipeline now has a proper front door.
4-section sovereign intake form at /grant-apply
Funder & Entity · Deadline & Status · Notes · Evidence Upload. 7 required fields with server-side validation. All fields store to PostgreSQL on submit.
New grant_applications DB table (auto-created)
Columns: ref (unique GA-XXXNNNN), funder_name, entity, grant_type, amount_requested, deadline, status, operator details, evidence path, submitted_at. Persistent across server restarts.
Sealed confirmation page with reference number
/grant-apply/confirmation/GA-XXXNNNN — shows full application summary, next-steps grid (3 cards), reference badge. Shareable URL. Added to PUBLIC_PREFIXES so no login needed to view confirmation.
Evidence file upload (PDF/DOC/XLS, 10MB cap)
Drag-drop zone with extension allowlist enforced server-side. Files saved to static/grant_evidence/. Filename stored in DB record.
Grant Hub hero updated — "Submit Application" is now the primary CTA
Sits before "Open Tracker" so the natural flow for a new operator is: Grant Hub → Submit → see confirmation → find yourself in the tracker.
Why it was needed: The Grant Tracker was entirely hardcoded — the 7 application rows were baked into the HTML template. That meant every status update, new application, or note had to be done by editing code. Now every row is a real DB record: status changes, notes, checklist items, and probability scores all save instantly and persist. This is what transforms the tracker from a demo page into a working operational tool.
GrantApplication SQLAlchemy model (models.py)
Fields: funder, grant_name, entity, amount (text + value), deadline (text + date), status, probability, notes, checklist (JSON), is_critical. to_dict() for JSON API responses.
6 new API routes for full CRUD
GET /api/grant-tracker/applications · POST (create) · PUT (update) · DELETE — all write routes protected with @require_admin. GET and /stats are public read-only. 7 seed applications auto-populated on first start.
Tracker template fully rewritten with live JS fetch
All 7 hardcoded rows replaced. Notes save on blur, checklist items toggle-save immediately, status/probability inline edit via PUT. Delete with confirm dialog. "+ Add Application" modal POSTs to API.
Grant Hub counters now pull from live DB
Active, awarded £, due soon, pipeline £M — all derived from GrantApplication queries with static fallbacks if the table is empty.
Why it was needed: The Guaranteed Pipeline page showed live counters (active learners, completions, stipends) but nothing over time. A investor looking at the page couldn't tell if numbers were growing or flat. The 12-week rolling chart gives a screenshot-ready evidence asset: here is the last quarter of activity, week by week. The £ payout axis on the same chart means one screenshot captures both volume (bars) and financial output (amber line) — exactly what a grant evidence pack or investor deck needs.
New API endpoint: GET /api/guaranteed-pipeline/chart-data
Returns 12 weekly buckets (W1–W12). Two datasets: learner completions (learn_to_earn_grants) and stipend payouts (stipend_payouts). Also returns payout_value (£ sum) per week. Public endpoint — no auth required.
Grouped bar chart: emerald = completions, pink = payouts
Chart.js 4.4.2, dark theme matching page aesthetic. Responsive with maintainAspectRatio:false. Rich tooltips showing both series. Static fallback shown if no historical data yet.
Amber £ line series on right-side y2 axis
Secondary axis shows £ payout value per week. £/£k auto-formatting on tick labels. Grid lines disabled on y2 so bars stay readable. Tooltip shows "💰 £ Payout Value: £X,XXX" in shared tooltip.
12-week view (extended from original 4 weeks)
One full quarter of data. Chart height increased to 260px to accommodate 12 bars. X-axis labels auto-rotate on narrow viewports. Chart refreshes every 5 minutes automatically.
Why it was needed: Previously, when a learner passed their final quiz and received a certificate, the grant system didn't know. An admin had to manually go into the tracker and mark the grant as "completed" before the pipeline counter would update. This caused the Guaranteed Pipeline numbers to lag behind reality. Now it's automatic: pass the quiz → certificate issues → grant completes → counter updates. No manual admin action needed, no lag.
Certificate issue triggers grant auto-complete
After a new course_certificates row is inserted (final quiz passed, score ≥ threshold), the system queries learn_to_earn_grants for any 'approved' grant for that learner. If the completed course_id is in the grant's funded_courses list — status → 'completed', completed_at = NOW().
Pipeline counter updates automatically
_get_pipeline_counters() queries WHERE status IN ('completed','paid') AND completed_at >= NOW() - INTERVAL '30 days'. Now fires on every certificate — no manual trigger needed.
Zero-risk implementation
Wrapped in try/except — any DB error on the grant update never breaks the certificate response. If matching grant not found, nothing happens. Certificate is issued regardless.
Why it was needed: Red Team Holdings Ltd (Entity #31) had no formal income architecture. RTH's role — watching over all 18 other entities as the governance general — generates 4 distinct income streams (dPRN royalties, investment dividends, delegation management fees, staffing coordination fees). Without jobs mapped to those streams, RTH existed as an entity on paper with no operational pipeline. The 18 READY jobs give RTH a live job board it can activate the moment the company is formally registered.
18 RTH jobs (RTH-001 → RTH-018) added to sovereign_jobs_database.py
Status: READY (staged — not yet OPEN). Batch tag: B157_RTH. Spread across 4 income streams + governance. Total system jobs: 1,714 → 2,076 (+362 after all recent batches).
4 income streams formally defined
1. dPRN Royalty Stream (£45/tonne IP licence from every entity). 2. Investment Dividend Stream (7% preferred equity in 10 entities). 3. Delegation Management Fees (15% coordination fee on sovereign work). 4. Staffing Coordination Fees (£500–£2,500/placement across 18 entities).
MD-1046 — Entity Income Framework
New master document covering RTH's full income architecture. Linked from /red-team-holdings-income. Sealed.
Why it was needed: A full security scan (threat_model.md) uncovered 79 vulnerabilities. The most dangerous were logic flaws — not outdated libraries but active attack paths: an unauthenticated user could spoof sovereign identity via a request header, any authenticated user could escalate to admin by claiming a job, Red Team content gated only in JavaScript could be bypassed, and the Digital Army registry was publicly writable. These needed to be closed before any external investor, auditor, or partner gets access to the platform.
CRITICAL: Header spoofing identity bypass — FIXED
Auto-login path that read X-Replit-User-Id header to grant sovereign session removed. Now requires full Replit OIDC flow. A spoofed header can no longer grant admin access.
CRITICAL: Admin escalation via claim-job — FIXED
POST /api/digital-army/claim-job set user.is_admin=True if first to claim a job. Any logged-in user could self-promote to admin. Now only pre-approved admin accounts receive admin flag.
HIGH: Digital Army registry publicly writable — FIXED
POST/PUT/DELETE /api/digital-army/* were in PUBLIC_PREFIXES — open to the internet. Moved to @require_admin on all write routes. Read-only remains public.
HIGH: Static partner magic-link (single-use enforcement) — FIXED
Partner access links with shared static tokens replaced with single-use DB-verified tokens that invalidate after first use.
HIGH: Red Team gate JavaScript-only — FIXED
Red Team Hub passcode check moved from client-side JS to server-side session. Viewing source no longer reveals the passcode.
72 dependency CVEs patched (Task #16)
All known outdated package vulnerabilities resolved via pip-audit. Zero remaining open CVEs in the dependency tree.
Why it was needed: Three new entities were officially ratified — #40 FullLoop Plastics, #41 FullLoop SDV, #42 FullLoop Workforce. The count of 39 was hardcoded across at least 14 places in the codebase. Left unpatched, grant templates would quote "39 entities" to funders while the dashboard says "42" — an immediate credibility problem. The Alignment Seal (the canonical count declaration) had to be updated at the same time so all counts stay in sync. The covenant calculator also divides by number of entities, so the maths needed updating too.
Entity count updated in 9 main.py locations
All data dicts, live fallbacks, covenant calculators, and API responses updated from 39 → 42. Covenant calc now divides by 42 entities.
5 grant templates updated
grant_command.html, system_architecture_guide.html, google_validation.html, service_consult.html, circular_os_console.html — all copy buttons and text updated to 42 entities.
Build #157 (indigo) + Build #156 (red/amber) dashboard sections added
Two new pill sections inserted above Build #155 in dashboard.html. Security banner, RTH link, Governance Hub link, and all new pages from both builds are linked.
Alignment Seal canonical counts updated
657 streams · 1,714 jobs · 485 MDs · 80 protocols · 19 agents · 42 entities. Triple-sealed. The authoritative single source of truth for all canonical system counts.