chore: run terminal settlement repair #1
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
| name: Port memory guard successor onto current dev | |
| on: | |
| issue_comment: | |
| types: [created] | |
| permissions: | |
| contents: write | |
| issues: write | |
| jobs: | |
| port: | |
| if: github.event.issue.number == 1 && github.event.comment.body == '/port-memory-clean' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: fix/memory-guard-domain-scheduler | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Apply exact net feature diff onto current dev | |
| id: apply | |
| continue-on-error: true | |
| shell: bash | |
| run: | | |
| git config user.name "twoimo" | |
| git config user.email "32544727+twoimo@users.noreply.github.com" | |
| git fetch --no-tags origin backup/memory-guard-426ca8d1 | |
| git diff --binary 5cd97b6611a56b4df75b9151e9f28691c28d7f98..origin/backup/memory-guard-426ca8d1 > /tmp/memory-successor.patch | |
| if ! git apply --3way --index /tmp/memory-successor.patch; then | |
| git diff --name-only --diff-filter=U > /tmp/memory-conflicts.txt | |
| exit 1 | |
| fi | |
| - name: Report patch conflicts | |
| if: steps.apply.outcome == 'failure' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const paths = fs.existsSync('/tmp/memory-conflicts.txt') | |
| ? fs.readFileSync('/tmp/memory-conflicts.txt', 'utf8').trim() | |
| : '(patch failed before conflict enumeration)'; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: 1, | |
| body: `MEMORY_PORT_FAILED\n\n${paths}`, | |
| }); | |
| - name: Stop after conflict report | |
| if: steps.apply.outcome == 'failure' | |
| run: exit 1 | |
| - name: Commit clean port | |
| shell: bash | |
| run: | | |
| git add -A | |
| git commit -m "feat(coding-agent): port memory pressure observability" | |
| git push --force-with-lease origin HEAD:fix/memory-guard-domain-scheduler | |
| - name: Report successful port | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: 1, | |
| body: `MEMORY_PORT_OK\n\n${process.env.GITHUB_SHA}`, | |
| }); |