Repository navigation
Description
Problem or Motivation
docs/roadmap/job-success.md and the agentic workflow spec (PR #5489) copy code facts by hand:
- the form of the result line, the job names, the intended results, the infra classes, the value charset and the first-pass limits (
src/devops_cli/roadmap/job_result.py); - the trend windows, the "broken" and "infra" thresholds, the version minimum and the number of top classes (
src/devops_cli/roadmap/job_grade_report.py); - the default and the ceiling of each roadmap limit setting (Table 4-4).
Two copies were wrong on the day of writing. Table 4-5 gives 6 plan heads, and main has 7. Table 4-4 gives constant ceilings that #5440 had already made settings. This item does not generate the eval set sizes: devops roadmap eval <set> --dry-run already lists the cases, a count in git would change in each PR that adds a case (#5516 adds 26), and #3445 derives the stage counts in its test. The spec links the fixture folders and the command. docs/CONFIGURATION.md shows a nested section as one string and gives no bound. The owner direction of 2026-11-13: these values come from programs, not from an agent.
Proposed Solution & Architectural Design
Extend DocGenerator.synced_blocks() (src/devops_cli/docs/generator.py), the method that already writes the JOB_GRADES block and the ADR index. When the named marker-block function of #4889 is on main, write the block with it, and add no third copy of the partition code. This item is a child of the content freshness tracker #4880.
- Add a typed table to
job_result.pyfor each job: the source of its line, all its results, its counts and its names. Use the form ofGRADE_POLICIES. - Write a block
JOB_RESULTS_START/JOB_RESULTS_ENDindocs/roadmap/job-success.mdfromLINE_PREFIX, the field order,RoadmapJob,SUCCESS_RESULTS,INFRA_CLASSES, the_NAMEcharset,FIRST_PASS_LIMITSand the new table. - Add the trend constants of
job_grade_report.pyto the JOB_GRADES block. Make them public constants first. - In
docs/CONFIGURATION.md, give each field of a nested settings model its own row with its type, its default and its bounds. Read them from pydanticmodel_json_schema()(minimum,maximum,exclusiveMinimum,exclusiveMaximum). devops docs checkfails when a block or the page is stale. It runs offline, as now.
Target Subsystem
SDLC, Git & PR Governance
Existing Tool Considered
- DocGenerator synced blocks (in this repository) already write and check the JOB_GRADES block and the ADR index. This item adds blocks to the same mechanism.
- pydantic (MIT)
model_json_schema()gives the types, defaults and bounds, so no code parsesFieldmetadata by hand. - Cog (MIT) writes text between markers, but it duplicates the existing mechanism.
Cost to build: about 120 lines with tests, about 120k tokens, half an agent-day.
Acceptance Criteria
- A test: a changed constant of
job_result.pychanges the JOB_RESULTS block, anddevops docs checkfails on the old page. - A test:
docs/CONFIGURATION.mdshowsroadmap.implement.max_memory_limitwith its default, and a bounded roadmap limit with its upper bound. - The hand text of
docs/roadmap/job-success.mdholds none of the generated values. -
uv run devops docs checkpasses on the branch.
Source: #4880
Alternatives check of 2026-11-23: partly.
Tool: nedbat/cog (https://github.com/nedbat/cog), MIT, last activity 2026-11-18, maintained.
Reason: Searches found Cog (cogapp), an MIT marker-block generator that runs Python from a document and writes the output between markers, so it covers the generated-block part only; it reads no pydantic schema bounds, and ADR 0025 rejects it as a duplicate of the in-repo DocGenerator.
Covers:
- Writes generated text between markers in a page
- Runs Python in the document to read code values
- Checks whether the generated output is stale
Lacks:
- No pydantic schema types, defaults or bounds
- No row per nested settings field
- Second generator beside DocGenerator and its docs check
Proposed design
Problem statement
Two documents copy code facts by hand, and two copies were already wrong. docs/roadmap/job-success.md must take the job result contract from job_result.py and the trend constants from job_grade_report.py. docs/CONFIGURATION.md must show each nested setting with its type, default and bounds from the pydantic schema. devops docs check must fail when a generated block or page is stale.
Acceptance criteria
Requirement: Job result block from code
The JOB_RESULTS block in docs/roadmap/job-success.md SHALL be generated from the constants and the typed job table in job_result.py.
Scenario: Changed prefix
- WHEN A test patches
LINE_PREFIXand callsDocGenerator.synced_blocks(). - THEN The JOB_RESULTS block holds the new prefix.
Requirement: Stale job result block
devops docs check MUST fail when the JOB_RESULTS block is stale.
Scenario: Stale block fails check
- WHEN A test writes an old block into
docs/roadmap/job-success.mdin a temporary checkout and runsuv run devops docs check. - THEN The command exits nonzero and names the stale JOB_RESULTS block.
Requirement: Trend constants in grade block
The JOB_GRADES block SHALL include the trend windows, thresholds, version minimum and top-class count from public constants in job_grade_report.py.
Scenario: Changed trend constant
- WHEN A test patches a public trend constant and calls
DocGenerator.synced_blocks(). - THEN The JOB_GRADES block holds the new value.
Requirement: Nested setting rows
docs/CONFIGURATION.md SHALL give each field of a nested settings model its own row with type, default and bounds from pydantic model_json_schema().
Scenario: Memory limit row
- WHEN A test calls the settings-page generator for the nested roadmap limit model.
- THEN The rendered table holds a row for
roadmap.implement.max_memory_limitwith its default, and a bounded roadmap limit with its upper bound.
Requirement: Offline docs check
devops docs check MUST run offline, pass on the generated branch and fail on a stale block or page.
Scenario: Offline check
- WHEN A test runs
uv run devops docs checkon the generated branch and on a stale copy with no network access. - THEN The command exits 0 on the branch and nonzero on the stale copy.
Requirement: No hand copy of generated tables
The hand text of docs/roadmap/job-success.md outside the markers MUST hold no second table of job results or trend thresholds.
Scenario: One table source
- WHEN A test reads the page outside the JOB_RESULTS and JOB_GRADES markers.
- THEN It finds no Markdown table with the job result columns or the trend threshold values.
Existing Tool Considered
Cog (cogapp) is the named tool. The alternatives check of 2026-11-17 in the issue body records the verdict rejected by ADR 0025, with what the tool covers and lacks. This proposal extends the in-repo DocGenerator and reads setting bounds from pydantic model_json_schema(), which Cog lacks. Cost to build: about 120 lines with tests, about 120k tokens, half an agent-day.
Key questions
- Which generator mechanism writes the new blocks?: Extend
DocGenerator.synced_blocks(). Use the named marker-block function of feat(docs): generated pages name their source and stay complete #4889 when it is on main, and add no third copy of the partition code. (best practice) [sources: src/devops_cli/docs/generator.py, docs/roadmap/job-success.md]- Chosen: Extend DocGenerator.synced_blocks(). It already writes JOB_GRADES and the ADR index, and the issue asks for this method.
- Rejected: Add a standalone generator. It adds a third copy of the partition code and a second check path.
- Rejected: Use Cog. ADG 0025 rejects Cog as a duplicate of the in-repo generator.
- Which source holds the job result facts for the block?: A typed table in
job_result.pyholds for each job the source of its line, all results, counts and names. The block also reads the line prefix, the field order, the job enum, the result mapping, the infra classes, the name charset and the first-pass mapping thatis_first_pass()uses. (best practice) [sources: src/devops_cli/roadmap/job_result.py, src/devops_cli/roadmap/job_grade.py]- Chosen: Typed table in job_result.py. It keeps one source in code and follows the existing grade-policy mapping form.
- Rejected: Hand text in the page. It is the duplicate that the issue removes.
- Rejected: Parse the Markdown page. It makes the page the source and keeps the stale values.
- How does the generator get the trend constants?: Make the constants of
job_grade_report.pypublic, and add them to the JOB_GRADES block. Do not copy their values into the generator. (best practice) [sources: src/devops_cli/roadmap/job_grade_report.py, docs/roadmap/job-success.md]- Chosen: Public constants from job_grade_report.py. One code source, and the existing JOB_GRADES block already comes from code.
- Rejected: Literal values in the generator. They become a second copy and can go stale.
- Rejected: Read the module source text. It is brittle and bypasses the constants.
- How does the docs page get the type, default and bounds of each nested setting?: Use pydantic
model_json_schema()on each nested settings model, and render one row for each field with its type, default,minimum,maximum,exclusiveMinimumandexclusiveMaximum. (best practice) [sources: src/devops_cli/config/settings.py, docs/CONFIGURATION.md]- Chosen: Pydantic model_json_schema(). It gives the schema facts, so no code parses Field metadata by hand.
- Rejected: Hand table in docs/CONFIGURATION.md. It gives no bound and already shows a nested section as one string.
- Rejected: Parse Field metadata by hand. It duplicates pydantic and misses nested models.
- Which first-pass mapping does the block use?: Use
FIRST_PASS, the mapping thatis_first_pass()reads and thatdocs/roadmap/job-success.mdnames. Do not use the olderFIRST_PASS_LIMITSsubset. (best practice) [sources: src/devops_cli/roadmap/job_result.py, docs/roadmap/job-success.md]- Chosen: FIRST_PASS. It holds every job with a first-pass rule and is the mapping that is_first_pass() reads.
- Rejected: FIRST_PASS_LIMITS. It is an older subset with only stage, implement and fix_plan.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 13, 2026
Both concern the roadmap limit settings, but #5440 converts constants into settings while this candidate generates docs from those settings.devops-cli-service commentedon Nov 17, 2026
Alternatives check: rejected
Reason: Searches found Cog as the only maintained general marker-block generator: it writes blocks from code and checks staleness offline, but it has no typed code-fact tables, and ADR 0025 rejected it as a duplicate of the in-repo generator.
Rejected by ADR 0025. A newer fact can change an ADR.
Tool: cogapp (https://pypi.org/project/cogapp), MIT, last activity 2026-11-15, maintained.
Covers:
Lacks:
Searches (6)
Tools considered:
Searches run:
Sources:
A person decides what this check of 2026-11-17 means for the item.
devops-cli-service commentedon Nov 18, 2026
Status set to Ready at 86358b6 (see proposed design in issue body).
devops-cli-service commentedon Nov 23, 2026
The result in the alternatives block of the issue body changed. Before this check:
rejected, tool https://pypi.org/project/cogapp. A person decides what the new result means for the item.Searches (5)
Tools considered:
Searches run:
Sources: