Skip to content

Fix source-verified sample metadata under samples and scenarios - #282

Open
VesaJuvonen wants to merge 1 commit into
pnp:mainfrom
VesaJuvonen:fix/validated-sample-metadata
Open

VesaJuvonen wants to merge 1 commit into
pnp:mainfrom
VesaJuvonen:fix/validated-sample-metadata

Conversation

@VesaJuvonen

Copy link
Copy Markdown
Contributor
Q A
Bug fix? Yes — metadata only
New feature? No
New sample? No — adds gallery metadata for an existing sample
Related issues? Metadata audit of 714a3eb9a0cb53a4c3973d10ad8f3c2608fca624

What's in this Pull Request?

Repair 64 assets/sample.json files under samples and scenarios only. No sample code, dependencies, lockfiles, workflows, screenshots, or gallery aggregate files are changed.

  • Correct 58 package/version mismatches and the malformed 1.19.beta0 declaration using each sample's actual packages and committed package locks, not the newest available SPFx release.
  • Preserve the older sample versions: ShareGraphClient ACEs 1.15.0-rc.0, Search FAQs 1.20.0, calendar plan 1.14.0, and PlannerTasks 1.13.0-beta.20. ShareGraphClient's separate graph-client-library is correctly left at its independently declared/locked 1.15.2; the metadata describes its two ACEs.
  • Add missing metadata for the existing PrimaryTextCard-NewsFeed sample, using its README title/summary, Nick Brown/Jisc attribution, TypeScript source, SharePoint/Viva functionality and existing screenshot.
  • Fill two empty scenario description strings from their existing short descriptions.
  • Correct WorldClock's update date using its documented and committed SPFx upgrade, leaving its creation date unchanged.
  • Fix the Sales Orders sample-directory URL and three existing preview paths: PromotePages and TodaysLunch folder typos, and Sales Orders folder casing. Each points to the exact already-tracked file; no preview is fabricated or replaced.

Historical evidence

  • NewsFeed initial release: README version history and 81ad320, 2022-04-26. The commit's GitHub author is techienickb; the README identifies Nick Brown and Jisc.
  • NewsFeed current update: README and d8330c0, 2026-08-11. Its package and lock both resolve SPFx 1.23.0.
  • WorldClock creation remains 2024-02-03. Update becomes 2026-09-01, evidenced by README version history and 06d123c. The impossible 2024-01-21 update already appeared in the original metadata addition, 3c93381.

Validation

  • Strict JSON and repository templates/metadata-schema.json Draft 7 validation, including date formats: all 64 touched files pass.
  • The merged gallery array of all 85 records passes the same source schema.
  • auditSnapshot rerun on an edited copy of the complete collected source snapshot: repository errors 70 → 3, metadata files/records 84 → 85, missing-metadata findings 2 → 1, zero newly introduced errors in any source.
  • Warnings 199 → 200: the added sample has no invented downloadUrl, like existing entries.
  • CRLF-aware git diff --check passes; existing file formatting is preserved.
  • No sample code was executed and no sample dependencies were installed.
  • The existing PnP PR action requests only the first page of changed files; its result is not claimed to cover every file. The complete local schema validation above provides that coverage.

Deliberately not invented / remaining central-audit findings

  1. samples/ImageCard-ApplyLeave-OOF-Holiday is artifact-only: all 142 tracked files are under lib/, release/, sharepoint/, or temp/; there is no README, package.json, or source tree. It entered in 2d9b359. Do not manufacture a separate gallery sample for this directory.
  2. BotPowered-BasicAce-CollectFeedback and BotPowered-BasicAce-Tasks are documented .NET bot-powered ACEs, not SPFx projects. Their .csproj files target net6.0 and reference Bot Framework 4.21.2. Existing BOT-FRAMEWORK-VERSION=bot40 is preserved. The central auditor's mandatory SPFX-VERSION rule is inapplicable; no fictitious SPFx value is added.

