Commit Graph

64 Commits

Author SHA1 Message Date
39ed5459b9 finish(STATE-WP-0064): cut over scheduler and split sweep errors from failures
STATE-WP-0064 cutover (state-hub only):
- Retire local custodian-sync.timer; archive units under infra/systemd/archived/
- Mark workplan finished; update infra/README, cron-migration, runbook, AGENTS.md
- Point activity-core-delegation at the consistency-sweep runbook

Consistency engine — automation error vs assessment failure:
- C-00 is an automation error; C-01..C-23 assessment failures are recorded
  for follow-up but no longer fail --remote --all scheduled sweeps (exit 0)
- Skip workplans/README.md in the workplan glob (human index, not a workplan)
- Progress events and compare script expose automation_error and
  assessment_failures separately from exit_code
2026-06-22 01:20:59 +02:00
ab14e77e77 feat(STATE-WP-0064): start parallel week with source-tagged sweep runners
Tag consistency_sweep_remote_all progress events by source, route the local
timer through the API, add a parallel-week comparison script, and document
the 2026-06-21 to 2026-06-28 observation window for T03.
2026-06-21 21:46:43 +02:00
821b5d6c89 fix(STATE-WP-0064): parse consistency sweep stdout with skip prefixes
Extract the JSON payload from mixed script output and document Railiance01
kubectl sync steps. Mark T02 done after cluster bridge and resolver canaries.
2026-06-21 20:56:35 +02:00
5a7a6ef5ee feat(STATE-WP-0064): add consistency sweep remote-all API endpoint
Expose POST /consistency/sweep/remote-all so activity-core can trigger
the workstation ADR-001 remote-all sweep via the bridge tunnel pattern.
Records consistency_sweep_remote_all progress events and documents the
cutover runbook while the local custodian-sync timer remains interim.
2026-06-21 20:19:22 +02:00
ce82ada0fa STATE-WP-0062 T5: docs, first-party↔repo test, mark workplan finished
- Add /docs/services reference (two-dimension model, persistence, API) and a
  pointer note from /docs/tpsc; add it to the Reference nav.
- Add a test asserting first_party.repo_slug resolves to a managed_repos FK
  (8 services tests green).
- Mark STATE-WP-0062 tasks done / status finished.

Known classes seeded in the live catalog via the API (Gitea, Postgres as
self-hosted/third-party; State Hub as self-hosted/first-party at Level 2).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 21:16:37 +02:00
77689fbfb2 STATE-WP-0062 T2: /services catalog API over the two-dimension model
Add a local /services router (source of truth for the catalog itself):
- GET /services/catalog with hosting_type / development_type / maturity_level /
  status filters (eager-loads all four extensions)
- GET /services/{slug}
- POST /services/catalog upsert-by-slug, applying the dimension extensions;
  first_party.repo_slug resolves to a managed_repos FK.

