chore(ci): relax agent diagnostic gate (#1001)

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
This commit is contained in:
John T. Myers
2026-04-27 15:56:58 -07:00
committed by GitHub
parent 2646b8c6c8
commit c890f0ee9e
2 changed files with 8 additions and 33 deletions
+1 -13
View File
@@ -85,19 +85,7 @@ Check whether the issue body contains a substantive agent diagnostic section. Lo
```bash
gh issue edit <id> --add-label "state:triage-needed"
```
2. Post a comment with the triage marker:
```
> **📋 triage-agent**
>
> This issue was opened without an agent investigation.
>
> 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).
>
> See [CONTRIBUTING.md](https://github.com/NVIDIA/OpenShell/blob/main/CONTRIBUTING.md#before-you-open-an-issue) for the full workflow.
>
> **Classification:** needs-more-info (agent diagnostic required)
```
3. Stop. Do not proceed with diagnosis until the reporter provides diagnostics.
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.
**If the diagnostic section is substantive**, proceed to Step 4.
+7 -20
View File
@@ -20,15 +20,16 @@ jobs:
const body = context.payload.issue.body || '';
// Check if the Agent Diagnostic section has substantive content.
// The template placeholder starts with "Example:" — if that's still
// there or the section is empty, the reporter didn't fill it in.
// GitHub issue forms render textarea labels as h3 headings, but
// issues created through gh or API clients often use h2 headings.
const diagnosticMatch = body.match(
/### Agent Diagnostic\s*\n([\s\S]*?)(?=\n### |\n$)/
/^#{2,4}\s+Agent Diagnostic[s]?\s*\n([\s\S]*?)(?=\n#{2,4}\s+|$)/im
);
const hasSubstantiveDiagnostic = diagnosticMatch
&& diagnosticMatch[1].trim().length > 0
&& !diagnosticMatch[1].trim().startsWith('Example:');
const diagnosticText = diagnosticMatch?.[1].trim() || '';
const hasSubstantiveDiagnostic = diagnosticText.length > 0
&& !diagnosticText.toLowerCase().startsWith('example:')
&& !['n/a', 'none', 'no', 'not applicable'].includes(diagnosticText.toLowerCase());
if (hasSubstantiveDiagnostic) {
console.log('Agent diagnostic section found with content. Passing.');
@@ -44,17 +45,3 @@ jobs:
issue_number: context.issue.number,
labels: ['state:triage-needed']
});
// Post redirect comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: [
'This issue appears to have been opened without an agent investigation.',
'',
'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`.',
'',
'See [CONTRIBUTING.md](https://github.com/NVIDIA/OpenShell/blob/main/CONTRIBUTING.md#before-you-open-an-issue) for the full workflow.',
].join('\n')
});