-
Notifications
You must be signed in to change notification settings - Fork 0
feat(PLT-1735): golden vector parity — Python side #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
eywalker
merged 16 commits into
main
from
eywalker/plt-1735-starfix-starfix-python-cross-language-hash-parity-via-golden
Jun 21, 2026
Merged
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4ba86e9
docs: add golden-vector parity spec and implementation plan (PLT-1735)
kurodo3[bot] 267fd1a
docs: sync corrected implementation plan (PLT-1735)
kurodo3[bot] 18bac84
feat: add golden fixture tests/golden/include_metadata_v0.3.json (PLT…
kurodo3[bot] b797287
test: add cross-language golden parity tests for include_metadata (PL…
kurodo3[bot] c0384a1
fix: add ensure_ascii=False to _serialized_schema for non-ASCII field…
kurodo3[bot] 02b8981
ci: add golden-sync-check drift gate (PLT-1735)
kurodo3[bot] f079780
ci: add manual release workflow (PLT-1735)
kurodo3[bot] 8915879
fix: update fixture description, add defensive error check to golden-…
kurodo3[bot] d57d90a
fix: address PR review — pin actions to full SHAs, add permissions bl…
kurodo3[bot] 633db5f
fix: address Copilot review — spec accuracy, fork guard, version norm…
kurodo3[bot] e09e0a0
fix: correct release architecture in spec — crates.io for Rust, no ma…
kurodo3[bot] f4e9f22
fix: update spec — crates.io uses trusted publishing, no API token ne…
kurodo3[bot] 0c3b7c9
fix: assert key_reorder fixture invariant; add pull-requests: read to…
kurodo3[bot] e0e918d
fix: open fixture with explicit utf-8 encoding
kurodo3[bot] 9ce01f6
refactor: merge publish.yml into release.yml; pin all action SHAs
kurodo3[bot] f256d6c
fix: defer tag push until after build; update docs for merged release…
kurodo3[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,17 +6,20 @@ on: | |
| pull_request: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.11", "3.12"] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5 | ||
|
|
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| run: uv python install ${{ matrix.python-version }} | ||
|
|
@@ -30,10 +33,10 @@ jobs: | |
| license-check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5 | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync --dev | ||
|
|
@@ -47,11 +50,14 @@ jobs: | |
| dependency-review: | ||
| runs-on: ubuntu-latest | ||
| if: github.event_name == 'pull_request' | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read # required by actions/dependency-review-action to fetch PR diff | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
|
|
||
| - name: Dependency review | ||
| uses: actions/dependency-review-action@v4 | ||
| uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4 | ||
| with: | ||
| deny-licenses: >- | ||
| GPL-2.0-only, GPL-2.0-or-later, | ||
|
|
@@ -60,3 +66,44 @@ jobs: | |
| LGPL-2.0-only, LGPL-2.0-or-later, | ||
| LGPL-2.1-only, LGPL-2.1-or-later, | ||
| LGPL-3.0-only, LGPL-3.0-or-later | ||
|
|
||
| golden-sync-check: | ||
| runs-on: ubuntu-latest | ||
| # Secrets are not available to fork PRs, so skip the check there. | ||
| # Internal PRs and pushes to main always run it. | ||
| if: > | ||
| github.event_name != 'pull_request' || | ||
| github.event.pull_request.head.repo.full_name == github.repository | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
|
Comment on lines
+70
to
+79
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. Added a job-level |
||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
|
|
||
| - name: Generate GitHub App token | ||
| id: app-token | ||
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3 | ||
| with: | ||
| app-id: ${{ secrets.STARFIX_APP_ID }} | ||
| private-key: ${{ secrets.STARFIX_APP_PRIVATE_KEY }} | ||
| repositories: starfix | ||
|
|
||
| - name: Fetch authoritative fixture from starfix | ||
| run: | | ||
| gh api repos/nauticalab/starfix/contents/tests/golden/include_metadata_v0.3.json \ | ||
| --jq '.content' | base64 -d > /tmp/upstream.json | ||
| env: | ||
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | ||
|
|
||
| - name: Fail on fixture drift | ||
| run: | | ||
| if [ ! -s /tmp/upstream.json ]; then | ||
| echo "ERROR: Could not fetch fixture from nauticalab/starfix main." | ||
| echo "Ensure nauticalab/starfix#main has tests/golden/include_metadata_v0.3.json" | ||
| echo "(starfix PLT-1735 PR must be merged before this check can pass)" | ||
| exit 1 | ||
| fi | ||
| if ! diff tests/golden/include_metadata_v0.3.json /tmp/upstream.json; then | ||
| echo "ERROR: tests/golden/include_metadata_v0.3.json has drifted from nauticalab/starfix main." | ||
| echo "Copy the updated fixture from the starfix repo and commit it." | ||
| exit 1 | ||
| fi | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: release | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: 'Release version (e.g. 0.3.0)' | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Generate GitHub App token | ||
| id: app-token | ||
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3 | ||
| with: | ||
| app-id: ${{ secrets.RELEASE_APP_ID }} | ||
| private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} | ||
|
|
||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| token: ${{ steps.app-token.outputs.token }} | ||
|
|
||
| - name: Configure git | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| - name: Tag and push release | ||
| run: | | ||
| # Strip a leading 'v' if the operator included one (e.g. "v0.3.0" → "0.3.0"), | ||
| # then always prefix with 'v' so the tag is exactly "v0.3.0". | ||
| VERSION="${{ inputs.version }}" | ||
| VERSION="${VERSION#v}" | ||
| git tag "v${VERSION}" | ||
| git push origin "v${VERSION}" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 0c3b7c9. Added an explicit
permissionsblock to thedependency-reviewjob withcontents: readandpull-requests: read. The workflow-level block stays atcontents: readonly; the extra permission is scoped to only the job that needs it.