Skip to content

host: make the sandbox items that only their own module uses private - #1686

Merged
Pedro Henrique Penna (ppenna) merged 1 commit into
devfrom
agents/issue-1683-sandbox-private-items
Nov 17, 2026
Merged

Pedro Henrique Penna (ppenna) merged 1 commit into
devfrom
agents/issue-1683-sandbox-private-items

Conversation

@ppenna

Copy link
Copy Markdown
Contributor

Fixes #1683

What does this pull request change?

It makes private the 27 pub(crate) items and fields of nvx::host::sandbox that #1683 lists: those that only their own module and its child modules name. It changes nothing else: each edit removes one pub(crate). Start with nvx/src/host/sandbox/distro.rs.

  • distro: BINDING_VERSION; the test seam Access, with its fields open and seal and its constants READ and GUARDED; PolicyResult; PolicyVerdict, with its fields revision and result and its constant ACCEPTED; DistroBinding::check_with; and verify_with.
  • scratch: SCRATCH_BINDING_VERSION; the test seam Access, with its field open and its constant WRITABLE; ScratchBinding::check_with; and bind_with.
  • options: SYSTEMD_ENTRYPOINTS, MAX_ENVIRONMENT_FILE_BYTES, MAX_EXEC_ENVIRONMENT, MAX_EXEC_ENVIRONMENT_BYTES, sandbox_mounts_with, and exec_environment_from_file.
  • mount: MAX_MOUNT_POLICY_PATHS and MAX_MOUNT_TARGET_BYTES, which only its child module request reads.

Once SYSTEMD_ENTRYPOINTS fits on one line, rustfmt joins it, so the diff is 27 insertions and 28 deletions in 4 files. Nothing else changes: no item is renamed, moved, or edited, and no code path, serde form, error message, ErrorKind, public API, or test changes.

Left out:

  • CheckedDistro stays pub(crate), since the crate-visible DistroBinding::check returns it.
  • The follow-ups that host: make the sandbox items that only their own module uses private #1683 lists. Some items are named across host::sandbox's submodules, such as the seams plan_mounts_with and require_mount_owner_supported_on, and need pub(super) or pub(in crate::host::sandbox). Other host modules have the same kind of candidates. And the host's hexadecimal helpers are duplicated.

Why is this change needed?

These items were visible to the whole crate, though nothing outside their own module used them.

The Access seams, with verify_with, check_with, and bind_with, let any module of the crate replace the opens and seals that the bindings' entry points fix:

  • DistroBinding::verify opens with seal::open_read.
  • DistroBinding::check opens with seal::open_guarded, which on Windows denies writing and deleting the layer while a launch holds it.
  • ScratchBinding::bind and check open with imp::open_writable.

With the change, these entry points are the only way in from the rest of the crate, and the compiler refuses any new use from outside these modules. The binding versions, the policy verdict, and the limits of options and mounts read as what they are: details of their module, which its tests can still name.

Nothing is broken, so there is no root cause: this is a code-quality change, behavior-preserving by construction.

Alternatives rejected:

  • Narrowing every pub(crate) item of host::sandbox at once. Items that sibling modules or the parent's tests read need pub(super) or pub(in crate::host::sandbox), and the pub(crate) use re-exports of mount/mod.rs would have to split. This change keeps to one rule, private where every use is in the item's own module, and leaves the rest to host: make the sandbox items that only their own module uses private #1683's follow-ups.
  • Narrowing CheckedDistro too. A private CheckedDistro in the signature of the crate-visible DistroBinding::check would trip private_interfaces under -D warnings.

How was this change validated?

The change preserves behavior. So in place of a reproduction and a regression test, #1683's acceptance criteria hold: the affected tests pass at the base revision and with the change, and stay unchanged. The base, 621f8b2c200 (origin/dev), holds the same host::sandbox and nvx/public-api/ as the issue's base, e5330ad60af.

Checks and results, with Rust 1.97.1:

