Wire-format Pydantic schema for AI Internet Diagnostic. The field allowlist is the privacy contract.
Project description
wifi-diag-schema
Privacy contract: the field allowlist on TelemetryFrame is the privacy posture. There is no raw_message, no username, no credential field — by construction.
The wire-format Pydantic schema for the AI Internet Diagnostic project. The cross-platform local agent, the Hugging Face Space UI, and the trained model artifact all pip install wifi-diag-schema==X.Y.Z and operate against the same set of typed contracts.
The schema source IS the privacy policy. Adding a field is a deliberate, reviewable act — the test suite enforces a literal allowlist regression gate (tests/test_telemetry_field_allowlist.py), and pydantic.ConfigDict(extra="forbid") rejects any unknown field at validation time.
Install
pip install wifi-diag-schema==1.0.0
Usage
from pydantic import ValidationError
from wifi_diag_schema import TelemetryFrame, Verdict, EvidenceItem, SCHEMA_VERSION
# Attempt to set a field outside the allowlist → ValidationError("extra_forbidden")
try:
TelemetryFrame.model_validate({"raw_message": "anything"})
except ValidationError as e:
print(e) # extra_forbidden — the privacy contract spoke
Schema fields (v1.0.0)
| Group | Count | Notes |
|---|---|---|
| Core (D-02) | 14 | timestamp, os, network_mode, rssi_dbm, bssid, channel, ping_continuity, latency_jitter_ms, dns_resolution_ms, dhcp_event_class, auth_event_class, captive_portal_detected, mac_randomization_state, driver_state |
| Extended (D-01) | 4 | per_packet_retry_count, rts_cts_rate, beacon_rssi_dbm, neighbor_ap_count_5ghz |
| Privacy mode | 1 | bssid_mode (raw | hashed) |
| Meta | 1 | window_ms |
| Total | 20 |
Every field carries a why-allowlisted justification in its Field(description=...). See src/wifi_diag_schema/_justifications.py for the extended-field rationale and per-OS source confidence tiers.
Versioning
Strict SemVer (D-05):
- Major = breaking change (field removed, type narrowed, validator tightened)
- Minor = additive (new optional field with default; new enum value)
- Patch = doc-only
The agent and Space exchange schema_version via HandshakeFrame on the first SSE message of every live session (added in plan 01-02). Major mismatch → hard error. Minor mismatch → warn-but-continue.
Release
Tag a release as vX.Y.Z; the publish.yml workflow runs OIDC Trusted Publishing automatically. The Trusted Publisher must be registered at https://pypi.org/manage/account/publishing/ pointing at this repo + the publish.yml workflow filename.
License
Apache-2.0.
Release process
Tag a release as vX.Y.Z; the publish.yml GitHub Action builds wheel + sdist with uv build, smoke-installs the wheel into a fresh venv, and publishes to PyPI via OIDC Trusted Publishing — no API tokens are stored anywhere.
A one-time manual step is required: register wifi-diag-schema as a Trusted Publisher at https://pypi.org/manage/account/publishing/ pointing at the GitHub repo + the publish.yml workflow filename. Until that registration is in place, the publish step will fail at the final action.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wifi_diag_schema-1.1.0.tar.gz.
File metadata
- Download URL: wifi_diag_schema-1.1.0.tar.gz
- Upload date:
- Size: 35.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6e3d84d98d4a0f1c6c1c351fb5d28eeb19ce64bef763045134e6ac0e03f36e0
|
|
| MD5 |
d20d6daeeae44491faa767cdbcabf070
|
|
| BLAKE2b-256 |
5284bdbd6185620708f30067e5807809ea5e3f1d809d8d7a80d76149cfc8e05c
|
Provenance
The following attestation bundles were made for wifi_diag_schema-1.1.0.tar.gz:
Publisher:
publish.yml on wolfwdavid/wifi-diag-schema
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wifi_diag_schema-1.1.0.tar.gz -
Subject digest:
c6e3d84d98d4a0f1c6c1c351fb5d28eeb19ce64bef763045134e6ac0e03f36e0 - Sigstore transparency entry: 1512363872
- Sigstore integration time:
-
Permalink:
wolfwdavid/wifi-diag-schema@3712c9dcff236c79c6d0e1ef73d049544483a46a -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/wolfwdavid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3712c9dcff236c79c6d0e1ef73d049544483a46a -
Trigger Event:
push
-
Statement type:
File details
Details for the file wifi_diag_schema-1.1.0-py3-none-any.whl.
File metadata
- Download URL: wifi_diag_schema-1.1.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f131a95bc7a65ef65ad634aa75d0c8485404069ad024457117e71cdaf1bdad7
|
|
| MD5 |
548bcf0b6877f116cacd4d1f3e601499
|
|
| BLAKE2b-256 |
3949f16a747a9ce996adf05ab6f7b2f280720f833d705ecdfa48d3ec560e0655
|
Provenance
The following attestation bundles were made for wifi_diag_schema-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on wolfwdavid/wifi-diag-schema
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wifi_diag_schema-1.1.0-py3-none-any.whl -
Subject digest:
6f131a95bc7a65ef65ad634aa75d0c8485404069ad024457117e71cdaf1bdad7 - Sigstore transparency entry: 1512364270
- Sigstore integration time:
-
Permalink:
wolfwdavid/wifi-diag-schema@3712c9dcff236c79c6d0e1ef73d049544483a46a -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/wolfwdavid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3712c9dcff236c79c6d0e1ef73d049544483a46a -
Trigger Event:
push
-
Statement type: