Repository navigation
chore(ci): add PR checks and merge risk guidance - #30
Merged
Merged
Conversation
Port PR metadata and size checks from awesoMux and add Zig 0.16 unit and automation checks. Preserve human comments and checklist confirmations when workflows reconcile their own comments. Add the approved fork-specific merge-risk skill. Defer attach CI until the regression harness lands through PR #29.
This comment has been minimized.
This comment has been minimized.
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
zmx has no build CI today. Add fast Zig checks and bring over awesoMux's shorter PR template, metadata check, size labels, and merge-risk guidance.
What's Included
test/.UI / UX
Not applicable. No terminal behavior or app UI changes.
Notes
Models: gpt-6.1-sol
Merge risk: medium. Core CI passed at 912a9fb, but PR hygiene and size first run from trusted main after merge. A workflow bug could block PRs or mislabel them. Recovery: revert this change; existing labels and comments may need cleanup.
Local Zig 0.16 formatting and unit tests pass. All six PR automation tests, workflow lint, and diff checks pass. The comment regression tests fail against the inherited workflow behavior and pass with these fixes.
Reviewed with sol-loop: 2 rounds with gpt-6.1-sol. Sol verdict: APPROVE. Both findings are fixed. A later focused regression test also caught Kody summaries filling author sections; the validator now ignores that managed summary. All six automation tests and Zig checks pass locally and in hosted CI at 912a9fb. Kody's unmatched-marker finding was checked with four rejected examples and resolved with the results.
PR hygiene and size workflows use the trusted default branch, so their first hosted runs follow this merge. The new core CI runs on this PR. No repository settings or branch protection changes are included.
Sarah approved the full merge-risk skill wording before publication. She chose core CI now and attach CI after #29 merges, because main does not yet have
test-replayortest/attach_scrollback.py. PRs #22, #28, and #29 are untouched; they will need the new description sections at their next edit or push after this merges.Hosted proof: https://github.com/Interactive-Buffoonery/zmx/actions/runs/42338591720
Created with gpt-6.1-sol in Codex.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Why
Adds automated PR hygiene and review guidance to the fork: a PR template, a description validator that runs as a required check, size labeling, an external-contributor checklist, a
ci.ymlrunning Zig format/unit tests plus the new script tests, and an advisorymerge-riskskill with matchingCONTRIBUTING.mdguidance. The goal is to keep PRs reviewable and consistent with upstream while avoiding any new merge permissions or repository protection changes.What's Included
Security posture (workflows)
pull_request_targetworkflows check out the trusted default branch, not the PR head, and pin every action to a commit SHA withpersist-credentials: false.pr-size.ymlfetches the PR head as passive Git data, expandingGH_TOKENonly inside the credential-helper subprocess, and aborts if the fetched SHA does not match the event SHA.user.login == github-actions[bot]anduser.type == Bot), so a human cannot spoof a marker to suppress or hijack automation.ci.ymlusespermissions: contents: read; validators and the checklist only ever read the PR body and file list.PR description validation
validate-pr-body.mjsrequires the template sections (Why,What's Included,UI / UX,Notes), allowing docs-only PRs to omitUI / UX.Models:line; honorsNoneas a valid value.Size labeling
git diff --numstat --ignore-all-space --ignore-blank-lines, excluding test files when non-test changes exist, and maps tosize:XS…size:XXL.ensure-repository-label.shcreates or reconciles label color/description, handling thealready_existsrace.size:XXLadds an informational, non-blocking comment.Contributor and agent guidance
.github/pull_request_template.mdwithWhy,What's Included,UI / UX, andNotes(includingModels:andMerge risk:).CONTRIBUTING.mddocuments the fork workflow, required local checks, size-label semantics, and that CI covers Linux unit tests only..agents/skills/merge-risk/SKILL.md(symlinked from.claude/skills/merge-risk) defines a read-only, advisory risk assessment: evidence requirements, a risk-by-touched-area table, levels, and a one-line report. It grants no merge authority..gitignorekeeps only the sharedmerge-riskskill while ignoring other local agent state.Tests and CI
ci.ymlruns on PR,mainpush, and manual dispatch withcancel-in-progressconcurrency, a 15-minute timeout, Zig 0.16.0, Node 24,zig fmt --check,zig build test, andnode --test .github/scripts/test/*.test.mjs.Models:, untouched template, empty bodies, kody-summary isolation, bot-only comment lookup, and checklist preservation.UI / UX
Not applicable — CI, documentation, and agent guidance only; no visible product change.
Notes
Models: None
Merge risk: medium. These workflows first take effect after merge, so trusted-base behavior and the new required check are only proven in hosted runs on
main. Assessment logic is advisory only and no protection rules changed.Review finding to address before merge
.github/scripts/validate-pr-body.mjs:11— the kody-summary strip regex requires a matching start and end marker, so a body with an unmatched marker is not stripped. Content inside a malformed summary can then count as author-authored text and satisfy sections, defeating the "Kody summaries cannot fill or replace author sections" test intent. Suggest stripping start/end markers independently (and ignoring orphan markers) so the guard cannot be sidestepped.Excess / cleanup opportunities
comment_id="$( gh api --paginate … )"lookup block is duplicated in three places (pr-template.ymltwice,pr-size.ymlonce) with only the marker differing. A single helper script taking the marker as an argument would be DRYer and keep the bot-identity check in one audited place.ensure-repository-label.shparses the HTTP status withawk 'NR == 1 { print $2 }'on--includeoutput; that is brittle if response framing changes.gh api --jqplus exit status would be simpler.ensure-repository-label.shis only exercised indirectly; there is no test for its404/422 already_exists/reconcile paths despite them being the most error-prone logic.hasTemplatePlaceholdermatches prose fragments such as "required for visible ui" anywhere in any comment, which can reject legitimate comments on unrelated content; anchoring to the template's exact placeholder text would be more precise.Performance impact
None to the shipped binary. Workflows use per-PR concurrency groups with
cancel-in-progress, a 15-minute CI timeout, and single-pass diffs; label reconciliation issues one lookup plus at most one write per label, and comment sync updates in place rather than accumulating comments.