[object Object]

← back to Cli Printing Press

test(cli): update TestPublishSkillSkipsCliSkillsMirrorRegen for new library gate name (#1618)

ef81ca04c8af25111e830aa47640650121995be5 · 2026-05-17 22:29:57 -0700 · Trevin Chow

#1614 (docs(skills): publish skill aligns with library's bot-only
generated-artifacts rule) updated the publish skill's prose to
reference the new `Fail on changes to generated artifacts` gate that
mvanhorn/printing-press-library#659 introduced. The existing contract
test still asserted the old strings:

- "Guard against hand-edits to cli-skills mirror" (gate name retired)
- "Do NOT regenerate or commit \`cli-skills/pp-<api-slug>/SKILL.md\`
  here" (now extended to cover both cli-skills and registry.json)

#1614's CI passed because change-scoped test selection didn't include
the pipeline shard (the skill change touched skills/, not internal/
pipeline/). The full-suite matrix that runs on release-please PRs
caught the divergence on the next release prep (release-please#1495
failing on test (pipeline)).

Updated the assertions to match the current skill text. Intent is
unchanged: verify the skill names the current rejection mechanism and
explicitly warns against committing the generated files.

Files touched

Diff

commit ef81ca04c8af25111e830aa47640650121995be5
Author: Trevin Chow <trevin@trevinchow.com>
Date:   Sun May 17 22:29:57 2026 -0700

    test(cli): update TestPublishSkillSkipsCliSkillsMirrorRegen for new library gate name (#1618)
    
    #1614 (docs(skills): publish skill aligns with library's bot-only
    generated-artifacts rule) updated the publish skill's prose to
    reference the new `Fail on changes to generated artifacts` gate that
    mvanhorn/printing-press-library#659 introduced. The existing contract
    test still asserted the old strings:
    
    - "Guard against hand-edits to cli-skills mirror" (gate name retired)
    - "Do NOT regenerate or commit \`cli-skills/pp-<api-slug>/SKILL.md\`
      here" (now extended to cover both cli-skills and registry.json)
    
    #1614's CI passed because change-scoped test selection didn't include
    the pipeline shard (the skill change touched skills/, not internal/
    pipeline/). The full-suite matrix that runs on release-please PRs
    caught the divergence on the next release prep (release-please#1495
    failing on test (pipeline)).
    
    Updated the assertions to match the current skill text. Intent is
    unchanged: verify the skill names the current rejection mechanism and
    explicitly warns against committing the generated files.
---
 internal/pipeline/contracts_test.go | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/internal/pipeline/contracts_test.go b/internal/pipeline/contracts_test.go
index 18ab4b36..579fea88 100644
--- a/internal/pipeline/contracts_test.go
+++ b/internal/pipeline/contracts_test.go
@@ -156,8 +156,16 @@ func TestPublishSkillSkipsCliSkillsMirrorRegen(t *testing.T) {
 	skill := readContractFile(t, filepath.Join("..", "..", "skills", "printing-press-publish", "SKILL.md"))
 
 	assert.Contains(t, skill, "Do not\nedit `registry.json`, README catalog cells, or `cli-skills/pp-<api-slug>/SKILL.md`")
-	assert.Contains(t, skill, "Guard against hand-edits to cli-skills mirror")
-	assert.Contains(t, skill, "Do NOT regenerate or commit `cli-skills/pp-<api-slug>/SKILL.md` here")
+	// Post mvanhorn/printing-press-library#659, the library's verify
+	// workflow replaced the Guard + auto-fix + fork-only drift trio
+	// with a single `Fail on changes to generated artifacts` check.
+	// The publish skill must reference the current gate name so an
+	// agent reading it knows what failure to expect, and must still
+	// tell the agent not to regenerate or commit either generated
+	// file (cli-skills/pp-*/SKILL.md or registry.json) — the library
+	// no longer has an in-PR auto-fix path for either.
+	assert.Contains(t, skill, "Fail on changes to generated artifacts")
+	assert.Contains(t, skill, "Do NOT regenerate or commit `cli-skills/pp-<api-slug>/SKILL.md` or")
 	assert.Contains(t, skill, "git add library/\ngit commit")
 	assert.NotContains(t, skill, "git add library/ cli-skills/")
 	assert.NotContains(t, skill, "git add library/ cli-skills/ registry.json")

← dde2a4e0 docs(skills): publish skill aligns with library's bot-only g  ·  back to Cli Printing Press  ·  chore(main): release 4.9.0 (#1495) 1dfbf795 →