Skip to content

DARZ Agent Gate Check v0.3.0

Choose a tag to compare

@barg-labs-agent barg-labs-agent released this 24 Nov 11:50
eb287d9

Breaking

  • Records are format darz-record-0.3 (schema/record-0.3.schema.json), which adds check 7 and ref. Records from v0.1.0 and v0.2.0 stay formats 0.1 and 0.2; their schemas are kept unchanged.

New

  • Lessons and check 7, lessons_hold. A team that sees an agent make the same mistake twice can write it down at .github/darz/lessons/<id>.json: a statement, evidence, and a forbid or require pattern check (schema/lesson-0.1.schema.json).
    • Check 7 requires each lesson's latest change to have been approved, on the pull request's final commit, by a person who is neither the pull request's author nor an agent, and each lesson in force to hold at the commit read.
    • Lessons are always read from the default branch, so a pull request cannot delete the lesson that judges it. Lesson files are gate files, so check 1 requires them to have a code owner.
    • With no lesson in force, the row is context, never pass.
  • --ref <sha> sets the commit check 7 runs lessons over. Default: the default branch's head.
  • Check 7 gives one SARIF result per failing or unverifiable lesson, located at the file and line a violated lesson found, or at the lesson file.

Changed

  • github-actions[bot] is a platform identity, not an agent. It is no longer detected from merge authors, collaborators or CODEOWNERS. A ruleset that lets GitHub Actions bypass it still fails check 4, and declaring it still makes it an agent.
  • Check 5 passes a required check pinned to GitHub Actions (app 15368) and lists such checks in details.pinnedToGitHubActions, with a context line: any workflow with checks: write can post that app's check runs.
  • Check 6 says how many of its merges were left out.
  • CODEOWNERS lines GitHub reports as errors are read the way GitHub handles them: an Unknown owner line applies with the owners not flagged; an Invalid owner anywhere on the line, or an Invalid pattern, skips the line; a ! negation line has no effect. Other error shapes stay codeowners_error_ambiguous.
  • README: a section on using Darz alongside OpenSSF Scorecard, zizmor and OSV-Scanner, with a least-privilege workflow sketch.