Skip to content

D221 — a required record status keeps an attested pull request moving - #400

Merged
napkinstack-agent[bot] merged 2 commits into
mainfrom
attest-posts-status
Nov 14, 2026
Merged

napkinstack-agent[bot] merged 2 commits into
mainfrom
attest-posts-status

Conversation

@napkinstack-agent

Copy link
Copy Markdown
Contributor

Closes #399.

Why

In an attested project (checks: attested), the record holds the description's sheet (D214), so it is made after the description's last edit. It travels by git notes, which start no workflow run. The pull request's last « Test sheet and cycle » run is older than the record, so it stays red and the merge stays blocked. Until D218, the approval's run hid this. Since D218, only an edit of the description unblocked it (#399 lists the runs and the order of events).

What

flowchart LR
  A[nstack attest] -->|notes push: no event| N[(record)]
  A -->|commit status| S["nstack / local checks"]
  R[ruleset requires it?] -->|yes| D["Test sheet and cycle: A1/A2 left to the status"]
  R -->|no / unread| J["Test sheet and cycle: judges the record, as before"]
Loading

Legend: the arrows from nstack attest are what it writes; the ruleset decides which check judges the record.

  • pr-check on the forge's run: if the base branch's ruleset requires nstack / local checks, it leaves A1 and A2 to that status and says so. nstack attest already posts that status with the record (PDR-0013 §3). The rules come from GET /repos/{repo}/rules/branches/{base}, read with the job's token. If they cannot be read, or the status is not required, the run judges the record as before.
  • A1's action now names both ways out: an edit of the description, or requiring the status.
  • The agent's App gets Commit statuses: write, so an agent's record shows its status.
  • When the status cannot be posted, nstack attest says the merge waits for it.
  • Docs: 07-governance §7, the workflow comment, ADR-0004's permission row, register row D221.

Market: a result made outside CI reaches the forge as a commit status that a ruleset requires (Jenkins, Buildkite, basecamp/gh-signoff). Making the status required stays the decider's gesture at the forge, as PDR-0013 §3 says.

Tests

  • test_attest.py: the run defers to the required status (no record, then a failed record); without that status, A1 fails and names both ways out; the rules are read, URL-encoded and fail safe, and only on CI. Seen red before the change.
  • Oracle uv run bash platform/tests/run.sh: 1308 passed, scenarios OK. Fitness compliant.

Migration

For an attested project on GitHub, add nstack / local checks to the default branch ruleset's required checks: Settings → Rules → the ruleset → Require status checks. An existing agent App also needs Commit statuses: write.

🤖 Generated with Claude Code

The record holds the description's sheet (D214), so it is made after the
last edit, and notes start no run: the pull request's run from before it
stayed red (#399). Where the base branch's ruleset requires
`nstack / local checks`, the status nstack attest posts with the record,
the run leaves A1 and A2 to it. An agent's App gets Commit statuses: write.

Agent-Session: nstack-os-d221
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@napkinstack-agent
napkinstack-agent Bot requested a review from a team as a code owner November 14, 2026 21:09
…paged, older Apps said

Agent-Session: nstack-os-d221
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@napkinstack-agent
napkinstack-agent Bot merged commit 3fd9750 into main Nov 14, 2026
3 checks passed
@napkinstack-agent
napkinstack-agent Bot deleted the attest-posts-status branch November 14, 2026 21:20
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.

A record made after the PR's last run never re-runs « Test sheet and cycle »: the merge stays blocked until the description is edited

1 participant