Skip to content

test(core): try_config_reload propagation and parse-failure safety#44

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/test-coverage-automation-b611
Closed

test(core): try_config_reload propagation and parse-failure safety#44
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/test-coverage-automation-b611

Conversation

@cursor

@cursor cursor Bot commented Jun 30, 2026

Copy link
Copy Markdown

Risky behavior now covered

  • try_config_reload() swaps live config, updates router live pointer, and queues stale config
  • Parse failures during SIGHUP reload keep the previous live config

Test files added/updated

  • tests/test_reload.c
  • tests/reload_propagation_shim.c (subsystem propagation stubs)
  • Makefile (link try_config_reload without gc-sections stripping)

Why these tests reduce regression risk

Reload is a hot-path for production config changes. Without propagation tests, a regression could leave providers/channels on stale config after SIGHUP or swap to broken config on parse errors.

Validation

make test_reload && ./build/test_reload

Open in Web View Automation 

Co-authored-by: esadrianno <esadrianno@gmail.com>
@adriannoes

Copy link
Copy Markdown
Owner

Closing as duplicate — equivalent coverage already exists on development.

Existing coverage: tests/test_reload.c includes test_try_config_reload_swaps_live_config, test_try_config_reload_keeps_old_on_invalid_file, test_try_config_reload_null_args_noop, and stale-queue tests (test_stale_enqueue_*). Reload stubs live under tests/stubs/ (http_reload_stub.c, bootstrap_dispatch_stub.c, reload_channel_stub.c, tool_reload_stub.c).

Wrong base branch: This PR targets main. Project convention (AGENTS.md) is to open PRs against development first.

CI failure: The branch fails to link with undefined reference to http_set_live_config because the reload test stubs are not present on the main-based build path.

Any net-new work from this automation will be cherry-picked separately in later cleanup steps (#42, #40, #39).

@adriannoes adriannoes closed this Jul 1, 2026
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.

2 participants