Repository navigation
feat: harden native plugin publishing lifecycle #11
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
Merged
Changes from 18 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
9d06f01
fix: bootstrap the initial plugin release
nathanvale 83fd820
Address PR review feedback (#11)
nathanvale a1e3dab
fix: enforce native plugin release metadata
nathanvale 246f1e3
Address PR review feedback (#11)
nathanvale 6930f18
feat(init): reset recipient release lineage to 0.1.0
nathanvale 96aad7e
feat(payload): enforce one safe regular-file-only payload inventory
nathanvale 5396fd3
feat(metadata): own native package rules with two named profiles
nathanvale e6451fe
feat(release): bind proof, tag, release, and repair to one commit
nathanvale 3127a5b
feat(ci): gate installable payload changes on releasable PR title
nathanvale 5f1b06f
feat(readiness): verify human-owned publication safeguards read-only
nathanvale 57cd1d3
feat(proof): prove native install, cache, trust, update, and rollback
nathanvale d1e859f
feat(canary): qualify publishing-system changes with hosted Git canaries
nathanvale 048faae
docs: align operator guidance with the hardened release contract
nathanvale d00e0fb
docs(plan): add reviewed plugin publishing hardening plan
nathanvale 4c4dd44
fix(ci): isolate packaging fixture from GitHub SHA
nathanvale 04fb28a
Address PR review feedback (#11)
nathanvale 79cd078
fix: close release and canary review gaps
nathanvale 64b60ea
fix: exercise centralized release impact policy
nathanvale c55082c
fix: bind final release validation to candidate
nathanvale 95c4fb2
fix: close release repair review gaps
nathanvale d32f637
fix: fetch fork canary heads from source
nathanvale 4c95f28
fix: make hosted and repair gates fail closed
nathanvale ebbc03e
fix: bind release gates across rename and trust boundaries
nathanvale f3f8d03
fix: execute release gates from trusted code
nathanvale 232ec8e
fix: isolate release impact in trusted workflow
nathanvale 9c6954c
fix: preserve canary generator and transport boundaries
nathanvale aafeec5
fix: close release review gaps (#11)
nathanvale 4cf8727
docs: bind release automation identity (#11)
nathanvale 7180e3f
fix: bind package source to checkout (#11)
nathanvale 7832ac9
fix: resolve publication review findings (#11)
nathanvale 5cfdcdc
fix: pin bootstrap release to v0.1.0 (#11)
nathanvale fc0c99d
docs: clarify release automation credentials (#11)
nathanvale fef9097
fix: require release automation token (#11)
nathanvale 2a9efcf
fix: harden release and canary admission (#11)
nathanvale 6b9b3b6
fix: close release review gaps
nathanvale 8660009
fix: fail closed on workflow policy gaps
nathanvale 24034b5
fix: sanitize public canary publication
nathanvale 9096fa6
fix: prove sanitized public canaries
nathanvale 7036418
fix: preserve unusual archive filenames
nathanvale 7ea726a
fix: detect list-item workflow actions
nathanvale ed5a995
fix: resolve release qualification review findings (#11)
nathanvale fac5e40
fix: close remaining release review gaps
nathanvale cb182a3
fix: check main linear history policy
nathanvale bf01654
fix: verify hosted canary credentials (#11)
nathanvale 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
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
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 |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| { | ||
| ".": "0.1.0" | ||
| } | ||
| {} | ||
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
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,137 @@ | ||
| name: Hosted canary qualification | ||
|
|
||
| on: | ||
| pull_request_target: | ||
|
|
||
| permissions: | ||
| checks: write | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: hosted-canary-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| classify: | ||
| name: Classify publishing-system paths | ||
| runs-on: ubuntu-24.04 | ||
| outputs: | ||
| check_run_id: ${{ steps.check.outputs.check_run_id }} | ||
| required: ${{ steps.classify.outputs.required }} | ||
| triggers: ${{ steps.classify.outputs.triggers }} | ||
| steps: | ||
| - name: Start required check on the pull request head | ||
| id: check | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
| run: | | ||
| check_run_id=$(gh api --method POST "repos/${GITHUB_REPOSITORY}/check-runs" \ | ||
| -f name="Hosted public and private Git canaries" \ | ||
| -f head_sha="$HEAD_SHA" \ | ||
| -f status="in_progress" \ | ||
| --jq .id) | ||
|
myagentdojo marked this conversation as resolved.
Outdated
|
||
| printf 'check_run_id=%s\n' "$check_run_id" >> "$GITHUB_OUTPUT" | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ github.event.pull_request.base.sha }} | ||
| fetch-depth: 0 | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 | ||
| with: | ||
| bun-version: 1.3.14 | ||
| - name: Fetch candidate object without executing it | ||
| env: | ||
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
| run: git fetch --no-tags origin "$HEAD_SHA" | ||
|
myagentdojo marked this conversation as resolved.
Outdated
|
||
| - name: Classify with trusted base code | ||
| id: classify | ||
| env: | ||
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
| run: | | ||
| result="$(bun run ship:canary -- --classify --base "$BASE_SHA" --head "$HEAD_SHA" --json)" | ||
| printf '%s\n' "$result" | ||
| printf 'required=%s\n' "$(jq -r '.canaries.required' <<< "$result")" >> "$GITHUB_OUTPUT" | ||
| printf 'triggers=%s\n' "$(jq -c '.canaries.triggeringPaths' <<< "$result")" >> "$GITHUB_OUTPUT" | ||
|
|
||
| qualify: | ||
| name: Qualify immutable hosted candidates | ||
| if: needs.classify.outputs.required == 'true' && github.event.pull_request.head.repo.full_name == github.repository | ||
| needs: classify | ||
| runs-on: ubuntu-24.04 | ||
| environment: hosted-canary-qualification | ||
| steps: | ||
| - name: Check out trusted driver | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ github.event.pull_request.base.sha }} | ||
| fetch-depth: 0 | ||
| - name: Check out candidate as data | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| path: candidate | ||
| persist-credentials: false | ||
| fetch-depth: 1 | ||
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 | ||
| with: | ||
| bun-version: 1.3.14 | ||
| - name: Install pinned native marketplace CLIs | ||
| run: bun add --global "@anthropic-ai/claude-code@2.1.222" "@openai/codex@0.146.1" | ||
| - name: Qualify immutable candidates with trusted driver | ||
| env: | ||
| CANARY_GH_TOKEN: ${{ secrets.CANARY_GH_TOKEN }} | ||
| CANARY_SSH_KNOWN_HOSTS: ${{ secrets.CANARY_SSH_KNOWN_HOSTS }} | ||
| CANARY_SSH_PRIVATE_KEY: ${{ secrets.CANARY_SSH_PRIVATE_KEY }} | ||
| SOURCE_SHA: ${{ github.event.pull_request.head.sha }} | ||
| run: | | ||
| test -n "$CANARY_GH_TOKEN" | ||
| test -n "$CANARY_SSH_KNOWN_HOSTS" | ||
| test -n "$CANARY_SSH_PRIVATE_KEY" | ||
| export GH_TOKEN="$CANARY_GH_TOKEN" | ||
| gh auth setup-git | ||
| install -m 700 -d "$HOME/.ssh" | ||
| printf '%s\n' "$CANARY_SSH_KNOWN_HOSTS" > "$HOME/.ssh/known_hosts" | ||
| chmod 600 "$HOME/.ssh/known_hosts" | ||
| eval "$(ssh-agent -s)" | ||
| trap 'ssh-agent -k >/dev/null' EXIT | ||
| ssh-add - <<< "$CANARY_SSH_PRIVATE_KEY" | ||
| git remote set-url origin "git@github.com:${GITHUB_REPOSITORY}.git" | ||
| bun run ship:canary -- --execute --source-root candidate --ref "$SOURCE_SHA" --json | ||
|
|
||
| result: | ||
| name: Publish hosted-canary check result | ||
| if: always() | ||
| needs: | ||
| - classify | ||
| - qualify | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Enforce conditional qualification | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| CHECK_RUN_ID: ${{ needs.classify.outputs.check_run_id }} | ||
| CANARIES_REQUIRED: ${{ needs.classify.outputs.required }} | ||
| CLASSIFICATION_RESULT: ${{ needs.classify.result }} | ||
| QUALIFICATION_RESULT: ${{ needs.qualify.result }} | ||
| TRIGGERING_PATHS: ${{ needs.classify.outputs.triggers }} | ||
| run: | | ||
| conclusion=success | ||
| summary="Hosted canaries not required. Publishing-system triggers: ${TRIGGERING_PATHS}" | ||
| if [ "$CLASSIFICATION_RESULT" != "success" ]; then | ||
| conclusion=failure | ||
| summary="Publishing-system classification failed." | ||
| elif [ "$CANARIES_REQUIRED" = "true" ] && [ "$QUALIFICATION_RESULT" != "success" ]; then | ||
| conclusion=failure | ||
| summary="Hosted canaries were required but did not qualify. Publishing-system triggers: ${TRIGGERING_PATHS}" | ||
| elif [ "$CANARIES_REQUIRED" = "true" ]; then | ||
| summary="Hosted public and private Git canaries passed for: ${TRIGGERING_PATHS}" | ||
| fi | ||
| gh api --method PATCH "repos/${GITHUB_REPOSITORY}/check-runs/${CHECK_RUN_ID}" \ | ||
| -f status="completed" \ | ||
| -f conclusion="$conclusion" \ | ||
| -f "output[title]=Hosted canary qualification" \ | ||
| -f "output[summary]=$summary" >/dev/null | ||
| printf '%s\n' "$summary" | ||
| test "$conclusion" = "success" | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.