Check Where Base (621f8b2c200) With the change (2986195b61c)
cargo test --locked --all-features --lib host::sandbox (in nvx/) Windows (x86-64), locally 94 passed 94 passed
cargo test --locked --all-features --lib host::sandbox (in nvx/) Linux host 89 passed 89 passed
python scripts\local_gates.py --base origin/dev --run Windows (x86-64), locally not run All 9 selected gates passed: test-changes (no change to an existing test), markdown-links, test-layout, nvx-format, nvx-lint, nvx-test (1098 library tests with all features, 543 with the default ones, and 191 without; no failure in any binary), nvx-doc, nvx-msrv, and nvx-cli (2261 Python tests OK with 88 skipped, and 84 adversarial tests OK with 11 skipped)
python3 scripts/local_gates.py --base origin/dev --run --keep-going --only test-layout markdown-links nvx-format nvx-lint nvx-test nvx-doc nvx-public-api nvx-msrv nvx-macos nvx-guest-binaries-lint nvx-guest-binaries-build, after test-changes passed there Linux host not run All 11 passed. Among them, nvx-public-api found the snapshots in nvx/public-api/ unchanged, and nvx-test ran 1815 library tests with all features, 543 with the default ones, and 191 without
python3 scripts/nvx.py test-microvm --backend kvm --scenario sandbox-lifecycle --scenario sandbox-gpt-layer --scenario managed-exec-config Linux host not run All three passed, and no OpenVMM process remained

Notes:

  • On Windows, sh came from Git's usr\bin on PATH, and NVX named a release nvx built from the change with cargo build --release --locked --features cli. The pip install step of nvx-cli found every requirement already satisfied.
  • The Linux host has python3 but no python. A temporary python link to python3, removed afterwards, let the gates' python commands run. The first attempt, without it, stopped at markdown-links with exit code 127.
  • A code-review pass over the whole diff found no issues.

Backend, host OS, host type, and guest: the Linux host is an Azure Linux 3.0 (x86-64) virtual machine with KVM, which ran the Linux checks in a temporary worktree of this branch. The KVM scenarios used the packaged artifacts of v0.1.0-dev.621f8b2c2002, the base's release, and an nvx built from the change. They booted the default Alpine guest, with the Ubuntu distro layer and the sandbox scratch template of that release.

Left to CI:

  • The microVM suites on MSHV and WHP, and the rest of the KVM suite. The change alters no code path, so no backend's behavior can change.
  • The Linux nvx-cli validation. Its first step runs pip install, which this session does not run on a remote host.
  • Every other job that CI selects.

Checklist

  • Tests cover the new or fixed behavior, in the layout that
    python3 scripts/check_test_layout.py checks.
  • python3 scripts/check_test_changes.py --base origin/dev lists no change
    to an existing test, or a Changes to existing tests section below
    explains each one.
  • The documentation that the change affects is updated, including
    .github/copilot-instructions.md and the skills when a convention or
    workflow changes.
  • A change to the public API of nvx updates nvx-rs/public-api/ with
    python3 scripts/public_api.py --update.
  • Snapshots, protocols, and on-disk formats stay compatible, or the
    description says how the change versions or migrates them.

No behavior changes, so the first item does not apply, and the existing tests, which are child modules of the changed ones, still reach every item. No documentation describes these items' visibility. The public API is unchanged: host::sandbox is private to the crate. The serde forms of DistroBinding, PolicyVerdict, and ScratchBinding keep their fields and names.

Twenty-seven pub(crate) items and fields of host::sandbox's distro,
scratch, options, and mount modules were named only inside their own
module and its child modules: its tests, scratch's imp, and mount's
request. Among them were the test seams of the distro and scratch
bindings, Access with verify_with, check_with, and bind_with, through
which any module of the crate could replace the opens and seals that
DistroBinding::verify and check and ScratchBinding::bind and check fix,
such as the guarded open of a distro layer's staged check.

Each is now private to its module: the binding versions, both Access
seams with their fields and constants, PolicyResult, PolicyVerdict with
its fields and ACCEPTED, verify_with, both check_with, bind_with, the
systemd entrypoints and the managed exec environment's limits, with
sandbox_mounts_with and exec_environment_from_file, and mount's limits
on policy paths and guest targets. CheckedDistro stays pub(crate), since
the crate-visible DistroBinding::check returns it.

Only visibility changes: no item, code path, serde form, error message,
or public API changes, and the tests, which are child modules, still
reach every item. At 621f8b2, whose host::sandbox matches the
issue's base, e5330ad, cargo test --locked --all-features --lib
host::sandbox passed 94 tests on Windows and 89 on Linux (nvx-kvm-test,
Azure Linux 3.0 with KVM, Rust 1.97.1). With the change, it passes the
same 94 on Windows, where cargo fmt --check and cargo clippy
--all-targets --all-features -D warnings are clean.

