Pattern quality: Flag missing package-registry ecosystem in dependency-monitor network config - #228
Draft
github-actions[bot] wants to merge 1 commit into
Conversation
… config The dependency-monitor archetype is the only one that enables capabilities.network, and generateWorkflowFile() always emits network.allowed: [defaults, github] for it. Per gh-aw's network.md, "defaults" and "github" never include package-registry domains (registry.npmjs.org, pypi.org, proxy.golang.org, etc.), so the generated pre-step that "checks upstream repos or package registries for new versions" would be silently blocked by the firewall in every repository that actually has a package manager to check. - Add an inline TODO comment in the generated network.allowed block telling the downstream agent to add the repo's ecosystem identifier(s), with a link to gh-aw's network.md. - Surface the same gap as an explicit tip on the dependency-monitor archetype so it appears in the wizard's generated agent prompt under "boundary constraints". - Update the existing workflow.test.js expectation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
What was evaluated
I read all 6 sample generated pattern/prompt/workflow triples in
/tmp/gh-aw/data/generated-patterns-and-prompts.json(status-report, issue-triage, code-improvement, documentation-updater, dependency-monitor, pr-review), pluspatterns/manifest.json,patterns/workflow-generation.json, the relevantpatterns/archetypes/*.jsonfiles, and the generator insrc/js/workflow.js.Recurring quality issue found
dependency-monitoris the only archetype withcapabilities.network: true, and it is the archetype whose job is explicitly to "check upstream repos or package registries for new versions."generateWorkflowFile()always emits:Per gh-aw's own
network.mdreference:defaultsonly covers basic infra (CAs, apt/OS metadata) andgithubonly covers GitHub domains — neither includes any package-registry ecosystem (node→registry.npmjs.org,python→pypi.org,go→proxy.golang.org, etc.), and the doc explicitly warns "never usenetwork: defaultsalone for workflows that build, test, or install packages." Since the wizard is a static site with no knowledge of the target repo's package manager at generation time, it currently ships a network allowlist that looks complete but would silently block the archetype's own core pre-step (checking registries for new releases) in essentially every real repository. This is a defect specific to the generator's output for this archetype, not a downstream-agent mistake — it would recur identically across any repo that uses this archetype.What changed
src/js/workflow.js: wheninferred.networkis set, append an inline TODO comment to the generatednetwork.allowedblock instructing the downstream agent to add the repository's package ecosystem identifier(s) (e.g.node,python,go,rust), with a link to gh-aw'snetwork.md.patterns/archetypes/dependency-monitor.json: added a new tip surfacing the same gap, so it also appears as an explicit boundary-constraint requirement in the wizard's generated agent prompt.test/workflow.test.js: updated the existing dependency-monitor network test to assert the new TODO comment is present.No other archetypes were touched — this is the only archetype with
network: true.Validation
npm test: 295 passed, 9 pre-existing failures (all live-network-fetch tests inpatterns.test.js/workflow.test.jsthat fail identically on the unmodifiedmainbranch in this sandboxed environment — confirmed viagit stashcomparison before making changes). No new failures introduced by this change.npm run build: succeeds,dist/patterns/archetypes/dependency-monitor.jsonincludes the new tip.Follow-ups deliberately left out