Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
33b99ec
docs: record development interruption 001 and connector fallback
LE-saber Oct 3, 2026
96b3e08
docs: record development interruption 002 archive download gate
LE-saber Oct 3, 2026
d43b321
chore: transport exact source snapshot for offline implementation
LE-saber Oct 3, 2026
98746f7
docs: record development interruption 003 baseline execution timeout
LE-saber Oct 3, 2026
de53521
docs: establish executable 0.2.0 profile implementation plan
LE-saber Oct 3, 2026
206ce85
docs: record development interruption 004 wildcard validation test
LE-saber Oct 3, 2026
483784d
docs: record development interruption 005 domain matcher fuzz
LE-saber Oct 3, 2026
1ace915
chore: stage checksum-verified implementation transport 1/4
LE-saber Oct 3, 2026
5d3935e
chore: stage checksum-verified implementation transport 2/4
LE-saber Oct 3, 2026
c0de6be
chore: stage checksum-verified implementation transport 3/4
LE-saber Oct 3, 2026
b40dd75
chore: stage checksum-verified implementation transport 4/4
LE-saber Oct 3, 2026
4f64c88
chore: apply verified offline implementation on development branch
LE-saber Oct 3, 2026
349c0bb
chore: materialize verified 0.2.0 implementation
LE-saber Oct 3, 2026
29fb90f
feat: implement 0.2.0 domain profiles and inherited preference policies
github-actions[bot] Oct 3, 2026
618915a
ci: verify feature branches and PRs with gated official SDK and main-…
LE-saber Oct 3, 2026
267c3c7
docs: explain named profiles, domain sets, inheritance and r6 upgrade
LE-saber Oct 3, 2026
eedaac0
docs: record inspection failure 006 connector branch URL validation
LE-saber Oct 3, 2026
a14c9c0
docs: record inspection failure 007 connector workflow URL validation
LE-saber Oct 3, 2026
52a4db7
docs: record PR kernel failure 008 watchdog completion barrier
LE-saber Oct 3, 2026
ccc761c
test: wait for complete watchdog nft and conntrack recovery before re…
LE-saber Oct 3, 2026
8411e8e
docs: record inspection failure 009 and successful SDK binary smoke
LE-saber Oct 3, 2026
5cf2cb8
docs: finalize 0.2.0 execution and verification evidence with target-…
LE-saber Oct 3, 2026
b448941
docs: record extended fuzz failure 010 repeated root-dot normalization
LE-saber Oct 3, 2026
56e7596
docs: record local verification interruption 011 execution time budget
LE-saber Oct 3, 2026
f8ae68c
fix: make query normalization idempotent and retain extended fuzz reg…
LE-saber Oct 3, 2026
a8c9d5f
docs: record repeated local tool timeout 012 and stop monolithic retries
LE-saber Oct 3, 2026
3c8083c
docs: record PR failure 013 dual-protocol fixture port collision
LE-saber Oct 3, 2026
8b03a9a
test: reserve dual-protocol fixture ports and close failed reservations
LE-saber Oct 3, 2026
e8792ec
docs: record r2 source clone network failure
LE-saber Oct 3, 2026
7f05cc2
docs: record r2 source archive retrieval interruption
LE-saber Oct 3, 2026
30f1f24
chore: export fixed r1 and r6 source snapshots for offline verification
LE-saber Oct 3, 2026
d33878c
docs: record workflow-name fetch rejection during r2 snapshot recovery
LE-saber Oct 3, 2026
ed65ca7
docs: record workflow collection endpoint restriction
LE-saber Oct 3, 2026
9791507
docs: record unavailable streaming execution for baseline tests
LE-saber Oct 3, 2026
04878ca
docs: record executable r2 UX and traffic recovery plan
LE-saber Oct 3, 2026
d13e8bf
test: record four reproduced traffic lifecycle failures before repair
LE-saber Oct 3, 2026
3d44881
docs: record direct LuCI source download failure and target-rootfs fa…
LE-saber Oct 3, 2026
56954ed
docs: record bounded local suite execution timeout
LE-saber Oct 3, 2026
7a43b6f
docs: record transient connector interruption before r2 source public…
LE-saber Oct 3, 2026
94e9e04
feat: r2 domain-set and mode-set editor with end-to-end traffic recovery
LE-saber Oct 3, 2026
df88eee
docs: record sdk_rootfs failure for run 37130017251
github-actions[bot] Oct 3, 2026
6c86e6f
fix: persist mode-set policy ordering with target LuCI
LE-saber Oct 3, 2026
96f08b2
docs: record browser failure for run 37131055598
github-actions[bot] Oct 3, 2026
da62db0
test: model LuCI move ordering faithfully in harness
LE-saber Oct 3, 2026
c72a0a4
docs: record sdk_rootfs failure for run 37131311097
github-actions[bot] Oct 3, 2026
2d7e00c
fix: persist mode-set order after LuCI selector saves
LE-saber Oct 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 119 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,101 +1,165 @@
name: NetPreference MVP
name: NetPreference verify and SDK
on:
push:
branches: [feat/mvp]
paths: ['.bootstrap/READY', 'cmd/**', 'internal/**', 'tests/**', 'scripts/**', 'files/**', 'packaging/**', 'openwrt/**', 'go.mod', '.github/workflows/**']
branches: ['**']
paths: ['cmd/**', 'internal/**', 'tests/**', 'scripts/**', 'files/**', 'packaging/**', 'openwrt/**', 'go.mod', '.github/workflows/**', 'LICENSE', 'docs/LICENSE-Go']
pull_request:
workflow_dispatch:
permissions:
contents: write
contents: read
concurrency:
group: netpreference-${{ github.ref }}
group: netpreference-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
verify:
runs-on: ubuntu-24.04
timeout-minutes: 20
timeout-minutes: 25
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
fetch-depth: 0
- name: Materialize checked source transport
if: github.event_name == 'push' && hashFiles('.bootstrap/READY') != ''
shell: bash
run: |
set -euo pipefail
python3 - <<'PY'
import base64, hashlib, io, lzma, pathlib, tarfile
root=pathlib.Path('.')
encoded=''.join(p.read_text().strip() for p in sorted(root.glob('.bootstrap/part-*.b64')))
data=base64.b64decode(encoded,validate=True)
expected=(root/'.bootstrap/READY').read_text().strip()
assert hashlib.sha256(data).hexdigest()==expected, 'source transport checksum mismatch'
with tarfile.open(fileobj=io.BytesIO(lzma.decompress(data)),mode='r:') as archive:
for member in archive.getmembers():
path=pathlib.PurePosixPath(member.name)
assert member.isfile() and not path.is_absolute() and '..' not in path.parts
assert path.parts[0] not in ('.git','.github','.bootstrap','dist')
assert not member.name.startswith('docs/failures/')
archive.extractall('.',filter='data')
PY
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git rm -r .bootstrap
git add README.md LICENSE .gitignore go.mod cmd internal files packaging scripts tests openwrt docs
git commit -m 'feat: materialize tested NetPreference 0.1.0 MVP source'
git push origin HEAD:feat/mvp
persist-credentials: false
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16
if: hashFiles('go.mod') != ''
with:
go-version: stable
cache: false
- name: Unit, wire behavior, fuzz, package and static checks
- run: mkdir -p dist/logs
- name: Unit, real DNS wire, race, fuzz, LuCI and package checks
id: core
if: hashFiles('go.mod') != ''
shell: bash
run: |
set -o pipefail
mkdir -p dist/logs
bash scripts/check.sh 2>&1 | tee dist/logs/core.txt
- name: Install isolated kernel-lab dependencies
if: hashFiles('go.mod') != ''
- name: Install isolated kernel-lab tools
id: kernel_tools
run: sudo apt-get update && sudo apt-get install -y nftables conntrack iproute2
- name: Real dual-stack nftables and crash recovery
- name: Real IPv4/IPv6 redirects, profiles, recovery and NAT66 preservation
id: kernel
if: hashFiles('go.mod') != ''
shell: bash
run: |
set -o pipefail
sudo python3 tests/netns.py 2>&1 | tee dist/logs/kernel.txt
- name: Target userspace opkg install and remove
id: rootfs
if: hashFiles('go.mod') != ''
continue-on-error: true
- name: Install pinned browser test runner
id: browser_tools
run: |
python3 -m pip install playwright==1.57.0
python3 -m playwright install --with-deps chromium
- name: Chromium mode-set interactions and real backend validation
id: browser
shell: bash
run: |
set -o pipefail
sudo bash tests/rootfs_install.sh 2>&1 | tee dist/logs/rootfs.txt
- name: Commit each failed phase separately
if: always() && github.event_name == 'push' && hashFiles('scripts/ci_failure.py') != ''
python3 tests/luci_browser.py 2>&1 | tee dist/logs/browser.txt
- name: Build the fixed r6 source for actual upgrade testing
id: legacy
shell: bash
run: |
set -o pipefail
bash scripts/build_legacy.sh 2>&1 | tee dist/logs/legacy.txt
- name: Capture phase outcomes
if: always()
env:
CORE_RESULT: ${{ steps.core.outcome }}
KERNEL_TOOLS_RESULT: ${{ steps.kernel_tools.outcome }}
KERNEL_RESULT: ${{ steps.kernel.outcome }}
ROOTFS_RESULT: ${{ steps.rootfs.outcome }}
BROWSER_TOOLS_RESULT: ${{ steps.browser_tools.outcome }}
BROWSER_RESULT: ${{ steps.browser.outcome }}
LEGACY_RESULT: ${{ steps.legacy.outcome }}
run: |
for phase in core kernel rootfs; do
var="${phase^^}_RESULT"
if [ "${!var}" = failure ]; then python3 scripts/ci_failure.py "$phase"; fi
done
- name: Upload package and exact verification logs
if: always() && hashFiles('dist/*.ipk') != ''
mkdir -p dist/logs
python3 - <<'PY'
import json,os,pathlib
pathlib.Path('dist/outcomes.json').write_text(json.dumps({k[:-7].lower():v for k,v in os.environ.items() if k.endswith('_RESULT')}))
PY
- name: Upload exact verification evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: netpreference-mvp-${{ github.run_id }}
name: netpreference-verification-${{ github.run_id }}
path: |
dist/*.ipk
dist/SHA256SUMS
dist/build-info.json
dist/coverage.out
dist/outcomes.json
dist/logs/
dist/browser/
dist/kernel-traffic.json
dist/ux-generated.uci
retention-days: 30
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
if: success()
with:
name: netpreference-legacy-${{ github.run_id }}
path: dist-legacy/*.ipk
retention-days: 7

sdk:
needs: verify
uses: ./.github/workflows/sdk-build.yml
with:
legacy_artifact: netpreference-legacy-${{ github.run_id }}

record-failures:
needs: [verify, sdk]
if: always() && github.event_name == 'push' && github.ref != 'refs/heads/main' && (needs.verify.result == 'failure' || needs.sdk.result == 'failure')
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
contents: write
actions: read
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
pattern: netpreference-*
path: .ci-artifacts
- name: One failure document and commit per failed phase
run: |
python3 - <<'PY'
import json,pathlib,subprocess
for report in sorted(pathlib.Path('.ci-artifacts').rglob('outcomes.json')):
for phase,result in json.loads(report.read_text()).items():
if result == 'failure':
subprocess.run(['python3','scripts/ci_failure.py',phase,str(report.parent/'logs'/f'{phase}.txt')],check=True)
PY

release:
needs: [verify, sdk]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
contents: write
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: netpreference-immortalwrt-sdk-${{ github.run_id }}
path: dist-sdk
- name: Publish only a fully verified main push
env:
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
set -euo pipefail
VERSION=$(sed -n 's/^PKG_VERSION:=//p' openwrt/luci-app-netpreference/Makefile)
REV=$(sed -n 's/^PKG_RELEASE:=//p' openwrt/luci-app-netpreference/Makefile)
TAG="v$VERSION"
(cd dist-sdk && sha256sum -c SHA256SUMS)
if gh release view "$TAG" >/dev/null 2>&1; then
echo "Release $TAG already exists; never overwrite an existing release."
exit 0
fi
printf '%s\n' "NetPreference $VERSION-r$REV" "" \
"Per-device defaults, named profiles/domain sets, domain-specific IPv4/IPv6 preference and inherited A/B." \
"Official ImmortalWrt 24.10.4 x86_64 SDK package. Verification and SDK jobs passed for $GITHUB_SHA." \
"Includes r6 config-preserving opkg upgrade and isolated dual-stack recovery tests." \
"DNS timing is a preference, not forced IPv6. Target-router/LuCI browser acceptance remains separate." > "$RUNNER_TEMP/release-notes.md"
gh release create "$TAG" dist-sdk/*.ipk dist-sdk/SHA256SUMS dist-sdk/build-info.json \
--target "$GITHUB_SHA" --title "NetPreference $VERSION" --notes-file "$RUNNER_TEMP/release-notes.md"
Loading
Loading