Skip to content

refactor: expose the architecture-assets validator as a callable core - #1787

Merged
mrbobbytables merged 1 commit into
cncf:mainfrom
mrbobbytables:copilot/p3-assets-core-20261022
Oct 22, 2026
Merged

mrbobbytables merged 1 commit into
cncf:mainfrom
mrbobbytables:copilot/p3-assets-core-20261022

Conversation

@mrbobbytables

Copy link
Copy Markdown
Member

Summary

Fixes #1759.

Implements the maintainer's explicitly approved, single additional validator
extraction after the accepted awards pilot. This is not a repository-wide
rollout or a change to mutation policy.

  • Move the existing filesystem rules into
    scripts/lib/validate-architecture-assets.mjs, exporting
    validateArchitectureAssets(root, shouldFix = false) and returning
    { issues, fixed, assetCount }. Findings, repairs and root-derived state are
    invocation-local.
  • Keep the existing CLI as the root/flag/reporting adapter, preserving exit
    behavior, diagnostic ordering, repair messages, asset counts and existing
    success text. There is no JSON input interface to introduce or alter.
  • Exercise the existing rule and symlink-root cases directly against the core,
    retain real subprocess CLI contracts, and update the existing shared-extension
    consumer check to the new production module.
  • Strengthen the behavior assertions exposed by the measured survivors:
    supported font formats, quality-check scope, valid XML attribute whitespace,
    incomplete dimensions, remediation diagnostics, warning severities and size
    boundaries, post-edit diagnostics, and the absence of unwanted file writes.

No mutation glob, workflow, threshold, dependency, fixture-build policy or
private runner bridge changes. Source-text/meta-tests were not added.

Verification

On the integrated base containing the other approved P2/P3 merges:

  • 83 focused cases pass, including the real CLI contracts and symlink-root
    containment cases.
  • npm run test:unit:coverage:check passes with 100% source lines and regions.
  • All six repository lint gates and npm run build pass.
  • npm run test:mutation -- --mutate scripts/lib/validate-architecture-assets.mjs --concurrency 2
    passes with the existing break threshold of 83 unchanged.
Scoped measurement Killed Survived NoCoverage Timeouts/errors Score
Initial extracted core, before strengthening assertions 269 43 0 0 86.22%
Final extracted core 304 8 0 0 97.44%

All 35 behaviorally distinguishable survivors were killed. The remaining eight
were individually reviewed as equivalent for the existing public behavior:
three unused exemption-description strings; the quality argument on a
font-only allowlist that cannot reach SVG validation; two explicit utf8
encodings changed to the identical default encoding; and the missing/other
root-kind strings changed to another value handled by the same nondirectory
skip. No suppressions or threshold reductions were used to hide them.

This is a scoped core result, not a replacement full-tree mutation baseline.
The historical CLI text, including its existing --fix success wording, is
intentionally unchanged.

Authorization

The maintainer approved this exact new PR and its normal protected merge as
part of the designated P2/P3 work. Agent inspection is not independent human
approval. Submit the exact validated head through the existing queue without
bypassing required checks or waiting for unrelated PRs.

Apply the maintainer-approved second validator extraction without changing mutation scope or thresholds. Preserve the filesystem CLI and its findings, repair and containment contracts; strengthen the measured behavioral survivors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
@netlify

netlify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for endusers ready!

Name Link
🔨 Latest commit 2d5b8b9
🔍 Latest deploy log https://app.netlify.com/projects/endusers/deploys/6ada47a2ba399130a92a0296
😎 Deploy Preview https://deploy-preview-1787--endusers.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mrbobbytables

Copy link
Copy Markdown
Member Author

Maintainer-delegated P3 disposition: exact head 2d5b8b9 implements only the expressly approved second validator extraction in issue1759. Reviewed the semantic move, unchanged filesystem CLI/root/repair/diagnostic contracts and symlink containment; all 35 behaviorally distinguishable survivors from the initial campaign were killed. The eight remaining equivalents are individually documented, not suppressed. Full local required coverage, all six lint gates, scoped mutation and build pass. The maintainer authorized this bounded PR and its normal exact-head protected queue submission once fresh gates pass. Agent inspection is not independent human approval. No blanket rollout, policy change or protection bypass.

@mrbobbytables

Copy link
Copy Markdown
Member Author

Infrastructure retry on the unchanged head: the first End-to-end tests job hit its 15-minute job budget after browser/dependency installation consumed about 12 minutes. The site built successfully, but only about 2.5 minutes remained for browser tests before cancellation; the log reports no assertion failure. Required Validate/Lint, CodeQL, DCO, scoped Mutation testing and End-to-end coverage are green. Rerunning only the cancelled browser job, not changing tests, timeouts or protections. Queue submission still waits for the real End-to-end tests result.

@mrbobbytables

Copy link
Copy Markdown
Member Author

The unchanged-head browser-job retry passed. Fresh Validate repository, Lint repository, End-to-end tests, End-to-end coverage, Mutation testing, CodeQL and DCO gates are green. Submitting exact approved head 2d5b8b9 to the normal protected merge queue, independently of unrelated PRs and without changing any gate or protection.

@mrbobbytables
mrbobbytables added this pull request to the merge queue Oct 22, 2026
Merged via the queue into cncf:main with commit 761fa39 Oct 22, 2026
17 of 18 checks passed
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.

[quality] Extend the merged callable-core mutation pattern to scripts/validate-architecture-assets.mjs

1 participant