Add GUI WebApp Launcher Wrapper script #428
Workflow file for this run
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: Section Marker Integrity Audit | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'bash4llm' | |
| - 'bin/bash4llm' | |
| - '.github/workflows/section-integrity.yml' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'bash4llm' | |
| - 'bin/bash4llm' | |
| - '.github/workflows/section-integrity.yml' | |
| workflow_dispatch: | |
| jobs: | |
| audit-sections: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Verify Macro-Sections and Full Tag Symmetry | |
| run: | | |
| bash -c ' | |
| set -euo pipefail | |
| echo "Locating bash4llm executable..." | |
| # Dynamic Path Detection | |
| B4L_BIN="./bash4llm" | |
| if [ ! -f "$B4L_BIN" ]; then | |
| B4L_BIN=$(find . -maxdepth 2 -name "bash4llm" -type f | head -n 1 || true) | |
| fi | |
| if [ -z "$B4L_BIN" ] || [ ! -f "$B4L_BIN" ]; then | |
| echo "❌ ERROR: Executable file '\''bash4llm'\'' not found in repository!" | |
| ls -la | |
| exit 1 | |
| fi | |
| echo "Found executable at: $B4L_BIN" | |
| chmod +x "$B4L_BIN" | |
| # 1. Verify Macro-Sections (BEGIN / END) match | |
| macro_begin=$(grep -cE "^# SECTION: [A-Z0-9_]+ - BEGIN" "$B4L_BIN" || true) | |
| macro_end=$(grep -cE "^# SECTION: [A-Z0-9_]+ - END" "$B4L_BIN" || true) | |
| if [ "$macro_begin" -ne "$macro_end" ] || [ "$macro_begin" -eq 0 ]; then | |
| echo "❌ ERROR: Macro-Section mismatch! BEGIN count: $macro_begin, END count: $macro_end" | |
| exit 1 | |
| fi | |
| # 2. Extract full line tags including trailing anchors --->N-- safely under pipefail | |
| open_tags=$(grep -oE "#--[0-9]+<---\[ SECTION: [A-Z0-9_]+ \]--->[0-9]+--" "$B4L_BIN" | sort || true) | |
| close_tags=$(grep -oE "#--[0-9]+<---\[ /SECTION: [A-Z0-9_]+ \]--->[0-9]+--" "$B4L_BIN" | sed "s#/SECTION:#SECTION:#" | sort || true) | |
| if [ -z "$open_tags" ]; then | |
| echo "❌ ERROR: No section tags found in $B4L_BIN!" | |
| exit 1 | |
| fi | |
| if [ "$open_tags" != "$close_tags" ]; then | |
| echo "❌ ERROR: Mismatch between opening and closing Section tags or trailing anchors!" | |
| diff -u <(echo "$open_tags") <(echo "$close_tags") || true | |
| exit 1 | |
| fi | |
| # 3. Check for Duplicate Section Tags | |
| duplicates=$(echo "$open_tags" | sort | uniq -d || true) | |
| if [ -n "$duplicates" ]; then | |
| echo "❌ ERROR: Duplicate section tags detected:" | |
| echo "$duplicates" | |
| exit 1 | |
| fi | |
| # 4. Enforce Flat Architecture (Strictly NO Subsections $N.X) | |
| if grep -qE "#--[0-9]+\.[0-9]+" "$B4L_BIN"; then | |
| echo "❌ ERROR: Subsections ($N.X) detected! Architectural violation of Flat Policy." | |
| grep -nE "#--[0-9]+\.[0-9]+" "$B4L_BIN" | |
| exit 1 | |
| fi | |
| echo "✅ Section Marker Architecture on $B4L_BIN is 100% Valid and Symmetrical!" | |
| ' |