Answer product-owner round 1: 1 🔴, 2 🟡 (0 misread); check chunk-pr commands for an attribution; the default-branch refusal and the PR summary went in the stability and prose commits; tea's --draft and --ready are verified by its help and #448
This commit is contained in:
@@ -45,7 +45,7 @@ RULES: dict[RuleName, Rule] = {
|
||||
),
|
||||
"no-ai-attribution": Rule(
|
||||
"no commit, PR, issue comment or file carries a Claude or Anthropic attribution, such as a co-author trailer or a generated-with line",
|
||||
"a git, gh or tea command, and any file written",
|
||||
"a git, gh, tea or chunk-pr command, and any file written",
|
||||
),
|
||||
# A Read carries no text for a marker, and a misjudged read has a way through that the message names, so no marker waives it.
|
||||
"repeat-read": Rule(
|
||||
@@ -140,7 +140,7 @@ def check(breaches: list[Breach], written: str, markdown: bool, bash: bool) -> C
|
||||
def command_breaches(command: str, simples: list[Simple], home: str) -> list[Breach]:
|
||||
breaches = []
|
||||
found = commits(simples, home)
|
||||
publishing = [simple for simple in simples if simple.words[0] in ("gh", "git", "tea")]
|
||||
publishing = [simple for simple in simples if posixpath.basename(simple.words[0]) in ("chunk-pr", "gh", "git", "tea")]
|
||||
if publishing and ATTRIBUTION.search(command):
|
||||
breaches.append(Breach("no-ai-attribution", "the command carries an attribution", publishing[0].directory))
|
||||
for simple in simples:
|
||||
|
||||
@@ -133,8 +133,9 @@ class CommandBreaches(unittest.TestCase):
|
||||
with self.subTest(command):
|
||||
self.assertEqual(checked(command), [])
|
||||
|
||||
def test_an_attribution_breaks_only_in_a_git_gh_or_tea_command(self):
|
||||
def test_an_attribution_breaks_only_in_a_git_gh_tea_or_chunk_pr_command(self):
|
||||
self.assertEqual(checked(f"tea pr create --description '{TRAILER}'"), ["no-ai-attribution"])
|
||||
self.assertEqual(checked(f"~/.claude/bin/chunk-pr open 'Do it' '{TRAILER}'"), ["no-ai-attribution"])
|
||||
self.assertEqual(checked(f"grep -rn '{TRAILER}' ."), [])
|
||||
|
||||
def test_a_commit_breach_names_the_commit_s_checkout(self):
|
||||
|
||||
Reference in New Issue
Block a user