Skip to content

[Superseded] Engineering foundation work archive - #693

Closed
matteius wants to merge 230 commits into
mainfrom
feat/engineering-foundation
Closed

matteius wants to merge 230 commits into
mainfrom
feat/engineering-foundation

Conversation

@matteius

@matteius matteius commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

This PR is superseded and closed for review. It combined unrelated product fixes, foundation tooling, generated contracts, inventories, and unfinished policy decisions. The complete work remains preserved on feat/engineering-foundation at e37e791e.

Focused replacements

Each replacement starts independently from main and carries its own regression tests:

These seven PRs contain only the named fix, its regression tests and necessary existing CI registrations. They have local passing evidence; hosted checks are still running. Nothing has been merged. This is the first extracted set, not a conversion of every archived change.

Remaining archived work

Foundation tooling, TypeScript/contracts, scanner policy, generated inventories, broad accessibility changes, and additional native changes remain on the preserved branch. They are not covered by the replacement PRs above and are not ready for merge through this PR. The original draft had failing hosted checks.

Further extraction candidates require their own review and isolated validation:

  • Frontend interaction fixes: profile/keyboard actions, repeated form IDs and radio-group isolation, media fullscreen controls, recording thumbnails. These can use existing main test tooling without the generated API or TypeScript infrastructure.
  • Remaining accessibility edits: review whether each addresses a demonstrated defect before publishing; many are labels or structural annotations.
  • Native remainder: 26 product/build paths across 16 groups—shutdown waits; stream-state disposal; PUT/DELETE launch failure; legacy-root retention; stale-media validation/paging; guarded stale-prune/schema 90; MP4 path reservation; pressure recovery; read-only storage failure; AAC bitrate arithmetic; query-column truncation; polygon counts; go2rtc sizing; descriptor initialization; authorization cache arithmetic; FAAC input-pointer build patch. These have not been independently revalidated as replacement PRs.
  • Native extraction ordering matters: path reservation precedes pressure recovery; guarded stale-prune depends on legacy-root retention, media paging, schema 90 and path reservation. Do not wholesale copy shared recording/storage source files into a small fix.
  • Tests-only characterizations, unapproved credential-storage proposals and unimplemented lifetime/concurrency hypotheses are not product fixes to republish.
  • Foundation tools/contracts/scanners: separate from product fixes; resolve the original hosted failures and pending policy decisions before proposing a foundation PR.

Physical-device qualification remains deferred. Dependency exceptions, scanner coverage gaps, owners and expiry dates remain unapproved. No replacement PR approves those exceptions or claims completion of the engineering-foundation plan.

matteius and others added 30 commits October 31, 2026 02:52
Add quality/findings.json (384 itemized findings, 359 count buckets,
coverage gaps), quality/scanners.json (expected scanner-run manifest
with access status, report conventions and fingerprint schemes for T6),
and quality/evidence/T1.md (provenance and count reconciliation).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Inventory all 193 web/js files with proposed domain owners, import graph,
entrypoints, shared i18n/auth/toast/modal/ZoneEditor/query consumers, tests,
and extension-sensitive test/config consumers. Map 297 UI operations onto the
239 registered C routes (first-match router semantics) with 10 recorded
discrepancies, Streams summary/full/role variants and list/edit option
dependencies for T11, and the PR #691 Live compatibility behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a Node-built-ins-only reporter/checker (scripts/quality/assets.mjs)
for the default and modern-only (LIGHTNVR_WEB_LEGACY=false) Vite builds:
installed bytes incl. shipped .gz copies and locales, served/gzip/brotli
per page without double-counting shared chunks, shared/lazy chunk
attribution, and sourcemap-based dependency composition. --capture
archives baselines under build/eng-baseline/1b8d4332/web-<profile>/;
--check is read-only and fails on missing/stale/mismatched artifacts or
budget overruns. Budgets: baseline +3% totals / +5% per page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Record CI-executed vs registered native tests, PRD scenario gaps for
media/storage/lifecycle, production feature profiles, calibration
constants, and bounded C improvement candidates. Baseline: 146/153 with
the as-specified build (FFmpeg 7.1 headers vs 8.0 libs on this host),
153/153 with consistent system FFmpeg.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add scripts/quality/findings.py (stdlib only) that normalizes CodeQL/Trivy
SARIF, clang-tidy, cppcheck XML, eslint JSON/job log, npm audit and GitHub
REST reports into the T1 line-independent fingerprints and compares them by
identity against quality/findings.json. New findings and bucket increases
fail regardless of disappearances; expired/unbounded exceptions, missing,
ambiguous, crashed, truncated, empty-scope and invalid reports fail; the
checker's exit code (0/1/2/3) reflects report status, never scanner exit
codes. Known coverage gaps are explicit, owned, expiring policy entries
shown as NOT SCANNED. --check never writes; --update-baseline --reason is
the only explicit writer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
assert row['task_id'] in graph, ('unknown mapped task', row)
assert {g['id'] for g in data['coverage_gaps']} == {g['id'] for g in inventory['coverage_gaps']}
assert all(not gap['approved_exception'] for gap in data['coverage_gaps'])
assert set(data['discrepancy_map']) == {d['id'] for d in json.load(open('quality/api-inventory.json'))['discrepancies']}
assert row['task_id'] in graph, ('unknown mapped task', row)
assert {g['id'] for g in data['coverage_gaps']} == {g['id'] for g in inventory['coverage_gaps']}
assert all(not gap['approved_exception'] for gap in data['coverage_gaps'])
assert set(data['discrepancy_map']) == {d['id'] for d in json.load(open('quality/api-inventory.json'))['discrepancies']}
for pid in descendants(process.pid):
try:
handles.append((pid, os.pidfd_open(pid)))
except ProcessLookupError:
for _, handle in reversed(handles):
try:
signal.pidfd_send_signal(handle, signal.SIGTERM)
except ProcessLookupError:
continue
forced = True
signal.pidfd_send_signal(handle, signal.SIGKILL)
except ProcessLookupError:
Comment thread scripts/quality/soak.py
for saved,fd in handles.values():
if not select.select([fd],[],[],0)[0]:
try:signal.pidfd_send_signal(fd,signal.SIGKILL);reports.append({'identity':saved,'action':'SIGKILL'})
except ProcessLookupError:pass
time.sleep(LIMITS['disconnect_seconds'])
baseline_ids = {row['id'] for row in completed(database)}
restored_wall = time.time(); restored = time.monotonic()
source = launch([str(go2rtc),'-config',str(directory / 'go2rtc.yaml')],'source-after.log')
import socket
import sqlite3
import subprocess
import sys
import hashlib
import json
from pathlib import Path
import shutil
import hashlib
import io
import json
import os
jest.mock('webrtc-adapter', () => ({}));
const { ToastContainer } = require('../../js/components/preact/ToastContainer.jsx');
const { SnapshotPreviewModal, VideoModal } = require('../../js/components/preact/UI.jsx');
const { ConfirmDialog, TextInputDialog } = require('../../js/components/preact/common/ModalDialog.jsx');
@codecov

codecov Bot commented Oct 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant