Skip to content

Remove format-sensitive load shedder registration checks - #7

Open
skovranek wants to merge 1 commit into
mainfrom
ms_fix_load_shedding_checks
Open

skovranek wants to merge 1 commit into
mainfrom
ms_fix_load_shedding_checks

Conversation

@skovranek

@skovranek skovranek commented Sep 18, 2026

Copy link
Copy Markdown
Member

Changes

  1. Remove exact source-string matching for health-route and load-shedder registration from scripts/availability-policy.mjs.
  2. Allow equivalent formatting and middleware variable names without failing the load-shedding probe.
  3. Remove the obsolete healthRegisteredBeforeLoadShedder output field. The companion lesson update checks health bypass against the running app.
  4. Retain the concurrency probe for rejecting excess work, returning Retry-After, and releasing capacity after completion or disconnection.
  5. Add redirect: "manual" to the timeout probe so it inspects the checkout response instead of following the fake PawPal redirect.

Verification

  1. Pass npm run lint and npm run typecheck.
  2. Run all 18 chapter 11 before/after cases with matching copies of this script: all nine preceding snapshots fail, and all nine completed solutions pass.
  3. Verify that the timeout before snapshot produces 302 and one created order, then fails the expected assertion without a DNS error. The completed solution produces 503, creates no orders, and passes.
  4. Verify that formatting variants pass and missing registration, incorrect health placement, and header-only middleware are rejected.
  5. Confirm the starter script matches all 74 course complete-directory copies.

Companion PR

  1. Course changes: https://github.com/bootdotdev/go-api-gate/pull/10010. Publish that lesson update before merging this starter change so the CLI no longer expects the removed JSON field.

@skovranek
skovranek force-pushed the ms_fix_load_shedding_checks branch from 97eccf3 to 3932fdc Compare September 18, 2026 20:58
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