Skip to content

fix(api): regenerate config_schema golden after parallel_tools addition#3167

Merged
houko merged 1 commit into
mainfrom
fix/config-schema-golden-regen
Apr 25, 2026
Merged

fix(api): regenerate config_schema golden after parallel_tools addition#3167
houko merged 1 commit into
mainfrom
fix/config-schema-golden-regen

Conversation

@houko

@houko houko commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Regenerates crates/librefang-api/tests/fixtures/kernel_config_schema.golden.json to match the schemars-derived KernelConfig schema in current main. Fixes the kernel_config_schema_matches_golden_fixture test failure that has been flaring on:

Root cause

PR #3144 (feat(types): KernelConfig.parallel_tools section) added a new top-level config section (ParallelToolsConfig definition + parallel_tools field) but didn't refresh the golden fixture. The PR-lane CI on #3144 was selective and only ran librefang-types jobs, so the drift went undetected at merge time. Since then every push to main has been failing this guard.

Diff

The 45-line addition is exactly:

  • definitions.ParallelToolsConfig — the new schema entry (5 properties: enabled, max_concurrent, mcp_default_safety, mcp_readonly_allowlist, plus the docstring block).
  • properties.parallel_tools — the $ref + default-value reference at the KernelConfig level.

Generated with the documented procedure:

cargo test -p librefang-api --test config_schema_golden \
    -- --ignored regenerate_golden --nocapture

Verified against main HEAD 53dde25a.

Test plan

  • CI: Test / Ubuntu, Test / macOS, Test / Windowskernel_config_schema_matches_golden_fixture should pass.
  • No code changes; fixture-only update.

Once this lands, #3162 just needs a rebase on main.

#3144 added KernelConfig.parallel_tools but did not refresh the
schemars-derived golden fixture. The PR's selective CI lane only
ran librefang-types so the drift slipped through; on push to main
the full-run lane has been failing on
kernel_config_schema_matches_golden_fixture for every commit since.
Any subsequent PR that touches librefang-api (e.g. #3162's dashboard
edits) gets blocked by the same panic.

Regenerated via:

    cargo test -p librefang-api --test config_schema_golden \
        -- --ignored regenerate_golden --nocapture

Diff is exactly the new ParallelToolsConfig definition + the
parallel_tools field reference — verified against the current main
HEAD (53dde25).
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@houko
houko merged commit ff099c1 into main Apr 25, 2026
22 checks passed
@houko
houko deleted the fix/config-schema-golden-regen branch April 25, 2026 16:00
houko added a commit that referenced this pull request Apr 25, 2026
…#3171)

The schemars-derived KernelConfig schema lives in librefang-types,
but the golden-file regression guard
(`kernel_config_schema_matches_golden_fixture`) lives in
librefang-api. Selective PR-lane CI fans out by directly-touched
crates only — so a types-only PR that adds a new schema field never
runs librefang-api's tests, and the drift goes undetected until the
push-to-main full-run lane explodes. By then main is already poisoned
and every subsequent PR whose lane includes librefang-api gets blocked
on the same panic.

Incident chain that motivated this:
  - #3144 (KernelConfig.parallel_tools) merged with stale golden;
    PR-lane only ran librefang-types.
  - main full-run on the merge commit failed
    `kernel_config_schema_matches_golden_fixture` and stayed broken.
  - #3162 (dashboard-only) tripped the same panic two days later
    purely because its selective lane happened to include
    librefang-api.
  - #3167 regenerated the fixture as a one-shot fix.

This guard makes the same mistake fail at PR review time instead of
poisoning main. Implementation is one shell stanza in the existing
"Detect Changes" job, no new actions or jobs.
@github-actions github-actions Bot added ready-for-review PR is ready for maintainer review size/S 10-49 lines changed no-rust-required This task does not require Rust knowledge and removed ready-for-review PR is ready for maintainer review labels Apr 25, 2026
@houko houko mentioned this pull request Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-rust-required This task does not require Rust knowledge size/S 10-49 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant