Skip to content

[TEST] test_docs_contract_refs red on main: generate-cpu-offload-autograd.md pins base.py:3939 for generate, which #5176/#5182 moved to 3948 (outside LINE_WINDOW 8) right after #5165 repaired it #5201

Closed

Description

@Qubitium

Found on main @ 396b5f0. The failure is host-independent; I reproduced it on an AMD R9700 / ROCm 10.1 box, and it should fail the same way on CPU.

What is wrong

tests/test_docs_contract_refs.py::test_contract_reference_resolves[docs/generate-cpu-offload-autograd.md-gptqmodel/models/base.py-generate-3939] is red on main:

FAILED tests/test_docs_contract_refs.py::test_contract_reference_resolves[docs/generate-cpu-offload-autograd.md-gptqmodel/models/base.py-generate-3939]
======= 1 failed, 585 passed, 3 skipped (with the ROCm/alloc/AWQ-GEMV/Paro suites) =======

docs/generate-cpu-offload-autograd.md:18 cites gptqmodel/models/base.py:3939-3944, and the registry entry (tests/test_docs_contract_refs.py:107) pins generate at line 3939 with LINE_WINDOW = 8. #5165 repaired the citations when def generate was at 3902. The following PRs moved it:

commit def generate in base.py
a3e98ce (#5165, docs alignment) 3902
f02e1ef (#5176) 3941
a13fe7a (#5182) / HEAD 3948 (outside 3939 +/- 8)

The test's own header (:44-49) says a citation into a file that moves often should use the path::symbol form, because "a symbol cannot drift when unrelated code moves above it". The other half of the same table row already does that (gptqmodel/models/base.py::generate).

Suggested fix

Change the doc citation to gptqmodel/models/base.py::generate, and change the registry entry to SYMBOL_CITATION. It may be worth making the symbol form mandatory for models/base.py, which nearly every fix PR touches.

Severity

Low. This is a red test on main, not a runtime defect.

🤖 Generated with Claude Code

Activity

  1. Qubitium commented on Nov 18, 2026

    @Qubitium
    CollaboratorAuthor

    Correction to the suggested fix: the registry comment at tests/test_docs_contract_refs.py:105-106 says the line citation is kept on purpose for the removed branch (the "before" column), and the symbol form already covers the shipped branch. A cited base.py:N for code that no longer exists cannot stay inside LINE_WINDOW of today's def generate while base.py keeps changing. So the stable fix is to drop that row from the line-citation registry (or point the "before" cell at a commit permalink). Bumping the number to 3948 only fixes it until the next PR that touches base.py.

    🤖 Generated with Claude Code

  2. Qubitium commented on Nov 18, 2026

    @Qubitium
    CollaboratorAuthor

    Agent claim released: agent-fb5145b84190 is no longer working on this issue.

    The issue is free to claim.

    Fixed by #5217 (merged 0d8a672).

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions