Repository navigation
Description
Problem Description
Four models in src/devops_cli/models/ default to a clean result. A producer that forgets to set the field gives a result that reads as safe, with no error. This is the shape of the defect of #2504, where NetworkReputationRecord.outcome defaulted to ok. #2504 fixes that one model and leaves these four.
NetworkReference.security_statusdefaults to "✓ Safe" (models/vulnerability.py). The extractor (reference_extractor.py) also sets "✓ Safe" on each external reference before any lookup. The review pipeline replaces the text in_audit_file_network_references, so no reference reaches a report with the default today. A path that skips the audit would show an unchecked reference as safe.PackageLookupResult.statusdefaults took(models/vulnerability.py). Each constructor insrc/names the status today, so no result is wrong today. A new client that forgets the status givesok.NetworkIntelResultdefaults toreputation_summary="Safe"andrisk_level="LOW", andPackageIntelResultdefaults tosecurity_status="Clean"(models/security.py). No code insrc/uses these two models. Onlytests/test_resource_schemas.pybuilds them.
Reproduction Steps
- Run
uv run python -c "from devops_cli.models.vulnerability import NetworkReference, PackageLookupResult; print(NetworkReference(target='203.0.113.7').security_status, PackageLookupResult().status)". - Run
uv run python -c "from devops_cli.models.security import NetworkIntelResult, PackageIntelResult; print(NetworkIntelResult(target='x').reputation_summary, PackageIntelResult(package_name='x').security_status)".
Expected vs Actual Behavior
Expected: a result that no lookup marked has no clean default. PackageLookupResult.status and NetworkReference.security_status are required, or default to an unchecked state. The two unused intel models are removed, or their fields are required.
Actual: the commands print ✓ Safe ok and Safe Clean.
Environment Diagnostics
devops-cli 0.15.1, from origin/main at dde2f55. Linux, Python 3.14. The probe made no network request.
Logs, Traces, or Terminal Output
✓ Safe ok
Safe Clean
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate.
Source: found while working on #2504.
Proposed design
Problem statement
Four models in src/devops_cli/models/ default to a clean security status. A producer that forgets to set the field gives a result that reads as safe. No error appears. This is the same defect shape as #2504. The fix makes two fields required and removes two unused models.
Acceptance criteria
Requirement: NetworkReference security_status is required
NetworkReference.security_status SHALL have no default value.
Scenario: Construct NetworkReference without security_status
- WHEN A producer constructs NetworkReference without setting security_status
- THEN Pydantic raises a validation error
Requirement: PackageLookupResult status is required
PackageLookupResult.status SHALL have no default value.
Scenario: Construct PackageLookupResult without status
- WHEN A producer constructs PackageLookupResult without setting status
- THEN Pydantic raises a validation error
Requirement: NetworkIntelResult is removed
NetworkIntelResult SHALL not exist in the models package.
Scenario: Import NetworkIntelResult
- WHEN A consumer attempts to import NetworkIntelResult from devops_cli.models
- THEN The import raises ImportError
Requirement: PackageIntelResult is removed
PackageIntelResult SHALL not exist in the models package.
Scenario: Import PackageIntelResult
- WHEN A consumer attempts to import PackageIntelResult from devops_cli.models
- THEN The import raises ImportError
Requirement: Package exports are updated
The models package all SHALL not list removed models.
Scenario: Inspect models.all
- WHEN A consumer inspects devops_cli.models.all
- THEN NetworkIntelResult and PackageIntelResult are not in the list
Requirement: Tests pass after removal
The test suite SHALL pass without referencing removed models.
Scenario: Run the test suite
- WHEN The test suite runs after the change
- THEN All tests pass and no test references NetworkIntelResult or PackageIntelResult
Existing Tool Considered
No check has run. No open, maintained tool or library covers the need to fix Pydantic model defaults in this project. The fix is a code change to the project's own models. The written cost is the tokens to change two field definitions, remove two unused classes, update the package exports, and update the test file.
Key questions
- Should NetworkReference.security_status and PackageLookupResult.status be required or default to an unchecked state?: Make them required (no default). (best practice) [sources: src/devops_cli/models/vulnerability.py, openspec/changes/archive/2026-10-29-2504-shodan-failed-lookup-outcome/design.md]
- Chosen: Required (no default). Forces the producer to set the status. A validation error appears if the field is missing. This is the safest option.
- Rejected: Default to an unchecked state. A consumer must check for the sentinel value. If it does not, it may treat the unchecked state as a valid status.
- Should NetworkIntelResult and PackageIntelResult be removed or have their fields made required?: Remove them. (best practice) [sources: src/devops_cli/models/security.py, tests/test_resource_schemas.py]
- Chosen: Remove the models. No code in src/ uses them. Removing them eliminates dead code and its maintenance cost.
- Rejected: Make their fields required. Keeps dead code. Adds a maintenance cost for models that no producer uses.
- Does any code in src/ use NetworkIntelResult or PackageIntelResult?: No. Only tests/test_resource_schemas.py builds them. [sources: tests/test_resource_schemas.py, src/devops_cli/models/security.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Oct 29, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
Incorrect default values in model classes cause unchecked results to read as safe.No current code path triggers the wrong defaults, but a new client or skipped audit step would expose them.Prevents a class of latent defects where unchecked items appear safe to users.Changing or removing default values in four model classes is a small, contained change.Both fix model defaults that read as safe when unchecked; #2504 fixes one model's outcome field, the candidate fixes four other models' status fields.devops-cli-service commentedon Oct 30, 2026
Status set to Ready at 07fb4c2 (see proposed design in issue body).
devops-cli-service commentedon Nov 1, 2026
Staged: branch
fix/2636-a-result-that-no-lookup-marked, draft pull request #3132. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
docs(openspec): fix review findings on the #2636 plan
docs(openspec): tighten tasks 1.5 and 2.1 and merge the removal requi…
docs(openspec): plan #2636 make clean-default model fields required (#…
42 remaining items
devops-cli-service commentedon Nov 4, 2026
Cleared the stop at group 1 by the rule
digest: the runner image changed since the stop, from sha256:eb2c32f9c27c350eafb35b7f08c274621a0a05b95904b2185c667b9805b0d499 to sha256:ff7f81f8f5902c5ae4e48ed334bc83f842b51afb639ab71be65cb4240daadf01. The item is Planned again, and the Service takes it in the next round. The Service clears a stop one time for each runner image. A new stop on this image waits for a commentimplement: retry.feat(roadmap): let the step guard allow a recorded test removal (#3715)
[-]fix(models): a result that no lookup marked must not default to a clean status[/-][+]fix(models): make clean-default model fields required[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 65 characters, and the limit is 60. The type and the scope stay.
fix(models): a result that no lookup marked must not default to a clean statusfix(models): make clean-default model fields requiredchore(openspec): archive #2636
devops-cli-service commentedon Nov 6, 2026
Released in v0.71.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.71.0
docs(docs): add a no clean default rule for result models (#3844)
devops-cli-service commentedon Nov 6, 2026
Live since 2026-11-06 19:47 UTC
fix(roadmap): reset a head that the agent moved (#3883)