beads(hunt-r5): file round-5 remediation beads (epic + 10 children) #85
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
| # Round-trip integration test for plsql-bindgen against Oracle XE 23ai. | ||
|
Check failure on line 1 in .github/workflows/bindgen-roundtrip.yml
|
||
| # | ||
| # Wire path: | ||
| # 1. Pull container-registry.oracle.com/database/free:23.7.0.0-lite | ||
| # 2. Deploy a synthetic test package from corpus/synthetic/l1/ | ||
| # 3. Generate bindings via `cargo run -p plsql-bindgen -- | ||
| # --package <NAME>` | ||
| # 4. Run the round-trip integration test that calls the generated | ||
| # wrapper through rust-oracle, verifies the result, and prints a | ||
| # structured report. | ||
| # | ||
| # `PLSQL-BG-014` / oracle-9rkm. Plan reference: §13 (Bindings | ||
| # Generator) + §6.2.8 (Synthetic Lab). | ||
| # | ||
| # This workflow is intentionally **manual** (workflow_dispatch + | ||
| # scheduled weekly) because: | ||
| # - It requires `docker login container-registry.oracle.com` with | ||
| # a FUTC-accepted account, which can't run from anonymous PRs. | ||
| # - The pull is large (~3 GB) and takes ~5 min to boot. | ||
| # - Round-trip flakiness would block unrelated PRs if it gated | ||
| # every push. | ||
| name: bindgen-roundtrip (XE container) | ||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| # Weekly Saturday at 03:17 UTC — off-hours, low contention. | ||
| - cron: "17 3 * * 6" | ||
| jobs: | ||
| roundtrip: | ||
| name: bindgen round-trip (Oracle XE 23ai) | ||
| runs-on: ubuntu-latest | ||
| services: | ||
| oracle-xe: | ||
| image: container-registry.oracle.com/database/free:23.7.0.0-lite | ||
| ports: | ||
| - 1521:1521 | ||
| env: | ||
| ORACLE_PWD: ${{ secrets.ORACLE_XE_PWD }} | ||
| ORACLE_CHARACTERSET: AL32UTF8 | ||
| ENABLE_ARCHIVELOG: "false" | ||
| options: >- | ||
| --health-cmd "echo 'select 1 from dual;' | sqlplus -s system/${{ secrets.ORACLE_XE_PWD }}@//localhost:1521/FREEPDB1 | grep -q 1" | ||
| --health-interval 30s | ||
| --health-timeout 10s | ||
| --health-retries 20 | ||
| --health-start-period 5m | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Install Oracle Instant Client | ||
| run: | | ||
| sudo apt-get update -y | ||
| sudo apt-get install -y libaio1t64 || sudo apt-get install -y libaio1 | ||
| curl -L -o /tmp/instantclient.zip \ | ||
| https://download.oracle.com/otn_software/linux/instantclient/2370000/instantclient-basic-linux.x64-23.7.0.25.01.zip | ||
| sudo unzip -q /tmp/instantclient.zip -d /opt/oracle | ||
| sudo ln -sf /opt/oracle/instantclient_23_7 /opt/oracle/instantclient | ||
| echo "LD_LIBRARY_PATH=/opt/oracle/instantclient" >> $GITHUB_ENV | ||
| - name: Deploy synthetic test package | ||
| env: | ||
| ORACLE_PWD: ${{ secrets.ORACLE_XE_PWD }} | ||
| run: | | ||
| /opt/oracle/instantclient/sqlplus -s \ | ||
| system/$ORACLE_PWD@//localhost:1521/FREEPDB1 <<'SQL' | ||
| @corpus/synthetic/l1/pkg_employee_mgmt.pks | ||
| @corpus/synthetic/l1/pkg_employee_mgmt.pkb | ||
| exit; | ||
| SQL | ||
| - name: Generate bindings | ||
| run: | | ||
| cargo run -p plsql-bindgen -- \ | ||
| --package SYSTEM.PKG_EMPLOYEE_MGMT \ | ||
| --output target/generated-bindings \ | ||
| --target rust | ||
| - name: Run round-trip integration test | ||
| env: | ||
| ORACLE_PWD: ${{ secrets.ORACLE_XE_PWD }} | ||
| run: | | ||
| cargo test -p plsql-bindgen --test xe_roundtrip \ | ||
| --features live-roundtrip -- --nocapture | ||
| continue-on-error: false | ||
| - name: Upload generated bindings artifact | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: generated-bindings | ||
| path: target/generated-bindings/ | ||
| if-no-files-found: warn | ||
| - name: Upload coverage doctor report | ||
| if: always() | ||
| run: | | ||
| cargo run -p plsql-bindgen -- \ | ||
| --package SYSTEM.PKG_EMPLOYEE_MGMT \ | ||
| --output target/generated-bindings \ | ||
| --target rust \ | ||
| --robot-json > target/bindings-coverage.json || true | ||
| - uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: bindings-coverage | ||
| path: target/bindings-coverage.json | ||
| if-no-files-found: warn | ||