Skip to content

config: SIGHUP reload should aggregate all resolution problems (like startup #222) #608

Closed

Description

@yigitdot

Problem

#222 (ea53bc3) made startup config resolution aggregate every problem into a
single error via ConfigErrorBag: resolve_config()
(crates/common/src/config/mod.rs:114) threads one bag through all sections and
calls bag.into_result() once (mod.rs:153).

The SIGHUP hot-reload path did not get this. crates/node/src/runtime/reload.rs
resolves each section through the per-section public shims —
resolve_payment / resolve_observability / resolve_security
(mod.rs:1236 / 1321 / 1458) — each of which wraps its *_into worker in
one_section(), allocating a private bag that is immediately collapsed. The
reload resolve loop also aborts on the first failing section
(reload.rs:34-38, the all-or-nothing contract).

Result: an operator editing a bad config and sending SIGHUP still fixes errors
one at a time — the edit/run/fix/run cycle #222 removed for startup.

Requested change

Make the reload resolve phase thread a single ConfigErrorBag across all
reloadable sections (payment, observability, cache.pinned_hashes,
security.*) and surface every problem in one error, while keeping the existing
all-or-nothing contract: any non-empty bag → abort the reload and retain the
previous values for every section. Reuse the *_into workers + bag rather than
the one_section() shims for the reload path.

References

Activity

  1. added
    kind:feature
    rust
    on May 19, 2026
  2. github-actions commented on May 19, 2026

    @github-actions

    🎯 Triage report

    The SIGHUP hot-reload path was missed when #222 introduced ConfigErrorBag-based error aggregation for startup. Currently each reloadable section (payment, observability, cache.pinned_hashes, security.*) uses a private per-section bag via one_section(), so the operator sees only the first failing section per reload attempt. The fix is to thread a single shared ConfigErrorBag through all reloadable sections in reload.rs and collapse it once, preserving the existing all-or-nothing rollback contract.

    📊 Assessment

    Dimension Value Reasoning
    Type Task Concrete implementation gap: bring reload path to parity with the startup path established in #222
    Labels unchanged enhancement, technical, rust, poc-blocking already set and accurate
    Coding agent Suitable Requirements are precise; affected files, functions, and line ranges all cited; success criterion is clear (single aggregated error on reload failure)
    💡 Notes and suggestions

    Approach

    1. In crates/node/src/runtime/reload.rs, allocate one ConfigErrorBag at the top of the resolve phase (before the per-section calls, ~line 34).
    2. Replace calls to the public shims resolve_payment / resolve_observability / resolve_security (which internally call one_section()) with direct calls to the underlying *_into worker functions, passing the shared bag.
    3. After all sections have been attempted, call bag.into_result() once. On Err, return without updating any live config (all-or-nothing contract unchanged).
    4. Verify cache.pinned_hashes resolution is also covered — check whether it goes through a similar one_section() shim or a separate path.

    Key files

    • crates/node/src/runtime/reload.rs — resolve loop (~lines 34–40, 227–232, 302–307, 446–451)
    • crates/common/src/config/errors.rs — ConfigErrorBag, one_section
    • crates/common/src/config/mod.rs:114 (resolve_config), :153 (into_result), :1236/:1321/:1458 (per-section shims)

    Testing

    • Add a unit/integration test in crates/node/tests/ that constructs a config with two invalid sections, sends SIGHUP (or calls the reload path directly), and asserts the returned error contains diagnostics from both sections rather than stopping at the first.

    Generated by Agentic Triage for issue #608 · ● 1.4M · ◷

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
    
  3. self-assigned this
    on May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:featurerust

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions