moving
Some checks failed
Installer Smoke / installer-smoke (push) Has been cancelled

This commit is contained in:
Oleg Maslov
2026-09-02 10:10:29 +02:00
commit 0c3e2ead3b
3841 changed files with 970576 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
# Waggle OS — Production Readiness Sign-off (2026-07-03)
> Engineering-director pass driven by a 10-lane parallel audit, executed as prioritized remediation streams (Opus implementation agents, Fable orchestration/QA). Companion to [`2026-07-03-release-audit.md`](./2026-07-03-release-audit.md).
## Session commit ledger (17 commits on `main`, from baseline `a1fad4f8`)
| Commit | Stream | Severity |
|---|---|---|
| `78660ab5` | lint baseline — real NaN-port fallback bug + 2 lint errors | — |
| `c5631a53` | consolidated 10-lane audit doc | — |
| `4ce8b9fe` | CI: real typecheck + apps/web test gates + dependabot | P1 |
| `d2161b01` | hive-mind-core: busy_timeout, raw_archive cap+reclaim, suppression split | P2 |
| `afcac457` | docs: root LICENSE, real run cmds, current layout, community files | P1 |
| `aff15212` | **security: sub-agent confirmation-gate + governance bypass** | **P0-1** |
| `8248a24e` | security: SSRF egress guard + agent-runtime quality | P1 |
| `02d33352` | web: NUL-byte repair, drop dead react-query, vendor chunks, modal a11y | P2/P3 |
| `d402cf23` | stabilize apps/web suite (testTimeout under CI load) | reliability |
| `a80dbb00` | keep ephemeral plan-authoring in read-only allowlist (planner fix) | P0-follow-up |
| `3d5d6abc` | raise testing-library asyncUtilTimeout to harden CI gate | reliability |
| `5f550421` | server: stripe webhook auth-exempt + global error handler + zod boundaries | P2 |
| `a225e2eb` | de-flake perf benchmarks (CI-scaled budgets) | reliability |
| `1258ae31` | **stage sidecar runtime deps into packaged app** | **P0-2** |
| `ec9ab6f8` | deps: lockfile sync, drop bun.lock, launcher engines | P2/P3 |
| `87ff15af` | untrack .understand-anything/.trash bloat (838 files/6.4MB) | P3 |
| `6d073e56` | align auto-update tests with the disabled updater | P0-2 follow-up |
## What was IMPLEMENTED
- **Sidecar dependency staging** (`scripts/stage-sidecar-deps.mjs`): a metafile-driven stager that copies the transitive prod-dep closure of esbuild-externalized packages into `resources/node_modules`, plus a `beforeBuildCommand` guard requiring it — closing the packaged-binary MODULE_NOT_FOUND blocker.
- **SSRF egress guard** (`url-egress-guard.ts` ×2): scheme allowlist + DNS-resolved private/loopback/link-local/CGNAT/IPv6-ULA blocking + per-redirect-hop re-validation, wired into `web_fetch` + harvest URL ingestion.
- **CI merge gates**: real package + apps/web typecheck, the 131-file apps/web test suite now blocks, dependabot for the monorepo.
- **Server hardening**: Stripe webhook reachable in hosted mode, global `setErrorHandler`, shared `validateBody` zod preHandler on 5 high-value routes, suppression read-error accounting.
- **Substrate robustness**: `busy_timeout` + retry, `raw_archive` size cap + `reclaim()`, suppression error/match discrimination.
- **Community + legal**: root LICENSE, SECURITY.md, CODE_OF_CONDUCT, PR/issue templates.
## What was REFACTORED
- Sub-agent tool construction now threads a request-scoped security context (approval hooks + governance blockedTools + persona allowlist) across the spawn boundary.
- Read-only persona filtering inverted from an incomplete write **denylist** to a read-only **allowlist**.
- Perf-benchmark thresholds centralized behind a CI-aware `perfBudget()`.
- apps/web: dead react-query provider removed; modal a11y consolidated onto the existing `useFocusTrap` hook.
## What was REDESIGNED
- **`executeToolCall` critical-destructive floor**: an unconditional, hooks-independent deny for `isCriticalNeverAutopass` operations reaching any execution path without an approval mechanism — a structural guarantee that no spawn path can run `rm -rf ~`/`sudo`/force-push-main unconfirmed.
- **Auto-updater**: the broken empty-signature channel was removed (rather than left advertising a non-functional update path) pending real signing.
## What was VERIFIED
- P0-1 closed with TDD: sub-agent critical-command denial, governance/persona enforcement across spawn (24 targeted tests).
- P0-2 validated by booting the bundled `service.js` with the staged `NODE_PATH`: `/health` 200, **0 MODULE_NOT_FOUND**, in-process ONNX embedder executes.
- Full gates green through the arc: agent 3079/3079, server 2106+/2106+, hive-mind-core 729/729, apps/web 1194/1194 (stable across repeated runs), build:packages tsc chain 0, lint 0.
- Secret history scan CLEAN (all key-shaped strings are test fixtures).
- **Final integrated run: 8137 passed / 5 skipped / 0 failed (608 files), lint 0, build:packages 0.**
A prior full-parallelism run showed 18 "failed" files; every one was triaged and **all pass in isolation** — the failures were CPU-starvation load flakiness (an 8000-test concurrent run on a dev box with orphaned `next dev` servers), not code. Re-running with reduced parallelism (`--maxWorkers=3`) sidesteps the starvation and is fully green. The one *real* full-run failure (a second updater test asserting the removed config) was fixed. Clean CI runners will not hit the local starvation; CI-flakiness was additionally hardened proactively (apps/web `testTimeout`/`asyncUtilTimeout`/`retry`, perf-benchmark `perfBudget`).
## What remains INTENTIONALLY DEFERRED
- **Full signed Tauri desktop build** per platform (4560min Rust job; maintainer step). The dependency-resolution mechanism is proven; final packaging (NSIS/DMG of the 271MB node_modules) needs a real build. Code signing / notarization certs are a maintainer provision.
- **Auto-update re-enablement**: needs `TAURI_SIGNING_PRIVATE_KEY` + a real-signature `latest.json` generator.
- **`npm audit` moderates** (react-router open-redirect, tar): left to dependabot's targeted, CI-validated bumps — a blanket `npm audit fix` wanted breaking downgrades (next@9) and was rejected.
- **apps/web `strict:true` burndown**, better-sqlite3 single-major override, and a full 80-route zod sweep: scoped follow-ups, patterns now in place.
- **`apps/www` GitHub Pages deploy** (`next build``.next/`, workflow uploads `dist/`): a marketing-site deploy-target decision (Pages static-export vs Vercel) for the owner — does not block the core release.
- **CI `npm install``npm ci`**: lockfile is now in sync (dry-run validates); flip pending a clean-machine `npm ci` run.
## Confidence
**High** that the *repository* — source, tests, security posture, build system, CI gates, docs, and hygiene — is production-ready for a first public open-source release. The two P0 release-blockers are closed and verified; every P1 is resolved; the P2 hardening pass landed; the full suite is green (8137 tests); lint and typecheck are clean; git history carries no secrets; and the out-of-box contributor experience (LICENSE, real run commands, accurate architecture, community files) now survives a clean-machine trace.
The gate between "repository-ready" (done) and "artifact published to the public" is a set of **maintainer-only external actions**, not code deficiencies — and each is documented above:
1. Run one real signed `tauri build` per platform to confirm the packaged 271MB `node_modules` bundles and boots (the dependency-resolution mechanism is proven; only the final Rust/NSIS/DMG packaging remains).
2. Provision code-signing / notarization certificates (Apple Developer ID, Windows Authenticode) — or ship v1 unsigned with documented install steps.
3. Publish the GitHub repo's `releases/latest` (the download funnel 404s until then) and finalize the placeholder legal copy — founder-owned.
I would approve the repository for the public release on the condition that those three maintainer steps are completed. I would **not** hold the release for the intentionally-deferred items (audit-moderate dependabot bumps, apps/web strict-mode burndown, full zod sweep, updater re-enablement, marketing-site deploy target) — they are tracked, non-blocking follow-ups with patterns already in place.
**One-line:** the code is ready; the release is a signing-key-and-publish step away.
## Post-push CI validation (real Linux runner)
Pushed all commits to `origin/main` and watched CI. The first run **caught a genuine cross-platform bug the local (Windows) run masked**: the SSRF egress guard didn't strip IPv6 brackets, so `new URL('http://[::1]/').hostname` = `[::1]` failed `isIP()` and fell through to a DNS lookup — which throws `ENOTFOUND` on Linux (CI red) but happens to resolve on Windows (local green). Fixed by stripping brackets before classification in both guard copies (`97904e4f`); bracketed IPv6 literals now classify (loopback/private/…) with no DNS dependency. This is exactly the value of the hardened gates — the real typecheck + full test suite on a clean Linux runner surfaced a defect the dev box hid.
Re-run result: **`RUN: success``test` job (build:packages + typecheck:web + lint + app tsc + npm test + apps/web suite) green on Linux/Node.** The `e2e` (Playwright) job is red but `continue-on-error` by design — a pre-existing advisory job for flake-prone broad journeys (stabilizing it is a tracked follow-up). Dependabot began opening its first monorepo update PRs immediately from the new config.