Not to be merged before Christian's go. These are the contract additions of the napalm-windows depth programme (NetOrk/netork#2888–#2899).
Everything is additive. Nothing napalm-linux fills was renamed, retyped or removed.
What each stream adds
storage:host_storage.py, with HostStorageMixin, DiskSmartDict and HostVolumeDict.
basics:
clean_system_identity();
an optional UserDict.sid;
UserDict and ProcessDict move to os_models.py, re-exported from models.
logins: optional sid, administrator and remote_desktop on login accounts; LoginGroupDict and LoginGroupMemberDict; records_since on sessions.
exposure:
HostFirewallDict.windows, with the Windows firewall shapes in host_firewall_models.py;
windows_features.py, with WindowsFeaturesMixin.
events:
host_events.py, with HostEventsMixin;
the log-source kind eventlog, with LogSourceDict.channel;
optional result, exit_code, trigger_start and account on ServiceDict.
repairs:host_repairs.py, with HostRepairMixin, HostRepairResultDict, tool_outcome() and offered_host_repairs().
updates: optional title, advisories, cves and vendor_severity on UpdateDict; title on UpdateHistoryPackageDict.
posture: optional Windows posture keys on HardeningDict: secure_boot, tpm, disk_encryption, antimalware, firewall_profiles, vbs.
Checked locally
Tests: 2345 passed, 3 skipped.
ruff clean; mypy strict clean.
Two runs of tests/test_host_status.py::TestThePackageManagerCommandOnARealShell failed locally on unchanged main too; they depend on the machine.
Release
The version is not bumped. At merge this wants a minor release (4.56.0). napalm-windows' dependency floor rises to it, and the napalm-windows train PR's lowest job cannot pass until then.
Found on the way
#144: NotRequired under from __future__ import annotations is required at runtime. The posture stream avoided it in hardening.py.
**Not to be merged before Christian's go.** These are the contract additions of the napalm-windows depth programme (NetOrk/netork#2888–#2899).
**Everything is additive.** Nothing napalm-linux fills was renamed, retyped or removed.
## What each stream adds
- **storage:** `host_storage.py`, with `HostStorageMixin`, `DiskSmartDict` and `HostVolumeDict`.
- **basics:**
- `clean_system_identity()`;
- an optional `UserDict.sid`;
- `UserDict` and `ProcessDict` move to `os_models.py`, re-exported from `models`.
- **logins:** optional `sid`, `administrator` and `remote_desktop` on login accounts; `LoginGroupDict` and `LoginGroupMemberDict`; `records_since` on sessions.
- **exposure:**
- `HostFirewallDict.windows`, with the Windows firewall shapes in `host_firewall_models.py`;
- `windows_features.py`, with `WindowsFeaturesMixin`.
- **events:**
- `host_events.py`, with `HostEventsMixin`;
- the log-source kind `eventlog`, with `LogSourceDict.channel`;
- optional `result`, `exit_code`, `trigger_start` and `account` on `ServiceDict`.
- **repairs:** `host_repairs.py`, with `HostRepairMixin`, `HostRepairResultDict`, `tool_outcome()` and `offered_host_repairs()`.
- **updates:** optional `title`, `advisories`, `cves` and `vendor_severity` on `UpdateDict`; `title` on `UpdateHistoryPackageDict`.
- **posture:** optional Windows posture keys on `HardeningDict`: `secure_boot`, `tpm`, `disk_encryption`, `antimalware`, `firewall_profiles`, `vbs`.
## Checked locally
- **Tests:** 2345 passed, 3 skipped.
- **ruff** clean; **mypy strict** clean.
Two runs of `tests/test_host_status.py::TestThePackageManagerCommandOnARealShell` failed locally on unchanged `main` too; they depend on the machine.
## Release
**The version is not bumped.** At merge this wants a minor release (4.56.0). napalm-windows' dependency floor rises to it, and the napalm-windows train PR's `lowest` job cannot pass until then.
## Found on the way
#144: `NotRequired` under `from __future__ import annotations` is required at runtime. The posture stream avoided it in `hardening.py`.
HostRepairMixin declares one method per run -- verify_system_files,
repair_system_files, check_component_store, repair_component_store,
update_antimalware_signatures and scan_antimalware -- so the method list is the
guard, and a repair is never offered with its check. Each streams the tool's
lines to log and returns a HostRepairResultDict; tool_outcome builds it from the
lines and the exit code, failing a non-zero code with the tool's last lines.
offered_host_repairs lists the runs a driver defines.
clean_system_identity applies parse_system_identity's placeholder rules to values a
host reads through an interface of its own (Windows' CIM classes,
NetOrk/netork#2888); parse_system_identity now uses it. UserDict gains an optional
sid beside the int uid (NetOrk/netork#2889).
LoginAccountDict may carry sid, administrator and remote_desktop; uid
stays an int and is the RID where a SID is given. LoginAccountsDict may
carry groups (LoginGroupDict, LoginGroupMemberDict, LOGIN_GRANTS): the
groups that grant administering the host or a remote desktop login,
with every member. LoginSessionsDict may carry records_since, the oldest
entry the record still holds. All optional: the Linux reading and every
driver that builds one are unchanged.
UpdateDict takes optional title, advisories, cves and vendor_severity, for a
source that says more of an update than a package name: Windows Update's
title, KBArticleIDs, CveIDs and MsrcSeverity. UpdateHistoryPackageDict takes
an optional title. Additive: every reader that leaves them out conforms.
HostStorageMixin declares get_disks, get_disk_pools and get_volumes in
StorageDriver's shapes, and get_disk_smart, drive health per disk, with
no role: a Windows or Linux host reports its storage and stays a host.
DiskSmartDict names the keys Proxmox's get_disk_smart already fills and
adds the highest temperature and the uncorrected read and write errors.
HostVolumeDict adds a volume's file system and health to
LogicalVolumeDict. A disk that does not say reads temperature -1 and
health "unknown", never a zero or a "healthy" nobody measured.
Additive: nothing changes for StorageDriver or its drivers.
Secure Boot, the TPM, disk encryption per volume, the antimalware product,
the firewall's profiles and virtualization-based security, in terms no OS
owns, so a Windows host's protection fits the reading Linux fills. The new
keys are NotRequired; every key Linux fills stays required and unchanged.
- HostEventsMixin.get_host_events(since=None), declared: the events of a fixed
set of kinds a host's own log recorded (unexpected shutdowns, system crashes,
hardware errors, disk errors, programs and services that crashed), with
HostEventDict, HostEventsDict and host_event().
- LogSourceDict: kind "eventlog" for a Windows event channel, named by the new
optional channel field (eventlog_source, LOG_SOURCE_KINDS).
- ServiceDict: optional result, exit_code, trigger_start and account; exported.
get_host_firewall gains an optional windows key: a Windows host's
profiles, enabled rules with their filters, and the profile of each
connected interface, beside the netfilter chains rather than in them.
WindowsFeaturesMixin declares get_windows_features: every optional
feature of the host's image and its state.
The netfilter shapes move to host_firewall_models; models re-exports
them.
An application whose worker gives a run less time than the driver's bound
passes limit (seconds), so the run fails with what it printed instead of
being cut off by the worker.
christianmanivong
changed title from WIP: feat: contracts for the Windows depth programme (NetOrk/netork#2888–#2899) to feat: contracts for the Windows depth programme, 4.56.0 (NetOrk/netork#2888–#2899)2026-12-02 21:25:08 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Not to be merged before Christian's go. These are the contract additions of the napalm-windows depth programme (NetOrk/netork#2888–#2899).
Everything is additive. Nothing napalm-linux fills was renamed, retyped or removed.
What each stream adds
host_storage.py, withHostStorageMixin,DiskSmartDictandHostVolumeDict.clean_system_identity();UserDict.sid;UserDictandProcessDictmove toos_models.py, re-exported frommodels.sid,administratorandremote_desktopon login accounts;LoginGroupDictandLoginGroupMemberDict;records_sinceon sessions.HostFirewallDict.windows, with the Windows firewall shapes inhost_firewall_models.py;windows_features.py, withWindowsFeaturesMixin.host_events.py, withHostEventsMixin;eventlog, withLogSourceDict.channel;result,exit_code,trigger_startandaccountonServiceDict.host_repairs.py, withHostRepairMixin,HostRepairResultDict,tool_outcome()andoffered_host_repairs().title,advisories,cvesandvendor_severityonUpdateDict;titleonUpdateHistoryPackageDict.HardeningDict:secure_boot,tpm,disk_encryption,antimalware,firewall_profiles,vbs.Checked locally
Two runs of
tests/test_host_status.py::TestThePackageManagerCommandOnARealShellfailed locally on unchangedmaintoo; they depend on the machine.Release
The version is not bumped. At merge this wants a minor release (4.56.0). napalm-windows' dependency floor rises to it, and the napalm-windows train PR's
lowestjob cannot pass until then.Found on the way
#144:
NotRequiredunderfrom __future__ import annotationsis required at runtime. The posture stream avoided it inhardening.py.WIP: feat: contracts for the Windows depth programme (NetOrk/netork#2888–#2899)to feat: contracts for the Windows depth programme, 4.56.0 (NetOrk/netork#2888–#2899)