Skip to content

Contents-only Workspaces may read check runs: the checks_read opt-in (0.17.0) - #35

Merged
immakermatty merged 1 commit into
mainfrom
agent/34-checks-read
Nov 23, 2026
Merged

immakermatty merged 1 commit into
mainfrom
agent/34-checks-read

Conversation

@immakermatty

@immakermatty immakermatty commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Status: Ready for review. Closes #34, implemented exactly as proposed there; the Owner accepted that scope in comment 7086307965, and nothing wider is included.

A contents-only Workspace can opt in to reading check runs. With checks_read: true its pull and triage grants mint contents: read and checks: read. An application host can then verify a commit's check runs before it deploys it (HumanAndMachine-ai/Machines#1356, R2).

What changes

  • Policy: workspaces[].checks_read is optional, and its only value is true. Only a Workspace with permission_ceiling: "contents" may declare it. Any other value, or the key on another Workspace, is rejected, so the broker fails closed.

  • Tokens of such a Workspace:

    Grant Before With checks_read
    pull / triage contents: read contents: read, checks: read
    push / maintain / admin contents: write contents: write (unchanged)
    any grant on the policy's conglomerate_hosts repository contents: read contents: read (unchanged)

    GitHub adds metadata: read as always. No write permission is added anywhere, and other Workspaces mint exactly as before.

  • policy check prints the checks_read set on its own line and shows contents+checks_read in the CEILING column.

  • Version 0.17.0. A 0.16.x broker ignores the key and keeps minting contents: read. The host's read of check runs is then refused and nothing deploys, so the opt-in fails closed until 0.17.0 is deployed.

  • Installation: unchanged. It already holds checks: read, which the policy requires.

  • Docs: README ("Reading check runs"), AGENTS.md invariant 4 and ARCHITECTURE.md.

Tests (invariant 8)

  • Policy accepts only true on a contents-ceiling Workspace and rejects false, strings, numbers, null, arrays and objects, and the key on uncapped and read-ceiling Workspaces.
  • tokenPermissions: read tier with checks, write tier unchanged, nothing added on the host key repository, other Workspace and the plain contents ceiling unchanged.
  • End to end over the live core server for pull, triage and push grants. Also checked: a cross-Workspace, cross-repository and foreign-owner request is refused, and a push grant on the host key repository mints contents: read without checks.
  • The mint revokes and refuses any answer GitHub returns with another set (checks missing, checks: write, contents: write, extra Actions or pull requests).
  • Worker with the real core: contents: write for the push grant, contents: read and checks: read for the pull grant, the other Workspace unchanged, and a misplaced checks_read gives 503 configuration_unavailable.

npm test 192 of 192 pass, and npm run check exit 0 (license check and Worker dry run).

Not done here

  • Release and deployment: a 0.17.0 release and its deployment follow the usual immutable-release path.
  • Opting in: each Organization adds checks_read: true to its application host's Workspace in its own reviewed policy.
  • The host side: the gate in Machines (ON_MERGE_CHECKS_READABLE) opens only after this and after HumanAndMachine-ai/Machines#1512.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread mcp:2dc11459-7e83-42da-a9c3-35187c51f8d5

🤖 Generated with Claude Code

Note

Add checks_read opt-in so contents-ceiling Workspaces can read check runs

Adds an optional workspaces[].checks_read policy field. When set to true on a contents-ceiling Workspace, core.mjs grants checks: read alongside contents: read in the read tier, except on the conglomerate_hosts repository. The write tier stays contents-only, and the installation must already accept checks: read.

  • parsePolicy rejects checks_read unless it is exactly true and the Workspace has the contents ceiling.
  • mintToken passes the repository ID to tokenPermissions so the host-key repository keeps contents-only permissions.
  • broker.mjs policy summaries show a separate checks-enabled read-tier line and mark the Workspace as contents+checks_read in the CEILING column.
  • Extensive tests in broker.test.mjs and worker.test.mjs cover permission selection, invalid policies, host-key exclusion, and token scope validation with revocation.
  • Behavioral Change: version bump to 0.17.0 (package metadata and USER_AGENT).

Macroscope summarized b8e92a4.

…(0.17.0)

A Workspace with permission_ceiling "contents" may declare checks_read: true.
Its pull and triage grants then mint exactly contents: read and checks: read
(plus GitHub's metadata: read), so an application host can verify a commit's
check runs before it deploys it. Its push, maintain and admin grants still
mint exactly contents: write, and on the policy's conglomerate_hosts
repository every grant still mints exactly contents: read, so a push grant
lowered there gains nothing. No write permission is added anywhere and other
Workspaces mint exactly as before.

checks_read is only true and only on a contents-ceiling Workspace; any other
value or Workspace is rejected and the broker fails closed. The installation
already holds checks: read, so no installation permission changes. A broker
before 0.17.0 ignores the key and keeps minting contents: read, so the host's
read of check runs is refused and nothing deploys.

Closes #34 as proposed there and accepted by the Owner (comment 7086307965).

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread mcp:2dc11459-7e83-42da-a9c3-35187c51f8d5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@immakermatty
immakermatty marked this pull request as ready for review November 22, 2026 23:42
@immakermatty immakermatty self-assigned this Nov 22, 2026

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Blocking: None.

Non-blocking: None. The implementation stays within the Owner-approved scope in #34. npm test passed 192 tests; npm run check passed.

Order and migrations: Release and deploy broker 0.17.0 before relying on the opt-in; the host gate also depends on HumanAndMachine-ai/Machines#1512, as recorded in the PR.

Agent: OpenMausBot Steward 9 · assignment 627bc051-48fc-4f95-966f-b80095192e48
— Pablo

@immakermatty
immakermatty merged commit 962a900 into main Nov 23, 2026
3 checks passed
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.

Contents-ceiling Workspace: opt-in checks:read on its read grants, so an application host can verify a commit's checks before deploying it

2 participants