Skip to content

Pattern quality: Fix status-report archetype missing min-integrity: none in generated workflow - #262

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
fix-status-report-min-integrity-75425101ab86da41
Draft

Pattern quality: Fix status-report archetype missing min-integrity: none in generated workflow#262
github-actions[bot] wants to merge 1 commit into
mainfrom
fix-status-report-min-integrity-75425101ab86da41

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What was evaluated

Reviewed all 6 samples in /tmp/gh-aw/data/generated-patterns-and-prompts.json (status-report, issue-triage, code-improvement, documentation-updater, dependency-monitor, pr-review), comparing each generated pattern object and prompt/starter-YAML against patterns/workflow-generation.json, patterns/archetypes/*.json, and the generator in src/js/workflow.js.

Recurring quality issue found

The status-report archetype's own tips list instructs:

"Set tools.github.min-integrity: none when the report must read issues, PRs, or discussions from any author regardless of trust — the workflow only summarizes, it never acts on that content"

This tip is correctly surfaced in the generated prompt text ("Follow the workflow-specific guidance..."), but the status-report archetype definition in patterns/workflow-generation.json had no min_integrity field. Since generateWorkflowFile in src/js/workflow.js only emits min-integrity when the archetype definition sets it, the "## Suggested workflow file" starter YAML shown to the downstream agent silently omitted min-integrity: none under tools.github, even though it lists github_toolsets: true and reads discussions/issues/PRs.

Downstream agents strongly anchor on the concrete starter YAML they're told to use "as a starting point," so a contradiction between the prose tip and the omitted example line risks the safety setting being dropped in generated workflows — undermining the exact guidance the pattern library itself recommends.

Notably, the existing test suite even encoded the bug as expected behavior (does not add min-integrity for archetypes without untrusted external content, asserting status-report never gets min-integrity), which no longer matches the archetype's stated guidance for reading untrusted content.

What changed

  • patterns/workflow-generation.json: added "min_integrity": "none" to the status-report archetype definition, so generated status-report workflows include min-integrity: none under tools.github, matching the archetype's own documented tip.
  • test/workflow.test.js: replaced the now-incorrect test with one asserting min-integrity: none is emitted for status-report, and added a new test using documentation-updater (an archetype without github_toolsets) to preserve coverage for archetypes that legitimately omit min-integrity.

Validation

  • npm test: 320/320 tests passed (18 test files).
  • npm run build: succeeded, dist/patterns/workflow-generation.json regenerated with the new field.

Follow-up ideas deliberately left out

  • Did not audit every other archetype's tips for similar prose/data mismatches beyond the two archetypes (pr-review, status-report) that reference min-integrity in their tips — both are now consistent with their generated output.
  • Did not change the pattern/manifest.json scan-derived success-rate or archetype metadata, since those are regenerated from raw scan data and out of scope per the task's DO NOT rules.

Generated by Pattern Quality Eval · copilot · auto · 57.3 AIC · ⌖ 12.3 AIC · ⊞ 7.8K ·

…n tip

The status-report archetype's tips list explicitly instructs setting
tools.github.min-integrity: none (since status reports only summarize
untrusted issue/PR/discussion content, never act on it), but the
archetype definition in patterns/workflow-generation.json had no
min_integrity field, so generateWorkflowFile never emitted the line
in the suggested starter YAML shown to the downstream agent.

Downstream agents anchor heavily on the concrete starter YAML in the
prompt over prose guidance buried in a bullet list, so the omission
meant many generated status-report workflows likely dropped this
safety setting despite the tip.

Fix: add "min_integrity": "none" to the status-report archetype so
the generated frontmatter matches its own documented guidance.

Also updated the outdated test that asserted status-report never gets
min-integrity, and added a replacement test using documentation-updater
(an archetype without github toolsets) to keep coverage for archetypes
that legitimately omit min-integrity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants