Skip to content

test(config): pin typo-port refusal and key-file permission warn - #397

Merged
plusky merged 1 commit into
mainfrom
test/rest-config-custom-stdio
Oct 12, 2026
Merged

plusky merged 1 commit into
mainfrom
test/rest-config-custom-stdio

Conversation

@plusky

@plusky plusky commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Fourteenth artifact of the mutation-testing campaign (remaining files): typo ports are refused as startup errors (not parsed hostnames), and key files readable by group or others warn exactly on the wide files — with the other-writable bit pinned too, and the temp files in an auto-cleaned dir. The comma-guard and >= survivors proved behaviorally identical and stay documented. No production behavior changed — tests and prose only. Verified: fmt, clippy -D warnings, full suite, per-mutant kill matrix, native OCR clean (including a second pass that caught temp-file hygiene — fixed before opening).

A written port that is not a u16 (host:, host:99999, host:abc) parses with port_u16() == None and would match any port; the entry.len() > host.len() arm refuses it at startup. > mangled to < or ==, and the : check flipped to !=, accept the typo instead (>= is identical, documented in DESIGN.md). The key-file mode warn fires exactly for group/other-readable files: & mangled to | or ^ warns on 0600 too, != mangled to == warns on 0600 only. DESIGN.md Testing records both pins plus the documented-not-tested dispositions (custom-fields contains(',') collapse, stdio delimiter advance). Guards touched: host validation strictness kept fail-closed, I12 (key never logged).
@plusky
plusky merged commit 99cb182 into main Oct 12, 2026
16 checks passed
@plusky
plusky deleted the test/rest-config-custom-stdio branch October 12, 2026 17:38
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