Commit Graph

224 Commits

Author SHA1 Message Date
a7cf757aea chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-23:
  - update .custodian-brief.md for state-hub
2026-05-23 09:38:04 +02:00
cea59d7f13 Add hourly RecentlyOnScope batch endpoint 2026-05-22 16:14:08 +02:00
c95d29023d Closed dashbord ui exp workplan 2026-05-22 15:45:08 +02:00
2dbd4aca4c chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-22:
  - update .custodian-brief.md for state-hub
2026-05-22 15:12:56 +02:00
bb985812e5 Implement RecentlyOnScope domain digest 2026-05-22 13:45:53 +02:00
0ccbb13892 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-22:
  - update .custodian-brief.md for state-hub
2026-05-22 10:13:54 +02:00
3e733912f6 scope digest workplan 2026-05-22 09:50:46 +02:00
c7150bae5f Improve dashboard loading and task sync 2026-05-19 02:32:22 +02:00
cc21c5869e Implement dashboard UI improvements 2026-05-19 02:16:24 +02:00
bf09782f68 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-19:
  - update .custodian-brief.md for state-hub
2026-05-19 02:06:40 +02:00
edb3b9dde6 Add dashboard UI improvement workplan 2026-05-19 01:49:16 +02:00
ca1b97ccb5 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-19:
  - update .custodian-brief.md for state-hub
2026-05-19 01:47:17 +02:00
6186a99bbd Refresh agent instruction templates 2026-05-18 16:55:53 +02:00
febad058e6 Migrate State Hub workplans 2026-05-18 01:32:29 +02:00
d6522a9a40 Complete workplan state model cleanup 2026-05-18 01:31:36 +02:00
98b2cb6484 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-17:
  - update .custodian-brief.md for state-hub
2026-05-17 23:28:15 +02:00
80ff5e6128 docs: clarify state hub intent 2026-05-17 21:37:02 +02:00
d2e7e206bc fix: bootstrap dashboard dependencies 2026-05-17 20:55:05 +02:00
b637455cad docs: prepare state model workplan handoff 2026-05-17 20:28:32 +02:00
fdc395a600 chore: update standalone state hub wiring 2026-05-17 20:01:21 +02:00
d444462de0 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-17:
  - update .custodian-brief.md for state-hub
2026-05-17 19:11:15 +02:00
f9d2dd0046 docs: rehome state model workplan 2026-05-17 19:10:34 +02:00
bd7ac91ebf chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-17:
  - update .custodian-brief.md for state-hub
2026-05-17 19:06:59 +02:00
193d873fdb feat: import extracted state hub implementation 2026-05-17 19:00:54 +02:00
66df41c48c docs: establish state hub baseline 2026-05-17 18:54:57 +02:00
a440120fa5 docs(state-hub): plan repo extraction 2026-05-17 18:48:31 +02:00
Coulomb Social
6b71c8835e Initial commit 2026-05-17 16:15:50 +00:00
9dd71af8f9 feat(state-hub): CUST-WP-0040 — NATS lifecycle event publishing for activity-core
Makes the state hub an event publisher so activity-core can drive
maintenance automation declaratively via ActivityDefinitions, rather
than the hub creating tasks itself.

- api/events/: lazy JetStream publisher + EventEnvelope mirroring
  activity-core's contract; no-op when NATS_URL unset, fire-and-forget
  with logged failures so publishing never breaks an API request.
- Wired publishers on the five v1.0 lifecycle events:
    org.statehub.repo.registered        (POST /repos/)
    org.statehub.workstream.completed   (PATCH /workstreams/* on transition)
    org.statehub.decision.resolved      (POST /decisions/*/resolve)
    org.statehub.domain.goal.activated  (POST /domain-goals/*/activate)
    org.statehub.task.stale             (scripts/cleanup_stale_tasks.py)
- docs/nats-event-subjects.md: subject naming convention + catalog.
- docs/cron-migration.md: design stub for replacing custodian-sync
  systemd timer and cleanup-stale cron with ActivityDefinitions
  (depends on activity-core WP-0003).
- docs/activity-core-delegation.md: protocol, invariants, cutover plan.
- SCOPE.md: declares activity-core as downstream event consumer and
  restates that the state hub stays a read model, not a task factory.

Workplan: workplans/CUST-WP-0040-state-hub-nats-activity-core-integration.md
242 tests pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 05:49:29 +02:00
7140174216 Update State Hub image build provenance 2026-05-15 15:02:30 +02:00
619fb72a78 perf(api): CUST-WP-0041 — DB indexes, TTL caches, noload on list endpoints
- Migration t7o8p9q0r1s2: indexes on tasks.status, tasks(workstream_id,status),
  workstreams.status, sbom_snapshots(repo_id,snapshot_at)
- workplan-index: 30 s TTL cache + ?refresh param (4171 ms → 16 ms on hit)
- /state/summary: 15 s TTL cache, bypassed on Cache-Control: no-cache
- /topics/: noload(workstreams, decisions, progress_events) (2382 ms → 115 ms)
- /domains/: noload(topics, repos, goals) (2252 ms → 39 ms)
- /repos/: noload(goals) (2222 ms → 599 ms first / fast on repeat)
- conftest: reset TTL caches between tests to prevent bleed-through

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 11:12:17 +02:00
90c5ea50f7 feat(dashboard): poll optimisation — T4, T5, T6
T4: workstreams.md and dependencies.md now call /state/deps instead of the
    full /state/summary — removes 2 heavy 10-table queries per 60 s cycle.

T5: index.md's 4 independent polling loops (summaryState, sbomSnapState,
    regsState, wsChartState) consolidated into a single pageState generator
    with one Promise.all batch and a shared backoff counter.

T6: config.js gains waitForVisible(ms) — pauses polling entirely while the
    tab is hidden and fires immediately on visibilitychange.  pollDelay()
    simplified (hidden-tab POLL_HIDDEN logic removed).  All 16 polling pages
    migrated from await sleep(pollDelay(...)) to await waitForVisible(pollDelay(...)).

CUST-WP-0039 complete — all 6 tasks done.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 17:58:18 +02:00
b832032cc3 feat(api): dashboard poll optimisation — T1, T2, T3
T1: Cache-Control max-age=60 on /topics/, /repos/, /domains/ list endpoints
    so repeated dashboard polls within a minute are served from browser cache.

T2: ETag middleware (md5 hash) on all JSON GET responses with conditional-GET
    (304 Not Modified) support; If-None-Match and ETag added to CORS headers.
    ETag registered inside CORS so 304s automatically carry CORS headers.

T3: GET /state/deps — lightweight dep-graph endpoint returning open workstreams
    with depends_on/blocks edges only, skipping the 10-table full-summary query.
    Prerequisite for T4 (switching workstreams.md and dependencies.md off /state/summary).

Workplan: CUST-WP-0039-dashboard-poll-optimization.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 17:26:30 +02:00
88ff588fb0 fix(api): restrict uvicorn --reload to source dirs only
Watching .venv/ (6k files) and dashboard/node_modules/ (6k files) was
causing sustained ~42% CPU on the uvicorn main process.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 15:26:48 +02:00
2484ed2815 Load limiting safeguards 2026-05-06 04:04:53 +02:00
47f6971c56 Updated repo onboarding 2026-05-04 19:18:10 +02:00
5429340f21 Improved workplan dependency management facilities 2026-05-04 11:45:24 +02:00
9d3963cead register project fix 2026-05-04 11:04:25 +02:00
a8228fc780 railiance-bootstrap to railiance-cluster rename cleanup 2026-05-03 16:30:07 +02:00
04bef63209 Locked in cytoscape.js as visualization for dep graph 2026-05-03 01:43:50 +02:00
26b9b95186 Codex state hub stuff added 2026-05-02 17:13:13 +02:00
e0f6a3b7a9 Overview shows workstreams by repo now and allows drilldown 2026-05-02 12:01:45 +02:00
e521f267ca Cleanup of documentation 2026-05-02 00:46:07 +02:00
a00f1b615b Task flow engine implementation 2026-05-02 00:21:14 +02:00
5502d1d535 Implemented foundation of task-flow-engine 2026-05-01 22:19:03 +02:00
c9695d51b1 Implemented Ad-Hoc Task handling 2026-05-01 21:27:52 +02:00
b8eb744e79 scope refactoring 2026-05-01 01:47:14 +02:00
fc725ec65f state-hub scope functionality work 2026-05-01 01:33:15 +02:00
45fb6e141d chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-05-01:
  - update .custodian-brief.md for the-custodian
2026-05-01 00:55:53 +02:00
548c3efe4a feat(state-hub): Interface Change Registry (CUST-WP-0033 T01-T06)
Adds first-class tracking for API and interface mutations across the
agent ecosystem. Breaking changes are documented, affected repos are
notified via inbox, and agents discover pending changes at session
start via the dispatch endpoint.

- Migration q4l5m6n7o8p9: interface_changes table
- Model/schema: InterfaceChange with draft→published→resolved lifecycle
- Router: POST/GET/PATCH /interface-changes/, /publish, /resolve actions
  (auto-notify affected repo agents on publish; progress event on origin)
- Dispatch: GET /repos/{slug}/dispatch now returns pending_interface_changes
- MCP tools: register_interface_change, list_interface_changes,
  publish_interface_change, resolve_interface_change
- Dashboard: /interface-changes page with type badges, planned calendar,
  published cards, and draft table
- EP-CUST-ICR-001 registered: webhook subscriptions (deliberately deferred)

First record: trailing-slash normalisation (2026-04-26), published,
affecting repo-registry — visible in repo-registry dispatch immediately.

223 tests passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 15:29:08 +02:00
768a8ba9c7 fix(api): normalize trailing slashes — no slash on param routes
Rule: trailing slash only on collection roots (/). Any route containing
a path parameter {…} uses no trailing slash. Applies across all routers,
scripts, Makefile, and tests. Fixes 307-redirect fragility on POST/PATCH
from naive clients (curl, Codex HTTP calls).

Also adds POST /repos/{slug}/sync — runs ADR-001 consistency check with
--fix via HTTP, so non-MCP agents (Codex) can self-service DB sync without
operator intervention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 15:13:01 +02:00