Repository navigation
fix: profileUrl prototype-key guard, RadarReports fallback tests - #546
Merged
Merged
Conversation
- PROFILE_BASES no longer inherits from Object.prototype, so an untrusted type such as 'constructor' misses and falls back to the twitter base instead of interpolating an inherited value into an href; the pinned todo test now runs for real (#504) - New tests/radar-reports-fallbacks.test.mjs exercises the missing-generatedAt, missing-radarReports, and missing-publishedAt arms of RadarReports via the importWithData fixture injector (#506) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Bob Killen <bkillen@linuxfoundation.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P2 code-quality items from tracker #530.
PROFILE_BASESwas a plain object literal, soprofileUrl('x', 'constructor')resolved the inheritedObject.prototype.constructorand interpolated it into an href. It is now a null-prototype map, so any unrecognised type — including inherited keys — falls back to the twitter base. The{ todo: true }test pinning this defect is now a live assertion.tests/radar-reports-fallbacks.test.mjscovering the three unreached fallback arms (nogeneratedAt→ no provenance line; noradarReportskey → empty labelled list; report withoutpublishedAt→ no date row while a dated sibling keeps its date), plus a fixture-path provenance-contract check, using theimportWithDatainjector merged in test: cover GroupLinkStatus and PeopleFreshness rendered output #482.tests/radar-reports.test.mjs(live corpus) is untouched.Targeted suites: 29/29 pass, 0 todo.
Fixes #504, fixes #506.