Skip to content

feat(automation): Phase B — insight auto-refresh, foundation auto-check, anchor lifecycle#30

Draft
tbitcs wants to merge 1 commit into
phase-nextfrom
overhaul/automation
Draft

feat(automation): Phase B — insight auto-refresh, foundation auto-check, anchor lifecycle#30
tbitcs wants to merge 1 commit into
phase-nextfrom
overhaul/automation

Conversation

@tbitcs

@tbitcs tbitcs commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Phase B — Automated Insight and Foundation Updates

Changes

Backend

  • SSE Event Bus (backend/glossa_lab/api/events.py): Lightweight in-memory pub/sub with GET /api/v1/events/stream SSE endpoint.
  • Foundation Automation (backend/glossa_lab/api/foundation.py): POST /check, GET /status, PATCH /config endpoints. 15-min auto-check background task.
  • Anchor Lifecycle (research_loop.py): Auto-verify approved candidates, auto-archive verified, expire rejected after 7d. New POST /staging/archive.
  • Event Emission: Loop complete, staging archive, anchor changes emit SSE events and mark foundation dirty.

Frontend

  • Insight Auto-Refresh (DashboardView.tsx): 20-min throttled auto-refresh with SSE, configurable interval, freshness indicator.
  • Foundation Auto-Check UI (DeciphermentPanel.tsx): Status display with toggle button.
  • Lifecycle Badges (ResearchLoopPanel.tsx): Per-candidate lifecycle stage badges, auto-verified count.

Build

  • Frontend: tsc + vite build pass with no errors

Backend restart needed

  • Yes — new routers and background task registration

Conversation: https://app.warp.dev/conversation/c67bcac2-ff46-40d1-b102-131b2fb7fc5d
Run: https://oz.warp.dev/runs/019e84ec-7a71-7ad8-808a-ea1350755e8c

This PR was generated with Oz.

…ck, anchor lifecycle

- Add SSE event bus (backend/glossa_lab/api/events.py) with /api/v1/events/stream
- Add foundation check automation (backend/glossa_lab/api/foundation.py) with
  POST /check, GET /status, PATCH /config, 15-min auto-check background task
- Emit insight_trigger events on loop complete, staging archive, discovery fetch
- Add anchor candidate auto-lifecycle: approved→verified→auto-archived when SA
  improves; rejected→expired after 7 days; auto-archive to anchor_staging_archive.json
- Add POST /staging/archive endpoint for manual archive override
- Mark foundation dirty on anchor changes and loop completion
- Frontend: 20-min throttled insight auto-refresh with SSE subscription,
  freshness indicator (countdown/up-to-date/waiting), configurable interval
  (10/15/20/30/60m stored in localStorage)
- DeciphermentPanel: foundation auto-check status display with toggle button
- ResearchLoopPanel: lifecycle stage badges (staged→approved→verified→archived),
  auto-verified count in all-reviewed CTA
- Register events_router and foundation_automation_router in main.py
- Start foundation auto-check background task on app startup

Co-Authored-By: Oz <oz-agent@warp.dev>
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