Skip to content

docs(openspec): plan #5272 Require cuts for shadow and time each decision - #5390

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

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

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #5272

The decision point framework of ADR 0020 has four gaps. A point in shadow loads with no cuts file, so each decision becomes a fallback that looks like a failed request. decide raises RuntimeError inside a running event loop. A decision holds no time and no failure class. The registry refuses a catalogue above 60 series while ADR 0020 section 7 allows 92. This change makes shadow need a cuts file, sends the request on the anyio blocking portal of decide_with_jev, adds adecide, the duration histogram and the failed counter with six classes, and sets the bound to 92. It records the dated model that answered. It updates the telemetry, configuration and environment-variable documents, the roadmap limits table, and the Status History of ADR 0020, whose body stays as it is.

Change: openspec/changes/5272-decision-points-need-cuts-for-shadow/

@devops-cli-service devops-cli-service Bot added type/docs Type docs: a change to the documents scope/openspec OpenSpec changes, specs and their checks verdict/fix-plan Verdict Needs fix of a plan: an open finding keeps the plan in draft until a fix labels Nov 13, 2026
@devops-cli-service

Copy link
Copy Markdown
Contributor Author

The stage_ready row leaves pull request #5390 a draft. It holds the label plan/needs-fix, because the model review of its plan found an open finding. Fix the plan, or remove the label when the finding is no defect.

dan-petty added a commit that referenced this pull request Nov 13, 2026
The step fix-plan failed at the trace gate on #5390 (3 gate returns, 2.4M
tokens). Two defects caused it:

- The repair had no trace of the run that wrote the head, so the gate
  judged each kept Feasibility sentence with the reads of the repair only.
  The gate now gets the sentences of the head as judged and does not judge
  them again. A sentence that a reply adds or changes is judged with the
  reads of the repair, so a citation of a file that no run read stays
  refused.
- The gate took `read_file <path> <start> <end>` as one path, so it
  refused the claim also when the run read the file. The gate now removes
  the line numbers after the path of a toolbox tool span.

