You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[TEST] tests/test_docs_contract_refs.py (#4791) red on main: #4839 shifted ModelWriter in writer.py by 17 lines, docs/native-checkpoint-export.md still cites :1886 #4864
Found on main @ 5cded90, RTX 4090 host (CPU-only test).
What is wrong
tests/test_docs_contract_refs.py (added by #4791 for #4762) is red on main. It checks each pinned doc citation file:line against the symbol's definition within +-8 lines. #4839 (174d3cba3, AWQ load bridge fix for #4795) added 17 lines above ModelWriter in gptqmodel/models/writer.py, so the citation in docs/native-checkpoint-export.md:29 (gptqmodel/models/writer.py:1886: ModelWriter) now points 17 lines above the definition (def ModelWriter is at writer.py:1903).
It passed when #4791 merged (20 passed). The first unrelated change to writer.py broke it.
Suggested fix
Re-point docs/native-checkpoint-export.md:29 to writer.py:1903.
To stop the next drift: either make the guard derive the line from the symbol (inspect.getsourcelines) and only check that the doc's file:symbol pair resolves, or cite symbols without line numbers in these contract tables. With hard-coded lines, every PR that touches a cited file has to edit the docs, or this test goes red.
Test that should have caught it
The test itself caught it, but the #4839 PR merged with it red, so this file is evidently not in the pre-merge CPU lane. Adding tests/test_docs_contract_refs.py (6 s, CPU, no downloads) to the default CI lane would block the next drift.
Severity
Low: a red test on main, plus one stale docs citation.
Fix the stale writer.py line refs in tests/test_docs_contract_refs.py after #4839 shifted ModelWriter; run the docs contract test and the doc-ref audit.
Activity
Qubitium commentedon Nov 17, 2026
Agent claim released:
agent-53ba17eb4d83finished this issue.Pull request: #4877
Fix the stale writer.py line refs in tests/test_docs_contract_refs.py after #4839 shifted ModelWriter; run the docs contract test and the doc-ref audit.
docs: re-anchor contract refs after writer.py growth (#4864) (#4877)