Refs #1683

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 04:38

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.

🟢 Approval recommended

No active review issues remain for the sandbox visibility cleanup.

No open issues 🎉

What changed in this PR

Addresses #1683 by making 27 module-local items and fields private in nvx::host::sandbox. This narrows internal access without changing runtime behavior, serialized formats, or the public API.

Changes:

  • Makes distro and scratch binding test seams private, preserving access through existing production entry points.
  • Makes module-local policy types, binding versions, option helpers, and limits private.
  • Preserves access for child modules and existing tests; no tests change.
File Description
nvx/​src/​host/​sandbox/​scratch.rs Makes the binding version, access seam, and binding helpers private.
nvx/​src/​host/​sandbox/​options.rs Makes option limits, entrypoint constants, and internal helpers private.
nvx/​src/​host/​sandbox/​mount/​mod.rs Makes mount limits private while retaining child-module access.
nvx/​src/​host/​sandbox/​distro.rs Makes the binding version, policy types, access seam, and verification helpers private.

Review effort: Balanced

@ppenna
Pedro Henrique Penna (ppenna) added this pull request to the merge queue Nov 17, 2026
Pedro Henrique Penna (ppenna) added a commit that referenced this pull request Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the
first line of its description, but nothing checks it: pull requests
such as #1675, whose only references sit in the template's HTML
comment, and #1516, whose Refs #1509 names a pull request, reference
no issue, and a reviewer has to notice.

Add the Issue link workflow, which pull_request_target runs, from the
default branch, when a pull request is opened, reopened, pushed to,
edited, labelled, or unlabelled. Its script, check_issue_link.py, reads
the pull request through gh api, in UTF-8 whatever the locale, and
passes it when GitHub links it to an issue of the repository
(closingIssuesReferences) or when its description holds close, fix,
resolve (in any form), Part of, or Refs, with an optional colon,
then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A
pull request's number, a missing number, a bare #N, and another
repository's issue do not count. The script reads the description as
GitHub renders it, through the Markdown API in the repository's context,
and only the text that GitHub shows counts: not an HTML comment, an
attribute such as a link's title, or code, inline, fenced, indented, or
in <pre>, nor a keyword that code or the end of a block, such as a list
item or a table cell, separates from its number. GitHub's own renderer
keeps the check in step with what the pull request's page shows, which a
parser of CommonMark, GFM tables, and raw HTML written here kept
missing. It looks up at most the first 10 numbers, so a description
cannot make it call the API without bound. Pull requests by
dependabot[bot] or github-actions[bot], or labelled no-issue, are
exempt, and closed ones are left alone.

An unlinked pull request gets the needs-issue label and one marker
comment that says how to reference an issue, and the check fails;
editing the description reruns it, which then removes the label and
rewrites the comment. Only a comment of github-actions[bot] that starts
with the marker is the script's. The script does every read before its
first write, so an API error fails the check and changes nothing, and
its summary names the verdict and the numbers, never the description.

The job has no condition, since a skipped run would replace the
previous verdict, runs one check a pull request at a time, keeps no
checkout credentials, and gets only the pull request's number. Its
token reads contents and writes pull requests; reading an issue of a
public repository needs no issues permission, so the nightly report
and issue labelling stay the only workflows that write issues.

Evidence: dry runs against the live repository pass #1687, #1686,
and #1682, which GitHub links to issues, and #1679, whose description
references #1676, and flag #1675, #1516, #1510, and #1509, as reading
their descriptions confirms. A 64 KiB description renders in about a
second, and its text reads in at most 60 ms.

test_issue_link.py covers the reading of GitHub's HTML, as gh api
markdown renders it: keywords and targets, other repositories, code and
<pre>, attributes, the ends of blocks and table cells, and inline
elements; the verdicts and the writes through a fake gh api, the render
request, gh's input and output in UTF-8, the bound on lookups, an API
error at each read, a comment that quotes the marker or has no author,
and the workflow's triggers, permissions, checkout, concurrency, and
inputs. validate-nvx runs it on Linux and Windows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna) added a commit that referenced this pull request Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the
first line of its description, but nothing checks it: pull requests
such as #1675, whose only references sit in the template's HTML
comment, and #1516, whose Refs #1509 names a pull request, reference
no issue, and a reviewer has to notice.

Add the Issue link workflow, which pull_request_target runs, from the
default branch, when a pull request is opened, reopened, pushed to,
edited, labelled, or unlabelled. Its script, check_issue_link.py, reads
the pull request through gh api, in UTF-8 whatever the locale, and
passes it when GitHub links it to an issue of the repository
(closingIssuesReferences) or when its description holds close, fix,
resolve (in any form), Part of, or Refs, with an optional colon,
then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A
pull request's number, a missing number, a bare #N, and another
repository's issue do not count. The script reads the description as
GitHub renders it, through the Markdown API in the repository's context,
and only the text that GitHub shows counts: not an HTML comment, an
attribute such as a link's title, or code, inline, fenced, indented, or
in <pre>, nor a keyword that code or the end of a block, such as a list
item or a table cell, separates from its number. A link counts by where
it goes, whatever its text: a link to an issue or a pull request as
OWNER/REPO#N, and any other link as code does. GitHub's own renderer
keeps the check in step with what the pull request's page shows, which a
parser of CommonMark, GFM tables, and raw HTML written here kept
missing. It looks up at most the first 10 numbers, so a description
cannot make it call the API without bound. Pull requests by
dependabot[bot] or github-actions[bot], or labelled no-issue, are
exempt, and closed ones are left alone.

An unlinked pull request gets the needs-issue label and one marker
comment that says how to reference an issue, and the check fails;
editing the description reruns it, which then removes the label and
rewrites the comment. Only a comment of github-actions[bot] that starts
with the marker is the script's. The script does every read before its
first write, so an API error fails the check and changes nothing, and
its summary names the verdict and the numbers, never the description.

The job has no condition, since a skipped run would replace the
previous verdict, runs one check a pull request at a time, keeps no
checkout credentials, and gets only the pull request's number. Its
token reads contents and writes pull requests; reading an issue of a
public repository needs no issues permission, so the nightly report
and issue labelling stay the only workflows that write issues.

Evidence: dry runs against the live repository pass #1687, #1686,
and #1682, which GitHub links to issues, and #1679, whose description
references #1676, and flag #1675, #1516, #1510, and #1509, as reading
their descriptions confirms. A 64 KiB description renders in about a
second, and its text reads in at most 60 ms.

test_issue_link.py covers the reading of GitHub's HTML, as gh api
markdown renders it: keywords and targets, other repositories, code and
<pre>, attributes, links, the ends of blocks and table cells, and inline
elements; the verdicts and the writes through a fake gh api, the render
request, gh's input and output in UTF-8, the bound on lookups, an API
error at each read, a comment that quotes the marker or has no author,
and the workflow's triggers, permissions, checkout, concurrency, and
inputs. validate-nvx runs it on Linux and Windows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna) added a commit that referenced this pull request Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the
first line of its description, but nothing checks it: pull requests
such as #1675, whose only references sit in the template's HTML
comment, and #1516, whose Refs #1509 names a pull request, reference
no issue, and a reviewer has to notice.

Add the Issue link workflow, which pull_request_target runs, from the
default branch, when a pull request is opened, reopened, pushed to,
edited, labelled, or unlabelled. Its script, check_issue_link.py, reads
the pull request through gh api, in UTF-8 whatever the locale, and
passes it when GitHub links it to an issue of the repository
(closingIssuesReferences) or when its description holds close, fix,
resolve (in any form), Part of, or Refs, with an optional colon,
then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A
pull request's number, a missing number, a bare #N, and another
repository's issue do not count. The script reads the description as
GitHub renders it, through the Markdown API in the repository's context,
and only the text that GitHub shows counts: not an HTML comment, an
attribute such as a link's title, or code, inline, fenced, indented, or
in <pre>, nor a keyword that code or the end of a block, such as a list
item or a table cell, separates from its number. A link counts by where
it goes, and of its text only a keyword that starts it: a link to an
issue or a pull request, absolute or root-relative, with nothing after
the number other than a slash, a query, or a fragment, as that keyword
and OWNER/REPO#N, and any other link as code does. GitHub's own renderer
keeps the check in step with what the pull request's page shows, which a
parser of CommonMark, GFM tables, and raw HTML written here kept
missing. It looks up at most the first 10 numbers, so a description
cannot make it call the API without bound. Pull requests by
dependabot[bot] or github-actions[bot], or labelled no-issue, are
exempt, and closed ones are left alone.