Refs #5391.
dan-petty added a commit that referenced this pull request Nov 13, 2026
The Job log of #5390 holds no tool arguments, so the tests do not say that the run read no file. The docstring of _citation names the forms in the order that the code reads them.
dan-petty added a commit that referenced this pull request Nov 13, 2026
…ead (#5400)

The fix-plan Job on #5390 failed at the trace gate after 3 gate returns
and 2.4M tokens, before the review of the head. Two defects caused it.

The trace gate of a repair judged each Feasibility sentence of each
reply with the reads of the repair only, because no trace of the run
that wrote the head is in the process. Now `revise` gives the sentences
of the head to the gate as `judged`. The gate of the run that wrote the
head passed them, so the gate does not judge them again. A sentence that
the repair adds or changes is judged with the reads of the repair, so a
citation of a file that no run read stays refused.

The gate took the path of a span `read_file <path> <start> <end>` as all
the text after the tool name, so it refused the claim also when the run
read the file. Now `_citation` removes the start and end line after the
path of a toolbox tool span.

Closes #5391

Change: `openspec/changes/archive/2026-11-13-5391-fix-plan-stage-reads/`
dan-petty added a commit that referenced this pull request Nov 13, 2026
A person can now start one named fix-plan attempt within the 6-hour
wait. `devops roadmap step fix-plan --skip-wait` needs `--confirm` and
one of `--item` or `--pull`. The cap of 2 attempts on a head and the cap
of 3 revisions stay. The Service never passes the flag, so its row and
its Jobs keep the wait.

Each attempt records its release in `fix_plan.version`. With
`--skip-wait`, a head with 2 counted attempts from an older release, or
with no release, gets one more attempt, and the run logs why. A new
release can fix the cause of those attempts, as #5409 did for the head
of #5390.

A killed attempt now has a class. SIGTERM after the time budget is
`deadline`: the attempt counts and logs `result=timeout` with
`kill=deadline`. SIGTERM before the budget, and a stop of the Service,
is `evicted`: the first 3 on a head do not count. The command exits 75
after an eviction and 143 after a deadline kill.

Closes #5413

Change: `openspec/changes/archive/2026-11-13-5413-fix-plan-skip-wait/`
@dan-petty
dan-petty force-pushed the fix/5272-decision-points-need-cuts-for-shadow branch from 8d08977 to 23fb722 Compare November 13, 2026 17:11
@dan-petty

Copy link
Copy Markdown
Owner

The revision at 922e6cd resolves the 3 open findings of the review of 8d08977. The label plan/needs-fix stays until an independent review confirms this, because without the label the Service row stage_ready marks a green draft ready. The pull request stays a draft.

The branch holds the latest origin/main. Two new commits change only the change folder openspec/changes/5272-decision-points-need-cuts-for-shadow/.

Finding How the revision resolves it
criterion_dropped at groups: no group changes the cuts-model check, and decision 14 keeps the class out. New group 8, "Give the fallback for a cuts file of another model". Test 8.1 writes cuts of typesafe/jev-1.13, uses ai.decision_model typesafe/jev-1.14, and asserts the fallback, the band none, no request and one count with error equal to model_mismatch. Task 8.2 adds CutsModelMismatchError, loads the cuts before the request and compares their model with the model in use. The spec delta of decision-workflows adds the requirement "A cuts file of another model gives the fallback" with 2 scenarios. Decision 14 is replaced by 3 decisions for the check. The ## Criteria section now gives the group of each sub-criterion of criterion 1: the cuts-model criterion is group 8, and the dated model is group 7.
false_premise at rejected: the plan says that the issue names 6 classes. The finding is correct: the issue names 7 classes, with model_mismatch. The rejected alternative "Add a seventh failure class" is removed. The failed counter now has 7 classes and a bound of 7 series in design.md, in the spec deltas of decision-workflows and metric-instruments, and in tasks 3.2, 6.2 and 9.1. The Feasibility lines that said "six classes" and "four gaps" now quote the fixed set of the issue.
false_premise at dependencies: #5355, #5357, #5367 and #5377 are merged. The finding is correct. The 4 entries are removed. A read of the files of each open pull request found no file of this change, so ## Dependencies says that no open pull request changes a file of this change. The entry for the metric devops_cli_decision_point_total stays.

Other changes of the revision:

  • The groups 8 to 12 are now the groups 9 to 13. The Feasibility lines name the new numbers.
  • 4 cited lines of Feasibility moved on origin/main (constants.py, instruments.py, decision_point.py, settings.py). The citations now name the correct line numbers.
  • The check compares the model of the cuts file with the model target of ai.decision_model: the name after a provider prefix such as litellm:, or the whole name. Reason: is_decision_model_name accepts the gateway route litellm:typesafe/jev-1.14, and the decision model sends the target to the endpoint (src/devops_cli/ai/pydantic_ai_bridge.py:135). A compare of the whole name makes each decision of such a configuration a fallback. A second scenario and the second case of test 8.1 cover this. No finding needs an owner decision.

Checks on the pushed head 922e6cd:

  • uv run devops roadmap plan-check 5390: no problem. The CI job Plan Check and all other required checks pass.
  • openspec validate 5272-decision-points-need-cuts-for-shadow --strict: valid.

devops-cli-service Bot and others added 4 commits November 13, 2026 18:01
Add group 8: a cuts file of another model gives the fallback and counts the class model_mismatch, as the acceptance criteria of #5272 ask. The failed counter holds seven classes. Remove the four merged pull requests from Dependencies. Map each sub-criterion to its group.
@dan-petty
dan-petty force-pushed the fix/5272-decision-points-need-cuts-for-shadow branch from 922e6cd to dc2c397 Compare November 13, 2026 18:03
@dan-petty

Copy link
Copy Markdown
Owner

Bottom line: every review finding is resolved at dc2c397. All checks pass. I remove plan/needs-fix and mark this pull request ready. A person merges it.

Revision dc2c397 (rebased onto main 2bdc9a2) resolves the findings of the independent review of 922e6cd:

  1. Task 8.2 named a shared step that runs after the request. The only step that _resolve and _aresolve share in the plan is the band helper of task 5.2, which runs after the request. Resolution: task 8.2 now says "Add a helper that _resolve and _aresolve call after the rule step and before decide_all or adecide_all. It loads the cuts and raises CutsModelMismatchError when their model differs from the model target of the chain". The rest of the task stays.
  2. The target compare did not name the short Jev names. is_decision_model_name also accepts jev-1.14 and typesafe:jev-1.14, whose target is jev-1.14. Resolution: the design decision "Compare the model of the cuts file with the model target" now states that such a short name is a mismatch against cuts of typesafe/jev-1.14 on purpose. The chain cannot prove that a short name on an endpoint serves the model that the cuts were fitted for. A mismatch sends no request, and the message decision_point_cuts_model names the two models, so the operator sets the full name. The live setting is typesafe/jev-1.14 with no prefix, so it is no mismatch. The plan adds no name mapping.
  3. Citations moved after feat(roadmap): make the attempt limits of the failing jobs settings #5490. Resolution: src/devops_cli/config/constants.py:3947 is now :3884, and src/devops_cli/config/settings.py:1494 is now :1667. The citation src/devops_cli/config/settings.py:768 in design.md also moved, and is now :786. Each path:line:text citation matches main again. The Dependencies line "No open pull request changes a file of this change" is still true: the open pull requests docs(openspec): plan #1928 Rank the benchmark with numpy and pytrec_eval #5422, docs(openspec): plan #2176 Settle the 26 audit rows by mutation runs #5449, docs(openspec): plan #4472 name the replaced selection test #5463, docs(ai): add the agentic jobs guideline and the job decisions #5489 and docs(k8s): add the Kubernetes guideline and the capacity decisions #5492 change no file of the Impact list.
  4. Dependencies did not name docs(adr): one decision-model record supersedes ADR 0019 and ADR 0020 #5239. Resolution: ## Dependencies now says that open issue docs(adr): one decision-model record supersedes ADR 0019 and ADR 0020 #5239 plans one decision-model record that supersedes ADR 0019 and ADR 0020. If it merges first, group 13 adds its Status History line to the record that supersedes ADR 0020, and the shadow rule of group 1 must agree with that record.

The 3 findings of the stage review (criterion_dropped at groups, false_premise at rejected, false_premise at dependencies) stay resolved, as the comment #5390 (comment) lists.

Checks on dc2c397:

@dan-petty dan-petty removed the verdict/fix-plan Verdict Needs fix of a plan: an open finding keeps the plan in draft until a fix label Nov 13, 2026
@dan-petty
dan-petty marked this pull request as ready for review November 13, 2026 18:16
@dan-petty
dan-petty self-requested a review as a code owner November 13, 2026 18:16
@dan-petty
dan-petty merged commit 2a524e0 into main Nov 13, 2026
22 checks passed
@dan-petty
dan-petty deleted the fix/5272-decision-points-need-cuts-for-shadow branch November 13, 2026 18:19
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