fix(sdl): add expirationDate to guardian baseline result entries - #126
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Guardian baseline configuration to satisfy M365 SDL policy requirements for ESLint @microsoft/sdl/no-inner-html baseline entries, unblocking the repo’s SDL/Guardian gate for the vendored JS bundle findings.
Changes:
- Add
expirationDateto each of the three existing baseline result entries. - Expand the
justificationtext to record the policy requirement and the renewal date (2026-11-27).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (97.7%) is below the target coverage (100.0%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #126 +/- ##
=====================================
Coverage 97.7% 97.7%
=====================================
Files 286 286
Lines 62460 62460
=====================================
Hits 61033 61033
Misses 1427 1427 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
#124 added the missing `createdDate` and cleared that error, but left `expirationDate` off on purpose. The SDL policy rejects the entries for exactly that: ##[error]Result with signature <76fd7a25...> on file <guardian_baselines.gdnbaselines> is not compliant with the provided policy. Reason: undefined. -- Additional arguments:You must provide a valid expiration date for @microsoft/sdl/no-inner-html `Baselined results: 0` and Guardian still exits 8, so the next publish run on main failed the same way. Both fields are required for this rule, not just `createdDate`. The reasoning in #124 for omitting the expiry -- that a vendored bundle should not need renewing -- is not available under this policy. Other repositories under the same policy all carry an expiry, with windows of 90, 180 and 200 days. Use 90 days, the shortest and most conservative of those. This does mean the baseline lapses on 2026-11-27. Say so in the justification so whoever hits it next has the context, and prefer an ESLint path exclusion for `crates/cargo-gamma-lib/src/vendor/` as the durable fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ca7b2e6 to
4145e3d
Compare
🤖 Clawpilot here! Posted automatically by Clawpilot (an AI agent), not by a human. Please verify before acting.
Follow-up to #124. Same underlying bug.
What #124 got wrong
#124 added the missing
createdDateand that half worked — theThe CreatedDate of the result ... is emptyerrors are gone. But it deliberately leftexpirationDateoff, arguing that a vendored bundle should not need periodic renewal. The SDL policy does not allow that choice, and the next publish run onmainfailed on precisely it:Still
Baselined results: 0, stillGuardian exited with an error exit code: 8.createdDateandexpirationDateare both required for this rule. #124 cited an existing baseline whose expiry had lapsed as evidence that dated baselines are a hazard; it is actually evidence that the field is mandatory.Choosing the window
Rather than guess a second time, this follows what other repositories under the same SDL policy already use for
@microsoft/sdl/no-inner-htmlbaselines. The windows observed there are 90, 180 and 200 days.This uses 90 days —
2026-11-27— the shortest and most conservative of them, so it satisfies any cap the policy applies.Effects
main.justificationon each entry now says so, with the date, so whoever hits it next does not have to re-derive any of this.crates/cargo-gamma-lib/src/vendor/has to happen there. That template is shared with at least one other repository, so it is a wider change and out of scope for this unblock; it is tracked separately.Verification
JSON validated; field order matches other baseline entries that pass this policy today.
As with #124 this cannot be checked locally — the Guardian CLI and the
.gdnresult files exist only on the CI agent. Confirmation is the next publish run reportingBaselined results: 3andActive results: 0. Given #124 fixed one required field and revealed a second, I will watch the next run rather than treat the merge as the end of it./cc Pato Sandaña (@psandana) Martin Taillefer (@geeknoid)