Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
# Vulnerability Report
Every failure point in the PCB Flow workspace, per subsystem, with severity, likelihood,
whether the system can **detect** it today, and whether it can **auto-recover**
today. Columns: **Sev** (S1–S4), **Lk** (likelihood), **Det?** (detectable now),
**Rec?** (auto-recoverable now).
> Reading guide: rows marked **Det? No** are the dangerous ones — a failure the
> system can't even see becomes an engineer staring at a stalled screen. Fixing
> detectability is Phase 1 of the [roadmap](ROADMAP.md).
---
## 1. Environment
| ID | Failure | Cause | Sev | Lk | Det? | Rec? |
|---|---|---|---|---|---|---|
| ENV-1 | Node.js missing/old | not installed; wrong version | S2 | Med | No | No |
| ENV-2 | Python missing/old | not installed; `python` vs `python3` | S2 | Med | No | No |
| ENV-3 | Chrome missing | not installed | S1 | Med | No | No |
| ENV-4 | KiCad / `kicad-cli` missing | not installed; not on PATH | S2 | Med | No | No |
| ENV-5 | VS Code / AI extension missing | not installed / not signed in | S1 | Med | No | No |
| ENV-6 | Wrong OS assumptions | scripts assume Bash; user on Windows PowerShell | S2 | High | No | No |
| ENV-7 | Path/quoting differences | spaces in paths; `\` vs `/`; `~` expansion | S3 | High | Partial | No |
| ENV-8 | Missing CLI tools (`git`, `rsync`, `websocat`) | not installed | S2 | Med | No | No |
| ENV-9 | Python/Node deps not installed | no `requirements`/`package` install step | S2 | High | No | No |
**Key gap:** there is **no environment check before work starts.** Every ENV-* row is
currently invisible until a script fails mid-task with a cryptic error. → the
[preflight doctor](DEPENDENCY_VALIDATION.md) closes all of these.
**OS reality:** the browser recipe (`rsync` a Chrome profile, `rm Singleton*`,
`--remote-debugging-port`) and `drc.sh` are **Bash + Linux paths**. On macOS the
Chrome profile path and app name differ; on Windows there is no `rsync`/`Singleton`
lock model and PowerShell quoting differs. **Today PCB Flow effectively assumes Linux.**
---
## 2. EasyEDA
| ID | Failure | Cause | Sev | Lk | Det? | Rec? |
|---|---|---|---|---|---|---|
| EDA-1 | Login expired / session timeout | cookie expiry; long session | S2 | High | Partial | No |
| EDA-2 | HTTP 401 (unauthorized) | expired/invalid session | S2 | High | Partial | No |
| EDA-3 | HTTP 403 (forbidden) | permission / region / bot block | S2 | Low | Partial | No |
| EDA-4 | HTTP 404 | wrong project/sheet UUID | S2 | Low | Partial | Partial |
| EDA-5 | HTTP 429 (rate limit) | too many part searches too fast | S3 | Med | Partial | Yes (backoff) |
| EDA-6 | HTTP 500 (server) | EasyEDA backend hiccup | S3 | Low | Partial | Yes (retry) |
| EDA-7 | Renderer hard-hang | a wrong `*.create` signature (esp. arcs) | **S1** | Med | No | Partial (tab reset) |
| EDA-8 | Project won't load | slow sync; corrupted local state | S2 | Low | No | Partial |
| EDA-9 | Standalone-script injection fails | wrong panel; API surface changed | S2 | Med | No | No |
| EDA-10 | Component generation fails | part not found; array-part false match | S2 | Med | Partial | Partial (retry/token) |
| EDA-11 | DOM / API change after update | EasyEDA app version changes method names | S1 | Low | No | No |
| EDA-12 | Unsaved changes lost | crash before `done()`/save | **S1** | Med | No | No |
| EDA-13 | Net-resolver lag after bulk create | reads FLOAT nets too early | S3 | High | Partial | Yes (re-read) |
| EDA-14 | Stale `getAll()` snapshot | read in same eval as a mutation | S3 | High | No | Yes (re-read) |
**Worst offenders:** EDA-7 (renderer hang — can freeze everything, currently
**undetectable** until evals time out) and EDA-12 (unsaved work lost). Both are S1.
The recovery for EDA-7 (browser-level `Target.createTarget`/`closeTarget`) exists but
is not automated.
---
## 3. Browser Automation (Chrome + CDP)
| ID | Failure | Cause | Sev | Lk | Det? | Rec? |
|---|---|---|---|---|---|---|
| BR-1 | Chrome won't launch | binary missing; bad flags | S2 | Med | Partial | No |
| BR-2 | Can't attach to `:9222` | port busy; Chrome not in debug mode | S2 | Med | Partial | Partial |
| BR-3 | Profile launches logged out | fresh profile; keyring-bound cookies | S2 | High | No | No |
| BR-4 | `Singleton` lock blocks launch | previous Chrome not closed | S2 | High | Partial | Yes (`rm Singleton*`) |
| BR-5 | Edit-lock from two windows | two sessions on same cloud project | **S1** | Med | No | Partial |
| BR-6 | Session lost mid-run | Chrome crashed / closed | S2 | Med | Partial | Partial (relaunch) |
| BR-7 | Wrong tab targeted | multiple editor tabs open | S3 | Med | No | Partial |
| BR-8 | Chrome/CDP version mismatch | Chrome auto-updated | S3 | Low | No | No |
| BR-9 | Generic devtools MCP won't attach | it spawns its own browser | S2 | Med | No | N/A (use raw CDP) |
| BR-10 | Profile clone wiped on reboot | `/tmp`-style clone location | S3 | Med | No | Yes (re-rsync) |
**Key gap:** BR-3 and BR-5 are high-impact and poorly detected. The launch recipe has
many implicit preconditions with no verification — a [preflight browser
check](DEPENDENCY_VALIDATION.md) should confirm "one editor tab, logged in, attached"
before any automation runs.
---
## 4. KiCad
| ID | Failure | Cause | Sev | Lk | Det? | Rec? |
|---|---|---|---|---|---|---|
| KI-1 | PADS export fails / empty | board not fully placed; wrong export | S2 | Med | Partial | Partial |
| KI-2 | Import drops footprints | unmapped footprints; format quirk | S2 | Med | Yes (count) | Partial |
| KI-3 | Mounting holes lost on import | live on a layer PADS doesn't carry | S3 | High | Yes | Yes (restore) |
| KI-4 | Broken netlist after import | net names not carried | S2 | Low | Yes | No |
| KI-5 | `kicad-cli` missing / wrong version | not installed; API changed across majors | S2 | Med | Partial | No |
| KI-6 | **Phantom DRC** (no `.kicad_pro`) | bare board reports default rules as clean | **S1** | High | No | Yes (`drc.sh`) |
| KI-7 | `pcbnew` Python plugin fails | stale handles after mutation; API change | S2 | Med | Partial | No |
| KI-8 | Version incompatibility (KiCad 7 vs 8+) | file/format/API differences | S2 | Low | No | No |
**KI-6 is the single most dangerous silent failure in the toolchain:** a board can
report "0 DRC errors" while being unmanufacturable, purely because the ruleset
sidecar was missing. `drc.sh` already guards this — the fix is to make `drc.sh` the
**only** allowed DRC path (never bare `kicad-cli`).
---
## 5. Automation Scripts (Node.js / Python)
| ID | Failure | Cause | Sev | Lk | Det? | Rec? |
|---|---|---|---|---|---|---|
| SC-1 | Unhandled exception | no try/catch; unexpected data shape | S2 | High | Partial | No |
| SC-2 | Missing dependency / broken import | package not installed | S2 | Med | Partial | No |
| SC-3 | Timeout with no result | slow API; hung eval | S2 | Med | Partial | Partial (retry) |
| SC-4 | Infinite loop / never returns | bad exit condition; waiting on a hang | S2 | Low | No | No |
| SC-5 | Memory growth over long run | accumulating snapshots | S3 | Low | No | No |
| SC-6 | Retry exhaustion | transient error persists past max tries | S2 | Med | Partial | No (escalate) |
| SC-7 | Silent wrong result | error swallowed; returns stale/empty | **S1** | Med | No | No |
| SC-8 | Non-idempotent re-run | re-running duplicates parts/wires | S2 | Med | No | Partial |
**SC-7 is the quiet killer:** a script that swallows an error and returns an
empty/stale result looks like success. The self-healing design mandates the
`{ok:false, err}` envelope everywhere so a failure is *data*, not a silent gap.
---
## 6. State, Resume & Data-Loss
| ID | Failure | Cause | Sev | Lk | Det? | Rec? |
|---|---|---|---|---|---|---|
| ST-1 | Uncommitted geometry lost | crash/pivot before commit | **S1** | Med | No | No |
| ST-2 | Interrupted session | VS Code/PC closed mid-phase | S2 | Med | Partial | Partial |
| ST-3 | Stale manifest vs live board | `project.yaml` not updated | S2 | Med | No | Partial |
| ST-4 | Prior-session note treated as truth | stale summary acted on | S3 | Med | Partial | Yes (verify) |
| ST-5 | Redoing completed work on resume | no checkpoint record | S3 | Med | No | Yes (design) |
**ST-1 is the same class of failure that lost two finished boards on the origin
project.** The mitigation (commit geometry immediately; the manifest records the
checkpoint) is a governance rule that the resume system must enforce mechanically.
---
## 7. Schematic Layout Limitations (a known, structural weakness)
Script-generated schematics are **electrically correct but not perfectly aligned.**
This is a real, documented limitation — worth stating plainly for engineers.
**Why it exists:**
- The EasyEDA script API places symbols at coordinates you compute, but it exposes
**no auto-layout / auto-arrange** and no reliable per-symbol bounding metrics until
after placement — so the generator uses a fixed tile grid, not a router-aware
layout.
- Wire routing between symbols is by **net name**, not drawn geometry, so the visual
wires are short stubs, not tidy orthogonal buses.
- Designator text and symbol sizes vary by part; the grid can't perfectly
pack mixed sizes without measured bboxes, which are stale right after creation.
**Consequence:** the schematic reads correctly to the AI (net-by-net) and passes ERC,
but a human may want to nudge blocks for readability. **This is cosmetic (S3), never
electrical** — the audit (Phase 5) guarantees connectivity regardless of layout.
**Improvement options** (evaluated in [ROADMAP.md](ROADMAP.md)): a post-generation
measured-bbox pass to de-collide symbols; a per-block "tidy" that snaps to a bus
grid; or accepting the limitation and exporting a clean layout from KiCad's schematic
editor instead. None are blocking; all are S3 polish.
---
## Top-10 risks (prioritized)
| Rank | ID | Risk | Sev | Why it's top |
|---|---|---|---|---|
| 1 | KI-6 | Phantom DRC (clean-looking, unmanufacturable board) | S1 | silent, high-likelihood, ships bad boards |
| 2 | ST-1 | Uncommitted geometry lost | S1 | already caused real losses |
| 3 | EDA-7 | Renderer hard-hang | S1 | undetectable; freezes everything |
| 4 | EDA-12 | Unsaved EasyEDA work lost | S1 | crash before save |
| 5 | SC-7 | Silent wrong result (swallowed error) | S1 | looks like success |
| 6 | EDA-1/2 | EasyEDA session expiry | S2 | high-likelihood, blocks a phase |
| 7 | ENV-6 | Non-Linux OS assumptions | S2 | blocks new users on Win/mac |
| 8 | BR-3/5 | Logged-out profile / edit-lock | S2 | blocks automation, poorly detected |
| 9 | ENV-1..9 | Missing dependencies (no preflight) | S2 | first-run wall for beginners |
| 10 | ST-2/5 | Interrupted session, no clean resume | S2 | redone work, confusion |
The roadmap builds the fixes in this order.
7315b96d0This file is pinned to the selected release. Download the original to open it in your design tool.