✨ feat: P-09 weekly decisions job

Merged
AL
1mo ago
+479-8

Roadmap P-09, decision issues weekly. This PR also marks P-07 and P-08 shipped after their sandbox proofs.

The weekly job. The shared workflow gets a "Decisions, weekly" job, process-rules decisions-weekly. Clients run it on Mondays, 06:17 UTC, and by hand with workflow_dispatch. A Decision issue carries its fields one per line: Kind: (Override, Risk or Bet), Review:, Expires:, Check: (a command in backticks) and Undo:. For each open Decision issue:

  • A check that reads laptop files (~/, $HOME, /Users/, /home/) is labeled cannot-run-here and not run.
  • Any other check runs in the checkout with only PATH and HOME set, for at most 2 minutes. When it fails, the decision gets a comment with the output, and one undo issue (type Brief, labeled needs-owner) is opened, unless one is already open.
  • An Override whose expiry is within 30 days is labeled expiring.
  • A check runs only when the owner or the agent wrote the issue and was the last to edit its body. That stops anyone else who can edit issues from running commands in CI.

Client workflow changes. onboard's client workflow gains the schedule, workflow_dispatch and issues: write. The job asks for write access only for itself.

Proofs recorded for earlier slices:

  • P-07: on agent PRs in the sandbox, these were each refused: an unapproved start, a slice added after approval, a dropped state, and a second pull request.
  • P-08: a state linking a frame built from the design library passed, and one linking a screenshot-only frame was refused.

Sandbox proof for this slice, after merge: one dispatched run with three planted decisions. One check fails and opens its undo issue, one reads laptop files and is labeled cannot-run-here, and one Override is within 30 days of expiry and labeled expiring.

pnpm check passes.

🤖 Generated with Claude Code


Summary by cubic

Adds the weekly "Decisions, weekly" job to the shared workflow. On Mondays and by hand, it evaluates each open Decision issue: runs its check, labels overrides near expiry, and opens an undo issue on failure. This PR also marks P-07 and P-08 shipped after their sandbox proofs.

Weekly decisions job

  • A check that reads laptop files (~/, $HOME, /Users/, /home/, including through redirections and pipes) is labeled cannot-run-here; any other check runs in the checkout with only PATH and HOME set, and only when the owner or the agent wrote the issue and was the last to edit it.
  • A failed check comments on the decision and opens one undo issue (type Brief, labeled needs-owner), unless one is already open; a missing comment is added on the next run.
  • A check runs at most 2 minutes and does not count as tripped when it runs out of time; a check that exits 124 itself does count as tripped. After 45 minutes of checks the rest wait for next week.
  • Runs do not overlap, so two cannot open an undo issue for one decision. Only a comment by github-actions[bot] counts as proof an undo issue was opened.
  • An Override expiring within 30 days is labeled expiring; one whose expiry has passed is named in the log.

Client workflow

  • onboard's client workflow gains the schedule, workflow_dispatch, and issues: write on the process-rules job only.