Skip to content

Add a npx hereby validate command to group all repo validations - #64161

Merged
Wesley Wigham (weswigham) merged 2 commits into
microsoft:mainfrom
weswigham:npx-hereby-verify
Sep 8, 2026
Merged

Add a npx hereby validate command to group all repo validations#64161
Wesley Wigham (weswigham) merged 2 commits into
microsoft:mainfrom
weswigham:npx-hereby-verify

Conversation

@weswigham

Copy link
Copy Markdown
Member

I have seen a lot of very dumb powershell trying to shorten the list of commands into "a single script" with appropriate error handling, and a lot of the time it does not work.

Better to just provide it upfront as a single command.

Comment thread Herebyfile.mjs Outdated

await runValidation("test", async () => {
await runTests();
await runTestExtension();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we take the time now to get these extension tests out too into their own task? I've been wanting hereby test to not run them.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They already are. There's hereby test:extension defined already. I can (and just did) remove it from test so test just aliases test:tsc - CI doesn't use test (or validate, ofc) anyway, so this only impacts our muscle memory for what commands do what locally.

Comment thread Herebyfile.mjs
}

export const validate = task({
name: "validate",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a lot of terms, test, check, validate... Sort of wonder if we should somehow name this with "all" in the name to make it very clear what must be done

@weswigham Wesley Wigham (weswigham) Sep 8, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a --all argument to validate that includes all the various tool/benchcmark/api tests and smoke test. Pretty sure that covers every test: subcommand listed in ci.yml.

npx hereby test # Run tests
npx hereby lint # Run linters
npx hereby format # Format the code
npx hereby validate # Build, test, lint, and format the project

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the things I want to do in this file is to make it clear that the build, test, lint, just matter when editing the tsc dir.

We can probably do that in a followup, as the "CRITICAL" language here should really be in the CCA file instead

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...isn't this the CCA file? It's copilot-instructions.md. The only other markdown file that ever even mentions hereby commands is the generic CONTRIBUTING.md (and the compiler test skill).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the file used by all copilot stuff; they only recently added a file that is for CCA only. Unfortunately I now cannot find the docs for this. They do have https://github.blog/changelog/2025-11-12-copilot-code-review-and-coding-agent-now-support-agent-specific-instructions/ which lets you exclude certain things, but I know they have a separate CCA one somewhere...

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Build must use the failure-capturing path so all validations run and failures are aggregated.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a unified npx hereby validate command for repository checks.

Changes:

  • Adds validation orchestration with optional API tests and aggregated failures.
  • Updates Copilot instructions to use the consolidated workflow.
File summaries
File Description
Herebyfile.mjs Implements the validation task and --api option. Build failures currently prevent remaining validations from running.
.github/copilot-instructions.md Documents the unified validation command and checklist.
Review details

Suppressed comments (1)

Herebyfile.mjs:1371

  • With --api, this calls runTestAPI directly but never runs the buildAPITests prerequisite that the existing test:api task declares at lines 1250-1254. On a clean checkout, the generated API test artifacts therefore are not prepared, so the documented replacement for test:api can fail or exercise stale output. Add that prerequisite conditionally when API validation is requested.
    dependencies: [build],
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread Herebyfile.mjs
export const validate = task({
name: "validate",
description: "Builds, tests, lints, and formats the repo. Pass --api to include API tests.",
dependencies: [build],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't notice this, but yeah build doesn't need to be a dep, right? nothing needs that to have happened? I guess the API does?

@weswigham Wesley Wigham (weswigham) Sep 4, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API needs it to work and I have doubts on if lint, test, and format would reliably work in the presence of a non-functioning build.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So right, I was just surprised by it being a dep versus another func call, but it doesn't practically matter.

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Sep 8, 2026
@weswigham
Wesley Wigham (weswigham) added this pull request to the merge queue Sep 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 8, 2026
@weswigham
Wesley Wigham (weswigham) added this pull request to the merge queue Sep 8, 2026
Merged via the queue into microsoft:main with commit d0ac85d Sep 8, 2026
26 checks passed
@weswigham
Wesley Wigham (weswigham) deleted the npx-hereby-verify branch September 8, 2026 18:53
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants