Repository navigation
feat(release): v0.2.37 - #1720
Merged
Merged
Conversation
…f #N and passes readiness (#1620) Readiness let a pull request into a release branch through only if its body closed exactly one issue, so an item planned as several pull requests could deliver only its last one: every earlier pull request closed no issue and `devops pr check-readiness` blocked it. Refinement on 2026-10-17 planned nine items that way, and the owner chose a `Part of #N` line over a child issue per pull request. `extract_part_references` in `github/issue_closure.py` reads the issues a body delivers part of with the same rules as closing keywords: one scan, shared with `extract_linked_issues`, skips what is not prose and a reference to another repository, and the phrase lives in `CONST_ISSUE_PART_PHRASE`, matched case-insensitively. `Part 1 of #N` is not the phrase. `strip_non_prose` now reads the body with markdown-it-py's CommonMark parser and keeps only the text of paragraphs, headings and list items outside block quotes, so a tilde or unclosed fence, indented code and an HTML comment no longer close an issue through `devops roadmap close` or name a part. Readiness grounds a pull request on the one issue it closes or, closing none, the one it delivers part of. A body that names both, two part references, several closed issues or none is one blocker that says which. The task-file, release-file and release checks judge that issue, and a part reference to an issue that is not open is refused, since the pull request that closes the item is its last. A part pull request's task file may read In Progress, and it adds no changelog fragment: the pull request that closes the item adds it, and the release-file blocker for a part says so. An unread issue is its own check, and the release blocker says "closes" or "delivers part of". `devops roadmap close` is unchanged: it reads only closing keywords, so the item stays open until its last pull request closes it, which a new test pins. `devops roadmap reprioritize` links an item to its part pull requests too, so their updates count as its activity for the stall window and a part keeps the item from a trim; a multi-PR item busy with its parts was otherwise readied and moved on part-way through. AGENTS.md, docs/ROUTINE_TASKS.md, the task-file README, changelog.d/README.md, the pull request template and the check-readiness docstring with its generated docs describe the multi-PR delivery and its one fragment, and task-740 and task-1294 name the renamed release check. Fixes #1617
… by the files it changes (#1621) * fix(github): pr readiness exempts a release-process pull request only by the files it changes `devops pr check-readiness` exempted any `chore/open-vX.Y.Z[-slug]` pull request into `release/vX.Y.Z` from grounding whatever it changed, so code fixes reached `release/v0.2.28` with no issue, task file or changelog fragment, while it held the cut pull request (`chore/cut-vX.Y.Z` into `release/vX.Y.Z`, as #1614 cut v0.2.36) to grounding, so the cut failed with "closes no issue". The exemption now depends on the files the pull request changes. A cut is exempt when every path is one of the cut's files with status `modified` or a `changelog.d/<n>.md` with status `removed`, exactly what `cut_release` writes, judged from the file list readiness already reads. A merge of `main` (`chore/open-vX.Y.Z[-slug]`) is exempt when every path is a cut file or a file `main` changed since its merge base with the release branch, read with one compare request, and only when a path is not a cut file. Both paths of a rename must be allowed. Otherwise grounding applies, led by one bounded blocker naming the other files. An unread file list holds the pull request, as does a compare that fails, returns no file list or lists GitHub's limit of 300 files, with a blocker naming the failure. A fork, another version, a slug before the version, a non-chore head or a head into the default branch is held as before. The cut's file list moves from `roadmap/close.py` (`CUT_FILES`) to `CONST_RELEASE_CUT_FILES` in `config/constants.py`, read by `devops roadmap close` and readiness alike. The release-process branch pattern gains a `kind` group. The `check-readiness` help, its generated docs, RELEASE_CYCLE.md, `docs/agent/tasks/README.md` and the pull request template name the release pull request, the cut pull request and the merge of `main`, each with its file rule. Fixes #1344 * test(server): await the startup tick's job instead of a fixed pause test_polling_tick_advances_with_injected_fixtures gave the lane's worker thread a fixed 0.1 s to run the startup poll before asserting, so on a loaded machine it failed with an empty batch list that held the batch by the time pytest printed it. It now waits, bounded, for the job to run and for the loop to sleep its interval, as the other service tests wait on their events. * fix(github): a merge of main whose payload names no default branch is held without a compare request When the pull request payload carries no `base.repo.default_branch`, `_read_default_branch_changes` sends no `compare/<sha>...` request, which could not succeed, and the merge of `main` is held with a blocker that says the pull request names no default branch for the repository instead of leaving the branch's name blank. `test_a_merge_of_main_whose_default_branch_is_unnamed_is_held_without_a_compare` pins the blocker and that no compare is read. `docs/agent/tasks/README.md` rule 5 names the release pull request and two release-process pull requests, as the pull request template and `_release_process_kind` do, and the `_grounding_scope` docstring says a merge of the default branch may read one compare request before it is exempt. The task file records the `test_polling_tick_advances_with_injected_fixtures` fix this branch carries, which `devops ci` needed on a loaded machine. Fixes #1344
…ox local whitelist refuses host.docker.internal and never emits an empty egress rule (#1622) The reference extractor's hand-kept RFC 6890 tables are gone. Every specified address is now in exactly one class: a documented example when it lies in CONST_DOCUMENTATION_IP_NETWORKS (RFC 5737, RFC 3849, RFC 9637, RFC 2544, RFC 5180); public when ipaddress reads it as global, not reserved and not multicast, outside CONST_NON_GLOBAL_NETWORKS_STDLIB_READS_GLOBAL (192.88.99.0/24 and the deprecated site-local fec0::/10, which Python still reads as global although IANA does not); and local otherwise. An IPv4-mapped IPv6 address is classed as the IPv4 address it carries, so ::ffff:192.88.99.2 is local and ::ffff:192.0.2.1 a documented example. With the tables, multicast was in no class, so check_threat_intel and CloudflareRadarClient.check_domain sent 224.0.0.1 and ff02::1 to Radar's domain lookup; they are now local and no request leaves. is_example_or_reserved_ip is removed and its callers use is_example_ip. A test pins that 192.88.99.2 and fec0::1 are still global to Python, so each network leaves the second constant when CPython follows IANA. Every class reads the address a target names, network_target_address: without the punctuation prose leaves after it (CONST_PROSE_TRAILING_PUNCTUATION), as the host of a URL or host:port without its trailing dot, and in the legacy numeric spellings inet_aton reads, through core.validation.parse_numeric_ip, now public, with no lookup. A target holding whitespace names no address, since glibc's inet_aton reads 1 555 0100 as 0.0.0.1. classify_network_target puts a target in one NetworkTargetClass, and is_example_or_invalid_network_target, the three address predicates, Shodan InternetDB, Cloudflare Radar and check_threat_intel all read it. 100.64.0.1., 224.0.0.1,, 10.0.0.1., 2130706433 and http://100.64.0.1./v1 used to reach Radar's domain lookup from check_threat_intel, check_domain and its batch path; no request is made for them now, and a public address with a trailing mark goes to Shodan as the bare address. Shodan is asked about a public address in its canonical spelling, and Radar about a public address or a domain that is neither an example nor local. Both answer every other class from one table whose summary names what the target is: a documentation or benchmarking address, an unspecified address, local network space, a fictional phone number, an example domain or a local domain. check_threat_intel names everything is_example_or_invalid_network_target excludes: example domains (RFC 2606, 6761), documentation (RFC 5737, 3849, 9637) and benchmarking (RFC 2544, 5180) addresses, fictional phone numbers (ATIS-0300115, Ofcom) and the unspecified addresses (RFC 1122, 4291), and no longer RFC 6890. It answers a local address itself, saying the target is a local address and no threat intelligence service was asked, instead of presenting Radar's static record as Radar intelligence for a domain. In the sandbox local whitelist, host.docker.internal is refused at SandboxNetworkConfig validation with a SandboxValidationError, compared with dns.name so case and a trailing dot do not matter, before the private-host check and before any lookup, with a message asking for the IP address or CIDR the cluster reaches the host on. #887's private-host check admits the name, since internal is not on the Public Suffix List, so the refusal is what keeps it out. It used to become a 127.0.0.1/32 ipBlock, the pod's own loopback. A loopback entry (localhost, a loopback address or a loopback network) now resolves to no address, since NetworkPolicy never polices a pod's loopback, and _build_whitelist_egress adds no rule for an entry that resolves to none, so no generated rule has an empty to, which would allow every destination on its port. No DNS lookup was added to the policy builder. The two RFC 1918 local whitelist fixture addresses in tests/test_sandbox_networking.py are RFC 5737 addresses now, the sandbox property test expects no address for a loopback host, and task-207 and task-702 describe the local whitelist as it now behaves. changelog.d/1174.md lists every report-class shift. Fixes #1174
…ty, so traces reach their volume (#1633) * fix(k8s): tempo runs under the otel namespace's restricted pod security, so traces reach their volume Tempo trace storage, shipped in v0.2.35 by #1135, never ran. The otel namespace enforces PodSecurity restricted, and the tempo chart values set no seccomp profile on the pod and no container security context, so admission refused every pod the StatefulSet created: 343 FailedCreate events over 3 days 17 hours, with the volume claim left Pending. The values now set what restricted requires. The pod runs as the chart's non-root user with the RuntimeDefault seccomp profile, and the tempo container cannot escalate privileges, drops every capability and keeps a read-only root filesystem, since tempo writes only under its /var/tempo volume. A server-side dry run of the pod the chart renders from these values is admitted into otel; the same dry run of the previous values is refused with the same violation. A test pins every restricted control against the namespace's enforce label. Fixes #1627 * docs: regenerate MCP_TOOLS.md for the pr check-readiness description release/v0.2.37 carries #1619 builds each tool's description from its Typer command, and #1620 and #1621 changed the check-readiness docstring; each passed its docs check on its own base, so the merged branch carried a stale MCP_TOOLS.md and devops docs check failed on every branch cut from it. Part of #1627
… command (#1639) In gateway mode a review sized its persona-stage file pool by ai.ollama_urls times ai.ollama_max_parallel, although gateway traffic goes only to gateway_url, and each file runs its personas in parallel. With three URLs the stage reviewed six files at once and kept more requests in flight than the gateway's 3 backend slots, which rebuilds the backend queue #1069 meant to prevent. One limiter per process now covers every chat request LLMClient sends to the gateway. network.py holds a BoundedSemaphore at DEFAULT_GATEWAY_REVIEW_CONCURRENCY and acquire_gateway_slot(), whose wait is bounded by the new DEFAULT_GATEWAY_SLOT_TIMEOUT_SECONDS (900 s) and fails with an AIClientError naming the slot count. uses_gateway_slots(config), true for the gateway provider only, is the one test the client and the review sizing both use: ai.gateway_enabled with another provider sends no chat call to the gateway, so it takes no slot and keeps its node sizing and an explicit --concurrency. _openai_compat_messages and _openai_compat_stream take a slot for the gateway provider, so persona calls, group analysis, roadmap intake and the devops ai chat commands are all covered; a stream holds its slot until the generator closes, and a call holds one slot across the transport's own retries. Model listing, gateway probes, embeddings and other providers take no slot. The wait is an ai.llm.gateway_slot span under the call's span and an observation of the new devops_cli_ai_gateway_slot_wait_seconds histogram, by outcome. A plain call is timed from when it holds its slot, and a stream now is too: the stream passes its wait back through a ContextVar, and its time to first chunk, llm.wall_seconds and spend duration leave it out, so a review waiting for slots does not look like slow inference. docs/TELEMETRY.md describes both. The review's worker sizing moves into helpers. Through the gateway the file pool is min(total_files, slot sum) whatever ai.ollama_urls holds, and effective_review_concurrency lowers an explicit --concurrency above the slot sum to it, with one warning that names both numbers. devops review benchmark records that concurrency in its run setup, so a gateway benchmark asked for 8 records the 3 it ran at. The --concurrency help says it is capped at the gateway's backend slots, and the CLI reference and docs/MCP_TOOLS.md are regenerated. The release branch's docs/MCP_TOOLS.md had not been regenerated for the pr_check_readiness description, so it now carries that too. fix_llm_response returns a plain FormattedLLMResponse. FormattedLLMResponse[T] made pydantic build a parametrized class that its generic cache holds only weakly, so after any garbage collection the next reply rebuilt its schema, about 30 ms of CPU per reply. The review-level test's fake gateway holds each request until more than the slot sum are in flight, or until 0.25 s after the first request, so the base and a review without the limiter reach 4 in flight on every run, and the change never passes 3. It runs six files of two personas, 12 calls, with a call phase under 1 s. Fixes #1354
#1660) Task files historically carried Status, Milestone, and Priority lines, leading to drift between files and GitHub Projects v2, and creating unnecessary administrative commits. Under ADR 0001, GitHub is the single source of truth for task status, release milestones, and priority. - Removed Status, Milestone, and Priority lines from all 504 existing task files. - Deleted 36 non-Done task files whose work has not been implemented. - Updated tests/test_agent_task_files.py to enforce that task files link their issue, have no PR field, and carry no Status, Milestone, or Priority lines. - Updated docs/agent/tasks/README.md to remove metadata fields from the template and document that status, release milestone, and priority live on GitHub. - Updated AGENTS.md and github_project_management.md so no instruction asks for a task file before implementation or for a status in it; task files are authored only by delivering pull requests. - Added deliverable task file and changelog fragment changelog.d/879.md. Fixes #879
…b, paced, charged and classified by status and headers (#1661) * feat(github): the github session sends rest requests through gidgethub, paced, charged and classified by status and headers GitHubSession.rest(method, path, *, accept=None, body=None) sends a REST request as the session's identity through a subclass of gidgethub 6.0.0's httpx2 adapter, over one httpx2.AsyncClient from the egress-checked factory running in an anyio blocking portal the session owns; reset_github_session() closes both. The client follows redirects under one request hook that compares request.url.origin with the API origin and refuses any other origin before the request is sent, so the token never reaches another host. Each attempt waits its turn on GitHubRateLimiter in a worker thread, a write as a write, and each answer's x-ratelimit headers update the quota of the resource GitHub names. gidgethub's handle_rate_limit_error hook retries a rate limit, and a read's 5xx, up to DEFAULT_GH_MAX_RETRIES times with the waits run_gh uses, now shared through GitHubRateLimiter.retry_delay. The new github/error_classifier.py maps gidgethub's exceptions by type, status and headers, never by message text, onto GitHubUnauthenticatedError, GitHubRateLimitError and the new GitHubScopeError, GitHubNotFoundError and GitHubUnreadError, each carrying the status and the bounded request path; GitHubFileNotFoundError becomes a GitHubNotFoundError. GitHubClient.get_pr_diff and SSH signing-key registration become session requests, which removes their own httpx2 clients and the hand-written redirect code that copied the token onto a github.com hop. The User-Agent, API version, diff media type and header names are constants. ADR 0006 records the choice of gidgethub. tests/github_session_fakes.py is a fake GitHub API on httpx2.MockTransport, and the github_api fixture puts the process's session over it, with the redirect table, the retry and pacing cases and the error table run through the real client and hook. Part of #983 * fix(github): the session's transport closes at exit, fails only with typed errors and charges its own identity's ledger A process that sent a request through the GitHub session and never closed it hung at interpreter exit: the portal context's own exit called into a portal thread that no longer ran. Each RestTransport now registers weakref.finalize over its resources, so it is closed by close(), when garbage-collected, or at exit while the daemon thread still runs, and closing stops the portal with cancel_remaining=True so a request waiting out a retry or a pacing pause is cancelled. get_github_session() closes a session a token change replaces, and a request a close stops raises GitHubUnreadError. A child-interpreter test sends requests and exits within its bound. No other exception leaves rest(): a DevOpsCLIError passes through, and a ValueError or LookupError from an answer that cannot be read (an unknown charset, a status outside http.HTTPStatus, quota headers that are not numbers) is GitHubUnreadError. A retry wait past max_rate_limit_wait names the request's path and status, and GitHubRateLimitError keeps numeric details as numbers, so status is an int on every class. The retry wait and its throttle record run in a worker thread like pacing and charging, and each session paces and charges the ledger of its own token through identity_rate_limiter. A path's template braces are percent-encoded before gidgethub expands it, get_pr_diff raises GitHubUnreadError for an answer that is not text, and GitHubClient's unused token attribute is gone. The session's mock transport now goes through new_async_http_client(mock_transport=...), so tests and production share one constructor and its timeouts. The redirect table's look-alike host gives way to another port on the API host, and the github_api fixture replaces only the rate limiter's clock. ADR 0006 records the lifecycle rule. Part of #983 * refactor(github): tests fake the github session through the httpx2 client seam, and the egress factory keeps no way around vetting new_async_http_client loses the mock_transport parameter the previous commit added, so the egress factory is again identical to the release branch's, and GitHubSession, RestTransport and session_client lose their transport argument: the session's client comes only from the factory at EgressLevel.PUBLIC. A parameter that let a client skip egress vetting existed in product code only for tests. Tests fake the session the way stub_web fakes web pages. The github_api fixture installs GitHubApiFake.client_class(), an httpx2.AsyncClient that keeps everything the factory passes except the transport, which becomes a MockTransport over the fake behind vetted_handler, now shared with StubWeb, at the level egress_level_of reads from the factory's transport. The factory's timeouts, the redirect handling and the origin hook stay real, and every request is still vetted, resolving through public_dns. install_async_client_fake raises when a test asks for both github_api and stub_web, so neither fake silently wins. A new test shows the session's client is built at the public level and that a request whose host comes to resolve to loopback raises SSRFBlockedError before it reaches the fake; the subprocess exit test's child fakes GitHub through the same seam and resolves the API host with the web fakes' resolver. ADR 0006 and the task file record the seam as a deviation from the plan's transport= argument. Part of #983
…llowing rel=next and failing closed on a page that is no list (#1662) * docs(github): the #983 task file follows #879's format, with no status, milestone or priority The #983 task file was written before #879 merged, so it still carried the Status, Milestone and Priority lines that tests/test_agent_task_files.py now rejects. They are removed; the file keeps its issue, scope and feasibility lines. Part of #983 * feat(github): the github session reads rest listings page by page, following rel=next and failing closed on a page that is no list GitHubSession.paginate(path, *, iterable_key=None) is a lazy, synchronous iterator over a REST listing's items. Each page is one call through the session's portal, made only when the consumer has read the items before it, so a consumer that stops early sends no further request. Pages follow the rel="next" URL gidgethub reads from each answer's Link header, by page number or by cursor, and pass through the same pacing, ledger, retries, origin hook and error classes as rest(), so a Link to another origin is refused before it is sent. A page must be a JSON array, or an object holding one under iterable_key (check_runs, workflow_runs, items). Anything else, such as an HTML page, an error object or a missing body, raises GitHubUnreadError naming the endpoint, the page and the type that came back, and a truncated page raises the classifier's GitHubUnreadError, which now names the page of a listing. An empty array or a page without a next link ends the listing. gidgethub's getiter is not used, since it would read a string's characters or an object's keys as items (#1034's rule). _fetch_issues_rest and _resolve_milestone_number read through paginate() instead of gh api --paginate, with their queries built by urlencode, stop reading at the limit or the matching title, and fail closed; _parse_milestones_response is gone. Their tests run over the github_api fake. ADR 0006 and the #983 task file describe the pagination. Part of #983 * fix(github): a session listing stops at the page cap every other paginated reader keeps GitHubSession.paginate() followed rel="next" without a bound, so a chain of next links that never ends, from a GitHub fault, a cursor loop or a hostile answer, was read forever; the issue and milestone reads lost the cap gh api --paginate gave them. paginate() now stops at DEFAULT_GH_MAX_PAGINATED_PAGES, read when the listing runs rather than bound at definition, and a listing still linking a next page past it raises GitHubUnreadError naming the endpoint and the cap. A listing whose last page falls on the cap is read whole. ADR 0006 and the #983 task file say so. Part of #983
… not shown (#876) (#1665) When an LLM response is truncated at its token ceiling (finish_reason == CONST_FINISH_REASON_LENGTH), json-repair fallback previously could parse the partial response into an incomplete GroupAnalysisOutput, passing G10 checks and surfacing a truncated explanation in review reports. Group analysis explanation is all-or-nothing and should not be retried with the same prompt. - Checked finish_reason on the returned LLMResponse prior to parsing in _execute_single_group_job. - A cut reply (finish_reason="length") is rejected immediately with reason reply-truncated and output None. - Rejection is recorded in AnalysisReport.rejections without retry. - Rendered markdown displays the group rejection notice and none of the cut text. - Added CONST_ANALYSIS_REJECTION_REPLY_TRUNCATED, CONST_ANALYSIS_REJECTION_SCHEMA_VALIDATION_FAILED, and CONST_ANALYSIS_REJECTION_MODEL_CALL_ERROR in src/devops_cli/config/constants.py. - Decomposed rejected record creation into _rejected_group_record helper keeping cyclomatic complexity M <= 4. - Added comprehensive offline unit tests with fake client returning LLMResponse in tests/test_review_group_analysis.py. - Stripped stale metadata lines from task-983 to satisfy tests/test_agent_task_files.py. - Added changelog fragment changelog.d/876.md and task file docs/agent/tasks/task-876-group-analysis-cut-reply-rejected.md. Fixes #876
…, and run_gh hands --paginate to gh unchanged (#1678) * refactor(github): the internal paginated reads go through the session, and run_gh hands --paginate to gh unchanged The pull request timeline and reviews (pr_monitor), the check-runs listing (check_verdict, iterable_key check_runs), a pull request's changed files (commands/pr) and reconcile's issue and pull request listings (projects) now read through session.paginate(), so each follows GitHub's rel="next" links and fails closed: a page that can't be read or holds no list is a read failure, never a shorter list. Each keeps its callers' contract, and the timeline takes its events from the listing instead of parsing gh's output. Reconcile's dry run lists those listings as the session's GETs. run_gh stops paging. devops gh api is the only caller left with --paginate, and run_gh hands gh that flag with --slurp, --jq and --template as given, since gh follows Link itself. The page loop and its flag refusals are deleted, with incompatible_gh_api_paginate_flag, parse_paginated_json, GhCliClient.api's unused paginate argument, run_gh_async, get_async_limiter and aiolimiter, and the tests that only exercised them, the one that spun through 100 pages among them. Tests answer the moved reads through the github_api fake, or, where a gh stub already answers a test's reads, from the same routes: test_pr_cmd's _RoutedSession and the reconcile fake's paginate. ADR 0006 records the consequence, and the #983 task file ticks PR 4. Part of #983 * fix(github): an unreadable paginated graphql call is paced as a write, a paginated api walk gets the listing timeout, and a listing entry that is no object fails the read The request classifier loses the --paginate read path it kept for the deleted page-by-page path, so a gh api graphql --paginate call whose document can't be read counts as a write, as #1125's rule says of anything the classifier can't read. devops gh api --paginate runs under DEFAULT_GH_API_PAGINATE_TIMEOUT_SECONDS, since gh walks every Link page in one process. A repository listing entry that is not an object raises GitHubUnreadError naming its type, never its text, instead of a TypeError or AttributeError in reconcile. The test_pr_cmd routed session records each session read, asks the run_gh stub with a session argv and refuses to run with run_gh unstubbed, and the reconcile fake answers no gh listing, so a reader regressed to one gh page fails offline. The task files and ADR 0006 record the lost on-disk listing cache, the paginate walk's timeout and retry, and the gh and GitHub schema sources PR 4 was checked against. Part of #983
…aths (Part of #1002) (#1679) Ensure that running commands, root --help, --version, and command group --help invocations do not eagerly import heavy packages. Decoupled pydantic_ai exception classes into exceptions/ai_pydantic with lazy loading in exceptions/ai, lazified SSRF checks in core/validation and http/egress, converted ai/rag, ai/review, and ai/benchmark facades to lazy __getattr__ dispatchers, and added comprehensive isolation tests in tests/test_cli_startup_imports.py.
…tests (#1002) (#1680) Adds named startup import budget constants and enforcement tests ensuring `devops --help` and `devops --version` finish importing within 0.5 s (-X importtime cumulative for devops_cli.main) and any `<command> --help` within 1.0 s, reporting the slowest imports on budget breach. Adds dry-run isolation tests verifying that `ai benchmark`, `k8s deploy-stack`, and `review path` import only what their plan requires. Fixes #1002
…ode deny rules (Part of #1154) (#1681) Introduces agent session prerequisites: - Adds AI_GATEWAY_URL and DEVOPS_CLI_AI_GATEWAY_URL configuration options with EnvVarSpec metadata and documentation. - Declares ENV_AGENT_GRANT constant and updates credentials_error to provide a grant-aware 401 error message naming the grant ID (capped at 256 chars) and omitting the generic API key hint when DEVOPS_CLI_AGENT_GRANT is set. - Adds Claude Code deny rules in .claude/settings.json for settings.local.json, settings.json, and ~/.kube/**. - Adds comprehensive regression tests in tests/test_claude_code_settings.py, tests/test_config_env_overrides.py, and tests/test_ai_gateway.py. Part of #1154
…tus and stderr through one table (#1682) * refactor(github): gh failures are classified once, by gh's exit status and the gh-output table error_classifier.py gains classify_gh_failure. It reads gh's exit status, where 4 means the command requires authentication, and the gh-output table in config/constants.py, the one place gh's text is matched. That table holds the rate-limit rows, the board lookup's and scope check's phrases, the login phrases, HTTP 401 and Bad credentials. Each classified error carries gh's exit status and the HTTP status gh names as ints, with gh's output bounded on one line. run_gh's rate-limit check, the project scope check, the board lookup and reads, the roadmap store's _failure, devops pr ready and _gh_add_key now read gh's failures through the classifier, and check_github_rate_limit_error and the unused is_secondary_rate_limit are gone. A quota refresh GitHub refuses gh's token for raises GitHubUnauthenticatedError, and any other failed refresh raises GitHubUnreadError. parse_retry_after moves into the classifier module, which rate_limiter now imports. Part of #983 * fix(github): gh failures are classified from gh's stderr, and an owner lookup, a refused token and a timed-out refresh are handled as their causes The gh classifier, run_gh's retry decision, the board reads, the roadmap store's _failure and _gh_add_key read gh's stderr only. gh writes every failure there, while its stdout holds GitHub's answer, whose partial GraphQL data can carry item titles. The table loses the rows gh never writes for a failure: graphql_rate_limit, insufficient_scopes, abuse-rate-limit, retry-after and retry after. It is the one place gh's failures are classified by gh's text; four other modules still match gh's text of their own and are named for a follow-up. CONST_GH_HTTP_STATUS_RE is now the only status regex, and the store's and devops pr's 404 reads use gh_http_status. "unknown owner type" is no rate-limit row, so run_gh no longer backs off on it before the @me fallback; where no fallback recovers it, the classifier still calls it a rate limit. A failed quota refresh raises the class the classifier names and is unread otherwise. A refresh that times out is GitHubUnreadError instead of a raw TimeoutExpired, and intake stops a round on a refused token as on a rate limit. _gh_add_key confirms a 422 by listing the keys, so an invalid key is not reported as registered. The project scope check asks for the project scope board sync needs, devops gh views sync prints gh's [read:project] as written, and devops pr ready no longer doubles gh's closing period. Part of #983
…ses (#1683) * feat(github): a release pull request gets a set number of copilot passes `.github/roadmap.toml` sets `release_copilot_passes` (default 2, at least 1), and `devops pr copilot-pass [<number>] [--repo] [--dry-run]` requests a Copilot pass on the release pull request only while its passes are below it. A pass is every Copilot review submitted on the pull request, whoever asked for it, and one still running; nothing is stored, so each release pull request starts with the whole budget. Once the passes are spent the command requests nothing, prints "Copilot budget spent: N of N passes" and exits 1, and it refuses any pull request but the release pull request. The request is gh's documented `gh pr edit <n> --add-reviewer @copilot`, made only from `src/devops_cli/github/copilot_budget.py`, and `--dry-run` makes no request and lists the reads and the request a real run would make. A review is Copilot's only when its author's login is exactly `copilot-pull-request-reviewer[bot]` (REST) or `copilot-pull-request-reviewer` (GraphQL). The monitor matched "copilot" anywhere in a login, so a person named copilot-fan set Copilot's state, ended a running pass and had their approval ignored; the monitor and the budget now share the exact check. The release pull request predicate moves from the pr command to `github/pr_branches.py`, so the budget refuses exactly what grounding exempts. `RELEASE_CYCLE.md` Step 3 states the budget and the stop rule: once it is spent, a remaining Copilot comment blocks the release only if it is a regression the release introduces, and every other one becomes a follow-up issue. ADR 0004 and `docs/SDLC.md` say re-reviews go through `devops pr copilot-pass`. The monitor's gate is unchanged: it already stops holding on Copilot's changes-recommended state once no thread is unresolved (#216). Part of #1345 * fix(github): copilot's timeline review ends its pass, and a pending request counts GitHub names Copilot's code review account differently in two payloads: the reviews endpoint calls it `copilot-pull-request-reviewer[bot]`, and the issue timeline calls the same account `Copilot` (type Bot), a login the Copilot coding agent shares. The exact-login check therefore never recognised Copilot's own `reviewed` event, so after its first `copilot_work_started` a pull request read as having a pass running for good: `devops pr copilot-pass` refused pass 2 of 2, and `devops pr monitor` timed out on every pull request Copilot had reviewed. A timeline `reviewed` event now ends the pass when its id is the id of one of Copilot's reviews; logins stay exact for review records only, and the timeline fixtures are rewritten in the shape #1283 recorded. A review requested of Copilot that it has not started now counts as one pass in the budget, since Copilot starts up to a minute later and a second request in that time would spend a pass the budget does not have. The request is recognised by the requested reviewer's type and its app's page, `/apps/copilot-pull-request-reviewer`. The monitor never waits on it, since Copilot may never take a request up. `devops pr copilot-pass` also refuses a release pull request that is merged or closed, its dry run lists the gh commands a real run sends from the same argv builders, a request gh refuses without saying why is named by its exit code from the lang catalogue, and a test pins the command to the budget `.github/roadmap.toml` sets. Part of #1345
) - Add namespace agents with restricted Pod Security Standards in k8s/namespaces.yaml - Add ServiceAccount devops-agent with automountServiceAccountToken: false in k8s/agents/serviceaccount.yaml - Add ClusterRoleBinding devops-agent-view binding devops-agent to built-in view ClusterRole in k8s/agents/clusterrolebinding.yaml - Add Argo CD Application agents in k8s/argocd/apps/agents.yaml under homelab project - Add agents destination and agent-grant-* orphan ignore in k8s/argocd/apps/projects.yaml - Integrate agents manifests into devops stack in stack_lifecycle.py - Update leaf application counts (22 -> 23) and add Agent sessions documentation in k8s/README.md - Add comprehensive unit tests in tests/test_k8s_agents_manifests.py and update argocd / stack tests - Add changelog fragment changelog.d/1154.md and update task documentation
…from tests.support.paths (#1685) `tests/support/paths.py` names the repository root, the test root and the `fixtures` and `golden` directories, found from the `tests` package rather than by counting a module's parents, so a test module reads the same paths at any depth. `tests/support/` and `tests/support/fakes/` are new packages for what test modules share and for the fakes of external edges. The 91 `Path(__file__)` sites in 63 test modules now import the shared paths, each module dropping its own root constant, and the four root-relative and two working-directory reads of test data read `FIXTURES`. The swallowed-failures ratchet runs as a module, `uv run python -m tests.test_swallowed_failures_ratchet --lower`, and builds that command from its own dotted name. The root conftest and the modules other pull requests are changing keep their 10 sites until the item's last pull request; the task file names them. Collection is the base's 10703 tests plus the new paths test, and the full run keeps the base's pass, skip and xfail counts. Part of #1312
…the GitHub session (#1690) * refactor(roadmap): the roadmap store reads its REST listings through the GitHub session GitHubRoadmapStore takes the session beside its runner and reads its ten REST listings with session.paginate(), which follows GitHub's next links, raises on a failed page, a page that is no list and a listing past the page cap, and requests a page only when the store reads into it. _read_listing, listing_page_args and the store's own page cap are gone. A listing read newest first, as changes_since reads the events, pull requests and GitHub Releases, stops at its first entry older than the cutoff and asks for no later page. The request plan lists each listing as the session's GET and URL, and the store's gh commands keep the runner. When gh project drops why it could not look up the board's owner, the store reads GraphQL's quota from gh api rate_limit, which spends none, so a failure with points left is no longer reported as a rate limit. The session's signing-key upload confirms a 422 against its signing-key listing, as the gh path does, so an invalid key is not taken as registered. The session's client connects within a 10 s public-internet timeout instead of the factory's 1 s, which failed live reads of api.github.com on a lost SYN. Part of #983 * fix(roadmap): the store's owner lookups ask GraphQL's own budget, Release ships are judged a whole page, and intake's spend counts the session's requests An owner lookup gh project drops the cause of is now decided by GraphQL's own budget, the source the project trusts since #1125, in one helper the roadmap store and the board reads in github/projects.py share. A budget above the floor makes a plain failure that still allows a secondary limit; a spent, refused or unread budget keeps the rate limit, so an intake round stops, and a refused token is the unauthenticated error naming the command. run_gh no longer parses a failed gh api rate_limit answer's error body. The GitHub Releases listing reads on to the end of the page it stops in, which GitHub has already sent, so a Release for an older tag published after the cutoff is a ship again. intake --plan counts the requests the identity's ledger paces, gh commands and session requests alike, so its spend line includes the listings again. A refused key on the session path of devops ssh is a registration error, so rotate removes the key it generated. The store's default session path, the milestones failed read and the records are pinned and brought up to date. Part of #983
…the ETag it kept (#1692) * feat(github): the GitHub session sends a repeated GET conditional on the ETag it kept Each session's transport hands gidgethub a bounded cachetools LRUCache, in memory, so the next GET of a URL carries If-None-Match and a 304 gives back the stored answer. Every attempt, a 304 too, is still paced and charged on the identity's ledger, retried by the same hook and vetted by the origin hook, and a stored page still fails closed in listed_items. One identity's ETags are never sent as another's, a write's answer is never stored, and every GET's answer is a copy, so no caller changes what a later 304 returns. GitHub's ETag covers a page's body only and its 304 carries no Link header, so a full last page that gains a next page keeps its ETag; a page whose stored answer linked no next page is read in full. cachetools is declared, its size is DEFAULT_GH_SESSION_ETAG_CACHE_SIZE, and the GitHub API fake answers a matching If-None-Match with a 304. Part of #983 * fix(github): a last page holds no slot in the GitHub session's ETag store A page that links no next page is dropped from the store after it is read as well as before, so one-page listings and the last page of every listing no longer evict the pages that can answer 304. A test pins that help for the session's commands leaves cachetools unloaded, the size comment and risk note count rest() answers such as a diff, and the red record cites the merged release commit. Part of #983
…elector, and a change that reaches every test runs the suite (#1693) * feat(test): devops test maps a change through the shared selector, and a tests/support change forces a full devops ci run `devops test run --changed` keeps its listing of the branch's changes and the working tree's, and hands those paths to the selector `devops ci test` uses instead of its own flat name table. It runs the targets that exist, so a deleted test module is never passed to pytest, runs the whole suite when nothing changed or nothing maps, and names each changed source no test module covers. The shared selector gains three rules. A module in a subpackage of devops_cli also selects the test modules directly in the directory under tests/ that mirrors its package, and a package's `__init__.py` its own directory, while a module directly in devops_cli gets none. A changed conftest selects its directory, and a changed file under tests/support/ selects the whole suite. `devops ci` treats tests/support/ like a conftest, because a support module may register a fixture that reaches tests that never import it: the full-run triggers move to `CONST_FULL_RUN_TRIGGER_NAMES` beside the new `CONST_TEST_SUPPORT_DIR`, and a public `forces_full_run` serves both the trigger check and the coverage index. The two `noqa: C901` markers in the test command are gone, and the C901 suppression ceiling falls from 49 to 47. Part of #1312 * fix(test): a change that reaches every test selects the suite before any test module is read `select_tests_for_sources` now returns `tests` as soon as a changed path forces a full `devops ci test` run, a file under `tests/support/`, a conftest in the repository root or directly in `tests/`, `pyproject.toml`, `uv.lock` or `.python-version`, before it lists or reads a test module. On a topic branch `devops test run --changed` lists against `main`, which takes in the whole release and its `tests/conftest.py` changes, so the 877 paths this branch lists selected the full suite only after a selection pass of 26 to 73 s; it now takes 0.003 s. A conftest below `tests/` still selects its own directory. `devops test run --changed` reads `git status --porcelain --untracked-files=all`, so a new test package not yet added is listed file by file: its test modules run, and its `__init__.py` selects its own directory, as a conftest does, instead of being named as a source no test covers. `_changed_paths` diffs against `CONST_GIT_MAIN_BRANCH`, without the `base_ref` parameter no caller passed and its ref pattern. `devops ci test` drops only a leading `./` from a relative path. `.lstrip("./")` also dropped the dot of `.python-version` and the `../` of a parent path, so `devops ci test .python-version --no-fallback` passed with nothing run; it now refuses like the other trigger names. The task file records the recheck at the real base, 0ae4ea4, and that a `--base` option for `--changed` is #1667's. The #852 and #406 task files name the `tests/support/` trigger. Part of #1312 * fix(test): selection drops the mirror-directory rule, sends a hook conftest to the whole suite, and a stale index to the text selector The selector no longer adds the test modules beside a changed module's own, in the directory under `tests/` that mirrors its package. Replayed over the last 40 commits, in all 15 where that rule added test modules none of them ran the changed module, and once #1313 moves the tests it would add up to 36 unrelated modules a commit; naming at any depth already finds a module's own test there. A package's `__init__.py` selects the tests named for it or importing it, like any module, and the unmapped-source warning no longer names the rule. A conftest below `tests/` that binds a `pytest_*` hook, defined or imported, as `ast` reads it, now selects the whole suite, since pytest calls such a hook for every test: a `pytest_collection_modifyitems` in `tests/a/conftest.py` changes the outcome of a test in `tests/b`. One that cannot be read, or star-imports, does too; one of fixtures only still selects its own directory. `devops ci test` counts a full-run trigger only among the files it is given. One that changed only since the coverage index was built leaves the index stale, and the given files are selected by name and import, with a warning naming the file; before, every later hook run after a committed `tests/support/` or `pyproject.toml` change ran the whole suite, or refused under `--no-fallback`, until the index was rebuilt. A `tests/support/` change itself still selects the whole suite. Run as a script, which has no `__spec__` and cannot import `tests`, the swallowed-failures ratchet prints the `-m` command that runs it and exits 1 instead of failing with a traceback. The task file records the measurement as the reason PR 2 departs from the plan's mirror rule, the recheck at 0510f6e, and the `ast` classification of `tests/support/` as a follow-up on #1312; the #852 and #406 task files say a drifted trigger now leaves the index stale. Part of #1312
…ds that tests double only process edges, and AGENTS.md and the contributor docs point to them (#1694) `docs/TESTING.md` holds the testing vocabulary and the conventions the owner settled on 2026-10-07: tests double only process edges, each through one seam and one shared fake with a contract suite, the clock's seam being the sleep and clock parameters the libraries take, and no test starts a real gh; tests find the repository root and their test data through `tests.support.paths`; `tests/` is to mirror `src/devops_cli`; a test is named after its behaviour in glossary terms and compares whole values; and no test asserts on elapsed wall-clock time, so the startup budget counts imported modules and fails on heavy ones, never on seconds. What later items deliver is marked as a target, and the file says what exists today and what a new test does meanwhile: most test files still sit flat, and a new test joins the file that already tests its behaviour, flat or in its mirror directory. ADR 0007 records why tests double only process edges, and that ratelimit, which takes only a clock, has its sleep patched at the stdlib; 0005 and 0006 were taken after the draft of 2026-10-07, which this brings onto today's tree. TESTING.md states, with no target mark, how a narrowed run selects tests as #1312's selection change (#1693) built it: a test module is reached by name at any depth and by import; with a fresh coverage index, `devops ci test` selects the tests that executed each module the index holds in place of name-and-import matching; `conftest.py`, `pyproject.toml`, `uv.lock`, `.python-version` and any file under `tests/support/` run the whole suite; `devops ci test`, and so the commit hook, runs the whole suite for any `conftest.py`, while `devops test run --changed` narrows a nested conftest that only defines fixtures to its own directory; and the commit hook passes only staged Python files, so the dependency and interpreter files reach the whole suite through `devops ci test`, `devops test run --changed` or the pre-push `uv run devops ci`. AGENTS.md, `CONTRIBUTING.md`, `RELEASE_CYCLE.md`, `docs/SDLC.md`, `docs/ROUTINE_TASKS.md`, `docs/SELF_IMPROVEMENT.md`, `.devops/review.md` and three knowledge base articles link `docs/TESTING.md` instead of stating test rules of their own, and the targeted test commands in `docs/ROUTINE_TASKS.md` and `docs/SELF_IMPROVEMENT.md` read `uv run pytest <test-file>`. AGENTS.md no longer requires linear asserts to be merged into tuple comparisons, which rested on Ruff's C901 counting asserts, nor one test file per submodule, nor mock isolation and `__test__ = False` in product code; its link to `docs/TESTING.md`, which named a missing file, now resolves, and it no longer names `docs/SDLC.md` Phase 2 as a second source. `.devops/review.md` keeps the settled claim that a tuple equality assert compares every element and is not an assertion bug, since review personas read its text and follow no link. The rule-mapping table in #841's task file no longer says AGENTS.md keeps the test rules this drops. `tests/test_agents_md_claims.py` checks that each of those documents links `docs/TESTING.md`, and that every relative link in TESTING.md, the ADR and those documents resolves, its percent-decoded fragment included, with a negative control that also passes a link to a heading with letters outside ASCII; on the base it fails on AGENTS.md's link to the missing file. Closes #1308
…ome follow-up issues (#1695) * feat(github): the release pull request's remaining review threads become follow-up issues `devops pr threads file-issues <pr>` is the step of the stop rule that files what remains once the release pull request's Copilot passes are spent. With `--confirm` it files each unresolved thread not named by `--keep` as one issue through the roadmap store, labelled source/agent with no milestone, then replies in the thread naming the issue and resolves it, one thread after another. Without `--confirm` it reads the threads and writes nothing, and `--dry-run` makes no request and lists the requests a real run makes, built by the same argument builders. Any pull request but the release pull request is refused before its threads are read. The issue quotes the thread's comments inside a backtick fence longer than any in them, so a mention neither notifies nor an issue reference links, cut at 4000 characters, then names the thread's file and line and links its first comment through the comment's GraphQL url, which the thread queries now select. The reply carries a marker, so a rerun resolves a thread an earlier run filed and files it no second time, and a failed write stops the run before that thread's reply. `RELEASE_CYCLE.md` Step 3 names the command in the stop rule, and `changelog.d/1345.md` records both pull requests of the item. Closes #1345 * fix(github): filing review threads opens no second issue, refuses an unknown --keep, and trusts only its own replies A `--keep` id that names no unresolved thread now stops `devops pr threads file-issues` before any write, with or without `--confirm`; a mistyped id used to leave the regression thread to be filed and resolved, so the release pull request showed no unresolved thread. The preview keeps a kept thread, and the stop rule in `RELEASE_CYCLE.md` and the task file preview with the same `--keep` flags before confirming. The filed marker is now a whole line giving the issue's number, `<!-- devops-cli: filed as #N -->`, and counts only in a reply written by the account running the command, read once through GraphQL's `viewer`. A Copilot suggestion quoting the marker, or another person's reply holding it, no longer resolves a thread with no issue. A thread's comments past its first 50 are read by cursor, so a marker reply on a later page is found. A rerun after a reply that failed once its issue was open opens no second issue: the thread is matched to the open issue whose body ends a line with the link to its first comment, read once through the store, and gets the reply and the resolve. A failed reply or resolve names the thread and the issue already opened, and each thread is printed as it is done, so a run that fails part-way has named what it filed. A merged or closed release pull request is refused before its threads are read, through one `require_open_release_pr` in `pr_branches.py` that `devops pr copilot-pass` now shares, both reading the pull request through `pr_monitor.fetch_pr_details`, no longer private. `source/agent` goes only on a thread Copilot started, and the help and the stop rule say a person runs the command. A deleted author is `ghost`, a thread a push moved off the diff is placed by its `originalLine`, a thread on a whole file is told apart by its first comment's id, and an outdated thread is marked in what the command prints. The tests' GraphQL stand-in answers each query with only the fields it selects, read with graphql-core's parser, so a query that stopped selecting `url` now fails the link and rerun tests. Closes #1345 * fix(github): filing review threads plans its issue listing as the GitHub session reads it Since #1690 the roadmap store reads its REST listings through the GitHub session, and the gh page helper `devops pr threads file-issues` built its dry-run entry from is gone. The plan now takes that entry from the store's own plan of its issue listing, `StoreRequests.issues`, so it shows the session's `GET` of the listing, read per page while GitHub links a next one, under the same condition as before, and still comes from the builders the real run uses. The tests open the GitHub roadmap store as the command does: its gh commands go to the scripted stand-in, which answers the issue it opens in the shape GitHub's REST API returns from a recorded one, and its issue listing goes through the GitHub session, `RunnerSession` asking the stand-in. Over the real session and the `github_api` fake, a run lists the issues once and names the open issue that ends a line with the thread's link, not one whose link only begins with it nor a closed one; a page that holds no list stops the run before any write; and `--dry-run` makes no request through gh or the session. Closes #1345
…item (#1671) (#1710) - In _comparison, record done state on _Entry for closed completed items. - In _decide, when a candidate matches a Done item, treat it not as a duplicate but place and file it as a new issue. - Append a regression reference (e.g. regression of #N, shipped in vX.Y.Z) to the candidate's body when it matches a Done item. - Retain folding behavior for duplicates matching open items or items closed as not planned.
… test module, checked in the full gate (#1711) The last eight Path(__file__) lines, in six test modules, read tests.support.paths, and no module keeps a root constant of its own or an alias of one. Four modules drop theirs and import REPO_ROOT, tests/test_roadmap_config.py imports it in place of its inline root, and tests/test_roadmap_github_store.py imports FIXTURES and names its own directory ROADMAP_FIXTURES. tests/test_test_module_independence.py parses every Python file under tests/ but tests/fixtures/ once, conftests and helper modules included, and names, as path:line, each bare __file__ outside tests/support/ and each import of a test module or a conftest. pytest's own python_files patterns say what a test module is, a relative import is resolved against the importing module's package and one past the top-level package is reported, and from X import n is checked as X and, when X is a package or X/n.py exists, as X.n. So a module's __file__ attribute, imports of devops-cli modules named test_* and a function imported from a plain support module pass. A seeded tree under tmp_path pins each reported and each allowed form, and spells the banned forms in parts, so a text search over tests/ finds none of them. The ban runs only in the full gate, as the owner decided on the issue: parsing the 526 Python files under tests/ takes about 1 s idle and the ban 1.8 s. It lives in a module of its own that imports nothing from devops-cli and nothing under tests/, spells no devops-cli module's dotted name and is named for none, so the selector maps no change to it; the plan's place, tests/test_architectural_invariants.py, is selected by 31 source modules. Two tests in tests/test_test_selection.py hold this. In a repository whose src/ is this one's and whose tests/ holds the ban beside the suite's helper modules and conftest, no selection short of the whole suite reaches it, over every source module, over the helper modules that do not reach the whole suite, or over any conftest, which may narrow to its directory. And the full gate collects it: the test step's pytest arguments and pyproject.toml's addopts each equal an exact list, testpaths and python_files their exact values, and no conftest or support module binds collect_ignore, collect_ignore_glob or pytest_ignore_collect, so any path, ignore, deselect, keyword or marker filter added fails the test. A move proof in a scratch worktree moved tests/test_release.py, tests/test_roadmap_dry_runs.py and tests/test_security_kubelinter.py into package directories with git mv: with no other edit the suite passed and collected the same IDs once each ID's directory was dropped. docs/TESTING.md describes the check as existing, changelog.d/1312.md is the item's one fragment, for its five pull requests, and the task file records this pull request, PR 2's outcome against its own parent, and every criterion of the plan. Closes #1312
…ff list (#1677) (#1709) - When validate_proposal fails due to an off-list type, Priority, Value, or Effort, retry once asking the model with structured feedback in problem. - Report both problems in the run report and skip candidate when both attempts fail. - Instruct model in roadmap_intake_system.md to correct invalid values when problem is present and map conventional commit prefixes without dedicated labels to type/infra. - Terminate devops roadmap intake --title ... --confirm with exit code 1 when the candidate cannot be placed and is skipped. - Count retries as model proposal calls in SpendMeter.
…es, held to GitHub's recorded answers by a contract suite (#1716) The GitHub session's fake moves from tests/github_session_fakes.py to tests/support/fakes/github.py, and every importer reads it from there. Its github_api fixture moves beside it out of tests/conftest.py, defined with pytest.fixture, so the support registration gives it to every test and the test selector sees it; install_async_client_fake, which keeps github_api and stub_web from sharing a test, moves to tests/web_fakes.py, since a support module imports no conftest. serve_github_api installs any double of GitHub's API as the fixture installs the fake. tests/test_github_contract.py runs ten cases through the real session twice: over GitHubApiFake, routed as a test over the fake routes it, and over RecordedGitHubApi, which replays GitHub's own answers to the same requests in order through httpx2.MockTransport, offline, matching each request on its method, URL, If-None-Match and body. The answers were recorded on 2026-10-19 through the session's own transport (tests/fixtures/github_api/recorded_answers.json): reads of GitHub's octocat/Hello-World example repository, a search with no query, a Markdown render and a /user read with the pinned fake token, kept without any token, OAuth scopes, OAuth client or request id. The cases cover a REST read, a read answered from its ETag after a read GitHub answers 404, a 404, a listing over the pages GitHub links, a reader that stops early, a listing read again from its first page's ETag, a refused token, a 422, a write answered with text and a write refused with a 400. Each compares answers, errors, requests and the ledger with values written in the case, and each fails under a mutant of the fake or the session. The suite found the fake's quota wrong where it makes an answer itself. GitHub reports the quota as it stands with every REST answer; a 304 spends none of it and a 404 spends one. The fake's 304 reported the quota of the answer it stood in for, and its 404 reported none. The fake now holds the quota it last reported for each resource, which a test may set: its own 304 reports it, and its own 404 spends one from it. github_text takes headers, so a text answer carries the quota GitHub sends with it. Rate limits, 5xx answers, refused connects, redirects and a missing scope's 403 are not recorded: GitHub cannot be made to send the first three without spending a quota or waiting for an outage, a redirect wants a moved repository that names no person, and the session reads a missing scope from the token's x-oauth-scopes, which the recordings remove. The page cap is the session's own rule and stays tested in tests/test_github_session.py, and the session sends no GraphQL. The github_api fixture now refuses any gh command the rate limiter would run, run_gh and the quota refresh, so a reader that falls back to run_gh fails offline with "A test over the fake GitHub API ran gh: <argv>" instead of starting gh with the pinned fake token. The gh-output table drops the rows gh writes for no GitHub failure: scope 'project', scope "project", project scope, requires additional permissions, requires the 'project' scope, need the 'project' scope and authentication required. gh's source at v2.102.0 and go-gh's at v2.16.1 hold none of them in any failure message: project scope is only in the help of gh's skill installer, and authentication required only in the exit-codes section of gh's man page and in an authenticating proxy's 407 reason phrase, Proxy Authentication Required, which the table now pins as no class. The session's signing-key 422 is already confirmed against the key listing since PR 5. docs/TESTING.md and ADR 0006 name the fake's place and its contract suite, the task file records PR 7 and reads the item as delivered, its follow-up for the remaining gh-text matchers being the 2026-10-19 amendment on #891, and changelog.d/983.md describes the whole item. Closes #983
…evops ci test sizes its workers and stops its whole process group (#1717) Nothing bounded a test, so one stuck child process held a devops ci run, and every xdist worker it owned, for more than an hour. pytest-timeout 2.4.0, the current release (2.5.0 is yanked), joins the dev group, and [tool.pytest.ini_options] sets timeout = 600 with timeout_method = "signal", so a test that hangs fails in its own process with pytest-timeout's report naming it, and the run and its worker carry on. The bound is a hang bound: the slowest test in 185 cached gate runs took 139 s at a load average of 30-50, the latest runs' slowest 21-34 s, and the bound stays under half the run's 1800 s timeout, so a hung test is reported by name before the whole run is stopped. No per-call timeout is added to the subprocess calls under tests/. A narrowed devops ci test given no -n started 16 workers for a few covering tests. It now runs serially for up to DEFAULT_CI_TEST_SERIAL_MAX_FILES (12) test modules and on DEFAULT_CI_TEST_NARROWED_WORKERS (4) above that; the full suite, the fallback to it and devops ci keep -n logical, and a given -n is kept. Measured at -n 0, 4 and 16 over selections of 1, 3, 5, 8, 12 and 19 test modules: up to 8, serial was the fastest or within the noise at about a third of the CPU of 4 workers; at 12, serial matched 4 workers' 79 against 82 s at 84 against 193 CPU-seconds; at 19, 4 workers ran 2.8 times faster than serial at about the same CPU. The hook's command for a one-module change took 10.6 s and 12 CPU-seconds against 17.7 s and 183 with -n logical. devops ci test ran pytest through subprocess.run, whose timeout kills only uv and left pytest running. Every pytest run it starts now goes through run_subprocess_async in a session of its own, so a timeout stops the whole group, and the run fails naming its command and timeout. No terminal or supervisor signal reaches that session, so a cancellation, which Ctrl-C makes and which SIGTERM and SIGHUP make for a devops ci test run, forwards the SIGINT a terminal would have sent, so pytest runs its teardown and finally blocks, then escalates to SIGTERM and SIGKILL. A second signal cuts the grace short but cannot skip the SIGKILL, which is sent from a finally; the start is shielded, so one cancellation while the child starts still stops its group, though a second Ctrl-C in that window leaves asyncio's clean-up to kill the child alone; and a late cancellation stays a cancellation. A timeout, which devops ci's checks share, still starts at SIGTERM. The handlers are set only from the main thread, leave an ignored SIGHUP ignored for nohup, and are handed back after the run. A serial run that hangs after its summary line is stopped with its whole group at the run's timeout, the only bound there, counted from the start: 1800 s for devops ci test. No serial run hung in the measured runs: the tail is pytest's unconfigure gc, the capture teardown and interpreter finalization, and the tracer's atexit shutdown cannot deadlock on its client lock, which no export holds during I/O. The tests drive devops ci test through its CLI, double the process edge at asyncio.create_subprocess_exec, refuse any real uv or pytest child, set the signal dispositions they rely on whatever the run inherited, run the real devops on the tree under test, and watch hung children through pidfds, failing a test whose child leads no session of its own and killing what a failing test leaves. The targeted-test command is uv run devops ci test <test-file> in AGENTS.md, CONTRIBUTING.md, docs/SDLC.md, docs/SELF_IMPROVEMENT.md, docs/ROUTINE_TASKS.md, the knowledge base and the generated AGENTS.md block, and docs/TESTING.md describes the bound, the workers, the stop and the doubles. The fail-to-pass replay's could-not-run report is the pull request that closes the item. Part of #1669
…d-not-run (#1718) When pytest could not start on the replayed base tree, devops ci fail-to-pass reported "0 failed and 0 passed ...; 0 errored" as an outcome: a feature passed the check with nothing replayed, and a defect failed it saying no changed test failed on base, though none ran. _run_pytest_on_base dropped pytest's exit status and returned no outcomes when the JUnit report was missing. _run_pytest_on_base now keeps pytest's exit status. An exit of 2 (interrupted), 3 (internal error) or 4 (usage error), or a run that wrote no complete JUnit report, is a ReplayCouldNotRun on the report, with the exit status and the last whole lines of pytest's output that fit in 256 characters. Exit 3 counts with a report too, as pytest writes one holding pytest::internal when an internal error ends a session it had begun to report. A report that is empty or never closes its root testsuites element counts as none: the JUnit parser, still the stdlib HTMLParser, records whether the root closed. Such a replay fails the check for any pull request; the report names the exit status, the replayed test files and pytest's last output, and points to the Fail-to-pass: not applicable line, which still passes the check without replaying. Exit 5, no tests collected, stays an empty replay, and a replay whose tests collect and run reports as before, so a changed test that only fails to collect on base is reported as errored. The command writes an unsatisfied report raw, with markup and emoji codes off, so pytest's output reaches the terminal as pytest wrote it. AGENTS.md and the instruction generator's line say the check fails any pull request whose replay pytest could not run on base, as when the overlaid tests/ import support the base lacks or the pull request changes dependencies or the test harness; that such a pull request declares the not-applicable line; and that a changed test that only fails to collect on base is reported as errored. The could-not-run reports' text is checked against syrupy snapshots, the suite's first, which docs/TESTING.md now names; the trailing-whitespace hook leaves tests/__snapshots__/ alone, as trimming a blank line's indent breaks a snapshot. With part 1 (#1717), the per-test timeout, the narrowed run's worker count and its process-group stop, this completes the item. The task file keeps part 1's section and adds this one as PR 2, with every criterion of the item and both amendments delivered, and changelog.d/1669.md is the item's one fragment, covering both parts. Closes #1669
dan-petty
added a commit
that referenced
this pull request
Oct 20, 2026
…ease branch The v0.2.37 release pull request (#1720) failed its Fail-to-Pass Check: the replay lays the release's tests/ over main's src/, the release's tests/support/bootstrap.py imports a name main's test_selection does not have yet, and pytest stopped with an INTERNALERROR, which since #1669 fails the check for any pull request. The check exists for item pull requests into a release branch, where each proves its fix; the release pull request into main carries items that each passed it, and a release that changes the test harness cannot replay on main's tree at all. The workflow now triggers on pull requests into release/** only, so it does not run on the release pull request into main. The workflow contract pins the trigger and task-844's record of it is updated. Closes #1721
…ease branch (#1722) The v0.2.37 release pull request (#1720) failed its Fail-to-Pass Check: the replay lays the release's tests/ over main's src/, the release's tests/support/bootstrap.py imports a name main's test_selection does not have yet, and pytest stopped with an INTERNALERROR, which since #1669 fails the check for any pull request. The check exists for item pull requests into a release branch, where each proves its fix; the release pull request into main carries items that each passed it, and a release that changes the test harness cannot replay on main's tree at all. The workflow now triggers on pull requests into release/** only, so it does not run on the release pull request into main. The workflow contract pins the trigger and task-844's record of it is updated. Closes #1721
This was referenced Oct 20, 2026
…elease branch (#1724) The CI Quality Gate's Changed-Test Independence job reruns a pull request's changed test files in shuffled order to catch order dependence. On the release pull request into main every test file the release touched counts as changed, so the v0.2.37 release pull request spent more than 20 minutes rerunning most of the suite, while each of its items had already passed the job against the release branch. The job's condition gains `github.base_ref != 'main'`; item pull requests into release/** keep it, as #1721 did for the fail-to-pass check. The changed-test job's test pins the condition. Closes #1723
…collected and the roadmap rendered (#1719) * fix(ci): the changed-test shuffle runs only on pull requests into a release branch The CI Quality Gate's Changed-Test Independence job reruns a pull request's changed test files in shuffled order to catch order dependence. On the release pull request into main every test file the release touched counts as changed, so the v0.2.37 release pull request spent more than 20 minutes rerunning most of the suite, while each of its items had already passed the job against the release branch. The job's condition gains `github.base_ref != 'main'`; item pull requests into release/** keep it, as #1721 did for the fail-to-pass check. The changed-test job's test pins the condition. Closes #1723 * chore(release): cut v0.2.37: version 0.2.37, the changelog fragments collected and the roadmap rendered The changes `devops roadmap close --confirm` makes when it cuts v0.2.37, produced by its own fragment collection, version bump and changelog writer and the close job's roadmap render, from release/v0.2.37 with #1723's fix on top, as a pull request instead of the cut's own commit and push to the release branch: pyproject.toml and uv.lock at 0.2.37, the 33 changelog.d fragments collected into CHANGELOG.md's [0.2.37] - 2026-10-20 section and deleted, among them #1721 and #1723, the release pull request's own fixes, and docs/ROADMAP.md rendered from GitHub. In a checkout with this repository's pre-commit hooks, no-commit-to-branch refuses the cut's commit on release/v0.2.37, so the close run of 12:37 UTC stopped with the cut staged (#1628); this carries the cut through the hooks and the pre-push gate, as the v0.2.36 cut did (#1614).
This was referenced Oct 22, 2026
Merged
Closed
dan-petty
added a commit
that referenced
this pull request
Oct 24, 2026
… so a site break fails before the merge (#2021) ## Summary GitHub Pages publishes `main:/docs` when a pull request merges. No workflow built the site before the merge, so a Liquid or Jekyll error broke Pages at the merge. The header of `docs/_config.yml` records one such failure. This change adds the `Docs Site Build` job (`docs-site`) to `ci.yml`. The job builds `docs/` with the GitHub Pages builder before the merge. - **Builder.** The job runs the image of `actions/jekyll-build-pages` v1.0.13 by digest: `ghcr.io/actions/jekyll-build-pages@sha256:6791ebfd912185ed59bfb5fb102664fa872496b79f87ff8b9cfba292a7345041`. The action names its image by a tag, so a commit pin of the action does not pin the builder. v1.0.13 (commit `44a6e6be`) is the latest release. `docker buildx imagetools inspect` gave this digest for the tag on 2026-10-23. - **Scope.** `dorny/paths-filter` v4.0.3 (commit `ceb8a2b8`, the pin that ADR 0012 names) reads the changed files of the pull request from the REST API. The job builds only when `docs/**` or `ci.yml` changed. On any other pull request, it skips the checkout and the build, and the check reports success. The job has no workflow-level `paths` filter, so it never stays pending. - **Read-only.** The container runs with `--network none`, a loopback resolver (`--dns 127.0.0.1`) and `docs/` mounted read-only. The GitHub metadata plugin catches the failed DNS lookup and makes no API call, so the build needs no token. Without the loopback resolver, the lookup to the runner's resolver raises `Errno::ENETUNREACH`, which the plugin does not catch: the first CI run failed this way. The built site stays inside the container. The job holds `contents: read` and `pull-requests: read`, keeps no checkout credentials, uploads no artifact and stops after 10 minutes. Its `if` names no branch, and no other job needs it. - **Evidence.** The exact `run:` block of the job, run in the devcontainer, built the final `docs/` tree in 4 s after a pull of 13 s. With an `if` tag that never closes in `docs/VISION.md`, it exited 1 and logged `Liquid Exception: Liquid syntax error (line 49): 'if' tag was never closed in VISION.md`. The build log names `docs/_config.yml` as the only configuration file. - **Checks.** `actionlint` passes. `zizmor` (pinned 1.30.1, auditor persona) reports the same findings on `ci.yml` as on the base. The new permission has an explanatory comment, so `undocumented-permissions` adds no finding. - **Test.** `test_a_pull_request_that_changes_the_site_builds_it_with_the_pages_builder` (`tests/test_workflow_contracts.py`) holds the condition, the permissions, the time limit, the filter, the checkout credentials, the digest and the `docker run` command. It also checks that no job needs the job. It failed on `origin/main` (`KeyError: 'docs-site'`) and passes now. The parity test of `tests/test_ci.py` lists the build step with its reason, as it lists the Semgrep step of `rule-pack`. - **Cost.** This change builds no internal code. It wires two open tools: the Pages builder image and `dorny/paths-filter`. The Argo CD overlay already renders on each pull request. `test_this_repository_passes_the_argocd_gate` (`tests/test_k8s_argocd_apps.py`, on `main` since #1720) calls `check_argocd_gate` in `Tests & Coverage`. It builds every Application with `kubectl kustomize` in about 1 s, and the runner image has `kubectl` 1.37.1. So this change adds no second caller. The image-pins check of the issue is not in this change. It moves to its own item, #1994, for these reasons: - The issue orders it after #1860, which is open. It runs "next to the gate of #1860", and that check does not exist. - `devops ci` has no trigger files for one check. `CheckSpec` (`src/devops_cli/commands/ci.py`) has no path field, and the cache holds one fingerprint for the whole gate. So the check would ask the registries on each gate run, in the pre-push hook too, unless a new mechanism scopes it. - Five of the eight images that the check asks about are on Docker Hub. Its anonymous pull limit counts manifest `GET` requests, and the check fails on every registry error, so a rate limit can fail it. Nobody measured this. - The `docker` CLI is a faked edge with no shared fake and no contract suite yet (`docs/TESTING.md`, "Not yet"). The tests of the issue need one. - The registries answer without credentials. On 2026-10-23, `docker buildx imagetools inspect` with an empty Docker configuration resolved each of the nine distinct `image:` values under `k8s/`, with the service image as `service:latest`. A missing tag exited 1 with `not found`. #1858 adds a `changes` job with `dorny/paths-filter`. This job keeps its own filter step, so the two changes merge without a conflict. The change that merges second can move the `docs` filter into the `changes` job. ## Item Closes #1651 Task file: `docs/agent/tasks/task-1651-pull-request-builds-the-pages-site.md`
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.
feat(release): v0.2.37
Summary
Release
v0.2.37tracking PR under GitHub pull request merge controls.Included Deliverables
devops agent envgives an agent session its own expiring gateway key, run-index access and a read-only kube identity, written to its settings file or a child process and never printed, with--revokeand an audit of every grant #1154Release Notes
Added
devops roadmap reprioritizesweeps open P0 and P1 backlog items into open planned releases holding fewer than 16 items (release_cap + release_slots), in_Ranks.firstorder with thepriorityreason comment. A backlog P0 meeting a full release displaces the lowest-ranked unimplemented P3 item in it, which moves to the next release with room or to the backlog; a P1 never displaces anything and moves to the next release with room. When every planned release is full, reprioritize creates the next patch release and places the item there. Items a person took out of a release stay in the backlog. At a start, New and Blocked P0/P1 items go to the next planned release instead of the backlog (feat(roadmap): reprioritize places every open p0 and p1 item in an open release, from the backlog and at a release start #882).GitHubSession.rest()andpaginate(), which follows GitHub'sLink: rel="next"one page at a time, stops sending when its reader stops and fails closed on a page that holds no list or a listing past the page cap. Every request is paced and charged on the identity's one ledger, the onerun_ghuses, is sent only to GitHub's API origin, is retried on a rate limit and on a read's 5xx, and a repeated GET of arest()read, or of a listing page that links a next one, is sent with the ETag the session kept, so a 304 answers it from memory (#983).GitHubScopeError,GitHubNotFoundErrorandGitHubUnreadError, which the session classifies from an HTTP answer's status and headers. A failed gh command is classified from its exit status and stderr by one table inconfig/constants.py, into a rate limit, a missing scope or a refused login (#983).DEVOPS_CLI_AI_GATEWAY_URLenvironment variable andai.gateway_urlconfiguration option to direct the AI client at an authenticated LLM gateway endpoint.DEVOPS_CLI_AGENT_GRANTenvironment variable for agent sessions, with bounded grant-aware 401 authentication hints that suppress generic API key setup reminders when an expired or revoked grant is in use.~/.claude/settings.json,.claude/settings.local.json, and~/.kube/**) during agent sessions.k8s/agents/: namespaceagentsenforcing restricted Pod Security Standards, ServiceAccountdevops-agentwithautomountServiceAccountToken: false, and ClusterRoleBindingdevops-agent-viewbound to the read-onlyviewClusterRole.agentsunder projecthomelab, orphan-resource ignore rules for transient session secrets (agent-grant-*), and nativedevops k8s deploy-stackintegration for agent manifests.tests/support/holds what tests share, and the root conftest's onepytest_pluginsentry,tests.support.bootstrap, isolates HOME and then registers every submodule and subpackage under it as a plugin, so a fixture added there reaches every test with no conftest edit (test(cli): tests find the repository root and fixtures from any depth, import no other test module and build test data with shared builders, and devops test maps a change to its mirror directory #1312). A run fails on a support module whose fixture or hook its source does not show, on a test module or conftest undertests/support/, and on a support module imported before assertion rewriting was set up.tests/support/paths.py(REPO_ROOT,TESTS_ROOT,FIXTURESandGOLDEN), so a module reads the same paths at any depth. A check fails a module undertests/that reads its own__file__outsidetests/support/or imports a test module or a conftest, naming eachpath:line. It runs in the full gate,uv run devops ciand the pre-push hook; a narroweddevops ci testruns it only when given its module.tests/support/builders.py:make_finding,make_verdict,make_item,make_release,make_candidateandmake_changelog_fragment, each building through the type's own constructor or parser, so an override the type refuses raises the type's own error.parse_changelog_fragmentholds the checks the changelog fragment reader makes, and the reader and the builder share it. syrupy 6.1.1 joins the dev dependencies for snapshot tests.devops release prepare --create-pr(andcut_release), building all repository-managedApplicationmanifests via Kustomize from an isolatedgit archivesnapshot at the release head before cutting a release (feat(release): a release is cut only after every argo cd application builds at the release head and its live changes are shown #1343).devops,ingress).argocd app diff --grpc-web, verifying live cluster diffs and surfacing any template domain placeholder hosts lacking active live overrides alongside their remediation command (devops k8s deploy-stack --stack <stack>) (feat(release): a release is cut only after every argo cd application builds at the release head and its live changes are shown #1343).release_copilot_passesin.github/roadmap.toml, 2 by default, counts every Copilot review submitted on it, whoever asked for it, and a pass running or requested and not yet started.devops pr copilot-pass [<number>] [--dry-run]requests a pass withgh pr edit --add-reviewer @copilotonly on the open release pull request while its passes are below the budget; otherwise it requests nothing and exits 1, sayingCopilot budget spent: N of N passesonce they are spent (feat(github): a release pull request gets a set number of copilot passes, and later review threads become follow-up issues #1345).devops pr threads file-issues <pr> [--keep <thread-id>] [--confirm] [--dry-run], which a person runs, files each unresolved review thread of the open release pull request as a follow-up issue with no milestone, labelledsource/agentwhen Copilot started the thread, quoting the thread in a fence so no mention notifies and no issue reference links, then replies in the thread naming the issue and resolves it. Without--confirmit writes nothing, and a--keepid that names no unresolved thread stops it before any write. A rerun opens no second issue for a thread: it resolves a thread whose reply from the same account names its issue, and finds by the thread's link the issue it opened for a thread whose reply failed (feat(github): a release pull request gets a set number of copilot passes, and later review threads become follow-up issues #1345).RELEASE_CYCLE.mdStep 3 states the stop rule: once the budget is spent, a remaining comment blocks the release only if it is a regression the release introduces, and every other one becomes a follow-up issue (feat(github): a release pull request gets a set number of copilot passes, and later review threads become follow-up issues #1345).devops_cli_ai_gateway_slot_wait_secondshistogram, by outcome (okortimeout), and anai.llm.gateway_slotspan record how long a gateway chat call waited in the process for a backend slot. A call'sllm.wall_seconds, its time to first chunk and its spend's duration start once it holds the slot, so a review waiting for slots no longer looks like slow inference (fix(ai): gateway reviews keep requests in flight at the backend slot count, however many ai.ollama_urls are configured #1354).Changed
gh api --paginateor their own httpx2 clients, so a malformed or failed page is a read failure instead of a shorter list, and a poll stops at its first entry older than its cutoff (#983).devops gh api --paginatehands gh--paginate,--slurp,--jqand--templateas given, underDEFAULT_GH_API_PAGINATE_TIMEOUT_SECONDS(#983).devops gh issues listanddevops roadmap intakereport each without a traceback (#983).devops roadmap intake --plan's spend line counts every request the identity's ledger paces, gh commands and session requests alike (#983).authentication required, which gh writes only in an authenticating proxy'sProxy Authentication Required, name no class any more (#983).CONST_MCP_EXPOSURE_TABLE(146 commands), eliminating hand-written argv construction wrappers inserver.py(refactor(mcp): the mcp tool bridge is generated from the typer app instead of 147 hand-written argv lists #997).hydrate_tool_domain,security_intel_package,security_intel_network,scan_uv_audit,k8s_tempo_info), and dead functional handlers indispatcher.py(register_handler,_functional_handlers,_check_functional_handlers) and test-detecting branches inserver.pyare removed (refactor(mcp): the mcp tool bridge is generated from the typer app instead of 147 hand-written argv lists #997)."_".join(command_path).replace("-", "_")with zero legacy shims (refactor(mcp): the mcp tool bridge is generated from the typer app instead of 147 hand-written argv lists #997).ModelFakeimplementingpydantic_ai.models.ModelandLLMClientduck typing, accompanied by a contract suite intests/test_model_contract.pyand fixturemodel_fakeintests/conftest.py(refactor(ai): one model seam: llmclient over three wire adapters behind one factory, no second provider stack #1001).get_llm_clientandbuild_llm_clientindevops_cli.ai.client.factorywith override support, routing all inlineLLMClientconstructions acrosssrc/through the factory, and removingconfig/settings.py:get_llm_client.new_async_http_client) with bounded timeouts and SSRF validation into Pydantic AI providers, and unified direct spend tracking indevops_cli.ai.directacross synchronous, asynchronous, and streaming requests.LLMClientmonkeypatches to the sharedmodel_fakefixture.check_threat_intelreplies move these blocks between classes (fix(security): reference_extractor classifies addresses with ipaddress, and the sandbox local whitelist stops mapping host.docker.internal to pod loopback #1174). From "Documented Example" to local: 0.0.0.0/8 (the unspecified 0.0.0.0 itself is still rejected), 100.64.0.0/10, 192.0.0.0/24 except 192.0.0.9 and 192.0.0.10, 192.88.99.0/24, 240.0.0.0/4, 255.255.255.255, 100::/64, 2002::/16 and the rest of 2001::/23, Teredo 2001::/32 and the deprecated ORCHID 2001:10::/28 among them. From "Documented Example" to public, so Shodan InternetDB may be asked about them: 192.0.0.9, 192.0.0.10, 2001:1::1, 2001:1::2, 2001:3::/32, 2001:4:112::/48, 2001:20::/28 and 2001:30::/28, which IANA lists as globally reachable. From public to local: site-local fec0::/10 (RFC 3879) and the IPv4-mapped spelling of 192.88.99.0/24 (::ffff:192.88.99.1). From local to "Documented Example": 3fff::/20 (RFC 9637) and the IPv4-mapped spelling of documentation and benchmarking space (::ffff:192.0.2.1). From no class to local: multicast, in either spelling, and the IPv4-mapped spelling of 100.64.0.0/10.check_threat_intel's reply for a target it excludes names RFC 2606 and RFC 6761 (example domains), RFC 5737, RFC 3849 and RFC 9637 (documentation addresses), RFC 2544 and RFC 5180 (benchmarking addresses), ATIS-0300115 and Ofcom's drama numbers (fictional phone numbers) and RFC 1122 and RFC 4291 (unspecified addresses), and no longer RFC 6890, whose reserved space is now local. For a local address it replies that the target is a local address and that no threat intelligence service was asked, where it used to present Cloudflare Radar's static record as "Cloudflare Radar Intelligence for Domain" (fix(security): reference_extractor classifies addresses with ipaddress, and the sandbox local whitelist stops mapping host.docker.internal to pod loopback #1174).docs/TESTING.mdholds the test vocabulary and conventions (docs(cli): docs/TESTING.md holds the test conventions, ADR 0005 records that tests double only process edges, and AGENTS.md and the contributor docs point to them #1308). By those conventions, tests double only edges, each through one seam and one shared fake with a contract suite, and no test starts a real gh; tests find the repository root and their test data throughtests.support.paths;tests/is to mirrorsrc/devops_cli; tests are named after behaviour in glossary terms and compare whole values; and no test asserts on elapsed wall-clock time. It also says which tests a narroweddevops ci testrun selects. ADR 0007 records why tests double only process edges. Conventions whose mechanisms are still to come are marked as targets, and the file lists what exists today.CONTRIBUTING.md,RELEASE_CYCLE.md,docs/SDLC.md,docs/ROUTINE_TASKS.md,docs/SELF_IMPROVEMENT.md,.devops/review.mdand three knowledge base articles linkdocs/TESTING.mdinstead of stating their own test rules (docs(cli): docs/TESTING.md holds the test conventions, ADR 0005 records that tests double only process edges, and AGENTS.md and the contributor docs point to them #1308). AGENTS.md no longer requires linear asserts to be merged into tuple comparisons: Ruff's C901 does not count asserts.devops test run --changedmaps a change through the selectordevops ci testuses, in place of its own name table: a changed source module selects the test modules named for it, at any depth, and those that import it; a conftest of fixtures selects its own directory, and one that binds a pytest hook the whole suite. It never passes a deleted test module to pytest, and it names each changed source no test module covers.tests/selects the tests it reaches, read withastonce per run: the whole suite when it defines a fixture or binds apytest_*name, when a conftest or such a helper imports it, or when it is deleted, renamed away or unreadable; otherwise the test modules that import it, directly or through other modules.devops ci testruns the whole suite, or refuses under--no-fallback, for a helper that reaches every test and for one deleted since the coverage index was built.uv run python -m tests.test_swallowed_failures_ratchet --lower, and its usage line names that command.devops ci test, given paths and no-n, runs serially for up to 12 test modules (DEFAULT_CI_TEST_SERIAL_MAX_FILES) and on 4 workers above that (DEFAULT_CI_TEST_NARROWED_WORKERS), instead of starting 16 workers for a few covering tests (fix(ci): a test that hangs fails at a per-test timeout, so devops ci never stalls on a stuck child process #1669). The commit hook's run for a one-module change took 10.6 s and 12 CPU-seconds, against 17.7 s and 183 CPU-seconds before. The full suite, the fallback to it anddevops cikeep-n logical, and a given-nis kept.uv run devops ci test tests/test_<feature>.py, so a direct run gets the same worker sizing, in AGENTS.md, CONTRIBUTING.md,docs/SDLC.md,docs/SELF_IMPROVEMENT.md,docs/ROUTINE_TASKS.md, the knowledge base and the generated AGENTS.md block;docs/TESTING.mddescribes the per-test bound and the narrowed run's workers and stop. AGENTS.md and the generated AGENTS.md block say the fail-to-pass check fails any pull request whose replay pytest could not run on base, as when the overlaidtests/import support the base lacks or the pull request changes dependencies or the test harness, that such a pull request declares the not-applicable line, and that a changed test that only fails to collect on base is reported as errored.Removed
run_gh's own page loop,run_gh_async,parse_paginated_jsonand theaiolimiterdependency (#983).pydantic_ai._run_context,pydantic_ai._models_by_id, andpydantic_ai._ssrfimports acrosssrc/, routing network safety checks throughdevops_cli.core.validation.devops_cli.ai,devops_cli.ai.agents,devops_cli.ai.mcp, anddevops_cli.github, which now contain single module docstrings; callers acrosssrc/,tests/, and knowledge base documentation import directly from defining submodules.StagePipelineprotocols, dead modulesrc/devops_cli/ai/agents/pydantic_agent.py,src/devops_cli/ai/pipeline_protocol.py, and the legacysrc/devops_cli/pipeline/package.pydantic_ai,kubernetes,docker,fastmcp,qdrant_client,opentelemetry) on--version, root--help, and all 39 command group--helpdispatches, with startup import budgets enforcing cumulative import time under 0.5 s fordevops_cli.mainand under 1.0 s for any command help.verify_test_paths_isolated, its check andCONST_ISOLATED_TEST_ENV_KEYS: the check read only paths the suite's own fixtures set, so it could not fail.Fixed
finish_reason="length") is rejected asreply-truncatedwithout being parsed or shown, and recorded in analysis report rejections without retry.arpaoronion) now count as local everywhere viadevops_cli.core.dns_names.is_public_dns_name, replacingCONST_LOCAL_DOMAIN_SUFFIXESand hand-written.endswith(...)suffix checks across egress validation, AI spend pricing, Kubernetes URL auto-configuration,web_fetch,PlaywrightBrowser.navigate, and sandbox local whitelisting (fix(security): local names come from the public suffix list, and domains match on DNS labels, not string suffixes #887).validate_url_egressandis_loopback_or_private_host) now refuses non-public hostnames and names rejected bydnspython(IDNA 2008) before performing any DNS lookup (fix(security): local names come from the public suffix list, and domains match on DNS labels, not string suffixes #887).devops k8s configure-urlsnow preserves any configured URL whose host is a domain name (including private zones underlan,internal,local,cluster.local, and single-label names) when discovery finds only an IP or loopback URL, and matches preferred Ingress domains on DNS label boundaries viais_at_or_under(fix(security): local names come from the public suffix list, and domains match on DNS labels, not string suffixes #887).WebSearchTool,WebFetchTool,WebFetch,Researcher,PlaywrightBrowser) andk8s.domain/cloudflare.domainnow refuse root (.,@,"") and leading-dot entries at load time, while treating blank or whitespace-onlyk8s.domainandcloudflare.domainvalues as unset (None) (fix(security): local names come from the public suffix list, and domains match on DNS labels, not string suffixes #887)./model/infocached per process, supporting direct configuration for models outside the gateway, and eliminating transparent 400 error-text scraping.@meat once, and where no@mefallback exists it is a rate limit only when GraphQL's own budget is spent or can't be read (#983).devops ci test .python-version --no-fallbackrefuses like the other files that force a full run; it passed with nothing run, because the leading dot was stripped with the./.--no-fallback, on every laterdevops ci testrun: the index counts as stale, the given files are selected by name and import, and a warning names the file.devops pr check-readinessexempts a release-process pull request from grounding only by the files it changes (fix(github): pr readiness exempts a chore/open release-process pull request only when it changes release-process files #1344). A cut pull request,chore/cut-vX.Y.Zintorelease/vX.Y.Z, is exempt when it only modifies the cut's files (pyproject.toml,src/devops_cli/__init__.py,uv.lock,CHANGELOG.md,docs/ROADMAP.md) and removeschangelog.d/<issue>.mdfragments, as the cut commit does; before this change it was held to grounding and failed with "closes no issue". A merge ofmain,chore/open-vX.Y.Z-mainintorelease/vX.Y.Z, is exempt when it changes only the cut's files and whatmainchanged since its merge base with the release branch, read with one compare request; before this change anychore/open-vX.Y.Z[-slug]pull request was exempt whatever it changed, so code fixes reachedrelease/v0.2.28with no issue, task file or changelog fragment. A release-process pull request that changes any other file, both paths of a rename included, is held to grounding with one blocker naming those files, and one whose file list or compare can't be read, or whose compare lists GitHub's limit of 300 files, is held with a blocker naming the failure.devops pr monitortook any review whose author's login contained "copilot" for Copilot's. A review is now Copilot's only by Copilot's exact login on review records, and a timelinereviewedevent ends Copilot's pass only by the id of one of its reviews, since the timeline names the same accountCopilot(feat(github): a release pull request gets a set number of copilot passes, and later review threads become follow-up issues #1345).ai.ollama_urlsare configured (fix(ai): gateway reviews keep requests in flight at the backend slot count, however many ai.ollama_urls are configured #1354). The limit is per process: a second CLI process, or the in-cluster Service, takes slots of its own. Gateway reviews sized their file workers by the Ollama URLs, which add no gateway capacity, and every file ran its personas in parallel, so a review with three URLs could keep more than 3 requests in flight and rebuild the backend queue fix(ai): review calls through the gateway no longer stall for about 190 s on ollama, with the cause measured first #1069 meant to prevent. With thegatewayprovider, the persona stage now reviews at most 3 files at once, and an explicitdevops review --concurrencyabove 3 is lowered to 3 with a warning that names both numbers.devops review benchmarkrecords the concurrency its reviews ran at, so a gateway benchmark asked for 8 records 3. Every chat request the process sends to the gateway, streamed or not and from any command, now waits for one of the 3 slots, and a stream keeps its slot until it closes. A request that waits more than 900 seconds fails with an error naming the slot count. Model listing, gateway health probes and embeddings take no slot. Other providers are unchanged, including anollamaclient withai.gateway_enabledset, whose chat requests go to Ollama.FormattedLLMResponse[T]class that pydantic caches only weakly, so after a garbage collection the next reply spent about 30 ms of CPU rebuilding it (fix(ai): gateway reviews keep requests in flight at the backend slot count, however many ai.ollama_urls are configured #1354)."devops-cli"identity fallback in_get_session_login(src/devops_cli/roadmap/run.py), allowing GitHub login lookup failures to raise typedGitHubOperationErrorexceptions directly and fail closed (fix(roadmap): the job clone and the change filter fail closed when the session login lookup fails, instead of falling back to a made-up devops-cli identity #1409)."devops-cli"and avoiding self-triggering loop failures against unauthenticated sessions.GitHubSession.loginto use the session REST transport (GET /user) rather than shelling out to theghCLI subprocess edge, tested againstGitHubApiFake.httpx2.TransportErrorand transport subclasses to AI provider connection errors inLLMClient._retry_chat_dispatch, preventing non-transport errors from falsely reporting "Cannot connect" and preserving actual exception names (fix(test): the five-persona transient-503 review test ends reviewed whatever runs before it #1609).LLMResponseCachedisk cache eviction against unhandledOSErrorandFileNotFoundErrorwhen files are concurrently deleted across worker processes.test_five_personas_with_one_transient_503_sees_exactly_six_callsby isolating response cache and settings cache state across worker runs.Part of #<issue>instead of a closing keyword, anddevops pr check-readinessgrounds it on that issue: the issue is open and an item of the base's release, and the pull request changes its task file, which may read**Status**: In Progress. A body that names both a closing keyword and a part reference, or two part references, is one blocker that says so.devops roadmap closeacts only on closing keywords, so the item's last pull request closes it, and that pull request adds the item's changelog fragment.devops roadmap reprioritizecounts a part pull request's updates as the item's activity, so an item busy with its parts is not stalled and moved on part-way through, and a part pull request keeps its item from a trim, as a closing one does. A pull request body's closing keywords and part references are read only in its prose: a tilde or unclosed fence, indented code and an HTML comment no longer close an issue or name a part (#1617).otelnamespace, whose PodSecurityrestrictedadmission refused every pod since trace storage shipped in v0.2.35:k8s/otel/tempo-values.yamlsets theRuntimeDefaultseccomp profile on the pod and a container that drops every capability, cannot escalate and keeps a read-only root filesystem (#1627).THREAD_HANDOFF_BOUND_SECONDS(30 s) intests/support/waits.py, instead of 1- and 2-second deadlines that failed correct code while a loaded host kept a ready thread waiting for a CPU. A wait still returns as soon as its event fires, so a passing test is no slower (test(cli): tests wait for a background thread with one generous bound, not a 1-second deadline, so they pass under load #1664).test_once_the_model_answers_lookups_stop_taking_turnsholds only the workers' embedding requests at its barrier: the tracer's exporter threads posted trace exports through the same patchedhttpx2.Client.post, took a worker's place at the barrier and broke it.tests/conftest.pysetsOPENBLAS_NUM_THREADS=1before its own imports, so a 16-worker run holds 2 threads per worker at collection (briefly 3 while OpenTelemetry's resource detection runs) instead of 17 against the container's pids.max.devops ci test --repeatloads pytest-randomly, which imports numpy before the conftest runs, so that one process keeps OpenBLAS's per-CPU threads.devops ci, and every xdist worker it owns, until a person kills it: pytest-timeout 2.4.0 joins the dev group, and[tool.pytest.ini_options]setstimeout = 600withtimeout_method = "signal", so the stuck test fails in its own process with pytest-timeout's report naming it, and the run and its worker carry on (fix(ci): a test that hangs fails at a per-test timeout, so devops ci never stalls on a stuck child process #1669). 600 s is a hang bound: the slowest test in 185 cached gate runs took 139 s under heavy load, and the bound stays under half the run's 1800 s timeout, so a hung test is reported by name before the whole run is stopped. A test that needs longer says so with@pytest.mark.timeout(<seconds>).devops ci teststops the whole process group of the pytest it starts,uv, pytest and its workers, when the run outlives its timeout, and fails naming the command and the timeout. It used to run pytest throughsubprocess.run, whose timeout killed onlyuvand left pytest running. Ctrl-C, SIGTERM and SIGHUP stop the run the same way: the group gets the SIGINT a terminal would have sent, so pytest runs its teardown, then SIGTERM, then SIGKILL, which a second signal brings forward but cannot skip. A run started off the main thread, as from the MCP server, sets no signal handlers, and an ignored SIGHUP stays ignored, sonohupstill works.devops ci fail-to-passreports a replay whose pytest could not run on base as one that could not run, and fails the check for any pull request, feature or defect: pytest was interrupted (exit 2), stopped with an internal error (3) or a usage error (4), or wrote no complete JUnit report, as when the overlaidtests/import support the base lacks. A report that is empty or cut short counts as none. The report names pytest's exit status, the replayed test files and the last lines of pytest's output, up to 256 characters, printed as pytest wrote them. Such a replay used to read as "0 failed on base (0 failed and 0 passed in …; 0 errored)", so a feature passed the check with nothing replayed and a defect failed it for the wrong reason, that no changed test failed. A pull request whose replay cannot run on its base still passes with aFail-to-pass: not applicable: <reason>line, pytest's exit 5, no tests collected, is still an empty replay, and a changed test that only fails to collect on base is still reported as errored.devops roadmap intakenever folds a candidate into a completed/Done item; candidates matching a closed completed item are placed and filed as a new issue referencing the original in their body (fix(roadmap): intake never folds a new candidate into a closed item, so a regression in shipped work is filed #1671).ignoreDifferencesentry withjqPathExpressionsfor Argo CDApplicationresources ink8s/argocd/bootstrap/cluster.yamlto ignore dynamically injected PreDelete and PostDelete finalizers (such ask8s-monitoring's clean-up hook), preventing the cluster app-of-apps from repeatedly stripping and re-adding them on every sync cycle (fix(argocd): the cluster app-of-apps leaves argo cd's pre-delete finalizers on child applications, so k8s-monitoring stops resyncing every five minutes #1674).devops k8s deploy-stack --stack alldeploys every manifest and chart deployed by Argo CD Applications: added the pinned Traefik Helm chart (kube-system/traefik), GPU feature discovery DaemonSet (Path("gpu-feature-discovery")), the wildcard Cloudflare Ingress routes (k8s/ingress/ingress-routes.yaml), Portkey (k8s/llm/portkey/*), and the Valkey run index (k8s/llm/valkey-runs.yaml) (#1675)._adopt_helm_resource_if_conflict) refuses to adopt conflicting resources for the Traefik release and warns that stock k3s must be run with--disable traefik(#1675).UNDEPLOYED_NETWORK_POLICIES) intests/test_k8s_network_policies.pyand replaced the hand-injected Traefik mapping intests/test_k8s_argocd_apps.pywith an exhaustive bidirectional counterpart mapping (#1675).devops roadmap intakeasks the model again when its proposal names a value off its list (type, Priority, Value, or Effort), providing structured feedback inproblem. A second off-list reply reports both problems in the run report. A candidate filed via--titlethat still cannot be placed exits non-zero under--confirm(fix(roadmap): intake asks the model again when its proposal names a value off the list, and a --title candidate it still cannot place exits non-zero #1677).devops_climodule counts rather than wall-clock seconds, preventing CI gate failures caused by host scheduling jitter on busy multi-core systems (fix(ci): the startup import budget counts what a command imports, not wall-clock seconds, so the gate does not fail on a busy machine #1687)..data/importtime.lock) and obsolete wall-clock seconds constants, enabling concurrent test execution underpytest -nwithout serialization contention.devops ci maintaintest no longer runs a realuv auditagainst the live advisory database, so a newly published advisory can no longer fail the test suite (fix(deps): aiohttp 3.14.4 clears three advisories that fail every devops ci audit, and the maintain test stops running a real uv audit #1697).Security
security/reference_extractor.pyclassifies addresses with Python'sipaddressinstead of hand-kept RFC tables. An address is a documented example if it is in documentation or benchmarking space (CONST_DOCUMENTATION_IP_NETWORKS: RFC 5737, RFC 3849, RFC 9637, RFC 2544, RFC 5180); public if it is global, not reserved and not multicast, outside 192.88.99.0/24 and the deprecated site-local fec0::/10, which Python still reads as global although IANA does not (CONST_NON_GLOBAL_NETWORKS_STDLIB_READS_GLOBAL); and local otherwise. An IPv4-mapped IPv6 address such as::ffff:192.0.2.1is in the class of the IPv4 address it carries. Multicast addresses such as224.0.0.1andff02::1were in no class, socheck_threat_intelandCloudflareRadarClient.check_domainsent them to Cloudflare Radar's domain lookup; they are now local, and no request is made. Radar answers an unspecified address (0.0.0.0,::,http://0.0.0.0:8000) from its static example record, ascheck_threat_intelrejects it;::used to reach the domain lookup.is_example_or_reserved_ipis removed;is_example_ipreplaces it.is_example_or_invalid_network_target, Shodan InternetDB, Cloudflare Radar andcheck_threat_intelread a target asnetwork_target_addressreads it: without the punctuation prose leaves after it, as the host of a URL orhost:port, and in the legacy numeric spellings a resolver dials (2130706433,127.1,0x7f.0.0.1are 127.0.0.1), with no lookup.100.64.0.1.,224.0.0.1,,10.0.0.1.,2130706433andhttp://100.64.0.1./v1used to reach Radar's domain lookup, fromcheck_threat_intel,CloudflareRadarClient.check_domainand its batch path; no request is made for them now. A public address with a trailing mark, such as8.8.8.8., used to go to Radar too, and is now sent to Shodan as8.8.8.8.host.docker.internaland never emits an empty egress rule (fix(security): reference_extractor classifies addresses with ipaddress, and the sandbox local whitelist stops mapping host.docker.internal to pod loopback #1174).host.docker.internal, in any case and with or without a trailing dot, is refused whenSandboxNetworkConfigis validated, before any lookup, with a message asking for the IP address or CIDR the cluster reaches the host on. It used to become a127.0.0.1/32ipBlock: the pod's own loopback, not the host gateway. A loopback entry (localhost,127.0.0.1,[::1]:8080,127.0.0.0/8) now adds no egress rule instead of a no-op ipBlock, since NetworkPolicy never polices a pod's loopback. An entry that resolves to no address adds no rule, since a rule with an emptytowould allow every destination on its port.argocd-default-perimeterNetworkPolicy through Argo CD by addingk8s/argocdas a source ink8s/argocd/apps/argocd.yaml, establishing default-deny ingress and egress isolation for theargocdnamespace (fix(argocd): argo cd syncs the argocd namespace perimeter, and the unused applicationset controller runs no replicas #1673).applicationSet.replicas: 0ink8s/argocd/values.yaml, preventing container creation and eliminating unneeded cluster-admin execution while preserving RBAC definitions.uv audit, and with it the audit check ofdevops ci, passes again (fix(deps): aiohttp 3.14.4 clears three advisories that fail every devops ci audit, and the maintain test stops running a real uv audit #1697).