[maestro] Treat unguarded Rust test modules as package-impacting#798
[maestro] Treat unguarded Rust test modules as package-impacting#798haasonsaas wants to merge 3 commits into
Conversation
…acting
stripRustTestModules stripped every inline `mod tests { }` block regardless
of #[cfg(test)], so edits inside an unguarded inline test module were dropped
from the release diff and packageChangedSinceTag could return false even
though compiled package sources changed. Gate stripping on a preceding
#[cfg(test)] attribute so only test-only modules are stripped; unguarded
modules stay package-impacting and force the required version bump.
Adds inline regression coverage (unguarded = impacting, cfg(test)-gated =
ignored) and registers the release-train-drift guardrail in the regression
suite manifest.
Refs #604
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
PR SummaryMedium Risk Overview
Adds regression coverage in Reviewed by Cursor Bugbot for commit 72d72bf. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
This PR changes mirrored Maestro source files in the public repo, but it does not link the matching private source-of-truth PR. Add one of these to the PR body, then re-run the check:
Mirrored files touched:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Cfg test gate skips blank lines
- Updated Rust test-module stripping to keep
#[cfg(test)]gates across blank/comment gaps and added a regression test for separated inline modules.
- Updated Rust test-module stripping to keep
You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 41a6c2a. Configure here.
|
Closing as superseded. This change landed in the source-of-truth repo ( Direct public edits to mirrored files get overwritten by the mirror sync ( |

Summary
Guardrail for #604 (
release-train-drift).stripRustTestModulesinscripts/release-impact-filter.mjsstripped every inlinemod tests { }block regardless of whether it was gated by#[cfg(test)]. An unguardedmod testsblock is compiled in production builds, so edits inside it are package-impacting — but they were dropped from the release diff, lettingpackageChangedSinceTagreturnfalseand a tag mismatch pass without the required version bump.This is the representative feedback shape from PR #601: "Treat unguarded Rust test modules as package-impacting."
Change
stripRustTestModulesnow collects the contiguous outer-attribute group precedingmod testsand only strips the module when a#[cfg(test)]attribute is present. Unguarded modules are retained in production content, so edits inside them remain package-impacting.test/scripts/release-impact-filter.test.ts):mod tests { }edit →packageChangedSinceTagistrue#[cfg(test)]-gated inlinemod tests { }edit → stillfalse(test-only path preserved)release-train-driftentry toscripts/guardrail-regression-suite.json, pointing at the fix and its tests.Acceptance (#604)
test/scripts/release-impact-filter.test.ts, run byci-nx-tests.sh/ Nxmaestro:test.release-train-driftfingerprint closed/absent (happens after merge).Verification
bunx vitest --run test/scripts/release-impact-filter.test.ts— 18 passedbunx vitest --run test/scripts/ci-guardrails.test.ts— 67 passed (manifest evaluation)node scripts/check-guardrail-regression-suite.mjs— covers 12 bug classesbun run bun:lint— clean (exit 0)Closes #604.