# Cybele Re-Verification (V1-P2-2013)

**Date:** 2026-05-04 **Owner:** eng-cybele **Inputs:** every cybele wiring
ticket already marked `[x]` in `OSHUN_V1_TODOS_P2.md` §27 (V1-P2-2000 …
V1-P2-2011). **Outputs:** per-ticket source-level confirmation that the wiring
is real (not a stub), plus a green-test attestation for every `libs/cybele/*`
test target.

This is the §27 counterpart to V1-P2-6702 in §66. Each ticket is re-verified
against the file:line cited in the ticket text and against the surrounding
implementation, not just against the test suite.

## Per-ticket verification

| Ticket     | Cited file:line                                     | Implementation                                                                                                                                                                                                                                                                                                                                                                                                                        | Verdict      |
| ---------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| V1-P2-2000 | `libs/cybele/api/src/routes/properties.ts:160`      | `DrizzlePropertyRepository.create` (`properties-repository.ts:258-266`) issues `db.insert(properties).values(row).returning()` against the `cybele_properties` table; the route delegates via `setPropertyRepository`.                                                                                                                                                                                                                | **VERIFIED** |
| V1-P2-2001 | `libs/cybele/api/src/routes/construction.ts:293`    | EVM endpoint computes BAC / SPI / CPI / TCPI / EAC / ETC / VAC over a hash-chained ledger (`InMemoryConstructionLedger` in `construction-ledger.ts`, swappable via `setConstructionLedger`) seeded from authoritative `budget_committed`, `payment_settled`, `progress_attested`, and `milestone_achieved` events.                                                                                                                    | **VERIFIED** |
| V1-P2-2002 | `libs/cybele/site-analysis/src/demographics.ts:978` | `analyzeCompetitors` reads the catalogue from a `CompetitorRepository`; the production binding is `DrizzleCompetitorRepository` (`competitor-repository.ts:343-378`) which queries `cybele_competitor_developments` via Drizzle's pgTable.                                                                                                                                                                                            | **VERIFIED** |
| V1-P2-2003 | `libs/cybele/site-analysis/src/risk.ts:621`         | Topography / slope analysis goes through `SrtmDemProvider` (`dem-provider.ts:246-390`): GDAL geo-transform decoding, 3×3 neighbourhood read for Horn slope/aspect, LRU tile cache, lazy `gdal-async` import; falls back to elevation-bucket heuristic when no provider is wired.                                                                                                                                                      | **VERIFIED** |
| V1-P2-2004 | `libs/cybele/site-analysis/src/risk.ts:722`         | Vegetation analysis goes through `Sentinel2NdviProvider` (`ndvi-provider.ts:443-`): STAC `/search` against Element 84 Earth Search v1, raw L2A → reflectance scaling, NDVI = (NIR-Red)/(NIR+Red), bilinear interpolation in fixture mode. UTM/WGS-84 zone resolved via STAC `proj:epsg`.                                                                                                                                              | **VERIFIED** |
| V1-P2-2005 | `libs/cybele/site-analysis/src/risk.ts:803`         | Subsurface analysis goes through `GgsaWfsBoreholeProvider` (`borehole-provider.ts:429-499`): WFS 2.0 GetFeature call to the Ghana Geological Survey, EPSG:4326 bbox parameterisation, GeoJSON FeatureCollection parsing, true-distance re-rank via Haversine.                                                                                                                                                                         | **VERIFIED** |
| V1-P2-2006 | `libs/cybele/site-analysis/src/risk.ts:1010`        | Air-quality analysis goes through `OpenAqEpaProvider` (`epa-monitoring-provider.ts:324-`): OpenAQ v3 `/locations?bbox=…&countries=GH` followed by a batched `/latest?locations_id=…` pull, parameter-aware accumulation (PM2.5/PM10/NO2/CO/SO2/O3 + leqDayDb when present).                                                                                                                                                           | **VERIFIED** |
| V1-P2-2007 | `libs/cybele/site-analysis/src/selection.ts:1351`   | `SiteSelectionWorkflow.evaluateAsync` (`selection.ts:1639-`) fans out DEM, Sentinel-2 NDVI, GGSA borehole, EPA air-quality, and EPA noise calls in a single `Promise.all` and adds the per-step latency + status to the synchronous workflow's step list. Provider failures degrade to the heuristic fallback paths in `risk.ts`.                                                                                                     | **VERIFIED** |
| V1-P2-2008 | `libs/cybele/design/src/drawings.ts:519`            | `DrawingBoundingBoxAnalyzer` (`drawings.ts:540-`) computes axis-aligned bounding boxes from parsed DWG/DXF entity geometry, then classifies clusters as `room` / `title-block` / `dimension` / `text-callout` / `legend` / `symbol` / `unknown` using deterministic layer-name + geometric heuristics (closed polylines for rooms, ISO 7200 aspect ratio for title blocks, DIMENSION group-code 42 for dimension values).             | **VERIFIED** |
| V1-P2-2009 | `libs/cybele/design/src/drawings.ts:562`            | `PdfjsAnnotationBackend` (`drawings.ts:1127-1222`) and `PdfLibAnnotationBackend` (`drawings.ts:1224-1317`) both walk the PDF `/Annots` tree page-by-page and emit `PDFAnnotationInput` records with subtype, rect, contents, author, and modification date. Both lazy-import their respective NPM module to keep the optional dependency off the cold-start path.                                                                     | **VERIFIED** |
| V1-P2-2010 | `libs/cybele/construction/src/drone.ts:486`         | `OnnxDroneInferenceBackend` (`drone-inference.ts:123-`) drives an ONNX Runtime session: letterbox the source image into the model's square grid, run inference, decode either YOLOv8 (`[1, 4+C, A]`) or RT-DETR (`[1, Q, 4+C]`) outputs, IoU-based non-max suppression. Auto-format detection inspects output shape against `4 + numClasses`.                                                                                         | **VERIFIED** |
| V1-P2-2011 | `libs/cybele/proptech/src/blockchain-title.ts:356`  | `Wallet` (`wallet.ts:126-205`) is a real ECDSA secp256k1 wallet built on `@noble/secp256k1`: 32-byte private scalar validation, uncompressed public-key derivation, EIP-191 personal_sign with keccak-256 (`\x19Ethereum Signed Message:\n` prefix), 65-byte (r ‖ s ‖ v) compact signatures with `v = recovery + 27`, deterministic `fromSeed` derivation. `recoverAddress` / `verifyMessage` round-trip via `secp.recoverPublicKey`. | **VERIFIED** |

