Skip to content

SAN-789: harden spec-pin-integrity test against shallow submodule clones - #82

Merged
nicallen-exd merged 1 commit into
mainfrom
san789-pin-integrity-unshallow-py
Jun 4, 2026
Merged

SAN-789: harden spec-pin-integrity test against shallow submodule clones#82
nicallen-exd merged 1 commit into
mainfrom
san789-pin-integrity-unshallow-py

Conversation

@nicallen-exd

Copy link
Copy Markdown
Contributor

Summary

  • test_spec_pin_is_on_protocol_main false-negatives in shallow submodule clones (depth 1, as used in the cross-SDK smoke test) because the parent chain between origin/main and an older-but-merged pin is absent, causing merge-base --is-ancestor to return a false negative
  • Detect shallow repo via git rev-parse --is-shallow-repository and unshallow via git fetch --unshallow origin before the reachability check, making the assertion reliable at any clone depth
  • No changes to pin read, fetch-failure handling, or the is-ancestor assertion itself; test-only

Ref SAN-667 (original spec-pin enforcement). Parallel fix in sanna-ts.

Test plan

  • tests/test_spec_pin_integrity.py -- 2 passed
  • Full suite -- 3414 passed, 1 skipped, 11 xfailed, no regressions
  • generate_state_doc.py --check -- up to date

Known broken baseline

None.

Tickets

SAN-789, SAN-667

test_spec_pin_is_on_protocol_main false-negatives in shallow clones (depth 1,
as used in the cross-SDK smoke) because the parent chain between origin/main
and an older-but-merged pin is absent. Detect shallow repo and unshallow before
the merge-base --is-ancestor check so the assertion is reliable at any clone depth.
Ref SAN-667 (original spec-pin enforcement).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@nicallen-exd
nicallen-exd merged commit 9fef3b1 into main Jun 4, 2026
5 checks passed
@nicallen-exd
nicallen-exd deleted the san789-pin-integrity-unshallow-py branch June 4, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant