Commit 47efec9
feat: add support for another 35 more validators (Resolves #435)
* feat: import 5 HIGH-confidence AI validators (verified against systemd source)
First batch of HIGH-confidence validators from the LLM batch processor,
manually verified and corrected against the systemd C source and gperf data:
- config_parse_string (CONFIG_PARSE_STRING_SAFE) — string_is_safe semantics
- config_parse_bind_user_shell — boolean OR absolute path (parse_user_shell)
- config_parse_cake_priority_queueing_preset — adds missing diffserv3
- config_parse_hostname — proper hostname_is_valid grammar
- config_parse_device_allow — /dev/path or block-/char- + optional [rwm]+ perms
Each AI generation had bugs (wrong section names, hallucinated grammar shape,
or grammars not matching the actual C validation function). Tests rewritten
to use the real (section, key) pairs from the gperf source.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: import 10 more HIGH-confidence AI validators (verified)
Batch 2: 10 validators verified against systemd source via parallel agents
and corrected. Each has been checked against gperf (real section/key/ltype)
and the C parser function (real validation logic):
- config_parse_wol — WakeOnLan flag list (off | space-separated flags)
- config_parse_dnssec_mode — boolean | "allow-downgrade"
- config_parse_protect_hostname — boolean | <kw>:<hostname> form
- config_parse_ip_tos — symbolic name | integer 0-255
- config_parse_ip_protocol — protocol name | integer
- config_parse_dns — list of IPv4/IPv6 with optional :port and %iface
- config_parse_trigger_unit — unit name with valid type suffix
- config_parse_sr_iov_link_state — boolean | "auto"
- config_parse_required_family_for_online — ipv4/ipv6/both/any
- config_parse_ifname — interface name (max 15 chars, no whitespace/slash)
Burndown test now passes — moved from 432 missing to ~417, under the
427 cap for today (2026-04-30).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: import 20 more HIGH-confidence AI validators (verified)
Adds validators for fq_bool, fq_size, fq_u32, si_uint64, fdb_vlan_id,
dhcp_socket_priority, cake_rtt, coalesce_sec, codel_usec, tbf_latency,
service_timeout, service_timeout_abort, job_running_timeout_sec,
exec_secure_bits, namespace_flags, can_bitrate, can_time_quanta, fdname,
udev_property_name, dns_name. Time-suffix regexes order longer
alternatives (year/week/hour/day/min/sec) before shorter (m/h/d/w/y) so
that "1min" doesn't get mismatched as "1m" + leftover "in".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: align AI validators with actual systemd C parser semantics
Adds shared TIME_VALUE combinator (mirrors extract_multiplier in time-util.c)
that accepts "infinity", fractional decimals, all long-form suffixes
(seconds/minutes/hours/days/months/years/etc.), whitespace between number and
suffix, and compound forms like "1h 30s". Eight time-related validators now
use it: cake_rtt, coalesce_sec, codel_usec, tbf_latency, service_timeout,
service_timeout_abort, job_running_timeout_sec, can_time_quanta.
can_bitrate now accepts the full parse_size suffix set (B/K/M/G/T/P/E) with
optional fractional part. dns_name regex relaxed to match dns_label_unescape's
permissive behavior — leading/trailing hyphens, underscores and most printable
punctuation are now accepted; only empty labels are rejected. ifname tightened
to reject ':', '%', the reserved names "all"/"default"/"."/"..", and
purely-numeric strings (interpreted as ifindex by the kernel).
Tests updated to match the corrected semantics.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: tighten dns_name and ifname validators to match C parser more closely
dns_name regex now rejects ASCII control characters (U+0000-U+001F, U+007F)
that dns_label_unescape rejects via the (uint8_t)*n >= ' ' check. ifname
regex now rejects 0x-prefixed hex strings, which safe_atoi32 (called by
parse_ifindex via base 0 strtol) treats as ifindex.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Steve Ramage <gitcommits@sjrx.net>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 497893e commit 47efec9
72 files changed
Lines changed: 3142 additions & 0 deletions
File tree
- src
- main/kotlin/net/sjrx/intellij/plugins/systemdunitfiles/semanticdata/optionvalues
- ai
- grammar
- test/kotlin/net/sjrx/intellij/plugins/systemdunitfiles/inspections/ai
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| 167 | + | |
166 | 168 | | |
167 | 169 | | |
168 | 170 | | |
169 | 171 | | |
170 | 172 | | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
189 | 224 | | |
190 | 225 | | |
191 | 226 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments