Skip to content

feat(build): replace alex with direct retext dependencies - #2818

Open
Jamie Kim (jkim323) wants to merge 12 commits into
mainfrom
feat/remove-alex-dependency-warning
Open

feat(build): replace alex with direct retext dependencies#2818
Jamie Kim (jkim323) wants to merge 12 commits into
mainfrom
feat/remove-alex-dependency-warning

Conversation

@jkim323

@jkim323 Jamie Kim (jkim323) commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Description

This change removed the direct alex@11.0.1 development dependency in favor
of direct retext dependencies.

  • Added exact retext-equality@6.6.0 and vfile-sort@4.0.0 development
    dependencies and regenerated the root lockfile.
  • Replaced alex.text() with separate reusable equality and profanity
    processors. Both use retext-english and retext-stringify; only the
    equality processor registers retext-equality, and only the profanity
    processor registers retext-profanities.
  • Configured profanity with sureness: 1, a confidence threshold rather
    than a severity scale. Rating-0 matches are excluded with and without
    -FailOnAlex. Each non-allowlisted rating-1 or rating-2 finding is emitted
    once under source: retext-profanities and remains an error.
  • Retained source: alex as the equality report-source alias, not a package
    dependency. Equality findings are warnings by default; -FailOnAlex
    promotes only emitted equality findings to errors. It does not change
    the profanity threshold or restore excluded matches.
  • Sorted equality messages with compareMessage before allowlist filtering
    and normalization, retaining the equality-before-profanity source-block
    order rather than a global position sort.
  • Expanded regression coverage for exact equality positions, single-source
    profanity findings, separate source blocks, paired phrase allowlists, and
    rating-0 exclusion in both -FailOnAlex modes.
  • Updated the eval script help and owner documentation to explain the direct
    retext implementation and its threshold and compatibility policy.

The JSON report fields, CLI names, and phrase allowlist were retained, but
the historical finding set is intentionally different: profanity findings
are no longer duplicated under source: alex, and rating-0 profanity matches
are no longer reported. Full historical output equivalence is not claimed.

Related Issue(s)

Closes #2628

Type of Change

Select all that apply:

Code & Documentation:

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Infrastructure & Configuration:

  • GitHub Actions workflow
  • Linting configuration (markdown, PowerShell, etc.)
  • Security configuration
  • DevContainer configuration
  • Dependency update