An unlinked pull request gets the needs-issue label and one marker
comment that says how to reference an issue, and the check fails;
editing the description reruns it, which then removes the label and
rewrites the comment. Only a comment of github-actions[bot] that starts
with the marker is the script's. The script does every read before its
first write, so an API error fails the check and changes nothing, and
its summary names the verdict and the numbers, never the description.

The job has no condition, since a skipped run would replace the
previous verdict, runs one check a pull request at a time, keeps no
checkout credentials, and gets only the pull request's number. Its
token reads contents and writes pull requests; reading an issue of a
public repository needs no issues permission, so the nightly report
and issue labelling stay the only workflows that write issues.

Evidence: dry runs against the live repository pass #1687, #1686,
and #1682, which GitHub links to issues, and #1679, whose description
references #1676, and flag #1675, #1516, #1510, and #1509, as reading
their descriptions confirms. A 64 KiB description renders in about a
second, and its text reads in at most 60 ms.

test_issue_link.py covers the reading of GitHub's HTML, as gh api
markdown renders it: keywords and targets, other repositories, code and
<pre>, attributes, links, the ends of blocks and table cells, and inline
elements; the verdicts and the writes through a fake gh api, the render
request, gh's input and output in UTF-8, the bound on lookups, an API
error at each read, a comment that quotes the marker or has no author,
and the workflow's triggers, permissions, checkout, concurrency, and
inputs. validate-nvx runs it on Linux and Windows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merged via the queue into dev with commit 8019ebf Nov 17, 2026
55 checks passed
@ppenna
Pedro Henrique Penna (ppenna) deleted the agents/issue-1683-sandbox-private-items branch November 17, 2026 05:55
Pedro Henrique Penna (ppenna) added a commit that referenced this pull request Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the
first line of its description, but nothing checks it: pull requests
such as #1675, whose only references sit in the template's HTML
comment, and #1516, whose Refs #1509 names a pull request, reference
no issue, and a reviewer has to notice.

Add the Issue link workflow, which pull_request_target runs, from the
default branch, when a pull request is opened, reopened, pushed to,
edited, labelled, or unlabelled. Its script, check_issue_link.py, reads
the pull request through gh api, in UTF-8 whatever the locale, and
passes it when GitHub links it to an issue of the repository
(closingIssuesReferences) or when its description holds close, fix,
resolve (in any form), Part of, or Refs, with an optional colon,
then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A
pull request's number, a missing number, a bare #N, and another
repository's issue do not count. The script reads the description as
GitHub renders it, through the Markdown API in the repository's context,
and only the text that GitHub shows counts: not an HTML comment, an
attribute such as a link's title, or code, inline, fenced, indented, or
in <pre>, nor a keyword that code or the end of a block, such as a list
item or a table cell, separates from its number. A link counts by where
it goes, and of its text only a keyword that starts it: a link to an
issue or a pull request, absolute or root-relative, with nothing after
the number other than a slash, a query, or a fragment, as that keyword
and OWNER/REPO#N, which no text after the link extends, and any other
link as code does. An issue's URL that GitHub shows as text follows the
same rule, but for the punctuation that ends a sentence. GitHub's own
renderer keeps the check in step with what the pull request's page
shows, which a parser of CommonMark, GFM tables, and raw HTML written
here kept missing. It looks up at most the first 10 numbers, so a
description cannot make it call the API without bound. Pull requests by
dependabot[bot] or github-actions[bot], or labelled no-issue, are
exempt, and closed ones are left alone.

An unlinked pull request gets the needs-issue label and one marker
comment that says how to reference an issue, and the check fails;
editing the description reruns it, which then removes the label and
rewrites the comment. Only a comment of github-actions[bot] that starts
with the marker is the script's. The script does every read before its
first write, so an API error fails the check and changes nothing, and
its summary names the verdict and the numbers, never the description.

