Skip to content

docs(openspec): fix plan #2371 measure first, no preload - #3045

Merged
dan-petty merged 4 commits into
mainfrom
docs/2371-fix-plan
Nov 1, 2026
Merged

dan-petty merged 4 commits into
mainfrom
docs/2371-fix-plan

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

This pull request corrects the plan for #2371 in place. The Service staged the plan in #2986. An evaluation of that pull request found defects.

The old plan built a session fixture that imports the heavy modules once per worker. Collection already imports pydantic_ai, anthropic, kubernetes and textual in every worker. So the fixture did nothing. A fixture also cannot lower the total CPU time, because it only moves an import.

The corrected plan measures first. It splits the CPU time of each worker over three runs and ranks the first imports. Then it applies the one candidate with the largest share. It stops when no candidate reaches 5%. It fixes the verify commands and adds stop rules for a runner pod and for a large change.

The change touches only the change folder of #2371. It changes no code and no test.

Plans #2371

The first plan built a session fixture that imports four heavy modules. The collection of every worker already imports them, and a fixture cannot lower total CPU time. The plan now measures the split of three idle runs, ranks the first imports, and applies the candidate with the largest share. It has no spec delta and sets skip_specs.
@dan-petty dan-petty added type/docs Type docs: a change to the documents scope/openspec OpenSpec changes, specs and their checks labels Nov 1, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Changes

  • The plan no longer builds a preload fixture. It measures first, then applies the candidate with the largest share (stop rule at 5%).
  • Task 3.1 verify command no longer names tests/support. Task 3.1 runs uv run devops ci test-settings for check_test_settings.py.
  • design.md says why tasks 1.1 and 1.3 use plain uv run pytest -p workersplit: they are measurement runs, and devops ci test cannot load a scratch plugin.
  • proposal.md Feasibility names fix(k8s): bound the test workers and log the command of a step #2809 (PYTEST_XDIST_AUTO_NUM_WORKERS=2 in the runner pod). Task 1.3 stops and names an open point when the host has fewer than 16 CPUs or runs in a runner pod.
  • Group 3 has a cap of 5 files under git. If the chosen row needs more, the implementer returns the item for a split with the figures of group 2.

Evaluation findings (PR #2986)

Confirmed and fixed:

  • major: tests/support in the 3.1 verify command. devops ci test refuses a directory with no test module.
  • minor: undocumented bare uv run pytest -p workersplit. Confirmed: devops ci test has no option for -p.
  • minor: fix(k8s): bound the test workers and log the command of a step #2809 missing from Feasibility. Confirmed: k8s/devops/cronjob-runner.yaml:72 and k8s/README.md:621.
  • minor: group 3 had no bound. Confirmed: 43 test modules import the heavy libraries at the top level, and tests/conftest.py is 47 KB.

Unconfirmed: none. The preload-fixture defect was confirmed by a sys.modules check after collection.

Verification

  • openspec validate --strict: valid.
  • uv run devops openspec check: passed.
  • uv run pytest tests/invariants/test_change_folders.py -n 0 -q: 16 passed.
  • Pre-commit and pre-push hooks ran with no bypass. origin/main was merged before the push. No force-push.

@dan-petty
dan-petty marked this pull request as ready for review November 1, 2026 13:13
@dan-petty
dan-petty merged commit 613cd4b into main Nov 1, 2026
19 checks passed
@dan-petty
dan-petty deleted the docs/2371-fix-plan branch November 1, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/openspec OpenSpec changes, specs and their checks type/docs Type docs: a change to the documents

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant