Skip to content

fix(roadmap): Require cuts for shadow and time each decision - #5528

Merged
dan-petty merged 19 commits into
mainfrom
fix/5272-decision-points-need-cuts-for-shadow
Nov 14, 2026
Merged

dan-petty merged 19 commits into
mainfrom
fix/5272-decision-points-need-cuts-for-shadow

Conversation

@devops-cli-service

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

Copy link
Copy Markdown
Contributor

A decision point in shadow mode now needs a cuts file, as on does. The decision code runs from async code: adecide serves an async caller, and decide uses the one Jev portal of the process.

Each decision records its time in devops_cli_decision_point_duration_seconds, and each failure counts its class in devops_cli_decision_point_failed_total (timeout, model_error, parse, model_mismatch, other). The record keeps the dated model name. A cuts file of another model version gives model_mismatch and sends no request. Every failure gives the fallback; an error that no known class names logs its trace through the masking log bridge. FailureClass.SECRET is now SENSITIVE_DIGEST, with the label value secret.

Closes #5272

Change: openspec/changes/archive/2026-11-14-5272-decision-points-need-cuts-for-shadow/

@devops-cli-service
devops-cli-service Bot force-pushed the fix/5272-decision-points-need-cuts-for-shadow branch 5 times, most recently from 831b18d to 5c5fe79 Compare November 13, 2026 19:51
@devops-cli-service
devops-cli-service Bot force-pushed the fix/5272-decision-points-need-cuts-for-shadow branch 2 times, most recently from 49d7e4d to 0663341 Compare November 14, 2026 00:29
@devops-cli-service

Copy link
Copy Markdown
Contributor Author

The steps of the job:

Step Status Attempts Tokens in/out Last failing command
group 10 done 1 1808418/12552 pytest on base: tests/roadmap/test_roadmap_decision_point.py
group 11 done 1 518755/2309 -
group 12 done 1 693739/3804 -
group 13 done 1 1286459/4291 -
  • scoped check pre-push: passed, 8 s
  • scoped check static: passed, 24 s
  • scoped check tests: passed, 29 s
  • scoped check tests: the changed files select more than 30 test modules, so only the changed test modules ran. The required checks of CI run the others
  • fail-to-pass of group 10: fails on the base commit. Tests that fail on the base commit: tests.roadmap.test_roadmap_decision_point::test_one_counter_counts_the_decisions_and_states_the_bound_of_the_catalogue, tests.roadmap.test_roadmap_decision_point::test_the_registry_accepts_a_catalogue_at_the_bound_and_refuses_one_above_it.
  • verify of group 11: uv run devops ci test tests/roadmap/test_roadmap_limit_classes.py exits 0.
================================================================================================================== test session starts ===================================================================================================================
platform linux -- Python 3.14.10, pytest-9.2.0, pluggy-1.7.0
rootdir: /home/devops/.data/agent/worktrees/w-5272
configfile: pyproject.toml
plugins: xdist-3.8.0, cov-7.1.0, asyncio-1.4.1.post1, hypothesis-6.170.15, syrupy-7.0.0, time-machine-3.6.0, mock-3.17.0, anyio-4.16.0, platformdirs-4.14.5, timeout-2.4.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
timeout: 600.0s
timeout method: signal
timeout func_only: False
collected 41 items

tests/roadmap/test_roadmap_limit_classes.py .........................................                                                                                                                                                              [100%]

=================================================================================================================== 41 passed in 0.52s ===================================================================================================================
Bytecode compiled 19311 files in 481ms
Bytecode compiled 19311 files in 451ms
/home/devops/.data/agent/worktrees/w-5272/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
  • verify of group 12: uv run devops ci docs exits 0.
\u2139 Quality gate root: /home/devops/.data/agent/worktrees/w-5272
\u2713 All documentation files are up to date.
Bytecode compiled 19311 files in 438ms
Bytecode compiled 19311 files in 461ms
  • verify of group 13: uv run devops ci test tests/invariants/test_adr_records.py exits 0.
================================================================================================================== test session starts ===================================================================================================================
platform linux -- Python 3.14.10, pytest-9.2.0, pluggy-1.7.0
rootdir: /home/devops/.data/agent/worktrees/w-5272
configfile: pyproject.toml
plugins: xdist-3.8.0, cov-7.1.0, asyncio-1.4.1.post1, hypothesis-6.170.15, syrupy-7.0.0, time-machine-3.6.0, mock-3.17.0, anyio-4.16.0, platformdirs-4.14.5, timeout-2.4.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
timeout: 600.0s
timeout method: signal
timeout func_only: False
collected 2 items

tests/invariants/test_adr_records.py ..                                                                                                                                                                                                            [100%]

=================================================================================================================== 2 passed in 0.93s ====================================================================================================================
Bytecode compiled 19311 files in 449ms
Bytecode compiled 19311 files in 487ms
/home/devops/.data/agent/worktrees/w-5272/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
  • verify of group 13: uv run devops ci docs exits 0.
\u2139 Quality gate root: /home/devops/.data/agent/worktrees/w-5272
\u2713 All documentation files are up to date.
Bytecode compiled 19311 files in 457ms
Bytecode compiled 19311 files in 485ms

@devops-cli-service devops-cli-service Bot added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 14, 2026
devops-cli-service Bot and others added 18 commits November 14, 2026 02:36
…e secret class (#5272)

The swallowed-failures row of devops ci refuses the broad except of
decide and adecide, and Bandit B105 refuses the member SECRET of
FailureClass. Add group 14, which catches FAILED first and logs the
trace of an error that no class names, and group 15, which renames the
member and keeps the label value secret.
decide and adecide caught Exception for every error, so the
swallowed-failures row of devops ci found two blind excepts in
decision_point.py over a ceiling of zero. Catch FAILED first: a known
error logs its line with no trace. An error that no class names is a
defect, so its except clause logs the same line with exc_info. Both
give the fallback and count the class of the error.
Bandit B105 read the member SECRET of FailureClass as a hard-coded
password, so the security row of devops ci failed. The string is a
label of the failed counter. Rename the member to SENSITIVE_DIGEST and
keep the label value secret that the spec names.
@dan-petty
dan-petty force-pushed the fix/5272-decision-points-need-cuts-for-shadow branch from b24f093 to 2ac3d6b Compare November 14, 2026 02:37
@dan-petty

Copy link
Copy Markdown
Owner

Static Analysis fix for head b24f093 (job 132277515707). The new head is 2ac3d6b. It holds origin/main 3d6cae6 (release 0.136.0) and has no merge commit. The archive commit is the last commit.

Causes and fixes

  • security (Bandit B105 at src/devops_cli/roadmap/decision_step.py:81): Bandit reads SECRET = "secret" as a hard-coded password because of the member name. The member is now FailureClass.SENSITIVE_DIGEST. The label value stays secret, as the spec names it, so no metric changes. A # nosec is not possible, because src already holds the 10 comments that the ratchet ceiling allows.
  • swallowed-failures (Ruff BLE001 at decision_point.py:279 and :293): decide and adecide now catch FAILED first, and an error of FAILED logs its line with no trace. A second except Exception logs the same line with exc_info, because an error that FAILED does not name is a defect. Both paths give the fallback and count the class, so the behavior of the spec does not change. The log bridge masks secrets in a trace (src/devops_cli/telemetry/logging_bridge.py:121).
  • Plan: design.md records both decisions and the two rejected alternatives. tasks.md has groups 14 and 15 and one criteria line. The new test test_an_error_that_no_class_names_logs_its_trace fails on b24f093 (no record holds a trace) and passes now.

No ceiling, threshold, baseline, nosec or noqa changed.

Review changes

  • tasks.md 14.1 and the criteria line said "a model that raises" and "a request that the timeout ends". The test uses a rule that raises and a cut that the model does not answer. The plan now names what the test does.
  • The comments and the docstrings said "an error that no class names". UserError and DevOpsCLIError are in FAILED but have the class other, and they log no trace. The text now says "an error that FAILED does not name".

Checks

  • uv run devops ci --check --no-cache --only security,swallowed-failures,lint,format,typecheck,openspec: all 7 rows pass.
  • uv run devops ci test on the 6 changed test files: 168 passed.
  • No active devops-cli-runner Job had --item 5272 before the push. The push used --force-with-lease against b24f093.

The PR stays a draft.

@dan-petty
dan-petty marked this pull request as ready for review November 14, 2026 04:08
@dan-petty
dan-petty self-requested a review as a code owner November 14, 2026 04:08
@dan-petty
dan-petty merged commit d901b6a into main Nov 14, 2026
30 checks passed
@dan-petty
dan-petty deleted the fix/5272-decision-points-need-cuts-for-shadow branch November 14, 2026 04:26
dan-petty pushed a commit that referenced this pull request Nov 14, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.137.0](v0.136.2...v0.137.0)
(2026-11-14)


### Features

* **roadmap:** audit command lists and checks test registry declarations
([#5611](#5611))
([798ca91](798ca91))


### Bug Fixes

* **roadmap:** Require cuts for shadow and time each decision
([#5528](#5528))
([d901b6a](d901b6a))

---
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/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): decision points need cuts for shadow and run in async code

1 participant