Skip to content

feat: add 6 validators (batch 4/5) - iec_size, fq_codel_size, int, job_mode, reboot_parameter, unit_mounts_for#451

Merged
SJrX merged 1 commit into
issue-448from
issue-450
May 23, 2026
Merged

feat: add 6 validators (batch 4/5) - iec_size, fq_codel_size, int, job_mode, reboot_parameter, unit_mounts_for#451
SJrX merged 1 commit into
issue-448from
issue-450

Conversation

@SJrX
Copy link
Copy Markdown
Owner

@SJrX SJrX commented May 23, 2026

Summary

Batch 4 of 5.

Validator C source Usages Approach
config_parse_iec_size(0) shared/conf-parser.c:974 4 parse_size IEC byte (reuses BYTES)
config_parse_fq_codel_size(QDISC_KIND_FQ_CODEL) network/tc/fq-codel.c:267 4 same parse_size shape
config_parse_int(0) shared/conf-parser.c:959 (DEFINE_PARSER(int, ..., safe_atoi)) 4 signed 32-bit integer
config_parse_job_mode(0) load-fragment.c:144 (DEFINE_CONFIG_PARSE_ENUM(... job_mode ...)) 4 Enum from job_mode_table (10 entries)
config_parse_reboot_parameter(0) load-fragment.c:353reboot_parameter_is_valid 4 Printable ASCII, length 1..255
config_parse_unit_mounts_for(0) load-fragment.c:3111 4 Whitespace-separated absolute paths (specifier-aware)

Resolves #450. Stacked on #449 (batch 3).

Results

  • OptionValueTest missing functions: 382 → 376 (−6)
  • Found keys: 1846 → 1870 (+24)
  • Failure-date estimate now ~2026-06-27 (close to July target)

Skipped

  • config_parse_string(0) (4 uses) — C accepts any string with ltype=0; a validator here would just be a NullOptionValue gaming the burn-down without helping users.
  • config_parse_hw_addrs(0), config_parse_socket_listen(SOCKET_SOCKET), config_parse_dhcp_option_tlv(0), config_parse_unit_condition_string(CONDITION_VERSION) — non-trivial syntax variants, may revisit in batch 5 or later.

Test plan

  • All 6 new test classes pass
  • OptionValueTest and SemanticDataRepositoryTest pass
  • Full suite passes
  • CI green

🤖 Generated with Claude Code

…ot_parameter, unit_mounts_for (Resolves #450)

Batch 4/5. Each grammar mirrors the systemd C parser:

- config_parse_iec_size: parse_size IEC byte (existing BYTES grammar)
- config_parse_fq_codel_size (QDISC_KIND_FQ_CODEL): same parse_size shape
- config_parse_int: signed 32-bit integer (DEFINE_PARSER + safe_atoi)
- config_parse_job_mode: enum from job_mode_table (10 entries)
- config_parse_reboot_parameter: printable ASCII length 1..255
- config_parse_unit_mounts_for: whitespace-separated absolute paths (specifier-aware)

OptionValueTest missing-function count drops 382 -> 376; found-key count rises 1846 -> 1870.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Test Results

1 072 tests  +12   1 072 ✅ +12   47s ⏱️ -1s
  275 suites + 6       0 💤 ± 0 
  275 files   + 6       0 ❌ ± 0 

Results for commit d5ac3fb. ± Comparison against base commit f499f0b.

@SJrX SJrX merged commit 7b15e4b into issue-448 May 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant