Skip to content

refactor(review): the synthetic corpus drops contradict-documented-default, which no tool can detect #541

Closed

Description

@dan-petty

Refreshed plan (2026-10-17, unblocking review)

This section supersedes any text below that conflicts with it.

Decisions

Scope

  • This item now deletes the template, its tests and its docs row. After that, a docs-only corpus is scored only on templates that change example commands inside code blocks.
  • The original deliverables are dropped: injecting only where the corpus holds the code that defines the default, and skipping the template otherwise.

Delivery

  • One PR, size S.

Acceptance criteria

  • A test written first shows that select_templates(["contradict-documented-default"]) raises ValueError naming the template (src/devops_cli/ai/review/defects.py:1241-1248). It sits next to test_unknown_templates_are_rejected_by_name (tests/test_review_defects.py:215-218).
  • _DOCUMENTED_DEFAULT, _OPPOSITES and _contradict_defaults (src/devops_cli/ai/review/defects.py:871-890) are deleted, along with the template's TEMPLATES entry (:1226-1231).
  • The template's cases at tests/test_review_defects_infra.py:223-236 and :332 are deleted, and the comment at :326 keeps only "Prose is not an example command", because its "no longer" clause described the deleted :332 case.
  • test_a_corpus_of_infrastructure_and_docs_records_each_injection (tests/test_review_defects_infra.py:342-376) still covers docs. Its README.md takes widen-file-mode on a fenced chmod 600 block. disable-tls-verify is not used here, because it also finds a site in the Dockerfile, on RUN_CHAIN's wget https:// line (:47), so the Dockerfile's seeded draw could pick it instead of unverified-download, whose site is the sha256sum -c line (:48).
  • The template's row at docs/SELF_IMPROVEMENT.md:664 is deleted. Outside the task files under docs/agent/tasks/, git grep contradict-documented-default finds nothing.
  • uv run devops ci passes with coverage of at least 90%.

Current references

Dependencies and order


Found by the first run of devops review samples validate --review (#505).

contradict-documented-default (#504) changes a documented default, such as "default 4096" to "default 8192". The documentation corpus holds only kind's user guide, so the reviewer has no code to compare the page with. Both such injections got no finding at all, and neither could have. Some defaults on those pages describe other software, such as Ubuntu's inotify limits, so even with kind's code the change is not a contradiction.

Deliverables

  • The template injects only where the corpus also holds the code or configuration that defines the default. For example, the default a Terraform variable declares against its description, or a documented CLI flag against the flag's definition.
  • Otherwise it is not applied, so a docs-only corpus is not scored on it.

Activity

  1. added this to the v0.2.24 milestone on Sep 24, 2026
  2. added
    type/bug
    scope/review
    priority/p2-medium
    on Sep 24, 2026
  3. modified the milestones: v0.2.24, v0.2.25 on Sep 30, 2026
  4. dan-petty commented on Sep 30, 2026

    @dan-petty
    OwnerAuthor

    Moved from v0.2.25 to the backlog. v0.2.25 is capped at 12 items (#740), and only the next two planned releases keep a milestone (#739), so P2 items wait in the backlog until reprioritization pulls them in.

  5. added
    priority/p3-low
    and removed
    priority/p2-medium
    on Oct 2, 2026
  6. dan-petty commented on Oct 2, 2026

    @dan-petty
    OwnerAuthor

    Grooming (2026-10-02): Priority p2-medium → p3-low. It affects scoring of a couple of injections in the docs-only sample, with no user-facing behavior. It is a measurement-accuracy fix.

    Checked against the code at the release/v0.2.25 tip.

  7. dan-petty commented on Oct 3, 2026

    @dan-petty
    OwnerAuthor

    Frozen by the evidence-first review redesign (#1137, owner direction of 2026-10-03): patches to the model generator and verifier stop, and tool-layer fixes continue. Its judgement of contradict-documented-default findings goes with the verifier (#1150). The synthetic-corpus generator (ai/review/defects.py, review samples) is not deleted, and #1138's scorer is the measurement it would feed. This item stays open, labelled status/blocked, and linked to #1138.

  8. added
    status/blocked
    on Oct 3, 2026
  9. changed the title [-]contradict-documented-default cannot be judged without the code it contradicts[/-] [+]refactor(review): the synthetic corpus drops contradict-documented-default, which no tool can detect[/+] on Oct 18, 2026
  10. removed
    status/blocked
    on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p3-lowscope/reviewtype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions