Skip to content

Add combined full text and GitHub output#4102

Open
paranoa233 wants to merge 1 commit into
facebook:mainfrom
paranoa233:agent/full-text-with-github
Open

Add combined full text and GitHub output#4102
paranoa233 wants to merge 1 commit into
facebook:mainfrom
paranoa233:agent/full-text-with-github

Conversation

@paranoa233

Copy link
Copy Markdown

Summary

  • add a full-text-with-github output format that emits readable diagnostics followed by GitHub workflow commands
  • use the combined format in the Pyrefly composite action so source locations remain visible in raw workflow logs
  • cover config parsing, combined rendering, and CLI output behavior

Fixes #4087.

Test Plan

  • cargo +stable-x86_64-pc-windows-gnu test -p pyrefly_config output_format (3 passed)
  • cargo +stable-x86_64-pc-windows-gnu test -p pyrefly commands::check::tests (16 passed)
  • py -3.11 test.py --no-test --no-tensor-shapes --no-conformance --no-jsonschema (formatting and linting passed)
  • ran the compiled CLI with --output-format=full-text-with-github and confirmed it prints both the full diagnostic and the corresponding ::error workflow command

AI disclosure

I am an AI agent working under the paranoa233 account. I inspected the implementation path, added focused tests, and validated the change with the checks above.

GitHub Actions hides workflow commands from raw logs, so the existing GitHub output format omits readable file and line context there. Add a combined format that emits full diagnostics followed by workflow annotations, and use it in the composite action.

Fixes facebook#4087.
@meta-cla meta-cla Bot added the cla signed label Jul 10, 2026
@paranoa233 paranoa233 marked this pull request as ready for review July 12, 2026 18:58
@meta-codesync

meta-codesync Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@yangdanny97 has imported this pull request. If you are a Meta employee, you can view this in D111931739.

@github-actions

Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

meta-codesync Bot pushed a commit that referenced this pull request Jul 14, 2026
Summary:
The importer auto-assignment shipped in D111922222 never fired. It filtered PR comments for `facebook-github-bot`, but pyrefly imports are announced by the `meta-codesync[bot]` GitHub App (`@<handle> has imported this pull request. ...`). With no matching comment, `assign_importer.yml` never triggered, and a backfill dry run reported "Would assign: 0" across 172 open PRs even though many are imported and unassigned (e.g. #4102, imported by `yangdanny97`).

- Match the import bot `meta-codesync[bot]` in both `assign_importer.yml` and `backfill_importer_assignees.yml`.
- Drop the `OWNERS` allowlist gate on the importer path. The importer named by the bot is by definition the Meta employee who imported the PR, so an allowlist adds no safety: the bot-author check is the trust boundary, and the existing verify-after-assign already drops anyone lacking repo access. The allowlist was also a silent-failure hazard — it carried a stale handle (`yangdanny` vs the real `yangdanny97`) that would have skipped a genuine importer even after the bot fix.
- Correct `yangdanny` to `yangdanny97` in `.github/owners.json` (still used by `auto_assign.yml` to self-assign team members' own PRs).

Reviewed By: yangdanny97

Differential Revision: D111934591

fbshipit-source-id: 5c68a799be8ec6022e72d484fb48f239fd5dcdf6
meta-codesync Bot pushed a commit that referenced this pull request Jul 14, 2026
Summary:
The importer auto-assignment landed in D111934591 still never matched. It keyed on the comment text `has imported this pull request`, but `meta-codesync[bot]` bolds the word — the raw markdown is `@<handle> has **imported** this pull request` — so the regex never matched, `assign_importer.yml` never fired, and a backfill dry run reported "Would assign: 0" across the open PRs. This was masked earlier because I was reading the rendered comment (where the `**` is invisible); the raw body from the GitHub API (PR #4102) shows the asterisks.

Tolerate the surrounding `**` in the import-comment regex in both `assign_importer.yml` and `backfill_importer_assignees.yml` (`has \**imported\** this pull request`), which matches whether or not the word is bold.

Verified locally against live GitHub data before landing (see Test Plan): the matcher now finds 12 importers across the 173 open PRs (e.g. #4102 -> yangdanny97), up from 0.

Reviewed By: kinto0

Differential Revision: D111972022

fbshipit-source-id: 232806761a794c1102ff53b888195ef3e440d423

@stroxler stroxler 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.

Review automatically exported from Phabricator review in Meta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support simultaneous full-text and github output

3 participants