Repository navigation
fix(docs): correct two stale THREAT_MODEL.md line anchors for auth_middleware.py - #17082
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: mrveiss/AutoBot-AI/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe threat model updates the declaration line references for ChangesThreat model references
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Change: Other 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ddleware.py (#17042) check_admin_permission and verify_internal_api_key both drifted 3 lines from their cited anchors (:967/:954 vs actual :964/:951) after #17042 added lines to auth_middleware.py without updating THREAT_MODEL.md. Confirmed the drift exists on main itself, not just a stale branch -- blocks repo_tests/threat_model_anchors_resolve_test.py (and therefore the whole python-suite shard it lands in) for every PR until fixed.
11d13ee to
486cf3d
Compare
Thinking Path
Found while diagnosing red python-suite shards on #17016 (an unrelated PR):
repo_tests/threat_model_anchors_resolve_test.py::test_anchor_points_at_its_symbolfailed for two symbols inautobot-backend/auth_middleware.py. Confirmed the drift exists onorigin/mainitself, not a stale-branch artifact --check_admin_permissionis really defined at line 964 but THREAT_MODEL.md cites :967, andverify_internal_api_keyis really at 951 but cited as :954. Both off by exactly 3 lines, consistent with #17042 (which touchedauth_middleware.py) adding lines above both functions without updating the doc's anchors.What Changed
docs/developer/THREAT_MODEL.md: corrected both anchors (:967 -> :964, :954 -> :951) to match the real current line numbers.Verification
Failed with the exact two assertions this fixes before the change; all 41 pass after.
Model Used
Claude Sonnet 5
Single-issue rationale
A base-branch doc/code drift blocking a repo-wide guard test for every PR; needs its own immediate, minimal fix rather than riding along with unrelated work.
Issue Link
No issue -- a two-line doc-anchor fix this PR both finds and fixes; filing one would only add ceremony ahead of a fix already verified and ready to land.
Checklist
<type>(scope): <description> (#issue)Summary by CodeRabbit