Skip to content

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

Open
Wesley Wigham (weswigham) wants to merge 1 commit into
microsoft:mainfrom
weswigham:npx-hereby-verify
Open

Add a npx hereby validate command to group all repo validations#64161
Wesley Wigham (weswigham) wants to merge 1 commit 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

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.

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

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

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.

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: Not started

Development

Successfully merging this pull request may close these issues.

3 participants