Extensions are read/written via session.get (not the relationship attribute) to
avoid async lazy-load. /tpsc/* is left intact for dependency snapshots. 7 tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 20:56:19 +02:00
e4126bc755 Add Service Definition of Mature policy and health-route test
Establish policies/service-dom.md as the service-level companion to the repo
DoI and workstream DoD. Its load-bearing Core criterion is a cheap, side-effect
free health endpoint for availability probing — satisfied by the existing
GET /state/health (DB readiness, 200/503). Served automatically at
/policy/service-dom by the existing policy router.

Add a regression test asserting /state/health returns 200 with the expected
shape, since none existed (DoM Standard criterion #4).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 15:58:51 +02:00
55e36bdf2d feat: add State Hub bulk status skill 2026-06-07 20:11:07 +02:00
e9e9168921 fix: stabilize consistency make wrappers 2026-06-07 19:49:17 +02:00
2cad5da0ab fix: harden MCP write tool errors 2026-06-07 19:30:58 +02:00
8428a02f6c feat: reuse hub-core base schemas 2026-06-07 16:42:54 +02:00
f41c61d0b5 feat: use hub-core progress router 2026-06-07 14:29:12 +02:00
40e2e96aef feat: use hub-core TPSC router 2026-06-07 14:08:55 +02:00
b3f8ed63c2 fix: distinguish consistency API lookup failures 2026-06-07 13:53:34 +02:00
0cf376ff8f feat: use hub-core policy router 2026-06-07 13:14:08 +02:00
493c241054 feat: reexport domain schemas from hub-core 2026-06-07 10:52:49 +02:00
5e32d5723d feat: reexport TPSC schemas from hub-core 2026-06-07 10:43:21 +02:00
70b264a37a feat: import core schemas from hub-core 2026-06-07 01:20:57 +02:00
b340489d96 Optimize dashboard overview loading 2026-06-06 00:42:00 +02:00
3663bac6f7 cli command statehub register with install 2026-06-05 13:09:25 +02:00
166aedfa8d feat: add workplan aliases and legacy meter
Adds preferred workplan REST/event surfaces, legacy-meter telemetry and weekly review summaries, documentation/dashboard terminology updates, dashboard API loading fixes, and close-out sync for STATE-WP-0052 and STATE-WP-0054.
2026-06-04 08:25:31 +02:00
38835e9e79 feat(tasks): adopt canonical task statuses 2026-05-26 01:32:50 +02:00
f25569d9d4 Implement financial Fabric vNext read model 2026-05-24 02:52:59 +02:00
ec5742543c Add Fabric graph read model ingest 2026-05-23 21:17:58 +02:00
d4dea7864d Add workplan execution queue 2026-05-23 19:11:30 +02:00
0ea46f081c Close lifecycle transition helper workplan 2026-05-23 18:42:32 +02:00
706b360736 Harden reconciliation conflict handling 2026-05-23 18:18:44 +02:00
997766e99d Record deferred reconciliation requests 2026-05-23 17:50:27 +02:00
757c2c3345 Add reconciliation file write-through 2026-05-23 17:41:30 +02:00
add650d4fa Add reconciliation state-change API contract 2026-05-23 17:22:12 +02:00
215a91e599 Classify UI state reconciliation changes 2026-05-23 17:14:41 +02:00
7d03cc48dd Add lifecycle helper regression tests 2026-05-23 17:06:42 +02:00
d4a195d0b5 Add renormalization rule guide 2026-05-23 17:01:41 +02:00
0aa02d9117 Add lifecycle renormalization consistency repair 2026-05-23 16:54:38 +02:00
d4e2c1a461 Harden flow advancement exit assertions 2026-05-23 16:41:21 +02:00
90c9f8e7a7 Normalize workplan IDs and activate parents on task start 2026-05-23 16:31:28 +02:00
c12091c2eb Fixed and improved token tracking 2026-05-23 13:59:05 +02:00
cea59d7f13 Add hourly RecentlyOnScope batch endpoint 2026-05-22 16:14:08 +02:00
bb985812e5 Implement RecentlyOnScope domain digest 2026-05-22 13:45:53 +02:00
c7150bae5f Improve dashboard loading and task sync 2026-05-19 02:32:22 +02:00
d6522a9a40 Complete workplan state model cleanup 2026-05-18 01:31:36 +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
e0f6a3b7a9 Overview shows workstreams by repo now and allows drilldown 2026-05-02 12:01:45 +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
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
6cbf2d2c56 feat(consistency): T04 push seal — closed-loop writeback for automated commits
Root cause of the 501-commit pile-up in inter-hub: fix_repo() created
git commits (brief updates, T03 writebacks) but never pushed them, so
the 15-minute timer accumulated local commits indefinitely. Once real
development landed on remote the repos diverged with no self-healing path.

Changes
-------
repo_sync.py (new module)
  Extracts all git lifecycle primitives: pull_ff, push_ff,
  count_remote_ahead (C-16 input), count_local_ahead (C-17/T04 input).
  Module docstring documents the push-seal invariant and stable state.

consistency_check.py
  - Imports primitives from repo_sync; thin _detect_behind_remote wrapper
    preserves backward compat for existing callers and tests.
  - C-17 backlog guard: if local has unpushed commits from a prior failed
    push, retry before making more; skip all writes if push still fails.
  - T04 push seal: unconditional push_ff() at end of every fix_repo() run.
  - _report_needs_action: ahead_of_remote param so repos with unpushed
    backlogs are not silently skipped as "clean" by fix_all_remote().
  - Domain-slug fallback: brief no longer degrades to "(unknown)" when all
    workplans are completed — falls back to any workstream for domain context.
  - Service switched from --all --fix to --remote --all (pulls before
    fixing, skips already-clean repos).

push-seal.md (new)
  Capability documentation: the problem, the invariant, all three checks
  (C-16/C-17/T04), stable-state description, API reference, and test map.

test_repo_sync.py (new, 32 tests)
  Full coverage of all four primitives via real git repos (tmp_path).
  Includes C-17 scenario, push-seal invariant, and four end-to-end
  loop-stability tests.

test_consistency_check.py
  Four new _report_needs_action cases for the ahead_of_remote parameter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 01:43:40 +02:00