Skip to content

feat(ops): macro load-smoke blocking PR gate (W43-B2, C08 L73) - #348

Merged
KooshaPari merged 6 commits into
mainfrom
feat/sl-w43-load-macro-gate
Jul 21, 2026
Merged

feat(ops): macro load-smoke blocking PR gate (W43-B2, C08 L73)#348
KooshaPari merged 6 commits into
mainfrom
feat/sl-w43-load-macro-gate

Conversation

@KooshaPari

Copy link
Copy Markdown
Owner

Summary

  • Add macro-tier load-smoke PR gate SSOT (docs/ops/load-macro-gate.md + JSON) for C08 L73
  • Extend load-smoke.ps1 with -RouteTier macro (/api/bundles, /api/search, /api/stream)
  • Hermetic load-macro-gate-check.ps1 -SelfCheck + blocking load-macro-gate-hard.yml workflow

Test plan

  • pwsh ./scripts/load-macro-gate-check.ps1 -SelfCheck
  • cargo test --test load_macro_gate --locked
  • CI load macro gate jobs green

Wave-43 lane w43-load-macro-gate (B2 of 5).

…2, C08 L73)

Add load-macro-gate SSOT, -RouteTier macro on load-smoke.ps1, hermetic SelfCheck,
blocking load-macro-gate-hard.yml workflow, and cargo test wrapper.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@KooshaPari, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7eafe67d-bba7-4a54-8550-957cf18ef129

📥 Commits

Reviewing files that changed from the base of the PR and between 49910aa and e28473f.

📒 Files selected for processing (2)
  • docs/ops/load-macro-gate.md
  • scripts/load-smoke.ps1
📝 Walkthrough

Walkthrough

Adds tiered macro-route load testing with policy-driven thresholds, PowerShell SelfCheck and smoke execution, local daemon seeding, documentation, a Rust wrapper test, and a blocking GitHub Actions workflow.

Changes

Load macro gate

Layer / File(s) Summary
Tiered load routing and gate policy
docs/ops/load-macro-gate.json, scripts/load-smoke.ps1, docs/ops/load-macro-gate.md, docs/ops/runbook.md, docs/ops/test-pyramid.md
Defines macro-route policy and documentation, adds RouteTier selection, distributes requests across tier-specific endpoints, and applies a shorter timeout to /api/stream.
Gate validation and smoke execution
scripts/load-macro-gate-check.ps1
Adds SelfCheck validation for required files, policy fields, documentation anchors, routing, and workflow wiring; RunSmoke starts sl-daemon, seeds /api/ingest, runs macro-tier load testing, and stops the daemon.
Blocking CI and regression coverage
.github/workflows/load-macro-gate-hard.yml, tests/load_macro_gate.rs, CHANGELOG.md
Adds blocking SelfCheck and smoke jobs, a Rust test invoking SelfCheck, and an Unreleased changelog entry.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PullRequest
  participant GitHubActions
  participant GateScript as load-macro-gate-check.ps1
  participant Daemon as sl-daemon
  participant LoadSmoke as load-smoke.ps1
  PullRequest->>GitHubActions: Trigger hard gate
  GitHubActions->>GateScript: Run -SelfCheck
  GitHubActions->>GateScript: Run -RunSmoke
  GateScript->>Daemon: Start and poll /readyz
  GateScript->>Daemon: POST seeded bundle to /api/ingest
  GateScript->>LoadSmoke: Run with RouteTier macro and policy thresholds
  LoadSmoke->>Daemon: Send macro-route requests
  GateScript->>Daemon: Stop daemon
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the macro load-smoke blocking PR gate and matches the main change.
Description check ✅ Passed The description directly summarizes the macro load-smoke gate, workflow, and test plan.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/sl-w43-load-macro-gate
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/sl-w43-load-macro-gate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-authored-by: Cursor <cursoragent@cursor.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/load-macro-gate-hard.yml:
- Line 26: Update both actions/checkout steps in
.github/workflows/load-macro-gate-hard.yml at lines 26-26 and 36-36 by adding a
with block that sets persist-credentials to false.
- Line 5: Quote the top-level GitHub Actions trigger key by changing the visible
`on` mapping key to `"on"` in the workflow, preserving all existing trigger
configuration beneath it.

