-
Notifications
You must be signed in to change notification settings - Fork 0
test(docs): contract the fenced-block shapes a split conflict resolution leaves #1967
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
Open
seonghobae
wants to merge
4
commits into
main
Choose a base branch
from
chore/fenced-block-integrity-contract
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+647
−0
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f3c8ff1
test(docs): contract the fenced-block shapes a split conflict resolut…
1db0804
fix(test): address Codex review — real fence parsing, mermaid comment…
c22937d
fix(test): drop the PyYAML import, require a keyword boundary, parse …
533b86b
fix(test): apply CommonMark's three-space fence indentation limit
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
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 |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| name: Markdown Fenced Block Quality CI | ||
|
|
||
| # The fenced-block contract exists for docs-only damage -- a conflict resolution | ||
| # that splits a mermaid diagram in ARCHITECTURE.md -- but every other suite-running | ||
| # workflow in this repository is path-filtered to Python, Rust, R or its own | ||
| # scripts, and `opencode-review-dispatch.yml` runs the Python suite only when | ||
| # `has_changed_tracked_files '*.py'` is true. Without this workflow the contract | ||
| # would never be collected on the exact change it was written to catch. | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main] | ||
| paths: | ||
| - "**.md" | ||
| - ".github/workflows/markdown-fenced-block-quality-ci.yml" | ||
| - "tests/test_markdown_fenced_block_integrity.py" | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "**.md" | ||
| - ".github/workflows/markdown-fenced-block-quality-ci.yml" | ||
| - "tests/test_markdown_fenced_block_integrity.py" | ||
|
|
||
| concurrency: | ||
| group: markdown-fenced-block-quality-${{ github.repository }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | ||
|
|
||
| jobs: | ||
| quality: | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - name: Harden runner | ||
| uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1 | ||
| with: | ||
| egress-policy: audit | ||
| - name: Checkout exact head with comparison history | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Determine exact changed range | ||
| env: | ||
| PR_BASE_SHA: ${{ github.event.pull_request.base.sha || '' }} | ||
| PR_HEAD_SHA: ${{ github.event.pull_request.head.sha || '' }} | ||
| PUSH_BEFORE_SHA: ${{ github.event.before || '' }} | ||
| PUSH_HEAD_SHA: ${{ github.sha }} | ||
| shell: bash --noprofile --norc -e -o pipefail {0} | ||
| run: | | ||
| if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then | ||
| base_sha="$PR_BASE_SHA" | ||
| head_sha="$PR_HEAD_SHA" | ||
| diff_range="${base_sha}...${head_sha}" | ||
| else | ||
| base_sha="$PUSH_BEFORE_SHA" | ||
| head_sha="$PUSH_HEAD_SHA" | ||
| if [[ "$base_sha" =~ ^0+$ ]]; then | ||
| base_sha="$(git rev-parse "${head_sha}^")" | ||
| fi | ||
| diff_range="${base_sha}..${head_sha}" | ||
| fi | ||
| git cat-file -e "${base_sha}^{commit}" | ||
| git cat-file -e "${head_sha}^{commit}" | ||
| { | ||
| echo "CHANGE_BASE_SHA=$base_sha" | ||
| echo "CHANGE_HEAD_SHA=$head_sha" | ||
| echo "CHANGE_DIFF_RANGE=$diff_range" | ||
| } >>"$GITHUB_ENV" | ||
| - name: Set up Python | ||
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| with: | ||
| python-version: "3.14" | ||
| cache: pip | ||
| cache-dependency-path: requirements-opencode-review-ci-hashes.txt | ||
| - name: Install exact hash-locked tooling | ||
| run: >- | ||
| python -m pip install --disable-pip-version-check --require-hashes | ||
| -r requirements-opencode-review-ci-hashes.txt | ||
| - name: Run the fenced-block contract and the complete repository suite | ||
| shell: bash --noprofile --norc -e -o pipefail {0} | ||
| run: | | ||
| # Named first so a split block reports as its own failing step rather | ||
| # than one line inside a 2900-test run. | ||
| python -m pytest -q tests/test_markdown_fenced_block_integrity.py | ||
| python -m pytest -q | ||
| python -m compileall -q tests | ||
| git diff --check "$CHANGE_DIFF_RANGE" | ||
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.
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.