Repository navigation
Conversation
…5249) IssueUpdater._create passed `--json number` to `gh issue create`, which the CLI does not support, and parsed JSON from stdout. Permissive mocks returned JSON, so no test noticed. Drop the flag and parse the documented issue URL (HTTP(S), any host) into a positive int, keeping the nonzero-exit check ahead of parsing and the existing diagnostics. Correct the creation fixtures to URL output, add unexpected-output cases, and add a contract test that runs the production arguments against the installed `gh` with `--help` appended. The module now spawns a subprocess, so it is classified medium. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The test only runs `gh issue create ... --help`, which validates flags but cannot observe the real stdout shape (gh issue create has no dry-run). Rename it to say what it checks and document where the stdout contract is pinned.
If production stopped passing --body-file, the gh contract test failed with a bare ValueError from list.index. Assert the flag first, matching the style of the neighbouring tests, so the failure names the contract violation.
The live-CLI contract test hard-asserted that gh is installed, so on a host without the CLI it errored instead of skipping. Follow the repo's live-CLI contract convention (tests/AGENTS.md, CLI Flag-Spec Coverage) and skip only when the binary is absent.
The module imported both `subprocess` and `from subprocess import CompletedProcess`. Consolidate on the existing from-import convention.
Trecek
deleted the
impl-rectify_issue_5249_cli_boundary_2026-10-30_171916-20261104-080526
branch
November 4, 2026 20:44
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.
Summary
IssueUpdater._createrangh issue create ... --json numberand parsed JSON from stdout.gh issue createhas no--jsonflag and prints the new issue's URL, so every failure-issue creation through this updater failed against the real CLI. The tests missed it because theghmocks returned JSON for creation, so nothing checked what the executable accepts.This fixes the one shared creation boundary used by probe failure issues, initial E2E occurrence issues, and body-limit successor issues, and adds a test that checks the production arguments against the installed
gh.Changes
src/autoskillit/_probe_canary.py--json numberfrom thegh issue createarguments.https?://<host>/<owner>/<repo>/issues/<N>, whitespace-stripped, any host so Enterprise hosts and HTTP URLs work) into a positiveint.gh issue create returned unexpected outputerror.tests/execution/backends/test_probe_canary.pyintresults.0: each raises, leaveslast_issue_numberuntouched, and removes the temporary body file.gh issue create failed.test_issue_create_arguments_are_supported_by_installed_ghruns the real_createarguments (including the live body file) against the installedghwith--helpappended. Creation is never executed, and no credentials or network are needed. A missingghfails the test rather than skipping it.small->mediumbecause it now spawns a subprocess.Verification
unknown flag: --json.task test-local-gate: this module, the live conformance-probe module, size-marker, regex-import, layer-marker, env-workaround, package-gateway, probe-script and filter-cascade tests.pre-commit run --all-filespasses.task test-local-gatesuite, left to CI.Notes
ghinstalled where tests run (2.98.0 here). It does not certify the version pinned inscripts/docker/Dockerfileor used by historical E2E runs.Closes #5249
🤖 Generated with Claude Code