Repository navigation
Description
Problem or Motivation
Child 5 of the ADR modernization (#5233). Decision. Rule 7 becomes 'Jev is never the security boundary' (owner direction of 2026-11-12), rule 4 allows a prior cut in shadow mode only, and 'fail open' becomes 'fail back'. It waits for the owner's approval at the merge.
The review of each record that this item changes:
- ADR 0019 (supersede (merge with 0020 into the decision-model record)): Rules 1-3 and 5 hold. Rule 4 relaxes to a prior cut in shadow mode only. 'Fail open' becomes 'fail back to the current behavior', and rule 7 becomes 'Jev is never the security boundary'.
- ADR 0020 (supersede (merge with 0019 into the decision-model record)): The resolver chain holds, but only 1 of the 8 catalogue points is registered. The catalogue moves to a reviewed file with bars that are written before the data. Decision logs keep hashes, not command text, and implement.extension gets Jev in shadow beside its rule.
Proposed Solution & Architectural Design
A new record. The catalogue moves to one reviewed file that gives the bar of each point, and a test checks that each registered point has an entry. A test refuses a cut constant for a registered point, or the record drops that claim. Rename test_a_failed_request_raises_so_the_step_can_fail_open, and move 34 citation lines. A separate code issue registers implement.extension, with Jev in shadow beside its rule.
Rules of the ADR process (docs/adr/README.md, #5225) that apply:
- Supersession: the new record sets 'supersedes', and the same PR sets status and 'superseded-by' on the old record. The test fails on a link that goes only one way. The new record restates each rule and each rejected option that still holds, because the alternatives check drops superseded records. Never amend a superseded record. After a third amendment, or when a body contradicts the code, the next change is a supersession.
- Length: the body of a new record has 1,000 words or fewer, its title has 10 words or fewer, and its slug has 60 characters or fewer. Designs, catalogues, row tables, cutover plans, caps and measurements go to OpenSpec changes and specs, to settings or to docs, with a link under More Information.
- Use one Considered Options section. Each bullet ends with 'chosen.', 'rejected, because .' or 'deferred until .'. 'Deferred' does not match the rejected regex (adr.py:49), so the check stops refusing on a premise that changed. Each record has a Confirmation section that names its test, CI row or metric, and an optional tracker key.
- Code, tests and workflows cite the record in force. A test fails on a citation of a superseded record in src/, tests/ and .github/ (archived changes and CHANGELOG.md are history). Each superseding PR moves the citations of the records that it supersedes. Rename sweeps do not change docs/adr/.
- Merge ADR changes in batches. Each change of the ADR set changes adr_hash (alternatives.py:634-644, 1006) and makes every checked item due again. So all pure status changes go in docs(adr): add MADR front matter, a Status History and the ADR rules #5225, and the record PRs merge one at a time in the planned order.
- Keep the fix(roadmap): the ADRs in force fill the alternatives ADR budget #5049 budget test. A new record must fit in the tokens that the records it supersedes free. Short option bullets keep the budget, because options are 6,883 of the 8,464 tokens today.
Keep these constraints on purpose. The review found a reason for each one:
- ADR 0019, fitted cuts before 'on': check_modes enforces it, and guessed cuts failed in feat(roadmap): a Jev completeness check for draft pull requests #4320 and feat(roadmap): Jev decides the labels of an intake proposal #4323.
- ADR 0019 rule 7 core, a deterministic boundary must hold for each outcome that Jev can choose: the runner pod still gets the project credentials from a Kubernetes Secret (feat(roadmap): test sandboxd and add the shell command backend #3694 and feat(roadmap): add the three-container runner Job, policy and log reads #3700 are open).
- ADR 0020, decision logs keep hashes and counts, not command text: a secret run as a command would reach Loki (feat(roadmap): Allow read pipes to a table of allowed programs #3520). Bars stay written before the data.
The owner merges this pull request.
Target Subsystem
docs/adr/, the decision-point catalogue file and its test; citation lines in src/ and tests/.
Existing Tool Considered
MADR 4 and the rules of docs/adr/README.md (#5225). No new tool.
Acceptance Criteria
- A new record supersedes ADR 0019 and ADR 0020. Rule 7 is 'Jev is never the security boundary', rule 4 allows a prior cut in shadow mode only, and 'fail open' is 'fail back to the current behavior'.
- The catalogue is one reviewed file that gives the bar of each point, and a test checks that each registered point has an entry.
- A test refuses a cut constant for a registered point, or the record drops that claim.
-
test_a_failed_request_raises_so_the_step_can_fail_openhas a new name, and the 34 citation lines move. - A separate code issue is filed: register
implement.extension, with Jev in shadow beside its rule. - The index and link tests of docs(adr): add MADR front matter, a Status History and the ADR rules #5225 pass, and the fix(roadmap): the ADRs in force fill the alternatives ADR budget #5049 budget test passes: the alternatives check fits every record in force under its cap.
Dependencies
Related
- Tracker: docs(adr): track the ADR modernization #5233. Review source:
docs/adr/at e413c40.
Source: #5233
Alternatives check of 2026-11-16: not-applicable.
Class: docs, no search.
Tool: none found.
Proposed design
Problem statement
ADR 0019 and ADR 0020 hold the decision model in two records. The owner direction of 2026-11-12 changes rule 7, rule 4 and the term 'fail open'. One new record, ADR 0041, supersedes both records and restates each rule and each rejected option that still holds. The decision-point catalogue moves to one reviewed file with a bar for each point. Tests check the catalogue, a cut constant, the budget over the records in force and the citations. The owner merges the pull request.
Acceptance criteria
Requirement: Two-way supersession
ADR 0041 SHALL set status: accepted, decision-makers: [owner], issue: 5239, supersedes: ["0019", "0020"] and body-hash, and the same pull request SHALL set status: superseded and superseded-by: ["0041"] on ADR 0019 and ADR 0020 and add their dated Superseded by ADR 0041. line.
Scenario: Supersession links go both ways
- WHEN
uv run devops ci test tests/invariants/test_adr_records.pyruns on the change - THEN The command exits 0 and reports no one-way link, no link to a missing record and no body-hash mismatch.
Requirement: Rules in force restated
ADR 0041 SHALL state rule 7 as 'Jev is never the security boundary', keep a deterministic boundary for each outcome that Jev can choose, state rule 4 as a fitted cut for on and a prior cut in shadow only, use 'fail back to the current behavior', state that decision logs keep hashes and counts and not command text, and state that bars are written before the data.
Scenario: The record holds the required terms
- WHEN
rg -n 'Jev is never the security boundary|deterministic|prior cut in shadow|fail back to the current behavior|decision logs keep hashes|bars are written before the data' docs/adr/0041-the-decision-model-holds-rules-and-a-resolver-chain.mdruns on the change - THEN The command exits 0 and prints at least one match for each of the six terms.
Requirement: Record length
ADR 0041 SHALL have a body of 1,000 words or fewer, a title of 10 words or fewer and a slug of 60 characters or fewer.
Scenario: Length limits pass
- WHEN
uv run devops ci test tests/invariants/test_adr_records.pyruns on the change - THEN The command exits 0 and reports no length error for ADR 0041.
Requirement: Budget over the records in force
The records in force SHALL fit CONST_ROADMAP_ALTERNATIVES_MAX_ADR_TOKENS, so ADR 0041 MUST fit in the tokens that ADR 0019 and ADR 0020 free.
Scenario: Every record in force fits the budget
- WHEN
uv run devops ci test tests/roadmap/test_roadmap_alternatives.py tests/roadmap/test_roadmap_limit_classes.pyruns on the change - THEN The command exits 0 and reports no record in force that
CONST_ROADMAP_ALTERNATIVES_MAX_ADR_TOKENSleaves out.
Requirement: Decision-point catalogue
The decision-point catalogue SHALL live in docs/roadmap/decision-points.md, and a test SHALL check that each point of the decision registry has an entry with its bar.
Scenario: Each registered point has an entry
- WHEN
uv run devops ci test tests/roadmap/test_roadmap_decision_table.pyruns on the change - THEN The command exits 0 and reports an entry for each point of the decision registry and no registered point without an entry.
Requirement: Catalogue link from the record
ADR 0041 SHALL link docs/roadmap/decision-points.md under More Information.
Scenario: More Information names the catalogue
- WHEN
rg -n 'decision-points\.md' docs/adr/0041-the-decision-model-holds-rules-and-a-resolver-chain.mdruns on the change - THEN The command exits 0 and prints the line that links
docs/roadmap/decision-points.md.
Requirement: Cut constant refused
A test SHALL fail when a module under src/devops_cli/roadmap/ holds a module-level constant that sets a cut for a point that the decision registry holds.
Scenario: A cut constant for a registered point is refused
- WHEN
uv run devops ci test tests/roadmap/test_roadmap_decision_table.pyruns on the change with its case that holds a synthetic module with a module-level cut constant for a registered point - THEN The command exits 0 and the case names the synthetic module and the point as a refused cut constant.
Requirement: Fail-back test rename
The test test_a_failed_request_raises_so_the_step_can_fail_open SHALL be renamed to test_a_failed_request_raises_so_the_step_can_fail_back.
Scenario: Only the fail-back test name remains
- WHEN
rg -n 'def test_a_failed_request_raises_so_the_step_can_fail_(open|back)' tests/runs on the change - THEN The command exits 0, prints one match, and the match names
test_a_failed_request_raises_so_the_step_can_fail_back.
Requirement: Citation move
Every citation of ADR 0019 or ADR 0020 in src/, tests/ and .github/ SHALL name ADR 0041.
Scenario: No live citation of a superseded record
- WHEN
uv run devops ci test tests/invariants/test_adr_superseded_citations.pyruns on the change - THEN The command exits 0 and reports no citation of ADR 0019 or ADR 0020 in
src/,tests/or.github/.
Requirement: ADR index
The ADR index SHALL list ADR 0041 and the superseded status of ADR 0019 and ADR 0020.
Scenario: Index is current
- WHEN
uv run devops docs checkruns on the change - THEN The command exits 0 and reports no stale row for ADR 0041, ADR 0019 or ADR 0020.
Requirement: Confirmation section
ADR 0041 SHALL have a Confirmation section that names its test, CI row or metric.
Scenario: Confirmation names a check
- WHEN
rg -n -A 2 '^### Confirmation$' docs/adr/0041-the-decision-model-holds-rules-and-a-resolver-chain.mdruns on the change - THEN The command exits 0 and prints the heading and the line after it that names a test, a CI row or a metric.
Requirement: Pending a person after the merge
The owner MUST merge the pull request, and the merge SHALL accept ADR 0041 and mark ADR 0019 and ADR 0020 superseded on main.
Scenario: The merge lands the record
- WHEN the owner merges the pull request and
uv run devops docs checkruns onmain - THEN The command exits 0 and reports no stale row, and
mainholds ADR 0041 as accepted and ADR 0019 and ADR 0020 as superseded.
Existing Tool Considered
The alternatives check of 2026-11-16 in the issue body gives not-applicable, with Class: docs, no search. and Tool: none found. No open tool or library covers this docs change. MADR 4 (https://adr.github.io/madr/) gives the record template, and docs/adr/README.md gives the process. They cover the record form and the process. They do not cover the two-way supersession check, the length limit, the decision-point catalogue, the cut-constant check or the citation check. The change builds about 120 lines of test code in tests/invariants/test_adr_records.py and tests/roadmap/test_roadmap_decision_table.py. That code costs about 4,000 tokens to build, 400 tokens a quarter to keep, and 4 hours to build, keep and fix until it matches the need.
Key questions
- Which tool or library covers this docs change?: The alternatives check of 2026-11-16 in the issue body gives
not-applicableandTool: none found.MADR 4 covers the record form, anddocs/adr/README.mdgives the process. The repository validators cover the checks that the template lacks. The change adds about 120 lines of test code. That code costs about 4,000 tokens to build, 400 tokens a quarter to keep, and 4 hours to build, keep and fix until it matches the need. (best practice) [sources: docs/adr/README.md]- Chosen: Use MADR 4 and the repository validators. The template covers the record form, and the validators cover the checks that the template lacks.
- Rejected: Build a new ADR tool. The repository already holds the validators, so a new tool adds no coverage.
- Rejected: Use no validator. The checks for supersession, length, budget, catalogue and citations would not run.
- Which number, title and slug does the new record take?: ADR 0041. The index already holds ADR 0040 (
0040-renovate-pins-product-refs-to-release-tags.md), so the next free number is 0041. The file isdocs/adr/0041-the-decision-model-holds-rules-and-a-resolver-chain.md. The title 'The decision model holds rules and a resolver chain' has 9 words. The file name has 56 characters. [sources: docs/adr/README.md, docs/adr/0040-renovate-pins-product-refs-to-release-tags.md] - Which rules does ADR 0041 restate, and how do they change?: ADR 0041 restates rule 7 as 'Jev is never the security boundary' and keeps a deterministic boundary for each outcome that Jev can choose. It states rule 4 as a fitted cut for on and a prior cut in shadow only. It uses 'fail back to the current behavior'. It states that decision logs keep hashes and counts and not command text, and that bars are written before the data. It restates each rejected option of ADR 0019 and ADR 0020 that still holds, because the alternatives check reads no superseded record. (best practice) [sources: docs/adr/README.md, docs/adr/0019-a-decision-step-asks-jev-short-closed-questions-about-evidence-that-tools-extract.md, docs/adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md, CONTEXT.md]
- Chosen: Restate each rule and each rejected option that still holds. The alternatives check does not read a superseded record, so ADR 0041 must carry the rules and the refused options.
- Rejected: Restate only the method rules. The log rule and the bar rule would lose their home.
- Rejected: Restate none. The check would read a refused tool as untried and could propose it again.
- Does rule 7 keep a deterministic security boundary?: Yes. The runner pod is the sandbox. It has no Kubernetes token, the installation token of the job names one repository, the step's shell gets none of the job's variables, and the job process is not dumpable. The body records that the runner pod still gets the project credentials from a Kubernetes Secret, and that feat(roadmap): test sandboxd and add the shell command backend #3694 and feat(roadmap): add the three-container runner Job, policy and log reads #3700 are open. (best practice) [sources: CONTEXT.md, docs/adr/0019-a-decision-step-asks-jev-short-closed-questions-about-evidence-that-tools-extract.md]
- Chosen: Keep the deterministic boundary under rule 7. The runner is the sandbox, and the boundary must not depend on the model.
- Rejected: Drop the deterministic boundary. The runner still depends on it, and the body records feat(roadmap): test sandboxd and add the shell command backend #3694 and feat(roadmap): add the three-container runner Job, policy and log reads #3700 as open.
- Where does the decision-point catalogue live, and what does it hold?: It lives in
docs/roadmap/decision-points.md, and ADR 0041 links it under More Information. It gives one entry for each point of the decision registry, with the bar written before the data. A test checks that each registered point has an entry. The ADR README sends a catalogue to a document, because the record body has a limit of 1,000 words. (best practice) [sources: docs/adr/README.md, CONTEXT.md, src/devops_cli/roadmap/decision_table.py:96, tests/roadmap/test_roadmap_decision_table.py, docs/roadmap/job-success.md]- Chosen: One reviewed file in
docs/roadmap/. The ADR README sends a catalogue to a document, anddocs/roadmap/already holds the workflow documents. - Rejected: Keep the table in ADR 0020. ADR 0020 is superseded, and a superseded record does not change.
- Rejected: Put the rows in the OpenSpec spec. Only
openspec archivewrites a spec, so a hand edit fails the archive rule.
- Chosen: One reviewed file in
- How does the plan refuse a cut constant for a registered point?: A test in
tests/roadmap/test_roadmap_decision_table.pyreads the modules undersrc/devops_cli/roadmap/withastand fails on a module-level constant that sets a cut for a point that the decision registry holds. It names the module and the point. It has a case with a synthetic module, so it needs no file insrc/. (best practice) [sources: src/devops_cli/roadmap/decision_table.py:96, tests/roadmap/test_roadmap_decision_table.py, docs/adr/0019-a-decision-step-asks-jev-short-closed-questions-about-evidence-that-tools-extract.md]- Chosen: Add a test that refuses a cut constant. The cut claim stays in the record, and a violation fails in CI.
- Rejected: Drop the cut claim from the record.
check_modesenforces fitted cuts before on, and guessed cuts failed in feat(roadmap): a Jev completeness check for draft pull requests #4320 and feat(roadmap): Jev decides the labels of an intake proposal #4323.
- How does the plan keep the alternatives budget?:
CONST_ROADMAP_ALTERNATIVES_MAX_ADR_TOKENSis defined atsrc/devops_cli/config/constants.py:3896, andsrc/devops_cli/roadmap/alternatives.pyreads it. Its tests aretests/roadmap/test_roadmap_alternatives.pyandtests/roadmap/test_roadmap_limit_classes.py. ADR 0041 must fit in the tokens that ADR 0019 and ADR 0020 free. Short option bullets keep the budget. [sources: src/devops_cli/config/constants.py:3896, src/devops_cli/roadmap/alternatives.py, docs/adr/README.md, tests/roadmap/test_roadmap_alternatives.py, tests/roadmap/test_roadmap_limit_classes.py] - Which citations move to ADR 0041?: The citations in
src/,tests/and.github/move to ADR 0041. The citations indocs/,CONTEXT.mdandk8s/stay. The archived OpenSpec changes andCHANGELOG.mdare history, and they keep their citations. A test fails on a citation of a superseded record in the three places that move. [sources: docs/adr/README.md, tests/invariants/test_adr_superseded_citations.py, openspec/specs/adr-records/spec.md] - What is the new name of the fail-open test?:
test_a_failed_request_raises_so_the_step_can_fail_back. (best practice) [sources: docs/adr/0019-a-decision-step-asks-jev-short-closed-questions-about-evidence-that-tools-extract.md]- Chosen: Rename the test to the fail-back term. The name then uses the term that the record uses.
- Rejected: Keep the old name. The record no longer uses the term 'fail open'.
- Rejected: Use a longer descriptive name. The name would be longer than the term that the record uses.
- Is the
implement.extensionregistration part of this issue?: No. The registration is code work: a registry entry, its fixed questions, its evidence builder, its bands, a cuts file and a shadow mode inroadmap.decisions. This issue changes records, the catalogue, tests and citations. The registration becomes a new code issue, and this proposal defers it. (best practice) [sources: CONTEXT.md, docs/adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md, docs/ROADMAP_WORKFLOW.md]- Chosen: Defer the registration to a new code issue. This pull request changes ADR records, the catalogue, tests and citations only.
- Rejected: Include the registration here. The registration needs a registry entry, a cuts file and a shadow mode beside its rule, so it exceeds one record change.
- Is test(adr): fail on a citation of a superseded record #5238 still a dependency?: Yes.
tests/invariants/test_adr_superseded_citations.pyexists in the tree and callsadr_offromsrc/devops_cli/roadmap/adr.py:206, but test(adr): fail on a citation of a superseded record #5238 is still open. Keep test(adr): fail on a citation of a superseded record #5238 as the dependency until it closes. [sources: tests/invariants/test_adr_superseded_citations.py, src/devops_cli/roadmap/adr.py:206] - How do the record pull requests merge?: One at a time, in the order of their tracker. Each change of a record in force changes
adr_hashinsrc/devops_cli/roadmap/alternatives.py, and each checked item becomes due again. The pure status changes go in docs(adr): add MADR front matter, a Status History and the ADR rules #5225. Only a person merges a pull request. [sources: docs/adr/README.md, src/devops_cli/roadmap/alternatives.py, AGENTS.md]
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 12, 2026
adr, and .github/labels.yml declares no scope/adr label. Add the label to the file to give the scope to this item.Both work on the ADR rules and structure in docs/adr/, but 5225 adds the MADR front matter and rules while this candidate creates a specific superseding record under those rules.dan-petty commentedon Nov 12, 2026
Request from the decision-model docs review of 2026-11-12. The owner approved it on 2026-11-12.
Please let this record hold the rules for the design of a question, not only the method. ADR 0019 and ADR 0020 hold the method, and the method agrees with the documents. The faults were in the questions: 7 of the 9 questions of
stage.verify_screenjoin conditions,otheris a catch-all, and intake asks priority as a Choice over an ordered scale (#5281, #5274).Rules for the record, with their sources:
The knowledge base page of #5285 quotes the documents and links this record.
devops-cli-service commentedon Nov 16, 2026
Alternatives check: not-applicable
Class: docs. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-16. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 17, 2026
Owner question: Who merges the pull request? (a person decides)
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
dan-petty commentedon Nov 19, 2026
New evidence for the catalogue move, from the Service config review of 2026-11-19. The catalogue table of ADR 0020 (lines 113-120 on origin/main) now differs from the code in these rows:
POINT_CUTS(src/devops_cli/roadmap/decision_table.py:24-29) andREGISTRY(src/devops_cli/roadmap/decision_registry.py:18) hold two points:stage.verify_screenandalternatives.reply_fixable.alternatives.reply_fixablehas no row. It is a rule point (alternatives_cuts.json), modeoffin the cluster, from feat(roadmap): a refused alternatives reply goes back once #4864. fix(roadmap): keep the alternatives return in reply_fixable shadow mode #6358 fixes a defect of its shadow mode.intake.proposalsays "shadowafter feat(roadmap): a shadow mode for the Jev intake labels #4395". It is not a registered point. Its switch isroadmap.intake.jev, and that isoffin the cluster.implement.extensionsays "onwhen feat(roadmap): extend a step budget when the run makes progress #4394 merges". feat(roadmap): extend a step budget when the run makes progress #4394 shipped in feat(roadmap): extend a step budget when the run makes progress #4464 as the settingroadmap.implement.step_token_ceiling, not as a point. The settingsdeadline_stall_secondsanddeadline_extension_secondscame from feat(roadmap): extend the runner Job deadline on progress #3196.stage.tier_routesays "Built later". feat(roadmap): log a Jev tier choice beside each stage run #4284 shipped asroadmap.stage.jev_shadow(feat(roadmap): Shadow the Jev tier choice of each stage item #6152), defaultfalse.docs/adr/README.md:69says that when the body of a record contradicts the code, the next change supersedes it. So the new catalogue file of this item is the place for these rows, not an edit of ADR 0020.devops-cli-service commentedon Nov 19, 2026
Owner question: Who merges the pull request? (a person decides)
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 21, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
dan-petty commentedon Nov 24, 2026
The owner merges the pull request. Only a person merges pull requests (AGENTS.md).
devops-cli-service commentedon Nov 24, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 27, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Released in v0.251.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.251.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 18:59 UTC