Repository navigation
Add model and engine misconfiguration diagnostics to agentic-workflows #67488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c8577ed
Initial plan
Copilot 8b843b2
Add model and engine misconfiguration checklist and regression contracts
Copilot 3e35095
Clarify model policy rejection and compatible sub-agent remedies
Copilot 53e9b86
Merge remote-tracking branch 'origin/main' into copilot/add-checklist…
Copilot 58752b2
Run guidance contracts in test-all
Copilot 9a07654
Plan model diagnostics follow-up
Copilot a47b968
Clarify model routing and silent sub-agent failures
Copilot 180cc88
Run guidance contract tests in CI
Copilot 14e8202
Apply remaining changes
Copilot 0e2132a
Restore model misconfiguration routing in skill template and guard it…
Copilot d192f51
Merge branch 'main' into copilot/add-checklist-for-misconfiguration
SivaKesava1 e6a3730
Merge branch 'main' into copilot/add-checklist-for-misconfiguration
SivaKesava1 e2f4716
Merge branch 'main' into copilot/add-checklist-for-misconfiguration
pelikhan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add model and engine misconfiguration checklist and regression contracts
Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
- Loading branch information
commit 8b843b2f6543cb22b78bc0d193c632ae267db1bf
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "model_mismatch": { | ||
| "evidence_kind": "redacted synthetic reconstruction, not live run evidence", | ||
| "lock_header": "# gh-aw-metadata: {\"compiler_version\":\"v0.89.21\"}", | ||
| "workflow": "engine:\n id: copilot\n model: auto\n", | ||
| "agent_stdio": "[copilot-harness] copilot model alias resolution: auto -> gpt-5.6-luna-utility\n[copilot-harness] COPILOT_PROVIDER_WIRE_API=completions (reconstructed old-run endpoint diagnostic)\n400 Cannot translate Copilot request feature 'tools[custom]' for gpt-5.6-luna-utility: /responses is incompatible", | ||
| "token_usage": { | ||
| "model": "gpt-5.6-luna-utility", | ||
| "path": "/chat/completions" | ||
| }, | ||
| "expected_diagnosis": ["outdated gh-aw compiler", "resolved model and wire-API mismatch"], | ||
| "expected_fixes": ["Upgrade gh-aw and recompile.", "Pin a model that supports the required endpoint.", "Remove a conflicting `COPILOT_PROVIDER_WIRE_API` override.", "Use sub-agent models from the main model's family."], | ||
| "last_resort": "Switching to an older model is a last resort" | ||
| }, | ||
| "misplaced_versions": { | ||
| "workflow": "engine:\n id: copilot\n version: 1.94.0\nsandbox:\n agent:\n version: 1.94.0\n", | ||
| "failures": [ | ||
| { | ||
| "step": "Install GitHub Copilot CLI", | ||
| "error": "curl: (22) The requested URL returned error: 404", | ||
| "field": "engine.version" | ||
| }, | ||
| { | ||
| "step": "Install AWF binary", | ||
| "error": "release asset not found", | ||
| "field": "sandbox.agent.version" | ||
| } | ||
| ], | ||
| "invalid_field": "engine.copilot.version" | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| """Documentation contract regressions, not an LLM or live workflow evaluation.""" | ||
|
|
||
| import json | ||
| from pathlib import Path | ||
| import unittest | ||
|
|
||
|
|
||
| SKILL = Path(__file__).resolve().parents[1] | ||
| ROOT = SKILL.parents[2] | ||
| GUIDES = (ROOT / ".github/aw/debug-agentic-workflow.md", ROOT / "debug.md") | ||
| FIXTURES = json.loads((SKILL / "tests/fixtures.json").read_text()) | ||
| ANCHOR = "#model-and-engine-misconfiguration" | ||
|
|
||
|
|
||
| def checklist(text): | ||
| return text.split("## Model and engine misconfiguration\n", 1)[1].split("\n## ", 1)[0] | ||
|
|
||
|
|
||
| class GuidanceTests(unittest.TestCase): | ||
| def test_customer_case_remedy_order(self): | ||
| case = FIXTURES["model_mismatch"] | ||
| self.assertIn("v0.89.21", case["lock_header"]) | ||
| self.assertIn("model: auto", case["workflow"]) | ||
| self.assertIn("gpt-5.6-luna-utility", case["agent_stdio"]) | ||
| self.assertIn("Cannot translate Copilot request feature", case["agent_stdio"]) | ||
| for path in GUIDES: | ||
| with self.subTest(path=path): | ||
| text = checklist(path.read_text()) | ||
| positions = [text.index(fix) for fix in case["expected_fixes"]] | ||
| self.assertEqual(positions, sorted(positions)) | ||
| self.assertLess(positions[-1], text.index(case["last_resort"])) | ||
| self.assertLess(text.index(case["last_resort"]), text.index("model: gpt-4.1")) | ||
| for required in ( | ||
| "v0.89.21", "64177", "compiler_version", "cli_version", | ||
| "including prereleases", "latest non-prerelease", | ||
| "gh extension install github/gh-aw --force --pin", | ||
| "underlying misconfiguration in place", | ||
| ): | ||
| self.assertIn(required, " ".join(text.split())) | ||
|
|
||
| def test_wire_api_and_artifact_contract(self): | ||
| for path in GUIDES: | ||
| with self.subTest(path=path): | ||
| text = checklist(path.read_text()) | ||
| precedence = text[text.index("precedence"):] if "precedence" in text else text[text.index("order:"):] | ||
| positions = [precedence.index(term) for term in ( | ||
| "override", "wire_api", "-utility", "gpt-5+", "CLI default", | ||
| )] | ||
| self.assertEqual(positions, sorted(positions)) | ||
| for required in ( | ||
| "/responses", "/chat/completions", "whole session", | ||
| "sub-agents", "67460", "5103", | ||
| "Cannot translate Copilot request feature", | ||
| "Unsupported Responses custom tool", "model_policy_violation", | ||
| "not accessible via the … endpoint", | ||
| "agent-stdio.log", "[copilot-harness]", | ||
| "sandbox/firewall/logs/api-proxy-logs/token-usage.jsonl", | ||
| "requested_model", "awf_version", "aw_info.json", "gh aw audit RUN_ID", | ||
| ): | ||
| self.assertIn(required, text) | ||
|
|
||
| def test_misplaced_version_fields(self): | ||
| case = FIXTURES["misplaced_versions"] | ||
| for path in GUIDES: | ||
| with self.subTest(path=path): | ||
| text = checklist(path.read_text()) | ||
| for failure in case["failures"]: | ||
| field_start = text.index(f"`{failure['field']}`") | ||
| boundary = text.find("\n", field_start) if path == GUIDES[0] else text.index("point", field_start) | ||
| self.assertIn(failure["step"], text[field_start:boundary]) | ||
| self.assertIn("1.0.x", text) | ||
| self.assertIn("vX.Y.Z", text) | ||
| self.assertIn("gh-aw-firewall", text) | ||
| self.assertIn(f"There is no `{case['invalid_field']}` field", text) | ||
| self.assertIn("remove", text) | ||
| self.assertIn("compiled default", text) | ||
|
|
||
| def test_routing_and_evidence_links(self): | ||
| routing = SKILL.joinpath("SKILL.md").read_text() | ||
| line = next(line for line in routing.splitlines() if ANCHOR in line) | ||
| for symptom in ("AWF 400s", "model: auto", "install-step 404s", "version fields"): | ||
| self.assertIn(symptom, line) | ||
| self.assertTrue((SKILL / "../../aw/debug-agentic-workflow.md").resolve().is_file()) | ||
| full = GUIDES[0].read_text() | ||
| for section in ("Collect Existing Evidence", "Identify the First Failing Boundary"): | ||
| content = full.split(f"## {section}\n", 1)[1].split("\n## ", 1)[0] | ||
| self.assertIn(ANCHOR, content) | ||
| self.assertIn(f".github/aw/debug-agentic-workflow.md{ANCHOR}", GUIDES[1].read_text()) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| unittest.main() | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.