There are no remaining preview errors in this repository's audited metadata after repairing the exact existing paths. Genuinely missing screenshots elsewhere remain deferred; this PR creates or replaces none.

Repair declarations using committed packages and locks; add historical NewsFeed metadata and correct existing descriptions, date and asset paths. Preserve non-SPFx facts and artifact-only exclusions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

Validation failed!

File: samples/ImageCard-HTML-React-Stock-Price-Chart/assets/sample.json

File: samples/ImageCard-MostLikedPages/assets/sample.json

File: samples/ImageCard-HybridWork-Checkin/assets/sample.json

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

Validation failed!

File: samples/ImageCard-MyLocation/assets/sample.json

File: samples/ImageCard-DynamicContentCard/assets/sample.json

File: samples/BasicCard-My-OneDrive-Info/assets/sample.json

File: samples/ImageCard-At-a-glance/assets/sample.json

File: samples/ImageCard-BookingSpaces/assets/sample.json

File: samples/ImageCard-PromotePages/assets/sample.json

File: samples/BasicCard-ShareGraphClient/assets/sample.json

File: samples/ImageCard-HTML-React-Stock-Price-Chart/assets/sample.json

File: samples/ImageCard-MostLikedPages/assets/sample.json

File: samples/ImageCard-HideACE/assets/sample.json

@VesaJuvonen

VesaJuvonen commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Merge stopped: normal checks are not green

The committed metadata passes local strict JSON validation for all 64 changed files, the repository schema for all 85 gallery records, and the complete-snapshot audit (70 → 3 errors, zero new errors). I have not merged or bypassed checks.

The existing sample-build workflow runs installations/builds even for metadata-only PRs. Confirmed blockers include:

  • ShareGraphClient: npm install --prefix samples/BasicCard-ShareGraphClient exits 254/ENOENT because this intentionally multi-project sample has no root package.json; its three actual packages are nested.
  • CreateTeam: existing dependency resolution fails (ERESOLVE): eslint 9.37.0 conflicts with @microsoft/rush-stack-compiler-5.3@0.1.0's peer eslint ^8.57.0.
  • ManageTeam: the same existing eslint/rush-stack-compiler peer dependency conflict.
  • Service-Health: the workflow chooses the existing gulpfile.js, then fails with Local gulp not found; the migrated package uses Heft.
  • calendar plan: existing node-sass/node-gyp 3.8.0 invokes Python 2 print syntax via /usr/bin/python; Python 3 raises SyntaxError: Missing parentheses in call to 'print'. Workflow-selected Node is 18.20.8.
  • PlannerTasks: existing node-sass installation invokes Python 2 syntax under /usr/bin/python and fails under the workflow-selected Node 18.20.8.

The PnP metadata validator reports reachability failures for unchanged author-avatar URLs and an unchanged existing DynamicContentCard preview URL. Its two attempts failed different URL sets. All nine unique reported URLs returned HTTP 200 on direct HEAD inspection, and comparison against the source base confirms all 13 reported field occurrences are unchanged. This supports intermittent validator-side URL reachability/transport failures, not a patch-introduced metadata defect; the validator's network environment was not reproduced. One ordinary retry was already attempted; no further retry or speculative URL replacement was made. Its first-page-only coverage remains supplemented by complete local validation.

All checks have now completed: 58 successful, seven failed (six sample builds plus metadata URL validation). Every one of the 64 changed files is assets/sample.json; source, package manifests, committed locks, gulpfiles, and workflows are byte-identical to the source base. No baseline or unrelated sample builds were rerun.

Fixing these build failures would require code/dependency/workflow changes outside this metadata-only authorization, so none were made. The branch has no enforced required-status rules, but normal failing checks were not bypassed. Repository auto-merge is disabled (allow_auto_merge=false). The PR remains open; the default branch is unchanged.

This branch has not been deployed

No deployments
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