AI Artifacts:

  • Reviewed contribution with hve-builder and addressed all actionable findings
  • Copilot instructions (.github/instructions/*.instructions.md)
  • Copilot prompt (.github/prompts/*.prompt.md)
  • Copilot agent (.github/agents/*.agent.md)
  • Copilot skill (.github/skills/*/SKILL.md)
  • Copilot hook (.github/hooks/*/*.json)
  • Eval spec added/updated for changed AI artifacts (evals/)

Note for AI Artifact Contributors:

  • Agents: Research, indexing/referencing other project (using standard VS Code GitHub Copilot/MCP tools), planning, and general implementation agents likely already exist. Review .github/agents/ before creating new ones.
  • Skills: Must include both bash and PowerShell scripts. See Skills.
  • Model Versions: Contributions MUST target models listed in the model catalog (scripts/linting/model-catalog.json) whose provider appears in providerAllowlist and whose status is ga or preview. Run npm run lint:models to validate references.
  • See Agents Not Accepted and Model Version Requirements.

Other:

  • Script/automation (.ps1, .sh, .py)
  • Other (please describe):

Sample Prompts (for AI Artifact Contributions)

User Request:

Execution Flow:

Output Artifacts:

Success Indicators:

For detailed contribution requirements, see:

Testing

  • npm ci passed after the final merge.
  • npm run test:ps -- -TestPath scripts/tests/evals/Test-EvalSpecText.Tests.ps1
    passed with 10 tests, 0 failures, and 1 informational skip.
  • The earlier claim of zero ordered differences across 1,100 files and 3,693 messages is withdrawn: the before/after reports were not retained, so their digests and comparison output cannot be supplied or independently verified.
  • The full-corpus comparison remains pending. Independent reconstruction from pre-migration revision e822f3bdf8e0bc816e996ef1e0d8343b1aa1c12d has not completed; installation of that snapshot's locked dependencies encountered TLS failures. Module import checks are not a completed locked install or corpus comparison.
  • The current revision intentionally changes profanity source attribution, removes duplicate findings, and includes default-threshold findings in the hard-error pass. A new comparison must demonstrate unchanged ordered equality findings and account for those explicit profanity differences, rather than claim zero differences across all messages.
  • Passing focused regression tests and in-memory sort-mutation checks are separate checks, not substitutes for retained full-corpus before/after evidence. No report digests or successful corpus diff count are claimed here.
  • npm run lint:public-dependency-feeds passed with zero violations.
  • npm run lint:dependency-pinning passed with zero violations.
  • npm run lint:tables, npm run lint:frontmatter, and
    npm run validate:devcontainer-lockfile passed.
  • npm run validate:docs passed after restoring the independent Docusaurus
    package root.
  • npm run spell-check passed.
  • npm run validate:local did not complete because markdown link validation
    received non-success responses from external URLs in unchanged files.
  • npm run lint:md-links did not complete for the same unchanged external
    links.
  • npm run ci:eval:lint:text is pending hosted CI.
  • Manual testing was not performed.

Checklist

Required Checks

  • Documentation is updated (if applicable)
  • Files follow existing naming conventions
  • Changes are backwards compatible (if applicable)
  • Tests added for new functionality (if applicable)

AI Artifact Contributions

  • Used hve-builder review mode to review contribution
  • Addressed all actionable findings from the hve-builder review
  • Verified contribution follows common standards and type-specific requirements

Required Local Checks

The following local-safe validation commands must pass before merging:

  • Local validation aggregate: npm run validate:local
  • Documentation validation (if docs changed): npm run validate:docs
  • Spell checking: npm run spell-check
  • Link validation: npm run lint:md-links

Security Considerations

  • This PR does not contain any sensitive or NDA information
  • Any new dependencies have been reviewed for security issues
  • Security-related scripts follow the principle of least privilege (N/A - no security scripts changed)

Additional Notes

The repository template was used. prebuild-install@7.1.3 remains through
unrelated upstream dependencies and is outside this change. Hosted CI must
complete the text lint lane before merge.

Jamie Kim added 3 commits August 31, 2026 11:27
🧹 - Generated by Copilot

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

Copilot-Session: 82416c1e-d4c0-43ab-97a0-ef06656b5ea4
@jkim323 Jamie Kim (jkim323) self-assigned this Aug 31, 2026
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
npm/vfile-sort 4.0.0 🟢 3.1
Details
CheckScoreReason
Packaging⚠️ -1packaging workflow not detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Code-Review⚠️ 0Found 1/30 approved changesets -- score normalized to 0
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ 0Project has not signed or included provenance with any releases.
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Security-Policy🟢 10security policy file detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/retext-equality 6.6.0 🟢 3.4
Details
CheckScoreReason
Code-Review⚠️ 0Found 1/30 approved changesets -- score normalized to 0
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Security-Policy🟢 10security policy file detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • package-lock.json
  • package.json

@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.27%. Comparing base (bb0ac58) to head (edd7e60).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2818      +/-   ##
==========================================
+ Coverage   83.14%   83.27%   +0.12%     
==========================================
  Files         183      184       +1     
  Lines       34039    34499     +460     
  Branches       27       27              
==========================================
+ Hits        28302    28729     +427     
- Misses       5734     5767      +33     
  Partials        3        3              
Flag Coverage Δ
docusaurus 90.60% <ø> (ø)
pester 84.24% <ø> (+0.40%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 12 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Eval Execution

Status: Passed

  • Artifacts evaluated: 0
  • Specs run: 0
  • Assertions passed: 0
  • Assertions failed (blocking): 0
  • Assertions failed (advisory): 0
  • Failed specs (merge-blocking): 0

No changed AI artifacts required evaluation.

@jkim323
Jamie Kim (jkim323) marked this pull request as ready for review September 3, 2026 05:33
@jkim323
Jamie Kim (jkim323) requested a review from a team as a code owner September 3, 2026 05:33
@jkim323
Jamie Kim (jkim323) marked this pull request as draft September 3, 2026 05:54
@jkim323 Jamie Kim (jkim323) changed the title feat(build): replace alex with direct retext dependencies [DRAFT]feat(build): replace alex with direct retext dependencies Sep 3, 2026
@jkim323

Copy link
Copy Markdown
Collaborator Author

Copilot resolve the merge conflicts in this pull request

…ndency-warning

# Conflicts:
#	docs/contributing/evals-ci.md
#	scripts/README.md

Co-authored-by: jkim323 <46459431+jkim323@users.noreply.github.com>

Copilot AI commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts in docs/contributing/evals-ci.md and scripts/README.md with origin/main in commit e62f99d.

@github-actions github-actions Bot mentioned this pull request Sep 6, 2026
@jkim323
Jamie Kim (jkim323) marked this pull request as ready for review September 6, 2026 06:02
@jkim323 Jamie Kim (jkim323) changed the title [DRAFT]feat(build): replace alex with direct retext dependencies feat(build): replace alex with direct retext dependencies Sep 6, 2026
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.

feat: remove alex-owned deprecated npm dependency warnings

3 participants