|
| 1 | +# PANLL: Complete Project Status, Priority TODO Plan & Thread Decomposition |
| 2 | +# Generated: 2026-02-11 (KEEP UPDATED EACH SESSION) |
| 3 | +# Author: Codex (GPT-5) audit pass |
| 4 | +# Purpose: Single source of truth for what is actually done vs what still needs work |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## HOW TO USE THIS DOCUMENT |
| 9 | + |
| 10 | +Read this document fully before starting new work on PanLL. |
| 11 | +It records: |
| 12 | +- what is genuinely working now, |
| 13 | +- what is claimed but not yet true, |
| 14 | +- what is currently broken, |
| 15 | +- and the next tasks in strict priority order. |
| 16 | + |
| 17 | +Move completed tasks into the TO-DONE section at the bottom as work lands. |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## TABLE OF CONTENTS |
| 22 | + |
| 23 | +1. [Honest Status Assessment](#1-honest-status-assessment) |
| 24 | +2. [What Is Actually Done](#2-what-is-actually-done) |
| 25 | +3. [What Is Claimed But Not Done](#3-what-is-claimed-but-not-done) |
| 26 | +4. [What Is Broken Right Now](#4-what-is-broken-right-now) |
| 27 | +5. [Code Quality & Risk Notes](#5-code-quality--risk-notes) |
| 28 | +6. [Complete Task List (Priority Ordered)](#6-complete-task-list-priority-ordered) |
| 29 | +7. [Thread Decomposition](#7-thread-decomposition) |
| 30 | +8. [TO-DONE (Completed Items)](#8-to-done-completed-items) |
| 31 | +9. [Revision History](#9-revision-history) |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +## 1. HONEST STATUS ASSESSMENT |
| 36 | + |
| 37 | +**Estimated completion: ~76% (not 95%)** |
| 38 | + |
| 39 | +Reasoning: |
| 40 | +- Core TEA modules exist and have unit tests. |
| 41 | +- Tauri backend compiles. |
| 42 | +- Core product loop is not release-ready yet, but frontend ReScript compile now passes. |
| 43 | +- Backend command behavior is partly placeholder logic. |
| 44 | +- Coverage is concentrated in TEA internals, not full application behavior. |
| 45 | + |
| 46 | +### Reality Snapshot (2026-02-11) |
| 47 | + |
| 48 | +| Component | Claimed | Actual | Notes | |
| 49 | +|-----------|---------|--------|-------| |
| 50 | +| Custom TEA runtime | Complete | ~80% | Modules exist, tests pass, but app lifecycle/rendering is still described as partial in tests | |
| 51 | +| Frontend ReScript build | Implied healthy | **Working** | `npm run res:build` passes (warnings only) | |
| 52 | +| Tauri backend commands | Working | ~45% | Commands are wired, but `main.rs` still has TODO placeholder implementations | |
| 53 | +| Event-chain import | Working | ~92% | Parser/update flow is real + panic-attacker integration path now wired | |
| 54 | +| State persistence | Roadmap says TODO | **Implemented** | `src/Storage.res` has load/save/clear via localStorage and is wired from app init/update | |
| 55 | +| Keyboard shortcuts | Roadmap says TODO | **Implemented (core set)** | Ctrl+Shift+L/N/B/W handlers exist in subscriptions | |
| 56 | +| Testing | 36 tests passing | True, improving | TEA tests + panic-attacker event-chain parser tests now pass | |
| 57 | +| Coverage | 87-91% | Misleading headline | Current run: Branch 86.2%, Line 51.4% across only TEA files under test | |
| 58 | + |
| 59 | +--- |
| 60 | + |
| 61 | +## 2. WHAT IS ACTUALLY DONE |
| 62 | + |
| 63 | +Verified in code and/or command execution: |
| 64 | + |
| 65 | +### Architecture & Core |
| 66 | +- Custom TEA modules exist: `src/tea/Tea_Cmd.res`, `src/tea/Tea_Sub.res`, `src/tea/Tea_App.res`, `src/tea/Tea_Render.res`, `src/tea/Tea_Vdom.res`, `src/tea/Tea_Html.res`. |
| 67 | +- Centralized model/message/update/view wiring exists: `src/Model.res`, `src/Msg.res`, `src/Update.res`, `src/View.res`, `src/App.res`. |
| 68 | + |
| 69 | +### Product Features Implemented |
| 70 | +- Event-chain parse/import path implemented in `src/core/EventChain.res` and `src/components/PaneW.res`. |
| 71 | +- File import command path implemented in `src/commands/TauriCmd.res` and update handler (`PaneW(ImportEventChainFile)` in `src/Update.res`). |
| 72 | +- panic-attacker integration added: |
| 73 | + - `Import latest panic-attacker` path (auto-detect latest report in panic-attacker reports dir). |
| 74 | + - `Load panic-attacker Report` path (select report file, convert, import). |
| 75 | + - Backend runs `panic-attack panll` when available and falls back to direct assault-report conversion when binary lacks that subcommand. |
| 76 | +- Anti-crash flow and token gating wired (`src/core/AntiCrash.res`, `src/Update.res`). |
| 77 | +- localStorage persistence implemented and auto-save wired (`src/Storage.res`, `src/App.res`, `src/Update.res`). |
| 78 | +- Keyboard shortcut subscriptions implemented (`src/SubscriptionsFixed.res`). |
| 79 | +- BEAM runtime scaffold implemented in `beam/panll_beam` with protocol-selectable API surface: |
| 80 | + - HTTP via Bandit/Plug (`/healthz`, `/v1/status`) |
| 81 | + - GraphQL via Absinthe (`/graphql`, `/graphiql`) |
| 82 | + - gRPC via `panll.v1.StatusService/GetStatus` |
| 83 | + - Runtime selection via `PANLL_BEAM_APIS` (`http`, `graphql`, `grpc`) |
| 84 | +- Hypatia workflow parsing fixed to read scanner envelope (`.findings`) correctly for counts/severity in `.github/workflows/hypatia-scan.yml`, with explicit `FLEET_GITHUB_TOKEN` gate for cross-repo submission. |
| 85 | +- Runtime stack scaffolding added under `runtime/`: |
| 86 | + - Chainguard-based `Containerfile` for BEAM release |
| 87 | + - `compose.toml` including `svalinn`, `vordr`, `selur`, `rokur`, and `panll` |
| 88 | + - scripts for build/pack/verify via Cerro Torre and selur-compose up/down |
| 89 | + |
| 90 | +### Build/Test Health |
| 91 | +- `deno task test`: **36 passed, 0 failed**. |
| 92 | +- `deno task test:coverage`: Branch **86.2%**, Line **51.4%**, scoped to TEA files in current tests. |
| 93 | +- `npm run res:clean && npm run res:build`: passes (warnings only). |
| 94 | +- `cargo check` in `src-tauri`: passes (with minor unused-variable warnings). |
| 95 | + |
| 96 | +--- |
| 97 | + |
| 98 | +## 3. WHAT IS CLAIMED BUT NOT DONE |
| 99 | + |
| 100 | +### A) Build/Runtime Readiness Claims |
| 101 | + |
| 102 | +| Claim | Reality | |
| 103 | +|------|---------| |
| 104 | +| `v0.1.0 ... 95% complete` (`README.adoc`, `ROADMAP.adoc`) | Frontend now compiles, but release readiness is still overstated due backend stubs + thin integration coverage | |
| 105 | +| Tauri commands "working" | Wired but logic is placeholder in `src-tauri/src/main.rs` | |
| 106 | +| Coverage badge-level confidence | Real app line coverage is low relative to whole codebase; only selected TEA modules are covered | |
| 107 | + |
| 108 | +### B) Roadmap Drift (Needs Cleanup) |
| 109 | + |
| 110 | +Roadmap currently marks these as TODO, but code shows they are already present: |
| 111 | +- State persistence (`src/Storage.res`) |
| 112 | +- Keyboard shortcuts (`src/SubscriptionsFixed.res`, plus docs in `README.adoc`) |
| 113 | + |
| 114 | +### C) "Production Ready" Documentation Drift |
| 115 | + |
| 116 | +- `docs/TEA_GUIDE.md` reports `Status: Production Ready`, but: |
| 117 | + - ReScript build passes, but production-quality integration coverage is still missing. |
| 118 | + - Test files explicitly note missing full lifecycle/render pipeline coverage (`tests/tea_app_test.js`, `tests/tea_render_test.js`). |
| 119 | + |
| 120 | +--- |
| 121 | + |
| 122 | +## 4. WHAT IS BROKEN RIGHT NOW |
| 123 | + |
| 124 | +### 4.1 Panic-Attacker Binary Version Drift |
| 125 | + |
| 126 | +- In this environment, `/var/mnt/eclipse/repos/panic-attacker/target/debug/panic-attack` |
| 127 | + currently exposes older commands only (no `ambush`/`panll` in `--help` output). |
| 128 | +- PanLL integration now handles this by falling back to a local assault-report → event-chain converter in backend (`src-tauri/src/main.rs`), so import still works. |
| 129 | + |
| 130 | +### 4.2 Panic-Attacker Source Build Break |
| 131 | + |
| 132 | +- Building current panic-attacker source fails in `src/report/gui.rs` at `eframe::run_native(...)?` due `eframe::Error` conversion into `anyhow::Error` (`Send`/`Sync`) constraints. |
| 133 | +- This blocks easy validation that newly added source commands are present in a fresh binary. |
| 134 | + |
| 135 | +### 4.3 Source/Test Confidence Gap |
| 136 | + |
| 137 | +- PanLL now has parser/adapter tests for panic-attacker report import, but full app-level UI automation is still missing. |
| 138 | + |
| 139 | +### 4.4 Backend Stubs |
| 140 | + |
| 141 | +- `src-tauri/src/main.rs:18`: TODO Echidna validation. |
| 142 | +- `src-tauri/src/main.rs:31`: TODO real vexation index tracking. |
| 143 | +- `src-tauri/src/main.rs:43`: TODO feedback persistence/transport. |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +## 5. CODE QUALITY & RISK NOTES |
| 148 | + |
| 149 | +- Accessibility gap: no ARIA-related attrs found in `src/` (roadmap "accessibility improvements" still valid). |
| 150 | +- `rescript.json` still uses deprecated `"module": "es6"` (warning on build). |
| 151 | +- Rust devtools setup now avoids `unwrap()` panic on missing window handle. |
| 152 | +- `src/core/AntiCrash.res` contains placeholder logic and TODO integration points for real symbolic checking. |
| 153 | + |
| 154 | +--- |
| 155 | + |
| 156 | +## 6. COMPLETE TASK LIST (PRIORITY ORDERED) |
| 157 | + |
| 158 | +### P0 - Must Fix Before Any "Release Ready" Claim |
| 159 | + |
| 160 | +- [ ] Fix panic-attacker compile failure in `src/report/gui.rs` so current source can build and ship updated CLI commands. |
| 161 | +- [ ] Validate fresh panic-attacker binary command surface (`ambush`, `panll`) and pin compatibility expectations in PanLL docs. |
| 162 | + |
| 163 | +### P1 - Core Functionality Truthfulness |
| 164 | + |
| 165 | +- [ ] Replace placeholder Tauri command logic with real implementations: |
| 166 | + - `validate_inference` should perform real validation semantics. |
| 167 | + - `get_vexation_index` should read actual signal(s), not constant `0.0`. |
| 168 | + - `submit_feedback` should persist/forward feedback. |
| 169 | +- [ ] Add tests for command contracts and error paths (frontend `TauriCmd` + backend command behavior). |
| 170 | +- [ ] Add integration tests for app-level flows (Pane interactions, event-chain import, auto-save/restore). |
| 171 | + |
| 172 | +### P2 - Product Quality & Consistency |
| 173 | + |
| 174 | +- [ ] Update `ROADMAP.adoc` to mark already-shipped items done (state persistence, keyboard shortcuts). |
| 175 | +- [ ] Reconcile status messaging in `README.adoc` and `docs/TEA_GUIDE.md` with actual build state. |
| 176 | +- [ ] Decide TEA strategy: |
| 177 | + - complete migration to official `rescript-tea`, or |
| 178 | + - remove/stop signaling migration if custom TEA remains canonical. |
| 179 | +- [ ] Replace deprecated ReScript module config (`"es6"` -> `"esmodule"`). |
| 180 | + |
| 181 | +### P3 - UX, A11y, Maintainability |
| 182 | + |
| 183 | +- [ ] Accessibility pass: semantic labels/roles/keyboard focus behavior and ARIA where needed. |
| 184 | +- [ ] Expand test coverage beyond TEA internals to component and end-to-end behavior. |
| 185 | +- [ ] Add performance baselines for render/update and event import handling. |
| 186 | + |
| 187 | +--- |
| 188 | + |
| 189 | +## 7. THREAD DECOMPOSITION |
| 190 | + |
| 191 | +### Thread A: Build Integrity |
| 192 | +- Keep CI compile gate green (`res:build`, `deno test`, `cargo check`). |
| 193 | +- Track/resolve new build warnings before release. |
| 194 | + |
| 195 | +### Thread B: Backend Correctness |
| 196 | +- Implement real logic in Tauri commands. |
| 197 | +- Expand backend tests and command-level error handling. |
| 198 | + |
| 199 | +### Thread C: App-Level Testing |
| 200 | +- Add integration tests for key user flows. |
| 201 | +- Extend panic-attacker import coverage from parser/backend tests to UI-level interactions. |
| 202 | + |
| 203 | +### Thread D: Docs & Truthfulness |
| 204 | +- Align README/ROADMAP/TEA_GUIDE with real state. |
| 205 | +- Keep this status file updated each session. |
| 206 | + |
| 207 | +### Thread E: UX/A11y |
| 208 | +- Accessibility audit and remediation. |
| 209 | +- Theme/view-mode polish and consistency checks. |
| 210 | + |
| 211 | +--- |
| 212 | + |
| 213 | +## 8. TO-DONE (COMPLETED ITEMS) |
| 214 | + |
| 215 | +- [x] Custom TEA core modules implemented. |
| 216 | +- [x] 36 Deno tests passing (TEA + panic-attacker parser tests). |
| 217 | +- [x] Event-chain parsing and import flow wired. |
| 218 | +- [x] ReScript compile blockers fixed (`TauriCmd` reserved keyword + `PaneW` array slice labels). |
| 219 | +- [x] panic-attacker integration wired (latest + selected report import, backend conversion fallback, unit test). |
| 220 | +- [x] panic-attacker import backend tests added (latest-file selection + command path). |
| 221 | +- [x] CI build gate added (`.github/workflows/build-validation.yml`) for `res:build`, `deno task test`, and `cargo check`. |
| 222 | +- [x] Full clean frontend rebuild validated (`npm run res:clean && npm run res:build`). |
| 223 | +- [x] localStorage persistence implemented and connected. |
| 224 | +- [x] Keyboard shortcut subscriptions implemented. |
| 225 | +- [x] Tauri backend command plumbing and app boot wiring in place. |
| 226 | +- [x] BEAM API options implemented (HTTP + GraphQL + gRPC) with runtime toggles and tests in `beam/panll_beam`. |
| 227 | +- [x] Hypatia scan workflow fixed for current JSON envelope shape (`findings` array under metadata object). |
| 228 | +- [x] Added runtime stack files for Chainguard + Cerro Torre + selur-compose orchestration. |
| 229 | + |
| 230 | +--- |
| 231 | + |
| 232 | +## 9. REVISION HISTORY |
| 233 | + |
| 234 | +- **2026-02-11:** Initial honest audit created from code + test + build checks. |
| 235 | + Key correction: project is not currently 95% complete due active compile break and backend stubs. |
| 236 | +- **2026-02-11 (update):** panic-attacker integration implemented; ReScript compile blockers fixed; backend fallback conversion + unit test added. |
| 237 | +- **2026-02-11 (update 2):** Added panic-attacker import tests, CI build-validation workflow, validated clean ReScript rebuild, and confirmed panic-attacker source build break (`gui.rs`) still blocks fresh binary verification. |
| 238 | +- **2026-02-11 (update 3):** Added BEAM API runtime (`panll_beam`) with selectable HTTP/GraphQL/gRPC frontdoors; added BEAM tests (`mix test` 5/5); fixed Hypatia workflow parsing to use `.findings` envelope. |
| 239 | +- **2026-02-11 (update 4):** Added `runtime/` stack scaffolding for Chainguard image build, Cerro Torre pack/verify, and selur-compose topology with `svalinn`, `vordr`, `selur`, `rokur`, and PanLL. |
0 commit comments