Skip to content

feat(roadmap): link reference implementations in each checked item - #7306

Merged
dan-petty merged 12 commits into
mainfrom
feat/4672-link-reference-implementations
Nov 26, 2026
Merged

dan-petty merged 12 commits into
mainfrom
feat/4672-link-reference-implementations

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The alternatives check now runs a reference step after the verdict of each checked item, also for a skip class. The step searches public code with GitHub's code search and repository search, and with an optional MCP code search server. It gates and ranks the candidates in code, verifies each permalink at the head commit, and keeps at most 3. It also keeps links to official documentation from a constant allowlist of hosts.

The owner asked for reference implementations in each issue, and no issue links one today. The setting roadmap.alternatives.references holds off, plan or on. With the default plan, the step logs the verified links, counts them in devops_cli_brain_references_total, and changes no issue. Mode on writes them in the block, the comment and alternatives.refs. The step sends at most 3 code searches and 15 fact reads for an item, stops after 120 s, makes no model call, and fails soft. The decision point brain.reference_relevance runs in shadow.

Closes #4672

Change: openspec/changes/archive/2026-11-26-4672-link-reference-implementations/

…the store

The setting roadmap.alternatives.references holds off, plan or on. The roadmap
store reads the code search, the repository search, the reference facts of a
repository and a file of another repository (#4672).
The step searches code through the providers, gates and ranks the candidates,
verifies each permalink at the head commit and keeps at most 3. The decision
point brain.reference_relevance runs in shadow (#4672).
…ed item

The alternatives check runs the step for each item, a skip-class item too. Mode
on writes the links in the block, the comment and alternatives.refs (#4672).
…run rows

roadmap.alternatives.references_mcp_url names an MCP server, such as the grep.app
server, as an optional provider for a public repository. A server that is down
at the start leaves the run (#4672).
The generated settings and telemetry references list the new setting and the
counter. The change folder holds the proposal, the design, the tasks and the
spec delta. A permalink holds its path percent-encoded.
The living spec roadmap-alternatives holds the 11 reference requirements and the
changed skip-class requirement. The telemetry reference is regenerated on the
current main.
@dan-petty dan-petty added type/feature Type feature: a new function scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 26, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test results and open points for #4672

Head commit: 8fa06b87cd145e8549e35434eed3a15d4b9b39a9.

Checks that ran in the devcontainer

Command Result
uv run devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures Each row passed.
uv run devops ci test on the 30 covering test files and folders 977 passed.
uv run devops ci test tests/roadmap tests/config tests/telemetry tests/invariants tests/security (before the rebase) 12503 passed, 1 failed. The failure was a type: ignore in a new test. It is removed, and tests/invariants/test_architectural_invariants.py passes.
uv run mypy on the 30 changed source files No issue.
uv run devops ci fail-to-pass --base origin/main Exit 0. On the base, 10 new test files error at collection and 22 changed tests fail. 363 tests pass on the base.

The full uv run devops ci did not run in the devcontainer. The checks of this pull request run it.

What the change does not prove

  • No request went to deps.dev, to grep.app or to a documentation host. The tests answer them at the HTTP edge. The deps.dev read of the direct dependents uses GET /v3alpha/systems/pypi/packages/<name>/versions/<version>:dependents, as the deps.dev API reference documents it.
  • The optional provider mcp-code has tests with an MCP server in the process, and with a refused connection at the HTTP edge. Its first use of the grep.app server (roadmap.alternatives.references_mcp_url) is not proven. The setting has no URL by default.
  • The ConfigMap example under k8s/ does not change. k8s/ is an environment path, and the freeze check of the k8s row refuses a change of it. The default mode plan needs no key in the ConfigMap.
  • The alternatives check is off for a private repository. So the rule "a private repository gets the two GitHub providers only" has tests at the provider list, and no run of the check uses it today.
  • A run with only skip-class items reads no SBOM. The rank term for shared PyPI packages is then 0.
  • The decision point brain.reference_relevance runs in shadow only. The settings refuse its mode on until a fit, and the step reads no band.
  • The step can add up to 120 s to the check of one item. The code search quota of GitHub (10 requests a minute) paces a round of many items.

Pending a person

@dan-petty

Copy link
Copy Markdown
Owner Author

The red check Analyze (python)

The check failed at the upload of its results, not at the analysis: Code Scanning could not process the submitted SARIF file: CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled.

  • The run of this pull request started at 2026-11-26T15:43:58Z.
  • The workflow CodeQL Advanced (codeql.yml) has the state disabled_manually since 2026-11-26T15:45:14Z, and GET /repos/dan-petty/devops-cli/code-scanning/default-setup gives the state configured.
  • The run of the same workflow on main at 15:26:37Z passed.
  • A new run of the job is refused: Unable to re-run this job, disabled workflow (HTTP 403).

So a repository setting changed while the run was in progress. The branch holds no cause, and an agent does not change a repository setting. The required checks Static Analysis, Tests & Coverage and Semantic PR title pass on the head commit 8fa06b87c.

@dan-petty

Copy link
Copy Markdown
Owner Author

Review of the coordinator, 2026-11-26, at 8fa06b8. The pull request stays a draft. An independent review read the core of the diff and found 1 blocker and several defects. The builder fixes them on this branch.

Blocker. A URL in the item text that urlsplit refuses (for example https://[cluster-ip]:6443/healthz) raises ValueError, which leaves the reference step. The round then raises, the verdict of the item is not written, and each later round stops at the same item. This occurs in the default mode plan. The same error exists on main for an item with page fetch on, so the fix also corrects main.

Other defects to fix in this pull request.

  • The reference queries skip the query guard of the web search, so a secret, an e-mail address or a private address of a code span can leave in a query.
  • The optional MCP provider can stop the round on an error of the tool listing, on a malformed answer and on a stream error.
  • A documentation link of a page with a trailing slash does not verify, and each failed page spends a fact read.
  • In mode on, a soft failure of the step removes the links of an earlier check. A switch from on back to plan also removes them.
  • Smaller points: a race in the time bound, the code gate drops C and header files, a wrong line anchor for a file with a form feed, .. segments of a provider answer, a search that can read a second page, and dry-run rows that miss two requests.

Checked, no defect. Private data: a hit of a private repository is dropped before any read, and the check is off for a private repository. Injection: a search qualifier of the item text becomes plain words, paths are percent-encoded, and no redirect is followed. Mode off sends nothing, and mode plan writes nothing new.

The red Analyze (python) check does not come from this branch: the workflow CodeQL Advanced was disabled by hand at 15:45 UTC while the default setup is on.

…ng links

A URL that the parser refuses names no page. The step runs in a daemon thread
and tells a failed step from a step with no link, so a failure keeps the links
of an earlier check. A documentation page is read as its source gave it, at
most 3 for an item, and a line ends at a line feed only (#4672).
… request

Each query passes the guard of the web search. The code gate reads a prose
suffix list and whole path segments. A search reads one page (#4672).
…vailable error

One place turns the named errors of the MCP libraries into
RoadmapMcpUnavailableError at the connection, the tool listing, a call, the
answer and the close. The connection and the tool listing have the bound of a
tool call. A provider that fails at a call leaves the run, and its query goes
to the GitHub code search inside the 3 searches (#4672).
…document the fix round

The dry run lists the MCP tool call and the decision model call when they are
configured. The ConfigMap example names the mode. The spec, the design and the
alternatives document hold the guard, the kept links, the page reads and the
two link bounds (#4672).
The deps row refuses an import of mcp, which is a transitive dependency.
fastmcp gives the same class as McpError (#4672).
@dan-petty

Copy link
Copy Markdown
Owner Author

Fix round after the review of #7306

Head commit: 4b4c70553a88ea54028e38a9ff4b1454a4e0e922. Each fix has a test that failed before the fix.

# Fix Test
1 A URL of the item text that urlsplit refuses with ValueError names no page: urls_in_order (page_fetch.py) leaves it out. So no such URL stops the step, the check or the page fetch. tests/roadmap/test_roadmap_page_fetch.py::test_a_url_that_the_url_parser_refuses_is_no_named_url (4 cases), tests/roadmap/references/test_reference_step.py::test_a_url_of_the_item_text_that_the_url_parser_refuses_does_not_stop_the_step, tests/roadmap/test_roadmap_alternatives_references.py::test_a_url_that_the_url_parser_refuses_leaves_the_verdict_of_a_skip_class_and_of_an_item
2 The bound has no race: the work runs in a daemon thread, and the caller reads its result after join. A project error raises in the caller. Another error ends the thread, which reports it, and the step gives no link. The thread cannot hold the interpreter at its exit. test_reference_step.py::test_an_error_of_the_work_that_is_no_project_error_gives_no_link_and_no_error, ::test_the_work_of_the_step_runs_in_a_daemon_thread_that_cannot_hold_the_interpreter, ::test_a_provider_that_does_not_answer_stops_the_step_at_its_bound
3 Each query passes the guard of the web search (ai/web_search._guard), as the text of the item and as the plain words, before a provider and before the decision point. A refused query is dropped and counted (provider="step", result="refused"). tests/roadmap/references/test_reference_queries.py::test_a_query_that_the_guard_of_the_web_search_refuses_reaches_no_provider
4 One context manager turns the named errors of the MCP libraries into RoadmapMcpUnavailableError at the connection, the tool listing, a call, the answer and the close. The connection and the tool listing have the bound of a tool call. open_providers guards the close. A provider that fails at a call leaves the run. tests/roadmap/references/test_reference_mcp_provider.py::test_a_server_whose_tool_listing_answers_with_an_error_leaves_the_run, ::test_a_tool_listing_that_does_not_answer_in_the_bound_of_a_tool_call_is_unavailable, ::test_a_failed_call_ends_the_connection_and_the_provider_leaves_the_run, ::test_a_connection_that_fails_at_its_close_does_not_stop_the_run, ::test_an_answer_with_a_url_that_the_url_parser_refuses_gives_its_other_file_links, tests/roadmap/references/test_reference_providers.py::test_an_optional_provider_that_fails_at_its_close_does_not_stop_the_run
5 A documentation page is requested as the search gave its URL, with no redirect followed, and one item reads at most 3 pages. test_reference_step.py::test_a_documentation_page_is_requested_as_its_source_gave_it, ::test_the_step_reads_at_most_3_documentation_pages_and_keeps_its_other_fact_reads, test_roadmap_alternatives_references.py::test_a_documentation_page_of_a_directory_is_read_as_the_search_gave_its_url
6 A failed step is not a step with no link (References.complete). The check writes the links only in mode on, for a complete step or a step with a link. Else the block and alternatives.refs stay as they are, also in mode plan and mode off. test_roadmap_alternatives_references.py::test_a_failed_step_in_mode_on_keeps_the_links_of_the_earlier_check, ::test_a_recheck_in_mode_plan_or_off_leaves_the_links_of_the_block_and_of_the_record (2 cases)
7 The code gate tests the suffix of a path against a prose list, so .c, .h, .pl, .bat and .ksh are code. test_reference_step.py::test_a_source_file_that_a_media_type_table_reads_as_plain_text_is_a_code_hit (6 cases)
8 The line of a link counts line feeds only. test_reference_step.py::test_the_line_of_a_link_counts_line_feeds_only_as_github_counts_them
9 A hit whose path has an empty segment, . or .. is dropped for each provider, before a read or a link. test_reference_step.py::test_a_prose_file_and_a_path_with_an_empty_or_a_dot_segment_cost_no_read (9 cases)
10 One search is one request of one page. tests/roadmap/stores/test_roadmap_github_store_reference_search.py::test_one_search_is_one_request_when_a_short_page_links_a_next_page, ::test_a_search_answer_that_holds_no_list_of_results_raises_the_read_error
11 The dry run lists the MCP tool call and the decision model call when they are configured. tests/roadmap/test_roadmap_dry_runs.py::test_the_alternatives_dry_run_lists_the_mcp_and_the_decision_requests_when_configured

Also in this round:

  • A query that the optional MCP provider fails goes to the GitHub code search, inside the 3 code searches of the item (test_reference_providers.py::test_a_query_that_an_optional_provider_fails_goes_to_the_github_code_search).
  • k8s/devops/configmap.example.yaml holds references: plan in its alternatives block. The k8s row passes: k8s/devops is a product folder, and my earlier statement that the freeze refuses it was wrong.
  • The documents and the spec state both bounds: at most 3 permalinks and at most 3 documentation links. The living spec roadmap-alternatives holds 80 requirements, which is its limit.
  • The change adds no blind except, and the swallowed-failures row passes with the same ceilings.

Checks in the devcontainer

Command Result
uv run devops ci --check --only lint,format,docs,deps,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures,k8s Each row passed.
uv run devops ci test on the covering files and folders 2219 passed, before the last test was added. That test file then passed alone (15 passed).
uv run mypy on the 21 changed source files No issue.
uv run devops ci fail-to-pass --base origin/main Exit 0. On the base, 9 test files error at collection and 27 changed tests fail. 384 tests pass on the base.

The first push of this round (20a20c8cf) failed the deps row of Static Analysis: the provider imported the error class from mcp, which is a transitive dependency. The import now comes from fastmcp, which gives the same class as McpError, and the row passes. The earlier local runs did not include that row.

On the head commit, each of the 29 checks of this pull request passes, Static Analysis, Tests & Coverage and Analyze (python) included.

Not proven

  • No request went to deps.dev, to grep.app or to a documentation host. The first live read is the proof of mode plan after the release.

@dan-petty

Copy link
Copy Markdown
Owner Author

Second review of the coordinator, 2026-11-26, at 4b4c705.

  • The blocker is fixed at its cause. Probe on this head: urls_in_order gives only https://docs.python.org/3 for a text that also holds https://[cluster-ip]:6443/healthz, http://[{host}]:{port}, https://[::1 and https://example.com:8080. The same change corrects the page-fetch path that main has today.
  • Each other finding of the first review has a fix and a test that failed first (list in the comment of the builder above). The three main test files pass here (92 passed), and each of the 29 checks of the head is green.
  • The living spec roadmap-alternatives now holds 80 requirements, which is its limit. feat(roadmap): the alternatives check reads the brain digest #4682 must move its requirements to a nested capability.

Pending after the release: the live proof of mode plan on 5 items of the stage window, with the result lines and the points of devops_cli_brain_references_total. No request went to deps.dev, to an MCP server or to a documentation host in a test, so that run is the first real one.

@dan-petty
dan-petty marked this pull request as ready for review November 26, 2026 17:18
@dan-petty
dan-petty merged commit 15bc4af into main Nov 26, 2026
29 checks passed
@dan-petty
dan-petty deleted the feat/4672-link-reference-implementations branch November 26, 2026 17:24
dan-petty-release Bot added a commit that referenced this pull request Nov 26, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.223.0](v0.222.0...v0.223.0)
(2026-11-26)


### Features

* **roadmap:** keep alternatives results in a brain index
([#7320](#7320))
([ef01e07](ef01e07))
* **roadmap:** link reference implementations in each checked item
([#7306](#7306))
([15bc4af](15bc4af))


### Code Refactoring

* **k8s:** delete the environment files from devops-cli
([#7317](#7317))
([66cb933](66cb933)),
closes [#7290](#7290)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(roadmap): link reference implementations in each checked item

1 participant