Commit Graph
24 Commits
Author SHA1 Message Date
Magnus HedemarkandGitHub 22f1d52456 fix(raleigh): keep WAF outages blocking (#424)
Keep Cloudflare WAF challenges distinct while preserving a blocking canary signal for unavailable civic adapters.
2026-08-29 13:12:42 -04:00
Magnus HedemarkandGitHub 5120238f2e fix(raleigh): classify upstream WAF challenges (#423)
Classify Cloudflare managed browser challenges as visible non-failing canary observations while preserving blocking behavior for ordinary authentication failures.
2026-08-29 12:40:16 -04:00
Magnus HedemarkandGitHub e99c6d2994 fix(raleigh): skip token-gated imagery folders in discovery and canary (#280) 2026-08-05 11:16:33 -04:00
Magnus Hedemarkandusername 3e4b651681 test(raleigh): prevent false-green police canaries 2026-07-26 20:02:14 -04:00
Magnus Hedemarkandusername 4a23562e59 fix(raleigh): restore live RPD queries 2026-07-26 19:58:54 -04:00
Magnus Hedemarkandusername 1bd7b06112 fix(raleigh): enforce publication request contracts 2026-07-26 18:56:09 -04:00
Magnus Hedemarkandusername cc26b4cb27 fix(raleigh): bound publication source contracts 2026-07-26 18:52:02 -04:00
Magnus Hedemarkandusername 07c2ae2e8f fix(raleigh): normalize statistics source failures 2026-07-26 18:47:32 -04:00
Magnus Hedemarkandusername f3dfb68832 fix(raleigh): normalize report probe failures 2026-07-26 18:44:48 -04:00
Magnus Hedemarkandusername 9f2e4b681c fix(raleigh): validate included resource identifiers 2026-07-26 18:41:19 -04:00
Magnus Hedemarkandusername 5f74b4dde5 fix(raleigh): reject malformed content identifiers 2026-07-26 18:38:28 -04:00
Magnus Hedemarkandusername 8becc22822 fix(raleigh): fail on missing statistics sections 2026-07-26 18:36:01 -04:00
Magnus Hedemarkandusername bf69aa1689 fix(raleigh): validate statistics response shapes 2026-07-26 18:33:14 -04:00
Magnus Hedemarkandusername b030f2607c feat(raleigh): add official public safety statistics 2026-07-26 18:30:09 -04:00
username 4eaf5aa7ea feat(raleigh): add guarded fire report lookups 2026-07-26 18:07:23 -04:00
Magnus HedemarkGitHubmagnus919 <magnus919>
1f5cd6a91c feat(raleigh): add fire protection proximity lookup (#144)
Co-authored-by: magnus919 <magnus919>
2026-07-25 01:48:53 -04:00
Magnus HedemarkGitHubmagnus919 <magnus919>
d4ab656c50 feat(raleigh): add Raleigh-Wake ECC active incident feed adapter (#142)
* feat(raleigh): add Raleigh-Wake ECC active incident feed adapter

Add an isolated, capability-limited adapter for the RWECC public
incident feed (incidents.rwecc.com/getdata). The adapter:

- Calls only the fixed public host and exact read-only endpoint
- Supports agency, incident type, and bounded result filters
- Preserves source identifiers without implying a historical archive
- Labels every response as a filtered active feed, not all 911 calls
- Fails/warns distinctly on empty, stale, malformed, and unavailable
  responses; empty feed is not reported as proof of no incidents
- Deduplicates records and guards against schema drift
- Can be disabled independently via RALEIGH_DISABLE_INCIDENTS=1
- Uses a 90-second cache lifetime

Closes #123

* chore: regenerate catalog artifacts for updated raleigh description

---------

Co-authored-by: magnus919 <magnus919>
2026-07-25 01:23:48 -04:00
Magnus HedemarkGitHubmagnus919 <magnus919>
0ca5c242ce feat(raleigh): add first-class RFD incident workflows and normalize the 2026 schema (#140)
Add a fire command group with two subcommands (incidents, response-times)
that resolve the stable ArcGIS item IDs for RFD's full public history
(2007–present) and past-month feeds, with source-aware filtering and a
normalization layer for the 2026 classification schema transition.

- New raleighlib/fire.py module with item resolution, field discovery,
  WHERE clause construction (TIMESTAMP literals; these layers reject
  epoch-ms date comparisons), and era-aware normalization
- CLI commands: fire incidents, fire response-times with --source,
  --since (now supports y), --station, --platoon, --group, --type,
  --limit, --offset
- Normalizes incident_type/incident_type_description (pre-2026) and
  incident_group_name/incident_subgroup_code/incident_type_name (2026+)
  into stable keys without fabricating cross-era mappings; raw fields
  preserved in JSON
- Response durations in labeled seconds; missing, reversed, and
  malformed timestamp pairs rejected per-pair, never zero-filled
- Documents RFD's exclusion of incident types 300–399 and 661
  (EMS/privacy)
- 45 unit tests covering both sides of the 2026 transition, injection
  safety, pagination, CLI dispatch, and error paths
- 3 new eval cases: transition normalization, response-time units,
  EMS privacy exclusion
- references/fire-reference.md with schemas, transition rules, caveats

Closes #122

Co-authored-by: magnus919 <magnus919>
2026-07-25 00:44:19 -04:00
Magnus HedemarkGitHubmagnus919 <magnus919>
50be18b8c2 feat(raleigh): add first-class RPD incident workflows (#139)
Add a police command group with four subcommands (incidents, recent,
previous-day, history) that resolve stable ArcGIS item IDs at runtime
and provide source-aware, filter-friendly access to RPD incident data.

- New raleighlib/police.py module with item resolution, field discovery,
  WHERE clause construction, and location privacy handling
- CLI commands: police incidents, police recent, police previous-day,
  police history with --since, --category, --district, --limit, --offset
- Source labeling (_source, _item_id, _retrieved_at, _location_status)
- Redacted/zero-coordinate suppression (never emits fake points)
- LIKE wildcard and SQL quote escaping for user-supplied filters
- NIBRS date boundary warning when --since predates June 2014
- 30 unit tests covering source selection, filters, injection, redaction,
  pagination, CLI dispatch, and error paths
- 5 new eval cases rejecting arrest/conviction/completeness claims
- references/police-reference.md with field schemas and caveats

Closes #121

Co-authored-by: magnus919 <magnus919>
2026-07-25 00:16:50 -04:00
Magnus HedemarkGitHubmagnus919 <magnus919>
2f535b05f7 ci(raleigh): add scheduled live endpoint and schema canary (#138)
Add a live canary that runs the full Hub catalog check (190 endpoints)
and probes all fixed non-Hub adapters (geocode, transit GTFS,
development, civic JSON:API, civic RSS, meetings eSCRIBE, imagery).

Validates source-specific minimum schemas, classifies failures into
transport_outage, auth_regression, arcgis_error, schema_drift,
parser_failure, and empty_but_valid. Retries bounded transient
failures and preserves first-failure evidence.

Runs daily at 10:17 UTC and on workflow_dispatch, separate from PR CI
so upstream outages do not block unrelated changes.

Closes #120

Co-authored-by: magnus919 <magnus919>
2026-07-24 23:52:24 -04:00
magnus919 903ea0559e feat(raleigh): expand civic data skill 2026-07-23 21:11:44 -04:00
Magnus Hedemark 1305c770d1 fix(raleigh): add JSON output for dataset info 2026-07-10 21:31:43 -04:00
Magnus Hedemark 9483280946 Fix 3 wrong service names in Raleigh dataset catalog
- Existing Bicycle Infrastructure: ExistingBicycleInfrastructure_Public → Existing_Bicycle_Infrastructure
- Speed Humps: Speed_Humps → SpeedHumps
- EVSE Stations: EVSE_Stations → EVSE_Stations_View

All three verified against live API — returning real data now.
2026-06-12 00:13:25 -04:00
Magnus Hedemark 9afed5d704 Add raleigh skill — CLI for City of Raleigh Open Data portal
Query, search, and download from 170+ public datasets via the
ArcGIS REST API. Ships a zero-dependency Python CLI with:
catalog, search, info, query, download, and categories commands.

Includes:
- SKILL.md with trigger conditions and reference table
- references/dataset-catalog.md — full 170+ dataset inventory
- references/api-reference.md — ArcGIS REST API documentation
- scripts/raleigh — executable CLI tool
2026-06-12 00:02:03 -04:00