Files
timmy-talking-turd/.gitea/workflows/quality.yml
T
timmy 2094a07d9f
Quality gates / quality (pull_request) Successful in 18m50s
feat(portability): version the backup, migrate older files, and keep AI provenance (#35)
A backup is the person's own record and has to keep working as the AI fields evolve.

- Export stamps schema version 2 and carries the confirmed logs plus the training
  contribution receipts, including withdrawn tombstones; both are written through an
  allowlist so unknown keys and credentials never leave the device.
- Import accepts version 1 and 2. A version 1 file is upgraded, the notice names the
  version it came from, and entries that predate provenance stay null instead of being
  given a source they never recorded.
- A file from a newer Timmy is refused with an update instruction, malformed, oversized
  and over-limit files fail closed, and a refused import leaves the ledger unchanged.
- A log saved from a confirmed or corrected AI suggestion records its provenance
  (source, suggested visible fields, model, confirmedAt) and the entry sheet states it.
- Service worker shell cache v5 -> v6 so installed clients actually receive the change.

Evidence: tests/portability.test.js (7 unit cases), tests/portability.acceptance.mjs
(real browser: v1 upgrade, future refusal with unchanged ledger, provenance recorded,
export v2, round trip), release demo scenes with on-camera caption proof, and the
release builder gate portable_backup_restore.

Refs #35
2026-10-22 11:08:55 +00:00

72 lines
1.9 KiB
YAML

name: Quality gates
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
quality:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install reproducibly
run: |
npm ci
python3 -m pip install --break-system-packages -r requirements-test.txt
- name: Install browser
run: npx playwright install --with-deps chromium
- name: Unit and security tests
run: |
npm test
python3 tests/staging-deploy.test.py -v
- name: Mobile browser acceptance
run: |
npm start > /tmp/timmy-server.log 2>&1 &
server_pid=$!
trap 'kill "$server_pid"' EXIT
for attempt in $(seq 1 30); do
if curl --fail --silent http://127.0.0.1:4173/ > /dev/null; then
break
fi
if [ "$attempt" -eq 30 ]; then
cat /tmp/timmy-server.log
exit 1
fi
sleep 1
done
npm run test:ui
npm run test:photo
npm run test:mobile-capture
npm run test:sleek
npm run test:manual-fallback
npm run test:provisional
npm run test:followup
npm run test:vision-refusal
npm run test:worker-readiness
npm run test:pattern-summary
npm run test:photo-lifecycle
npm run test:training-contribution
npm run test:portability
- name: Dependency audit
run: npm audit --audit-level=high
- name: Syntax checks
run: |
npm run check:syntax
node --check tests/staging.acceptance.mjs
- name: Diff hygiene
run: npm run check:diff