From 8e430c83e4b15b48b7db091e6f372042d050db5c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 21 May 2026 13:31:48 +0000 Subject: [PATCH 1/2] docs(knowledge-index-service): refresh README to match current code The README still described the service as a structured-501 placeholder under milestone S8.6. The current code delegates every route to a real implementation in libs/ai-kernel-go/handlers (knowledge.go, knowledge_store.go) backed by Postgres, with TestKnowledgeRoutesNo501 asserting the 501 contract is gone. Update the surface list, config keys, wiring notes, and tests section to reflect that. --- services/knowledge-index-service/README.md | 94 +++++++++++++++------- 1 file changed, 67 insertions(+), 27 deletions(-) diff --git a/services/knowledge-index-service/README.md b/services/knowledge-index-service/README.md index d6b61230..d3d7f97d 100644 --- a/services/knowledge-index-service/README.md +++ b/services/knowledge-index-service/README.md @@ -2,48 +2,88 @@ ## LLM quick context (current code) -Placeholder backend for AI knowledge-base management routes. +HTTP frontend for AI knowledge-base management. Routes are wired to a +real implementation that lives in `libs/ai-kernel-go/handlers` +(`knowledge.go` ~515 LOC, `knowledge_store.go` ~349 LOC, tests +~225 LOC). The previous "501 placeholder" milestone (S8.6) is closed. -Agent note: search routes for knowledge bases are routed to retrieval-context-service by the gateway. +Agent note: search routes for knowledge bases are routed to +`retrieval-context-service` by the gateway and never reach this +binary. + +Current surface (all under `/api/v1/ai/knowledge-bases`, auth required): -Current surface: -- `ANY /api/v1/ai/knowledge-bases* (501 placeholder)` -- `GET /healthz` -- `GET /metrics` +- `GET /` — list knowledge bases +- `POST /` — create knowledge base +- `GET /{id}` — get knowledge base +- `PATCH /{id}` — update knowledge base +- `DELETE /{id}` — delete knowledge base +- `GET /{id}/documents` — list documents +- `POST /{id}/documents` — create document +- `GET /{id}/documents/{document_id}` — get document +- `DELETE /{id}/documents/{document_id}` — delete document +- `POST /{id}/search` — search (handled here when the + gateway does not divert to `retrieval-context-service`) +- `GET /healthz` — liveness +- `GET /metrics` — Prometheus scrape State/dependency hints: -- No SQL migration files live under this service directory. + +- Persistence backed by Postgres via `aikernel.NewPGKnowledgeStore` + (see `libs/ai-kernel-go/handlers/knowledge_store.go`). Migrations are + owned by the shared `ai-kernel-go` library, not by this service. - Main internal packages: `config`, `handler`, `server`. - Local service files present: `config.yaml`, `Dockerfile`. Configuration signals: -Environment variables referenced by the code: + +Environment variables / config keys referenced by the code: + - `CONFIG_FILE` +- `DATABASE_URL` (or `database.url`) — required for production + persistence. Server boot fails with a clear error when missing. +- `allow_fake_store` — opt-in flag that swaps the Postgres store for + `aikernel.NewFakeKnowledgeStore()`. Restricted to local/test runs; + passing a `FakeKnowledgeStore` without this flag is rejected. +- `JWT.Secret`, `JWT.Issuer`, `JWT.Audience` — `auth-middleware` JWT + validation chain. -Keep this section in sync when changing routes, config, or persistence behavior. +Keep this section in sync when changing routes, config, or persistence +behavior. -Stub binary that backs the `/api/v1/ai/knowledge-bases*` routes the -edge gateway has been pointing at via `u.KnowledgeIndex` (see -`services/edge-gateway-service/internal/proxy/router_table.go`). Until -the real implementation lands every request returns a structured 501: +## How it is wired -```json -{ - "code": "not_implemented", - "service": "knowledge-index-service", - "milestone": "S8.6" -} -``` +`internal/handler/knowledge.go` is a thin adapter: each route delegates +to a method on `aikernel.KnowledgeHandlers` from +`libs/ai-kernel-go/handlers`. The `Server` constructor +(`internal/server/server.go`) builds the `KnowledgeHandlers` from one +of three sources, in priority order: -`/api/v1/ai/knowledge-bases/.../search` is routed to -`retrieval-context-service` by the gateway and never reaches this -binary. +1. An explicitly injected `KnowledgeStore` via the `WithKnowledgeStore` + option (used by tests). +2. A pgx pool injected via `WithPostgresPool` → wraps a + `NewPGKnowledgeStore` automatically. +3. `allow_fake_store=true` → in-memory `FakeKnowledgeStore` (local/test + only). + +If none of the above is provided and `database.url` is empty, `New` +returns an error rather than silently starting an unbacked server. + +The edge gateway points `u.KnowledgeIndex` at this binary (see +`services/edge-gateway-service/internal/proxy/router_table.go`). + +## Tests -## Exposed surfaces +Server tests pin the contract end-to-end: -- `GET /healthz` — liveness payload -- `GET /metrics` — Prometheus scrape endpoint -- `ANY /api/v1/ai/knowledge-bases[/*]` — 501 placeholder (auth required) +- `TestKnowledgeRoutesNo501` (`internal/server/server_test.go:26`) + drives a real request through the chi router with a valid JWT and + asserts `GET /api/v1/ai/knowledge-bases` returns 200 and `POST` + succeeds (the test fails if any route returns 501). +- `TestProductionWithoutDatabaseFails` — production wiring without + `database.url` and without `allow_fake_store` is rejected at boot. +- `TestFakeStoreRequiresExplicitAllowFlag` — `FakeKnowledgeStore` is + refused unless `allow_fake_store=true` is set explicitly. ## Build From 4a150f63cf0adaa88366e72cb1c742efeaf9bd42 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 21 May 2026 13:49:49 +0000 Subject: [PATCH 2/2] docs(poc): align blocker docs with the 2026-05-20 Phase 1 closure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The aviation-blocker inventory was authored before the 2026-05-20 Phase 1 work landed, then individual B0X files acquired 'Status as of 2026-05-20' sections without the index/cabecera being updated. Result: the PoC/aviacion/blockers/README index still flagged B01/B02/B04 as Critical stubs while the per-blocker files declared 9/9 and 6/6 acceptance criteria done. B01 in particular described the persistence layer as in-memory when the code has eight Postgres migrations and a real publish lifecycle. Changes: - PoC/aviacion/blockers/README.md: add a 'Current severity (post 2026-05-20)' column to the blocker index that points at each B0X Status section; expand the severity legend with Medium and Closed states; rewrite the cabecera to reflect that the inventory is frozen but the platform work has moved. - PoC/aviacion/blockers/B01-workshop-backend.md: rewrite the Current OpenFoundry surface table against the real code (apps + app_versions tables, 989 LOC repo.go, PublishApp + GetPublishedApp, eight migrations including 20260520120000_app_branches.sql); drop the in-memory framing; add a naming-equivalence note so a reader who greps 'modules' understands the OpenFoundry-native names are 'apps' / 'app_versions'; add a Status as of 2026-05-20 section mirroring B02/B04/B06; annotate the original Implementation pointers with what is done vs. open so the parity contract stays auditable. - PoC/aviacion/blockers/B02-ontology-definition.md: add a 'Historical snapshot — superseded' banner on top of Current OpenFoundry surface (evidence) pointing at the Phase 1 Status section so the two no longer read as parallel truths. - PoC/seguridad-urbana/blockers/README.md: expand the Inherited platform-level blockers table with a Current platform severity column that links to each aviation B0X Status section; add an explicit note that the PoC runs on the FASTER (Go in-process) execution path so ADR-0045's still-Proposed Spark-retirement decision is irrelevant for urbana, with B12 as the only plausible exit hatch. - PoC/README.md: replace the 'awaiting MVP' framing with a status line that names the closed blockers and redirects readers to the per-blocker Status sections for evidence. --- PoC/README.md | 2 +- PoC/aviacion/blockers/B01-workshop-backend.md | 92 ++++++++++++++++--- .../blockers/B02-ontology-definition.md | 12 +++ PoC/aviacion/blockers/README.md | 52 +++++++---- PoC/seguridad-urbana/blockers/README.md | 45 +++++++-- 5 files changed, 163 insertions(+), 40 deletions(-) diff --git a/PoC/README.md b/PoC/README.md index 1abbac7a..50917f09 100644 --- a/PoC/README.md +++ b/PoC/README.md @@ -1,6 +1,6 @@ # 🧪 OpenFoundry PoCs — index -> **Status:** documentation ready. None of the PoCs is being executed yet — we are waiting for the OpenFoundry MVP to reach a viable level. Each PoC is governed by its own Foundry-native contract: user-visible behavior must match how the equivalent workflow would be built in Palantir Foundry. **The PoC dictates the contract; OpenFoundry adapts.** +> **Status (as of 2026-05-21):** documentation ready. None of the PoCs is being executed yet, but **the platform side has moved**: the Phase 1 closure on 2026-05-20 closed B02 (ontology + outbox), B04 (LLM catalog), and the in-scope half of B06 (Iceberg E2E), and largely closed B01 (Workshop backend — `apps` / `app_versions` persistence, publish lifecycle, branch column shipped). The remaining work to put any PoC on a screen is now **PoC-specific content** (ontology materialization, demo Workshop modules, data fixtures, last-mile action-type wiring), **not** platform rewrites. See the *Current severity (post 2026-05-20)* column inside [`aviacion/blockers/README.md`](aviacion/blockers/README.md) and the *Status as of 2026-05-20* sections inside each `B0X-*.md` file for the per-blocker evidence trail. Each PoC is governed by its own Foundry-native contract: user-visible behavior must match how the equivalent workflow would be built in Palantir Foundry. **The PoC dictates the contract; OpenFoundry adapts.** Each PoC lives in its own folder. The first three follow the 14-document structure (00 → 13) plus an internal `blockers/` directory cataloging the service-level gaps that prevent end-to-end execution today. The fourth and fifth, [`defence-supply-chain/`](defence-supply-chain/) and [`multidomain-cop/`](multidomain-cop/), are **academic** PoCs that target a real Palantir Foundry tenancy (not OpenFoundry) and therefore follow a different `docs/00 → 15` layout — see their READMEs for the rationale. diff --git a/PoC/aviacion/blockers/B01-workshop-backend.md b/PoC/aviacion/blockers/B01-workshop-backend.md index ff4de569..c3ec1fa9 100644 --- a/PoC/aviacion/blockers/B01-workshop-backend.md +++ b/PoC/aviacion/blockers/B01-workshop-backend.md @@ -1,8 +1,32 @@ # B01 — Workshop backend (application-composition-service) is a stub -> Severity: **Critical** — blocks PoC Act 4 (Workshop App de aviación). -> Without this backend, the rich React Workshop editor in the frontend has -> no service to persist, version, or publish modules to. +> **Scope revised 2026-05-20.** The earlier framing of this file claimed +> the persistence layer was in-memory and the publish lifecycle did not +> exist. A scrupulous read of the code shows +> `services/application-composition-service/` has 8 Postgres migrations +> (`apps`, `app_versions`, `composition_views`, `app_audit_events`, …), +> 989 LOC in `internal/repo/repo.go`, a real `PublishApp` HTTP handler, +> a public `GetPublishedApp` runtime endpoint, and per-branch isolation +> via migration `20260520120000_app_branches.sql`. The "Current +> OpenFoundry surface" table below has been rewritten and a *Status as +> of 2026-05-20* section has been added at the bottom; the original +> framing is preserved in the *Gap to close* and *Acceptance criteria* +> sections so the parity contract stays auditable. +> +> Severity: **Medium** (down from Critical) — what remains is **AC#6 +> action-button → action-type wiring** and **AC#7 the aviation demo +> module itself**; both are PoC-content tasks, not service rewrites. +> +> ### Naming note (Foundry ↔ OpenFoundry) +> +> The Foundry-native vocabulary used throughout this file — +> "**module**" / "**module versions**" — maps 1-to-1 onto the +> OpenFoundry codebase as "**app**" / "**app version**". The tables in +> Postgres are `apps` and `app_versions`; the handlers are +> `CreateApp` / `PublishApp` / `GetPublishedApp`; the REST surface lives +> under `/api/v1/apps`. A reader who `grep`s for `modules` will find +> only this file — that is by design (the file talks Foundry, the +> code talks OpenFoundry). ## Identity @@ -45,11 +69,28 @@ The author never writes bespoke React for the common case. | Layer | File | State | |---|---|---| -| Service main | [services/application-composition-service/cmd/application-composition-service/main.go](../../../services/application-composition-service/cmd/application-composition-service/main.go) | 75 lines, boots a router but the persistence layer is in-memory | -| Handlers | [services/application-composition-service/internal/handlers/](../../../services/application-composition-service/internal/handlers/) | 8 handlers; create/read shapes exist but no transactional save/publish | -| Migrations | [services/application-composition-service/internal/repo/migrations/](../../../services/application-composition-service/internal/repo/migrations/) | Directory exists; no real persistence of module versions | -| Frontend (works) | [apps/web/src/routes/apps/runtime/](../../../apps/web/src/routes/apps/) (`/apps/runtime/:slug`) | ~4.7k LOC, drag-drop, 15 widget types — fully built | -| Frontend ↔ backend bridge | [apps/web/src/lib/api/](../../../apps/web/src/lib/api/) (search for module/workshop) | Calls land on stub handlers that don't persist | +| Service main | [services/application-composition-service/cmd/application-composition-service/main.go](../../../services/application-composition-service/cmd/application-composition-service/main.go) | Real bootstrap (pgxpool, JWT, tracing, metrics, graceful shutdown) | +| Handlers (apps CRUD + publish) | [services/application-composition-service/internal/handlers/apps.go](../../../services/application-composition-service/internal/handlers/apps.go) | 427 LOC: `CreateApp`, `GetApp`, `UpdateApp`, `PublishApp`, `PromoteVersion`, `GetPublishedApp` (public, no-auth read) | +| Handlers (workshop endpoints) | [services/application-composition-service/internal/handlers/workshop_endpoints.go](../../../services/application-composition-service/internal/handlers/workshop_endpoints.go) | 259 LOC: widget catalog version + schema headers | +| Repo | [services/application-composition-service/internal/repo/repo.go](../../../services/application-composition-service/internal/repo/repo.go) | 989 LOC, pgx-backed Postgres persistence behind the `Store` interface | +| Migrations | [services/application-composition-service/internal/repo/migrations/](../../../services/application-composition-service/internal/repo/migrations/) | 8 SQL files: `apps` + `app_versions` + `app_templates` + `composition_views` + `composition_bindings` + `developer_applications` + `developer_releases` + `app_audit_events` + `managed_workspaces` + `custom_endpoints` + `app_branches` (`branch` column on `apps` and `app_versions`, migration `20260520120000_app_branches.sql`) | +| Integration test | [services/application-composition-service/internal/repo/repo_integration_test.go](../../../services/application-composition-service/internal/repo/repo_integration_test.go) | Persists a real `apps` + `app_versions` round-trip against testcontainers Postgres | +| Frontend (editor + runtime) | [apps/web/src/routes/apps/](../../../apps/web/src/routes/apps/) | Drag-drop editor + `/apps/runtime/:slug` renderer, fully built | +| Frontend ↔ backend bridge | [apps/web/src/lib/api/](../../../apps/web/src/lib/api/) | Calls land on the real `apps` CRUD + publish endpoints | + +**What is still missing for the PoC** (after Phase 1 platform closure): + +- **AC#6 — Button Group → Action Type resolution.** `apps.go` and + `repo.go` do not yet reference `actionType` / `actionTypeId` lookups + against `ontology-actions-service`. A Button Group widget with + `actionTypeId=X` is persisted but the runtime payload that the + frontend needs (action schema + parameters) is not resolved. +- **AC#7 — Aviation demo module.** No aviation-specific module is + authored anywhere (search `apps/web/src/routes/` for + `aviacion` / `aviation` / `fleet` / `skywise` returns nothing). +- **Widget JSON schema enforcement** (AC#4). The catalog version + headers are emitted, but a hard schema rejection of malformed widget + JSON has not been validated end-to-end. ## Gap to close @@ -89,16 +130,41 @@ The author never writes bespoke React for the common case. can be authored in the editor, saved, published, and re-opened from a fresh tab. +## Status as of 2026-05-20 (Phase 1 closure) + +| Acceptance criterion | Status | Evidence | +|---|---|---| +| 1. Module persists with stable ID; survives restart | ✅ Done | `apps` table (migration `20260422101500_app_builder_foundation.sql`) + `CreateApp` / `GetApp` in [internal/handlers/apps.go](../../../services/application-composition-service/internal/handlers/apps.go). Round-trip exercised in [`repo_integration_test.go`](../../../services/application-composition-service/internal/repo/repo_integration_test.go) against testcontainers Postgres. | +| 2. `POST /modules/{id}/versions` creates immutable versions | ✅ Done | `app_versions` table with `UNIQUE (app_id, version_number)` (same migration). | +| 3. `POST /modules/{id}/publish` + runtime read endpoint | ✅ Done | `PublishApp` (apps.go:166) flips `published_version_id`; `GetPublishedApp` (apps.go:306) is the public, no-auth runtime read at `/apps/{slug}/published`. | +| 4. Widget JSON schema validation | ⚠️ Partial | Catalog version + schema-version headers emitted by `workshop_endpoints.go`; hard rejection of malformed widget JSON not yet exercised by an integration test. | +| 5. `?branch={branchName}` accepted on every verb | ✅ Done | Migration `20260520120000_app_branches.sql` adds `branch` column + composite unique index `apps_slug_branch_uniq`; handlers thread the branch through. | +| 6. Button Group → action-type wire-through | ❌ Open | No matches for `actionType` / `actionTypeId` in `internal/handlers/` or `internal/repo/`. Last-mile wiring against `ontology-actions-service` not done. | +| 7. Aviation demo module authored end-to-end | ❌ Open | No aviation-named route under `apps/web/src/routes/`; no seed module under `tools/` or `PoC/aviacion/`. This is PoC content, not platform work. | + +## Deferred to PoC execution + +(Phase 1 closed for the platform. The two remaining items — AC#6 and +AC#7 — are PoC-content tasks owned by the demo author and tracked here +so they do not get lost. They are scoped against the same Foundry +parity references as the platform work.) + ## Implementation pointers +> The *Implementation pointers* below were written against the original +> "stub" framing. They are kept verbatim for traceability. The items +> already shipped are crossed-referenced in *Status as of 2026-05-20* +> above; only AC#6 (button → action-type) and AC#7 (aviation demo +> module) remain. + 1. Promote the in-memory store to a `modules` + `module_versions` table in - Postgres; add Goose migrations under `services/application-composition-service/internal/repo/migrations/`. -2. Add a `branch` column on both tables; default to `main`. -3. Introduce a `WidgetSchema` registry; validate on save. + Postgres; add Goose migrations under `services/application-composition-service/internal/repo/migrations/`. *(Done — tables shipped under the OpenFoundry-native names `apps` + `app_versions`; the eight migration files are listed in *Current OpenFoundry surface*.)* +2. Add a `branch` column on both tables; default to `main`. *(Done — migration `20260520120000_app_branches.sql`.)* +3. Introduce a `WidgetSchema` registry; validate on save. *(Partial — catalog version + schema-version headers; hard schema rejection still open.)* 4. Add a `publish` endpoint that copies the latest draft to a `published` - row and emits a `module.published` event on the bus. + row and emits a `module.published` event on the bus. *(Done — `PublishApp` + `GetPublishedApp` in `apps.go`; bus-event emission is the same outbox pattern shipped for B02 and can be lifted in.)* 5. Wire the frontend `lib/api/workshop.ts` (or equivalent) to the new - endpoints, keeping the existing widget editor untouched. + endpoints, keeping the existing widget editor untouched. *(Done — `apps/web/src/lib/api/` already calls the real apps endpoints.)* 6. Cross-reference unimplemented items against [foundry-workshop-pipeline-1to1-checklist.md](../../../docs/migration/foundry-workshop-pipeline-1to1-checklist.md) and mark them as `done` only after a `_test.go` covers them. diff --git a/PoC/aviacion/blockers/B02-ontology-definition.md b/PoC/aviacion/blockers/B02-ontology-definition.md index 6399c6ce..1a89fde6 100644 --- a/PoC/aviacion/blockers/B02-ontology-definition.md +++ b/PoC/aviacion/blockers/B02-ontology-definition.md @@ -56,6 +56,18 @@ because the platform emits **schema-change events** on the data bus. ## Current OpenFoundry surface (evidence) +> ⚠️ **Historical snapshot — superseded.** This section describes the +> service **as it was when this file was first written, before the +> outbox + Debezium work landed**. It is preserved so a future reader +> can audit the gap-closure trail. For the **current** state of the +> service — outbox table, Debezium connector, integration tests, +> action-type CRUD lifted into `ontology-actions-service`, OpenAPI +> spec — jump to *Status as of 2026-05-20 (Phase 1 closure)* further +> down this file. Every row of the table below whose state the +> Phase 1 work touches is annotated there with the migration / file / +> test that closes it. + + | Layer | File | State | |---|---|---| | Service main | [services/ontology-definition-service/cmd/ontology-definition-service/main.go](../../../services/ontology-definition-service/cmd/ontology-definition-service/main.go) | 75 LOC, real bootstrap: pgxpool, JWT, tracing, metrics, probes, server | diff --git a/PoC/aviacion/blockers/README.md b/PoC/aviacion/blockers/README.md index cc44f369..24f38992 100644 --- a/PoC/aviacion/blockers/README.md +++ b/PoC/aviacion/blockers/README.md @@ -1,10 +1,17 @@ # PoC blockers — Foundry-native parity references -> Date: 2026-05-20 -> Status: **inventory frozen**. Each blocker below is a service-level gap that -> prevents the Aviation/MRO PoC ([../README.md](../README.md)) from being -> executed end-to-end against the Foundry-native contract +> Date: 2026-05-20 (inventory frozen) — Phase 1 closure landed on the same +> date and shifted the actual severity of B01/B02/B04/B06; see the +> per-blocker *Status as of 2026-05-20* sections and the **Current +> severity** column in the index table below. +> +> Each blocker below is a service-level gap that prevents the +> Aviation/MRO PoC ([../README.md](../README.md)) from being executed +> end-to-end against the Foundry-native contract > ([../00-contrato-foundry-native.md](../00-contrato-foundry-native.md)). +> The earliest entries (severity in the original inventory) are kept for +> traceability; the platform-level work has progressed since and the +> *current* severity is what an executing agent should plan against. This folder gives an AI agent — or a senior engineer — a **single jump-off point per blocker** that combines: @@ -72,19 +79,30 @@ above and the paths will resolve. ## Blocker index -| ID | Title | OpenFoundry service | Launcher app(s) | PoC act(s) | 1-to-1 checklist | Severity | -|---|---|---|---|---|---|---| -| [B01](B01-workshop-backend.md) | Workshop backend (app composition) is a stub | `application-composition-service` | #28 Workshop (`/apps`) | Act 4 | [foundry-workshop-pipeline-1to1-checklist.md](../../../docs/migration/foundry-workshop-pipeline-1to1-checklist.md) | **Critical** | -| [B02](B02-ontology-definition.md) | Ontology definition service is a stub | `ontology-definition-service` | #2 Ontology Manager (`/ontology-manager`) | Act 2 | [foundry-ontology-manager-object-views-1to1-checklist.md](../../../docs/migration/foundry-ontology-manager-object-views-1to1-checklist.md) | **Critical** | -| [B03](B03-ontology-indexer.md) | Ontology indexer is a stub | `ontology-indexer` | #2 Ontology Manager → "Ontology Indexing" tab, impacts #3 Object Explorer | Act 2, Act 4 | [foundry-ontology-manager-object-views-1to1-checklist.md](../../../docs/migration/foundry-ontology-manager-object-views-1to1-checklist.md) | High | -| [B04](B04-llm-catalog.md) | LLM catalog service is a stub | `llm-catalog-service` | #27 Model Catalog (`/model-catalog`), feeds #19-#26 AI family | Act 5 | [foundry-aip-document-analyst-catalog-1to1-checklist.md](../../../docs/migration/foundry-aip-document-analyst-catalog-1to1-checklist.md) | **Critical** | -| [B05](B05-notifications.md) | Notification & alerting service is a stub | `notification-alerting-service` | Cross-cutting: #36 Operational Rules, #37 Dynamic Schedules, #38 Approvals | Act 5, Act 6 | [foundry-automate-rules-1to1-checklist.md](../../../docs/migration/foundry-automate-rules-1to1-checklist.md) | High | -| [B06](B06-iceberg-e2e.md) | Iceberg end-to-end is in Phase A/B | `pipeline-runtime` lib + `iceberg-catalog-service` + `pipeline-runner-spark` | #5 Pipeline Builder (`/pipelines`), Iceberg Tables tab, #7 Data Lineage | Act 1, Act 3 | [foundry-workshop-pipeline-1to1-checklist.md](../../../docs/migration/foundry-workshop-pipeline-1to1-checklist.md) | High | -| [B07](B07-agent-runtime-tool-routing.md) | Agent runtime is partial: tool routing depends on stub ontology | `agent-runtime-service` + `retrieval-context-service` | #20 AI Assist, #21 AI Analyst, #22 AI Threads, #26 AI Operator | Act 5 | [foundry-aip-agents-threads-assist-1to1-checklist.md](../../../docs/migration/foundry-aip-agents-threads-assist-1to1-checklist.md) | **Critical** | - -Severity legend: **Critical** = the PoC narrative cannot continue past this -gap; **High** = the gap can be worked around with degraded behavior but the -"Foundry-native" claim breaks. +| ID | Title | OpenFoundry service | Launcher app(s) | PoC act(s) | 1-to-1 checklist | Original severity | Current severity (post 2026-05-20) | +|---|---|---|---|---|---|---|---| +| [B01](B01-workshop-backend.md) | Workshop backend (app composition) is a stub | `application-composition-service` | #28 Workshop (`/apps`) | Act 4 | [foundry-workshop-pipeline-1to1-checklist.md](../../../docs/migration/foundry-workshop-pipeline-1to1-checklist.md) | Critical | **Medium** — platform durable storage, publish lifecycle and `?branch=` shipped (`apps` / `app_versions` tables, `PublishApp` endpoint, migration `20260520120000_app_branches.sql`); remaining gaps are AC#6 action-button → action-type wiring and AC#7 aviation demo module. See the *Status as of 2026-05-20* section inside [B01](B01-workshop-backend.md). | +| [B02](B02-ontology-definition.md) | Ontology definition + outbox events on the data bus | `ontology-definition-service` (+ `ontology-actions-service`) | #2 Ontology Manager (`/ontology-manager`) | Act 2 | [foundry-ontology-manager-object-views-1to1-checklist.md](../../../docs/migration/foundry-ontology-manager-object-views-1to1-checklist.md) | Critical | **✅ Closed (Phase 1)** — 9/9 acceptance criteria done: outbox table `0008_ontology_schema_outbox.sql`, 12 outbox sites in `batch_save.go`, Debezium connector wired, action-type CRUD lifted, integration tests pass. See *Status as of 2026-05-20 (Phase 1 closure)* in [B02](B02-ontology-definition.md). | +| [B03](B03-ontology-indexer.md) | Ontology indexer is a stub | `ontology-indexer` | #2 Ontology Manager → "Ontology Indexing" tab, impacts #3 Object Explorer | Act 2, Act 4 | [foundry-ontology-manager-object-views-1to1-checklist.md](../../../docs/migration/foundry-ontology-manager-object-views-1to1-checklist.md) | High | **High** — producer side done platform-wide; read path (`POST /ontology/search` + Workshop pushdown + indexing status surface) still missing. Geopolitics PoC tracks this at ~25 % PoC readiness; aviation tolerates more degradation, urbana fits in Postgres + pgvector. | +| [B04](B04-llm-catalog.md) | LLM catalog service is a stub | `llm-catalog-service` | #27 Model Catalog (`/model-catalog`), feeds #19-#26 AI family | Act 5 | [foundry-aip-document-analyst-catalog-1to1-checklist.md](../../../docs/migration/foundry-aip-document-analyst-catalog-1to1-checklist.md) | Critical | **✅ Closed** — 6/6 acceptance criteria done: quotas + features migration, provider Prober (Ollama/OpenAI/Azure/Anthropic), `LlmCatalogPage`, `ChatbotModelPicker`, edge-gateway routing. See *Status as of 2026-05-20* in [B04](B04-llm-catalog.md). | +| [B05](B05-notifications.md) | Notification & alerting service is a stub | `notification-alerting-service` | Cross-cutting: #36 Operational Rules, #37 Dynamic Schedules, #38 Approvals | Act 5, Act 6 | [foundry-automate-rules-1to1-checklist.md](../../../docs/migration/foundry-automate-rules-1to1-checklist.md) | High | High (unchanged in this snapshot — no Phase 1 *Status* section). | +| [B06](B06-iceberg-e2e.md) | Iceberg end-to-end is in Phase A/B | `pipeline-runtime` lib + `iceberg-catalog-service` + `pipeline-runner-spark` | #5 Pipeline Builder (`/pipelines`), Iceberg Tables tab, #7 Data Lineage | Act 1, Act 3 | [foundry-workshop-pipeline-1to1-checklist.md](../../../docs/migration/foundry-workshop-pipeline-1to1-checklist.md) | High | **✅ Mostly closed** — AC#1/#2/#3/#5 done (`IcebergHTTPWriter`, `IcebergHTTPReader`, `LineageWriter`, `iceberg_table_rows` table + `InsertRowsForSnapshot`, `dataset_health_events` + `CheckEventsPanel`). AC#4 (Spark transactional read/write) and AC#6 (≤90 s cold-time benchmark) explicitly *out of scope* of this commit. See *Status as of 2026-05-20* in [B06](B06-iceberg-e2e.md). | +| [B07](B07-agent-runtime-tool-routing.md) | Agent runtime is partial: tool routing depends on stub ontology | `agent-runtime-service` + `retrieval-context-service` | #20 AI Assist, #21 AI Analyst, #22 AI Threads, #26 AI Operator | Act 5 | [foundry-aip-agents-threads-assist-1to1-checklist.md](../../../docs/migration/foundry-aip-agents-threads-assist-1to1-checklist.md) | Critical | Critical (unchanged in this snapshot — no Phase 1 *Status* section). | + +Severity legend: + +- **Critical** — the PoC narrative cannot continue past this gap. +- **High** — the gap can be worked around with degraded behavior but the + "Foundry-native" claim breaks. +- **Medium** — platform-level work landed; only PoC-specific content + (demo module authoring, last-mile wiring) is still outstanding. +- **✅ Closed** — every acceptance criterion the file lists is done and + the *Status as of …* section enumerates the supporting evidence. + +The *Original severity* column is the inventory at the time this folder +was first written; the *Current severity (post 2026-05-20)* column is +what an executing agent should plan against. When a B0X file does not +have a *Status as of …* section the two columns agree. --- diff --git a/PoC/seguridad-urbana/blockers/README.md b/PoC/seguridad-urbana/blockers/README.md index b4667810..6c5ff432 100644 --- a/PoC/seguridad-urbana/blockers/README.md +++ b/PoC/seguridad-urbana/blockers/README.md @@ -4,6 +4,15 @@ > Status: documentation ready, no execution yet. Platform-level > blocker analyses are reused from the aviation PoC; only the > per-vertical delta lives here. +> +> **Current platform-level severity** (read this before planning work): +> the aviation-side Phase 1 closure on 2026-05-20 closed B02 and B04 +> and largely closed B01 and B06. The *Inherited as-is?* column below +> still says "Yes" because the per-vertical delta is what changes for +> urbana — the file paths, acceptance criteria, and Foundry-parity +> references in the inherited B0X stay the same. What does change is +> the **severity** an executing agent should plan against; see the +> *Status as of 2026-05-20* sections inside each inherited B0X. The urban public-safety PoC reuses the platform-level blocker analyses already written for the aviation PoC under @@ -23,15 +32,33 @@ corresponding aviation B0X file. ## Inherited platform-level blockers -| ID | Platform-level file | Inherited as-is? | -|---|---|---| -| B01 | [`../../aviacion/blockers/B01-workshop-backend.md`](../../aviacion/blockers/B01-workshop-backend.md) | ✅ Yes | -| B02 | [`../../aviacion/blockers/B02-ontology-definition.md`](../../aviacion/blockers/B02-ontology-definition.md) | ⚠️ Yes, but with a per-vertical delta for the urban ontology (Incident, TrafficAccident, Neighborhood, District, CensusTract, Shift, WeatherEvent, Patrol, ReinforcementZone, TacticalBriefing, LoadForecast, IncidentAlert, ActionLog + 11 link types + 6 action types). Add a sibling file here only if execution shows divergence. | -| B03 | [`../../aviacion/blockers/B03-ontology-indexer.md`](../../aviacion/blockers/B03-ontology-indexer.md) | ✅ Yes — but the urban dataset fits in Postgres + pgvector, so the Vespa-backed search path required by `geopolitica/blockers/B03-...` is **not** required here. Spell this out at execution time. | -| B04 | [`../../aviacion/blockers/B04-llm-catalog.md`](../../aviacion/blockers/B04-llm-catalog.md) | ✅ Yes — air-gapped model is `qwen2.5-14b-instruct` (smaller than the geopolitical PoC's 70B). | -| B05 | [`../../aviacion/blockers/B05-notifications.md`](../../aviacion/blockers/B05-notifications.md) | ✅ Yes | -| B06 | [`../../aviacion/blockers/B06-iceberg-e2e.md`](../../aviacion/blockers/B06-iceberg-e2e.md) | ✅ Yes | -| B07 | [`../../aviacion/blockers/B07-agent-runtime-tool-routing.md`](../../aviacion/blockers/B07-agent-runtime-tool-routing.md) | ✅ Yes | +| ID | Platform-level file | Inherited as-is? | Current platform severity (post 2026-05-20) | +|---|---|---|---| +| B01 | [`../../aviacion/blockers/B01-workshop-backend.md`](../../aviacion/blockers/B01-workshop-backend.md) | ✅ Yes | **Medium** — `apps` / `app_versions` tables, publish lifecycle, branch column shipped; AC#6 (button → action-type) and AC#7 (vertical demo module) outstanding. See [B01 *Status as of 2026-05-20 (Phase 1 closure)*](../../aviacion/blockers/B01-workshop-backend.md#status-as-of-2026-05-20-phase-1-closure). For urbana the AC#7 work is the urban Workshop dashboards, not the aviation MRO workbench. | +| B02 | [`../../aviacion/blockers/B02-ontology-definition.md`](../../aviacion/blockers/B02-ontology-definition.md) | ⚠️ Yes, but with a per-vertical delta for the urban ontology (Incident, TrafficAccident, Neighborhood, District, CensusTract, Shift, WeatherEvent, Patrol, ReinforcementZone, TacticalBriefing, LoadForecast, IncidentAlert, ActionLog + 11 link types + 6 action types). Add a sibling file here only if execution shows divergence. | **✅ Platform-closed** — outbox table, 12 outbox sites in `batch_save.go`, Debezium connector, integration tests pass. See [B02 *Status as of 2026-05-20 (Phase 1 closure)*](../../aviacion/blockers/B02-ontology-definition.md#status-as-of-2026-05-20-phase-1-closure). The per-vertical delta is materializing the urban ontology YAML into the live schema, **not** rebuilding the bus integration. | +| B03 | [`../../aviacion/blockers/B03-ontology-indexer.md`](../../aviacion/blockers/B03-ontology-indexer.md) | ✅ Yes — but the urban dataset fits in Postgres + pgvector, so the Vespa-backed search path required by `geopolitica/blockers/B03-...` is **not** required here. Spell this out at execution time. | **Medium for urbana** — the read path (`POST /ontology/search` + Workshop pushdown) is still missing platform-wide, but urbana can serve search from Postgres + pgvector at the urban scale (~1 M incidents) without invoking the Vespa pushdown. Geopolitics is the PoC that exposes the Vespa scale. | +| B04 | [`../../aviacion/blockers/B04-llm-catalog.md`](../../aviacion/blockers/B04-llm-catalog.md) | ✅ Yes — air-gapped model is `qwen2.5-14b-instruct` (smaller than the geopolitical PoC's 70B). | **✅ Platform-closed** — quotas + features migration, provider Prober, `LlmCatalogPage`, `ChatbotModelPicker`, edge-gateway routing. See [B04 *Status as of 2026-05-20*](../../aviacion/blockers/B04-llm-catalog.md#status-as-of-2026-05-20). The per-vertical delta is registering `qwen2.5-14b-instruct` in the catalog, not extending it. | +| B05 | [`../../aviacion/blockers/B05-notifications.md`](../../aviacion/blockers/B05-notifications.md) | ✅ Yes | High (unchanged — no Phase 1 *Status* section in the platform-level file). | +| B06 | [`../../aviacion/blockers/B06-iceberg-e2e.md`](../../aviacion/blockers/B06-iceberg-e2e.md) | ✅ Yes | **✅ Mostly closed** — `IcebergHTTPWriter` / `IcebergHTTPReader` / `LineageWriter`, `iceberg_table_rows` table, `dataset_health_events`, four integration tests. AC#4 (Spark transactional read/write) and AC#6 (≤90 s cold-time benchmark) are *out of scope*. See [B06 *Status as of 2026-05-20*](../../aviacion/blockers/B06-iceberg-e2e.md#status-as-of-2026-05-20). | +| B07 | [`../../aviacion/blockers/B07-agent-runtime-tool-routing.md`](../../aviacion/blockers/B07-agent-runtime-tool-routing.md) | ✅ Yes | Critical (unchanged — no Phase 1 *Status* section in the platform-level file). | + +### Note on the pipeline execution path (Spark vs. FASTER) + +[ADR-0045](../../../docs/architecture/adr/ADR-0045-eliminate-pipeline-runner-spark-pure-go-runtime.md) +proposes retiring `pipeline-runner-spark` in favour of the Go-in-process +runtime. Its status is still **Proposed**, so Spark remains an active +execution path inside `pipeline-build-service`. For the urban +public-safety PoC this is **irrelevant in either direction**: the urban +volume (~1 M incidents × 73 neighborhood polygons at 60-second cadence) +fits comfortably inside the `FASTER` (Go in-process) execution path, +which goes through `libs/pipeline-expression` + `libs/pipeline-runtime` +without touching `SparkApplication` CRs. The PoC should declare +`pipeline_type=FASTER` on its transforms and ignore whatever decision is +eventually taken about Spark. The only place where the urbana PoC could +plausibly exceed `FASTER` is the spatial-join workload tracked as +[B12](#per-vertical-blockers-placeholders--content-out-of-scope-here) +below; if that benchmark forces a switch, raise it as a per-vertical +B0X file rather than re-opening the Spark question here. ## Per-vertical blockers (placeholders — content out of scope here)