Skip to content

sana2: one home for the device-name helpers (resident -152 B) - #111

Merged
tinic merged 1 commit into
mainfrom
claude/89-sana2-policy-dedupe
Sep 28, 2026
Merged

tinic merged 1 commit into
mainfrom
claude/89-sana2-policy-dedupe

Conversation

@tinic

@tinic tinic commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Follow-up to #109, per the resident-size-first rule.

#109 added ami_sana2_default_tcp_ack_max in sana2_policy.c with its own case-folding compare and basename walk, duplicating the static ami_str_iequal / ami_sana2_basename and the WiFiPi name test already in sana2_device.c. They now live once in sana2_policy.c (still pure and host-linkable), and both WiFiPi defaults (128 posted reads, 11,680 ACK ceiling) share one name test. No behaviour change.

bsdsocket.library, --preset default text file
pre-#109 main 95e3983 338,140 364,956
main after #109 338,636 365,468
this PR 338,488 365,316

So #109's resident cost goes from +496 to +348 bytes of text. The remaining 348 bytes are the feature itself (TCPACKMAX parsing, config advice, the per-interface branch). The 366,000 budget stays; its comment and the Unreleased changelog size are updated in the same commit.

Host tests sana2_device and config_routes pass locally.

🤖 Generated with Claude Code

#109 added ami_sana2_default_tcp_ack_max in sana2_policy.c with its own
lower-case compare and basename walk, next to the identical static
ami_str_iequal/ami_sana2_basename and WiFiPi name test in sana2_device.c.
Both now live once in sana2_policy.c (pure, still host-linkable) and both
WiFiPi defaults (128 posted reads, 11680 ACK ceiling) share one test.

bsdsocket.library (preset default): 365,468 -> 365,316 bytes, text
338,636 -> 338,488; pre-#109 main was 364,956. The 366,000 budget stays.
Host tests sana2_device and config_routes pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@tinic
tinic merged commit 6a0eaac into main Sep 28, 2026
42 of 43 checks passed
@tinic
tinic deleted the claude/89-sana2-policy-dedupe branch September 30, 2026 00:37
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