Skip to content

Commit e331772

Browse files
hyperpolymathclaude
andcommitted
chore: sync deno.lock, opsm-panel + audit docs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 04cbc43 commit e331772

4 files changed

Lines changed: 129 additions & 15 deletions

File tree

PROOF-NEEDS.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# PROOF-NEEDS.md — panll
2+
3+
## Current State
4+
5+
- **src/abi/**: YES — contains `cartridge-schema.json` and `README.md` (no Idris2 files)
6+
- **Dangerous patterns**: 0 in own code (164 references are all in UI display code that shows believe_me/Admitted counts from OTHER repos)
7+
- **LOC**: ~138,000 (ReScript + Rust)
8+
- **ABI layer**: Schema-only, no Idris2 proofs
9+
10+
## What Needs Proving
11+
12+
| Component | What | Why |
13+
|-----------|------|-----|
14+
| Cartridge schema validation | Cartridge loading validates against schema correctly | Malformed cartridges crash panels or produce wrong output |
15+
| PCC constraint propagator | Constraint propagation is sound and complete | PanLL Constraint Checker is the build-time safety net |
16+
| PCC ReScript scanner | Scanner correctly identifies all constraint violations | Missed violations bypass safety checks |
17+
| Verification Dashboard accuracy | Dashboard accurately reflects actual proof state | Displaying wrong verification state gives false confidence |
18+
| Provenance engine | Provenance tracking is complete and unforgeable | Provenance gaps break audit trail |
19+
| Gossamer coprocessor commands | Command dispatch is total (no unhandled commands) | Unhandled commands silently fail |
20+
| Wiring Inspector | Wiring analysis correctly identifies all connections | Missing wires mean broken panel communication |
21+
22+
## Recommended Prover
23+
24+
**Idris2** — Replace schema-only ABI with proper Idris2 types. PCC constraint propagation is a natural fit for formal verification. The Rust PCC tool (`tools/pcc/`) should have soundness proofs.
25+
26+
## Priority
27+
28+
**MEDIUM** — PanLL is the developer panel system. PCC soundness is the highest-value proof (it checks constraints across the ecosystem). The Verification Dashboard must accurately reflect proof state to avoid false confidence.

TEST-NEEDS.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# TEST-NEEDS.md — panll
2+
3+
> Generated 2026-03-29 by punishing audit.
4+
5+
## Current State
6+
7+
| Category | Count | Notes |
8+
|-------------|-------|-------|
9+
| Unit tests | ~20 | JS engine tests: tentacles, network_topology, level_architect, cloudguard, security, ums, automation_router, accessibility, seam, focus_dimming, help, tiling, anti_crash, contractiles, orbital_sync, menu_bar |
10+
| Integration | ~6 | TEA framework: tea_app_test, tea_cmd_test, tea_sub_test, tea_render_test |
11+
| E2E | 0 | None |
12+
| Benchmarks | 0 | Files named "Workbench" are components, NOT benchmarks |
13+
14+
**Source modules:** ~686 ReScript .res files (not counting compiled .res.js). Massive TEA architecture with engines, models, views, components, core modules. Also: 116 Rust files, 15 Elixir, 5 Zig FFI, Idris2 ABI.
15+
16+
## What's Missing
17+
18+
### P2P (Property-Based) Tests
19+
- [ ] TEA Model: property tests for state transition invariants
20+
- [ ] Panel layout: property tests for tiling constraints (no overlapping, no gaps)
21+
- [ ] Network topology: graph property tests (connectivity, acyclicity where required)
22+
- [ ] Security engine: policy evaluation property tests
23+
24+
### E2E Tests
25+
- [ ] Full panel lifecycle: create -> layout -> interact -> resize -> close
26+
- [ ] Multi-panel: open multiple panels, tile, switch focus, close
27+
- [ ] Accessibility: keyboard navigation through all panel types
28+
- [ ] Theme/variant: each visual theme renders correctly
29+
- [ ] Gossamer integration: panel communication round-trips
30+
31+
### Aspect Tests
32+
- **Security:** 1 security_engine_test exists but for 686 modules — ZERO tests for panel isolation, IPC sanitization, plugin sandboxing
33+
- **Performance:** ZERO benchmarks. No render frame budget tests, no panel creation overhead measurement, no memory leak detection for long-running sessions
34+
- **Concurrency:** No tests for concurrent panel operations, WebSocket message ordering, subscription race conditions
35+
- **Error handling:** 1 anti_crash_test exists. No tests for panel crash recovery, malformed IPC messages, subscription failure handling
36+
37+
### Build & Execution
38+
- [ ] ReScript build (686 modules!)
39+
- [ ] JS test runner for tests/
40+
- [ ] Rust cargo test
41+
- [ ] Elixir mix test
42+
43+
### Benchmarks Needed
44+
- [ ] Panel creation/destruction time
45+
- [ ] TEA update cycle latency
46+
- [ ] Render time per panel type
47+
- [ ] IPC message throughput
48+
- [ ] Memory usage per panel count
49+
- [ ] Layout algorithm time vs panel count
50+
51+
### Self-Tests
52+
- [ ] Panel manifest validation
53+
- [ ] TEA framework self-test (model/view/update cycle)
54+
- [ ] Component registry consistency
55+
- [ ] Accessibility compliance check (WCAG)
56+
57+
### CRITICAL GAPS
58+
59+
| Area | Modules | Tests | Coverage |
60+
|------|---------|-------|----------|
61+
| Components (.res) | ~200+ | 0 direct | **0%** |
62+
| Core engines | ~50+ | ~16 | **~32%** |
63+
| Models | ~100+ | 0 direct | **0%** |
64+
| Views | ~100+ | 0 direct | **0%** |
65+
| TEA framework | ~20 | 4 | **20%** |
66+
| Rust crates | 116 files | 0 | **0%** |
67+
68+
## Priority
69+
70+
**CRITICAL.** 686 ReScript modules with ~26 test files is 3.8% coverage. The TEA engine tests are a good start but the component, model, and view layers are completely untested. 116 Rust files with ZERO tests. ZERO benchmarks for a UI framework where performance is user-visible. The "DebuggingWorkbench" and "ExploratoryWorkbench" files in bench results are components, not benchmarks — do not be fooled.
71+
72+
## FAKE-FUZZ ALERT
73+
74+
- `tests/fuzz/placeholder.txt` is a scorecard placeholder inherited from rsr-template-repo — it does NOT provide real fuzz testing
75+
- Replace with an actual fuzz harness (see rsr-template-repo/tests/fuzz/README.adoc) or remove the file
76+
- Priority: P2 — creates false impression of fuzz coverage

deno.lock

Lines changed: 1 addition & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/opsm-panel.html

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,20 +248,38 @@
248248

249249
const panll = window.__panll || null;
250250

251-
// Gossamer IPC helper — invokes opsm-runtime via the shell-exec handler
251+
// IPC helper — invokes opsm_runtime via Gossamer, Tauri, or PanLL bridge
252+
// Tries each runtime in priority order (Gossamer > Tauri > PanLL)
252253
async function opsmInvoke(cmd, tool, version) {
254+
const payload = { cmd };
255+
if (tool) payload.tool = tool;
256+
if (version) payload.version = version;
257+
258+
// 1. Gossamer runtime (preferred)
253259
if (typeof window.__gossamer_invoke === 'function') {
254-
const payload = { cmd };
255-
if (tool) payload.tool = tool;
256-
if (version) payload.version = version;
257260
const result = await window.__gossamer_invoke('opsm_runtime', payload);
258-
// Result is JSON: {output: "...", exit_code: 0}
259261
if (typeof result === 'string') {
260262
try { return JSON.parse(result); } catch(_) { return { output: result, exit_code: 0 }; }
261263
}
262264
return result;
263265
}
264-
throw new Error('Gossamer IPC not available — run PanLL via gossamer dev');
266+
267+
// 2. Tauri runtime (mobile/desktop app)
268+
if (window.__TAURI_INTERNALS__ && window.__TAURI_INTERNALS__.invoke) {
269+
const result = await window.__TAURI_INTERNALS__.invoke('opsm_runtime', payload);
270+
return result;
271+
}
272+
273+
// 3. PanLL IPC bridge
274+
if (panll && typeof panll.invoke === 'function') {
275+
const result = await panll.invoke('opsm_runtime', payload);
276+
if (typeof result === 'string') {
277+
try { return JSON.parse(result); } catch(_) { return { output: result, exit_code: 0 }; }
278+
}
279+
return result;
280+
}
281+
282+
throw new Error('No IPC runtime available — run via PanLL, Gossamer, or Tauri');
265283
}
266284

267285
// --- Tab switching ---

0 commit comments

Comments
 (0)