The job has no condition, since a skipped run would replace the
previous verdict, runs one check a pull request at a time, keeps no
checkout credentials, and gets only the pull request's number. Its
token reads contents and writes pull requests; reading an issue of a
public repository needs no issues permission, so the nightly report
and issue labelling stay the only workflows that write issues.

Evidence: dry runs against the live repository pass #1687, #1686,
and #1682, which GitHub links to issues, and #1679, whose description
references #1676, and flag #1675, #1516, #1510, and #1509, as reading
their descriptions confirms. A 64 KiB description renders in about a
second, and its text reads in at most 60 ms.

test_issue_link.py covers the reading of GitHub's HTML, as gh api
markdown renders it: keywords and targets, other repositories, code and
<pre>, attributes, links, the ends of blocks and table cells, and inline
elements; the verdicts and the writes through a fake gh api, the render
request, gh's input and output in UTF-8, the bound on lookups, an API
error at each read, a comment that quotes the marker or has no author,
and the workflow's triggers, permissions, checkout, concurrency, and
inputs. validate-nvx runs it on Linux and Windows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna) added a commit that referenced this pull request Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the
first line of its description, but nothing checks it: pull requests
such as #1675, whose only references sit in the template's HTML
comment, and #1516, whose Refs #1509 names a pull request, reference
no issue, and a reviewer has to notice.

Add the Issue link workflow, which pull_request_target runs, from the
default branch, when a pull request is opened, reopened, pushed to,
edited, labelled, or unlabelled. Its script, check_issue_link.py, reads
the pull request through gh api, in UTF-8 whatever the locale, and
passes it when GitHub links it to an issue of the repository
(closingIssuesReferences) or when its description holds close, fix,
resolve (in any form), Part of, or Refs, with an optional colon,
then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A
pull request's number, a missing number, a bare #N, and another
repository's issue do not count. The script reads the description as
GitHub renders it, through the Markdown API in the repository's context,
and only the text that GitHub shows counts: not an HTML comment, an
attribute such as a link's title, or code, inline, fenced, indented, or
in <pre>, nor a keyword that code or the end of a block, such as a list
item or a table cell, separates from its number. A link counts by where
it goes, and of its text only a keyword that starts it: a link to an
issue or a pull request, absolute or root-relative, with nothing after
the number other than a slash, a query, or a fragment, as that keyword
and OWNER/REPO#N, which no text after the link extends, and any other
link as code does. An issue's URL that GitHub shows as text follows the
same rule, but for the punctuation that ends a sentence. GitHub's own
renderer keeps the check in step with what the pull request's page
shows, which a parser of CommonMark, GFM tables, and raw HTML written
here kept missing. It looks up at most the first 10 numbers, so a
description cannot make it call the API without bound. Pull requests by
dependabot[bot] or github-actions[bot], or labelled no-issue, are
exempt, and closed ones are left alone.

An unlinked pull request gets the needs-issue label and one marker
comment that says how to reference an issue, and the check fails;
editing the description reruns it, which then removes the label and
rewrites the comment. Only a comment of github-actions[bot] that starts
with the marker is the script's. The script does every read before its
first write, so an API error fails the check and changes nothing, and
its summary names the verdict and the numbers, never the description.

The job has no condition, since a skipped run would replace the
previous verdict, runs one check a pull request at a time, keeps no
checkout credentials, and gets only the pull request's number. Its
token reads contents and writes pull requests; reading an issue of a
public repository needs no issues permission, so the nightly report
and issue labelling stay the only workflows that write issues.

Evidence: dry runs against the live repository pass #1687, #1686,
and #1682, which GitHub links to issues, and #1679, whose description
references #1676, and flag #1675, #1516, #1510, and #1509, as reading
their descriptions confirms. A 64 KiB description renders in about a
second, and its text reads in at most 60 ms.

test_issue_link.py covers the reading of GitHub's HTML, as gh api
markdown renders it: keywords and targets, other repositories, code and
<pre>, attributes, links, the ends of blocks and table cells, and inline
elements; the verdicts and the writes through a fake gh api, the render
request, gh's input and output in UTF-8, the bound on lookups, an API
error at each read, a comment that quotes the marker or has no author,
and the workflow's triggers, permissions, checkout, concurrency, and
inputs. validate-nvx runs it on Linux and Windows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

host: make the sandbox items that only their own module uses private

2 participants