Skip to content

Commit c890f0e

Browse files
authored
chore(ci): relax agent diagnostic gate (#1001)
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
1 parent 2646b8c commit c890f0e

2 files changed

Lines changed: 8 additions & 33 deletions

File tree

.agents/skills/triage-issue/SKILL.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,7 @@ Check whether the issue body contains a substantive agent diagnostic section. Lo
8585
```bash
8686
gh issue edit <id> --add-label "state:triage-needed"
8787
```
88-
2. Post a comment with the triage marker:
89-
```
90-
> **📋 triage-agent**
91-
>
92-
> This issue was opened without an agent investigation.
93-
>
94-
> OpenShell is an agent-first project - before we triage this, please point your coding agent at the repo and have it investigate. Your agent can load skills like `debug-openshell-cluster` (for cluster issues), `debug-inference` (for inference setup issues), `openshell-cli` (for usage questions), or `generate-sandbox-policy` (for policy help).
95-
>
96-
> See [CONTRIBUTING.md](https://github.com/NVIDIA/OpenShell/blob/main/CONTRIBUTING.md#before-you-open-an-issue) for the full workflow.
97-
>
98-
> **Classification:** needs-more-info (agent diagnostic required)
99-
```
100-
3. Stop. Do not proceed with diagnosis until the reporter provides diagnostics.
88+
2. Do not post a standalone redirect comment. Report the missing diagnostic to the operator and stop unless a human explicitly asks you to continue triage anyway.
10189

10290
**If the diagnostic section is substantive**, proceed to Step 4.
10391

.github/workflows/issue-triage.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ jobs:
2020
const body = context.payload.issue.body || '';
2121
2222
// Check if the Agent Diagnostic section has substantive content.
23-
// The template placeholder starts with "Example:" — if that's still
24-
// there or the section is empty, the reporter didn't fill it in.
23+
// GitHub issue forms render textarea labels as h3 headings, but
24+
// issues created through gh or API clients often use h2 headings.
2525
const diagnosticMatch = body.match(
26-
/### Agent Diagnostic\s*\n([\s\S]*?)(?=\n### |\n$)/
26+
/^#{2,4}\s+Agent Diagnostic[s]?\s*\n([\s\S]*?)(?=\n#{2,4}\s+|$)/im
2727
);
2828
29-
const hasSubstantiveDiagnostic = diagnosticMatch
30-
&& diagnosticMatch[1].trim().length > 0
31-
&& !diagnosticMatch[1].trim().startsWith('Example:');
29+
const diagnosticText = diagnosticMatch?.[1].trim() || '';
30+
const hasSubstantiveDiagnostic = diagnosticText.length > 0
31+
&& !diagnosticText.toLowerCase().startsWith('example:')
32+
&& !['n/a', 'none', 'no', 'not applicable'].includes(diagnosticText.toLowerCase());
3233
3334
if (hasSubstantiveDiagnostic) {
3435
console.log('Agent diagnostic section found with content. Passing.');
@@ -44,17 +45,3 @@ jobs:
4445
issue_number: context.issue.number,
4546
labels: ['state:triage-needed']
4647
});
47-
48-
// Post redirect comment
49-
await github.rest.issues.createComment({
50-
owner: context.repo.owner,
51-
repo: context.repo.repo,
52-
issue_number: context.issue.number,
53-
body: [
54-
'This issue appears to have been opened without an agent investigation.',
55-
'',
56-
'OpenShell is an agent-first project - please point your coding agent at the repo and have it diagnose this before we triage. Your agent can load skills like `debug-openshell-cluster`, `debug-inference`, `openshell-cli`, and `generate-sandbox-policy`.',
57-
'',
58-
'See [CONTRIBUTING.md](https://github.com/NVIDIA/OpenShell/blob/main/CONTRIBUTING.md#before-you-open-an-issue) for the full workflow.',
59-
].join('\n')
60-
});

0 commit comments

Comments
 (0)