Skip to content

feat(roadmap): add tests and callers of cited symbols to context - #3178

Merged
dan-petty merged 6 commits into
mainfrom
feat/3012-the-stage-context-holds-the-callers
Nov 2, 2026
Merged

dan-petty merged 6 commits into
mainfrom
feat/3012-the-stage-context-holds-the-callers

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

The stage and refine context now lists, for each symbol an item cites, the Python test files and caller files that name it. It shows at most 50 paths for each symbol, tests first, and says how many it left out. It also names the requirements of the base specs that cover a cited file, by the name of the module or by a spec that names the path. Both come before the cited code, so the budget cut keeps them.

The sections add about 1,200 tokens for the issue itself and at most about 5,000 in the worst case.

Closes #3012

Change: openspec/changes/archive/2026-11-02-3012-the-stage-context-holds-the-callers/

🤖 Generated with Claude Code

https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW

…cited symbol

Failing tests for #3012: the tests and callers of a cited symbol, the bound on its paths, the requirement names of the specs of a cited file, and the token budget. The git fake answers git grep -l.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
…cited symbol

collect_context lists, for each cited identifier, the Python test files and caller files that name it, at most 50 paths with a note of the cut, and the requirement names of the specs that cover a cited file. Both come before the cited code.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
@dan-petty dan-petty changed the title docs(openspec): plan #3012 x feat(roadmap): add tests and callers of cited symbols to context Nov 2, 2026

Copy link
Copy Markdown
Owner

This pull request now delivers #3012. The staged plan (placeholder "x") is replaced by the full change, archived in the last commit.

Token cost (body of #3012 on this checkout, count_tokens): the new sections add 1,178 tokens (symbol sections 685, roadmap-refine requirement names 492) to a context of 68,593 tokens, which holds two whole cited files. Worst case: 5 symbols x 50 paths and 5 specs x 40 names, about 5,000 tokens. Full table in design.md.

Fail-to-pass (devops ci fail-to-pass --base origin/main, exit 0): three new tests fail on the base, test_a_cited_symbol_brings_its_tests_and_its_callers, test_the_paths_of_one_symbol_are_bounded_and_the_cut_is_noted and test_a_cited_file_brings_the_requirement_names_of_its_capability. All pass with the change. The command also lists 54 failures and 54 errors in tests/roadmap/test_roadmap_refine.py that fail the same way on the base and on this branch ("host path reached without a fake" and "network edge reached without a fake", from the sandbox of the agent worktree), so they are not caused by this change.

Premise (see ## Feasibility): the issue says the project already maps a file to a capability. It does not. The change defines the mapping from the module name, or from a spec that names the path. That covers about 6 % of the modules, so a follow-up is noted in tasks.md (a file list in each spec).

Checks run: ruff check, ruff format, mypy src/devops_cli/roadmap/refine.py, devops openspec check and devops openspec archive pass. The full devops ci was not run. The issue names tests/roadmap/test_refine.py; the file is tests/roadmap/test_roadmap_refine.py.


Generated by Claude Code

@dan-petty
dan-petty marked this pull request as draft November 2, 2026 12:38
@dan-petty
dan-petty marked this pull request as ready for review November 2, 2026 12:48
@dan-petty
dan-petty merged commit 6f648d5 into main Nov 2, 2026
22 checks passed
@dan-petty
dan-petty deleted the feat/3012-the-stage-context-holds-the-callers branch November 2, 2026 12:50
dan-petty pushed a commit that referenced this pull request Nov 2, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.42.0](v0.41.0...v0.42.0)
(2026-11-02)


### Features

* **roadmap:** add tests and callers of cited symbols to context
([#3178](#3178))
([6f648d5](6f648d5))
* **roadmap:** the stage job verifies its plan with a model
([#3182](#3182))
([fd0cc2f](fd0cc2f))


### Bug Fixes

* **roadmap:** the stage job refuses an unneeded spec delta
([#3177](#3177))
([0c09a3a](0c09a3a))

---
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(roadmap): the stage context holds the callers and tests of each cited symbol

2 participants