In `@docs/ops/load-macro-gate.json`:
- Around line 17-21: Make the load-macro policy fields effective: in
docs/ops/load-macro-gate.json lines 17-21 retain the configurable write_route
settings, update Invoke-MacroSeedIngest in scripts/load-macro-gate-check.ps1
lines 83-107 to use $policy.write_route.path and method, and guard the call at
lines 266-278 with $policy.write_route.seed_before_macro_tier. Ensure the
manifest and consumer behavior remain consistent.
- Line 33: Update the verify_command value in load-macro-gate.json to invoke the
script through pwsh, matching the documented command used in load-macro-gate.md
and runbook.md.

In `@scripts/load-macro-gate-check.ps1`:
- Line 57: Rename the Test-DocContains function to use a singular noun, such as
Test-DocContain, and update every reference to the function so callers remain
consistent.
- Around line 183-190: Update the policy validation near the route_tiers.macro
count check to verify that the macro tier contains /api/bundles, /api/search,
and /api/stream, not merely at least three entries. Keep the existing count
validation and Write-Check behavior, and ensure SelfCheck validates these
required routes from the JSON policy used by -RunSmoke.

In `@scripts/load-smoke.ps1`:
- Around line 66-75: Update the request logic in the load-smoke worker around
the Invoke-WebRequest call so /api/stream is not probed with Invoke-WebRequest.
Move that route to a separate bounded stream check or use another probe that
reliably limits connection/read duration under pwsh 7.6, while preserving the
existing request flow for non-stream endpoints.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8766664c-0f59-4220-9ef8-fe9a09d67d18

📥 Commits

Reviewing files that changed from the base of the PR and between 685e237 and 4c8970a.

📒 Files selected for processing (9)
  • .github/workflows/load-macro-gate-hard.yml
  • CHANGELOG.md
  • docs/ops/load-macro-gate.json
  • docs/ops/load-macro-gate.md
  • docs/ops/runbook.md
  • docs/ops/test-pyramid.md
  • scripts/load-macro-gate-check.ps1
  • scripts/load-smoke.ps1
  • tests/load_macro_gate.rs
📜 Review details
⏰ Context from checks skipped due to timeout. (28)
  • GitHub Check: gitleaks
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: load macro gate · macro routes smoke
  • GitHub Check: soft loom · loom_model core
  • GitHub Check: soft loom · daemon broadcast
  • GitHub Check: update check hard · root SelfCheck wrapper
  • GitHub Check: update check hard · sl-daemon tests
  • GitHub Check: shuttle permutation · cargo test shuttle_permutation
  • GitHub Check: coverage (85% gate)
  • GitHub Check: reproducible build · sl-daemon
  • GitHub Check: durable schema migration scaffold
  • GitHub Check: loom permutation · hermetic wrappers
  • GitHub Check: tsan permutation · race_model
  • GitHub Check: rootless-only matrix scaffold
  • GitHub Check: cargo audit
  • GitHub Check: OpenAPI route drift · sl-daemon
  • GitHub Check: SBOM policy SelfCheck
  • GitHub Check: trufflehog
  • GitHub Check: jemalloc hard · feature build
  • GitHub Check: gitleaks
  • GitHub Check: alloc profile hard · dhat smoke
  • GitHub Check: fuzz blocking · sustained 30s
  • GitHub Check: loom permutation · daemon broadcast
  • GitHub Check: loom permutation · core models
  • GitHub Check: miri permutation · SelfCheck
  • GitHub Check: visual contract · WCAG AA
  • GitHub Check: race smoke + channel/cancel model · windows-latest
  • GitHub Check: sl-daemon build · windows-latest
🧰 Additional context used
📓 Path-based instructions (3)
*

📄 CodeRabbit inference engine (AGENTS.md)

*: Perform feature work in a git worktree under .claude/worktrees/, created from origin/main on a branch named <type>/<topic>, rather than working directly on main.
Do not make direct commits to protected main; use a pull request.
Do not use git reset --hard, git stash, or git clean in worktrees.
Do not use --no-verify or bypass hooks without operator approval.
Do not work on a branch or worktree another actor is using.

Files:

  • CHANGELOG.md
**/*.{rs,toml}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{rs,toml}: Use the Rust toolchain pinned in rust-toolchain.toml; the workspace MSRV is Rust 1.85.
Validate Rust workspace changes with the prescribed locked build, all-features test suite, Clippy, and rustfmt checks where applicable.

Files:

  • tests/load_macro_gate.rs
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

Fix Clippy warnings; do not add #[allow] unless it includes a tracking-issue comment.

Files:

  • tests/load_macro_gate.rs
🪛 LanguageTool
docs/ops/load-macro-gate.md

[uncategorized] ~12-~12: The official name of this software platform is spelled with a capital “H”.
Context: ...e.ps1](../../scripts/load-smoke.ps1), [.github/workflows/load-macro-gate-hard.yml`](.....

(GITHUB)


[uncategorized] ~13-~13: The official name of this software platform is spelled with a capital “H”.
Context: ...b/workflows/load-macro-gate-hard.yml),
[.github/workflows/ops-load.yml](../../.github/...

(GITHUB)


[uncategorized] ~71-~71: The official name of this software platform is spelled with a capital “H”.
Context: ...acro-gate-hard CI workflow | done | .github/workflows/load-macro-gate-hard.yml |
...

(GITHUB)

docs/ops/test-pyramid.md

[uncategorized] ~115-~115: The official name of this software platform is spelled with a capital “H”.
Context: ... macro routes (-RouteTier macro) |
| [.github/workflows/load-macro-gate-hard.yml](.....

(GITHUB)


[uncategorized] ~117-~117: The official name of this software platform is spelled with a capital “H”.
Context: ...macro gate docs + workflow anchors |
| [.github/workflows/ops-load.yml](../../.github/...

(GITHUB)

🪛 PSScriptAnalyzer (1.25.0)
scripts/load-smoke.ps1

[warning] Missing BOM encoding for non-ASCII encoded file 'load-smoke.ps1'

(PSUseBOMForUnicodeEncodedFile)


[warning] Missing BOM encoding for non-ASCII encoded file 'load-smoke.ps1'

(PSUseBOMForUnicodeEncodedFile)


[warning] Missing BOM encoding for non-ASCII encoded file 'load-smoke.ps1'

(PSUseBOMForUnicodeEncodedFile)

scripts/load-macro-gate-check.ps1

[warning] 57-57: The cmdlet 'Test-DocContains' uses a plural noun. A singular noun should be used instead.

Suggested fix: Singularized correction of 'Test-DocContains'

(PSUseSingularNouns)

🪛 YAMLlint (1.37.1)
.github/workflows/load-macro-gate-hard.yml

[error] 1-1: wrong new line character: expected \n

(new-lines)


[warning] 5-5: truthy value should be one of [false, true]

(truthy)

🪛 zizmor (1.26.1)
.github/workflows/load-macro-gate-hard.yml

[warning] 26-26: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 36-36: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[info] 37-37: action functionality is already included by the runner (superfluous-actions): use rustup and/or cargo in a script step

(superfluous-actions)

🔇 Additional comments (7)
tests/load_macro_gate.rs (1)

14-34: LGTM!

CHANGELOG.md (1)

17-18: LGTM!

docs/ops/load-macro-gate.json (1)

1-16: LGTM!

Also applies to: 22-36

scripts/load-smoke.ps1 (1)

6-20: LGTM!

Also applies to: 45-57

docs/ops/load-macro-gate.md (1)

1-84: LGTM!

docs/ops/runbook.md (1)

112-120: LGTM!

docs/ops/test-pyramid.md (1)

114-117: 📐 Maintainability & Code Quality | ⚡ Quick win

Consider adding the new macro-gate artifacts to test-pyramid-check.ps1's tracked paths.

The pyramid SelfCheck's layerPaths/anchor list (in scripts/test-pyramid-check.ps1, not touched by this PR) doesn't yet include scripts/load-macro-gate-check.ps1 or .github/workflows/load-macro-gate-hard.yml, so this new "Load" tier documentation isn't machine-verified by test-pyramid-check.ps1 -SelfCheck the way the other rows are.

# SelfCheck + live macro routes on ubuntu PRs; soft ops-load probe tier retained.
name: load-macro gate hard

on:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Quote the on keyword to prevent YAML parsing ambiguities.

In YAML 1.1, on evaluates to the boolean true. While GitHub Actions explicitly supports unquoted on:, quoting it as "on": complies with strict YAML parsing and resolves static analysis warnings.

♻️ Proposed refactor
-on:
+"on":
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
on:
"on":
🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 5-5: truthy value should be one of [false, true]

(truthy)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/load-macro-gate-hard.yml at line 5, Quote the top-level
GitHub Actions trigger key by changing the visible `on` mapping key to `"on"` in
the workflow, preserving all existing trigger configuration beneath it.

Source: Linters/SAST tools

runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Disable credential persistence in checkout steps.

By default, actions/checkout persists the GITHUB_TOKEN in the repository's .git/config. Adding persist-credentials: false is a security best practice that prevents downstream scripts, build tools, or malicious dependencies from accessing or exfiltrating the token from the local git configuration.

  • .github/workflows/load-macro-gate-hard.yml#L26-L26: add a with: block containing persist-credentials: false to the checkout step.
  • .github/workflows/load-macro-gate-hard.yml#L36-L36: add a with: block containing persist-credentials: false to the checkout step.
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 26-26: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

📍 Affects 1 file
  • .github/workflows/load-macro-gate-hard.yml#L26-L26 (this comment)
  • .github/workflows/load-macro-gate-hard.yml#L36-L36
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/load-macro-gate-hard.yml at line 26, Update both
actions/checkout steps in .github/workflows/load-macro-gate-hard.yml at lines
26-26 and 36-36 by adding a with block that sets persist-credentials to false.

Source: Linters/SAST tools

Comment on lines +17 to +21
"write_route": {
"method": "POST",
"path": "/api/ingest",
"seed_before_macro_tier": true
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

write_route policy fields are declared in the JSON SSOT but never read by the consumer script. The manifest advertises method/path/seed_before_macro_tier as configurable, but the seeding call is fully hardcoded, so editing the JSON has no effect on this behavior.

  • docs/ops/load-macro-gate.json#L17-L21: either wire these fields through, or drop them if seeding is intentionally fixed/unconditional to avoid implying they're configurable.
  • scripts/load-macro-gate-check.ps1#L83-L107: Invoke-MacroSeedIngest should read $policy.write_route.path/method instead of hardcoding /api/ingest/Post, if the field is meant to be honored.
  • scripts/load-macro-gate-check.ps1#L266-L278: the unconditional call to Invoke-MacroSeedIngest should respect $policy.write_route.seed_before_macro_tier if that flag is meant to gate seeding.
📍 Affects 2 files
  • docs/ops/load-macro-gate.json#L17-L21 (this comment)
  • scripts/load-macro-gate-check.ps1#L83-L107
  • scripts/load-macro-gate-check.ps1#L266-L278
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/ops/load-macro-gate.json` around lines 17 - 21, Make the load-macro
policy fields effective: in docs/ops/load-macro-gate.json lines 17-21 retain the
configurable write_route settings, update Invoke-MacroSeedIngest in
scripts/load-macro-gate-check.ps1 lines 83-107 to use $policy.write_route.path
and method, and guard the call at lines 266-278 with
$policy.write_route.seed_before_macro_tier. Ensure the manifest and consumer
behavior remain consistent.

"load macro gate · SelfCheck",
"load macro gate · macro routes smoke"
],
"verify_command": "./scripts/load-macro-gate-check.ps1 -SelfCheck",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

verify_command is missing the pwsh prefix used elsewhere.

Every other reference (load-macro-gate.md, runbook.md) documents this as pwsh ./scripts/load-macro-gate-check.ps1 -SelfCheck. The bare ./scripts/... form here has no shebang backing it, so it won't run as-is from a POSIX shell.

📝 Proposed fix
-  "verify_command": "./scripts/load-macro-gate-check.ps1 -SelfCheck",
+  "verify_command": "pwsh ./scripts/load-macro-gate-check.ps1 -SelfCheck",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"verify_command": "./scripts/load-macro-gate-check.ps1 -SelfCheck",
"verify_command": "pwsh ./scripts/load-macro-gate-check.ps1 -SelfCheck",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/ops/load-macro-gate.json` at line 33, Update the verify_command value in
load-macro-gate.json to invoke the script through pwsh, matching the documented
command used in load-macro-gate.md and runbook.md.

return $Ok
}

function Test-DocContains {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Test-DocContains uses a plural noun; approved PowerShell verb-noun convention prefers singular.

Static analysis (PSScriptAnalyzer PSUseSingularNouns) flags this. Cosmetic, but cheap to fix before this becomes a public function name other scripts reference.

🧰 Tools
🪛 PSScriptAnalyzer (1.25.0)

[warning] 57-57: The cmdlet 'Test-DocContains' uses a plural noun. A singular noun should be used instead.

Suggested fix: Singularized correction of 'Test-DocContains'

(PSUseSingularNouns)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/load-macro-gate-check.ps1` at line 57, Rename the Test-DocContains
function to use a singular noun, such as Test-DocContain, and update every
reference to the function so callers remain consistent.

Source: Linters/SAST tools

Comment on lines +183 to +190
if ($policy.route_tiers.macro.Count -lt 3) {
throw "load-macro-gate.json must list at least three macro routes."
}
[void](Write-Check -Label "macro route tier count" -Ok $true)
if ($policy.pr_smoke.route_tier -ne "macro") {
throw "load-macro-gate.json pr_smoke.route_tier must be macro."
}
[void](Write-Check -Label "pr_smoke.route_tier macro" -Ok $true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Macro route count check doesn't verify the required routes.

This only asserts route_tiers.macro.Count -ge 3, not that /api/bundles, /api/search, /api/stream are actually the members. The specific route strings are checked against the .md doc (lines 165-170), not the JSON policy that -RunSmoke actually drives — so the policy could silently list unrelated routes and SelfCheck would still pass.

🛡️ Proposed tightening
-    if ($policy.route_tiers.macro.Count -lt 3) {
-        throw "load-macro-gate.json must list at least three macro routes."
-    }
-    [void](Write-Check -Label "macro route tier count" -Ok $true)
+    $requiredMacroRoutes = @("/api/bundles", "/api/search?limit=1", "/api/stream")
+    foreach ($route in $requiredMacroRoutes) {
+        if ($policy.route_tiers.macro -notcontains $route) {
+            throw "load-macro-gate.json route_tiers.macro must include '$route'."
+        }
+    }
+    [void](Write-Check -Label "macro route tier membership" -Ok $true)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if ($policy.route_tiers.macro.Count -lt 3) {
throw "load-macro-gate.json must list at least three macro routes."
}
[void](Write-Check -Label "macro route tier count" -Ok $true)
if ($policy.pr_smoke.route_tier -ne "macro") {
throw "load-macro-gate.json pr_smoke.route_tier must be macro."
}
[void](Write-Check -Label "pr_smoke.route_tier macro" -Ok $true)
$requiredMacroRoutes = @("/api/bundles", "/api/search?limit=1", "/api/stream")
foreach ($route in $requiredMacroRoutes) {
if ($policy.route_tiers.macro -notcontains $route) {
throw "load-macro-gate.json route_tiers.macro must include '$route'."
}
}
[void](Write-Check -Label "macro route tier membership" -Ok $true)
if ($policy.pr_smoke.route_tier -ne "macro") {
throw "load-macro-gate.json pr_smoke.route_tier must be macro."
}
[void](Write-Check -Label "pr_smoke.route_tier macro" -Ok $true)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/load-macro-gate-check.ps1` around lines 183 - 190, Update the policy
validation near the route_tiers.macro count check to verify that the macro tier
contains /api/bundles, /api/search, and /api/stream, not merely at least three
entries. Keep the existing count validation and Write-Check behavior, and ensure
SelfCheck validates these required routes from the JSON policy used by
-RunSmoke.

Comment thread scripts/load-smoke.ps1 Outdated
KooshaPari and others added 4 commits July 20, 2026 19:33
…-B2)

Co-authored-by: Cursor <cursoragent@cursor.com>
Parallel SSE GETs hung CI; stream gets one 2s connect probe outside the pool.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@KooshaPari
KooshaPari merged commit 8226670 into main Jul 21, 2026
89 of 91 checks passed
@KooshaPari
KooshaPari deleted the feat/sl-w43-load-macro-gate branch July 21, 2026 03:22
KooshaPari added a commit that referenced this pull request Jul 24, 2026
* feat(macos): add safe local app installer

* fix(daemon): fail fast when HTTP bind is unavailable

* fix(viewer): open inbox detail and make sessions keyboard accessible

* fix(macos): make packaging scripts executable

* feat(daemon): auto-discover native session roots

* fix(viewer): make detail scroll region keyboard accessible

* fix(ci): include make in hermetic allocator builder

* feat(macos): add opt-in auto-discovery launch agent

* docs(macos): print auto-discovery daemon command

* docs(packaging): make auto-discovery the default

* fix(ci): pin published hermetic builder digest

* docs(reaudit): Wave-43-D closure (#362 merge) refresh at commit 41829e8

- SCORECARD.md: header refreshed (date/auditor/commit), Wave-43 Delta section
  added, Wave-41/42/43 line, Held (no score) expansion incl #348/#349/#361/#362,
  Remaining unpaid rewrite.
- TRACEABILITY.json: updated 2026-07-21 -> 2026-07-23; commit d5f999f -> 41829e8;
  wave Wave-42 -> Wave-43; +delta_vs_w42 note. CRLF preserved.
- GAP_QA_MATRIX.md: C00 row + PLAN-W8-B row updated.
- CHANGELOG.md: Unreleased Changed entry for Wave-43-D reaudit.

Score 396/402 (98% A) held conservative; WAVE43 impl lanes deepened residual
evidence only (per WBS-8.3/8.5/8.7 pattern).

---------

Co-authored-by: KooshaPari <koosha@example.com>
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