← Back to Pull requests

Hold the pins a submodule supplies to its branch tip (2.2.0) #17

Closed
unknown closed this pull request without merging on Nov 23, 2026 14:27 UTC
View on GitHub
unknown unknown commented on Nov 23, 2026 12:51 UTC
Author

social installs brand's stack through -r brand/requirements.txt, and its brand submodule sat behind brand's main, so social kept charset-normalizer 3.5.2 after brand moved to 3.5.3 (5e55065). The pin rule reads Python versions, actions, hook revs and (since 2.1.0) container images, but never looks inside a submodule, so nothing reported it (the pin audit of 2026-11-23 found it by hand).

Quality kit 2.2.0 (main released 2.1.0 while this was open; merged in, both rules kept). The pin rule (check_quality.py, rule pins) now follows every -r / -c include of a requirements or constraints file (any .in, or a .txt named for requirements or constraints or under requirements/) into a git submodule:

  • With the kit given (--kit, as reusable-lint.yml and the drift dry run call it), it fetches the submodule's upstream (.gitmodules url, its branch, the checked repository's current branch for branch = ., or else the default branch) into a scratch bare repository, depth 1 and without blobs but the files read, and compares the included file and every file it includes at the recorded commit and at the branch tip.

  • A pin the tip adds, drops or moves is a finding, what = "submodule:<path>@<short commit>", cleared only by a below-latest: reason beside the include and a waiver. Pins are keyed by name and environment marker (respelling a marker outside its quoted values changes nothing). The repository's own include chains are followed into the submodule. A relative submodule URL resolves against an https, ssh, scp-like or file:// origin. A submodule at its tip, or a tip that changes no pin, is clean and costs one shallow fetch. An upstream that cannot be fetched, or a read that fails, is a finding, never a pass.

  • .gitmodules is the checked tree's text: the URL follows --, a branch must be a plain branch name and the recorded commit a full SHA, so nothing reaches git fetch as an option.

  • Offline (the pre-commit hook) it fetches nothing, says so in a note, and does not call a submodule waiver unused.
  • MINOR, not PATCH: by docs/quality.md "Versions" a patch cannot add findings. social is the one repository with a submodule; social main records brand's tip (dee16c7, kleidos-dev/social#13), so every repository passes the rule at release.

    Checked locally on Python 3.15.2: the kit's tests and tests/ pass (19 new ones in test_pins.py), ruff check, ruff format --check and mypy clean, pre-commit run --all-files green, check_quality.py clean on the kit. Against social at b28ef5b it reported requirements.txt:13: [pins] submodule:brand@b28ef5b supplies brand/requirements.txt, but the tip of its default branch (8798fb5) pins uv==0.13.9 (here none); on social main (brand dee16c7, the tip, hashed requirements: 27 pins read, one per marker) it is clean.

    After the merge: tag quality-v2.2.0 (signed) on the merge commit, then sync the consumers.

    Diff: 367 lines (+275 / -92) across 4 files Reviewer: jmrplens Review duration: 95m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 367 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.353
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #17"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.7% (MEDIUM) · Higher = larger blast radius
    42.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.9% · Safe to merge
    16.9%