## Test attestation

`npx vitest run` from each `libs/cybele/*` directory:

```
api               10 files, 52 tests
common             2 files, 39 tests
construction       5 files, 168 tests
core               1 file, 335 tests
db                 1 file, 10 tests
design             9 files, 356 tests
finance            5 files, 245 tests
financials         4 files, 247 tests
hospitality        2 files, 91 tests
industrial-parks   2 files, 106 tests
infrastructure     2 files, 177 tests
integration        1 file, 111 tests
market-intel       3 files, 197 tests
materials          4 files, 260 tests
prefab             7 files, 207 tests
property           3 files, 188 tests
proptech           4 files, 222 tests
site-analysis      9 files, 387 tests
testing            (fixtures library — no test target)
                  ───────────────────────
total            74 files, 3 398 tests, all passing
```

The `testing/` package only ships fixtures and helpers, so vitest correctly
reports "No test files found" — that is not a regression.

## Adversarial pass

The §66-style adversarial pass for cybele lives in
[`cybele-stub-audit.md`](./cybele-stub-audit.md) (V1-P2-2012). It classifies all
61 stub-vocabulary hits and confirms zero unannotated stubs after the two
silent-stub fixes shipped with that audit (`tenant.ts:612` and
`design-intelligence.ts:838`).

## Sign-off

All 12 V1-CYB-\* wiring tickets are **VERIFIED**. The §27 cybele section is
closed; V1-P2-6702 in §66 may rely on this report when the bulk re-verification
phase reaches the cybele entry.
