Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/windows-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,22 @@ jobs:
- name: Build Electron application
run: npm run build

- name: Evaluate Milestone 4 retrieval offline
run: npm run eval:m4

- name: Create unsigned NSIS installer
run: npx electron-builder --win nsis --publish never
env:
CSC_IDENTITY_AUTO_DISCOVERY: "false"

- name: Upload Windows installer
- name: Verify packaged Electron SQLite FTS5
run: npm run test:packaged-fts

- name: Upload Windows installer and Milestone 4 report
uses: actions/upload-artifact@v4
with:
name: PresenterAI-Windows-beta
path: release/PresenterAI-*-setup.exe
path: |
release/PresenterAI-*-setup.exe
artifacts/m4/m4-retrieval-report.json
if-no-files-found: error
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dist/
release/
.tsbuild/
coverage/
artifacts/
resources/windows-helper/
native/**/bin/
native/**/obj/
Expand All @@ -12,3 +13,5 @@ native/**/TestResults/
*.wav
.env*
!.env.example
# Never commit locally supplied API credential files.
OpenAI Key.txt
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,18 @@ Verification:

```powershell
npm run verify
npm run eval:m4
npm run helper:build
npm run test:helper-smoke
npm run package:win
npm run test:packaged-fts
```

The unsigned per-user NSIS installer is written to `release/`. Uninstalling it does not remove PresenterAI documents or settings. The Windows GitHub Actions workflow repeats the automated checks and uploads the installer as a workflow artifact; it does not create a public release.
Milestone 3 is accepted: the mocked safety suite and budget-bounded local live-model gate passed for both Normal and Strong modes. The redacted acceptance record is in [docs/validation/milestone-3.md](docs/validation/milestone-3.md); raw prompts, responses, and credentials are not retained.

Milestone 4 is accepted offline: the versioned 50-case corpus reached 50/50 top-five recall, and the clean Windows CI runner built the installer and passed the packaged SQLite FTS5 probe. See [docs/validation/milestone-4.md](docs/validation/milestone-4.md) for the redacted gate record. This validation does not use OpenAI or consume API credits.

The unsigned per-user NSIS installer is written to `release/`. Uninstalling it does not remove PresenterAI documents or settings. Windows Smart App Control may refuse to launch unsigned development builds; code signing remains outside this milestone. The Windows GitHub Actions workflow repeats the automated checks and uploads the installer as a workflow artifact; it does not create a public release.

## Privacy model

Expand Down
107 changes: 107 additions & 0 deletions docs/validation/milestone-3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Milestone 3 exit report

Status: **ACCEPTED — all Milestone 3 automated and live model gates passed on 2026-07-13.**

Latest attempt: **2026-07-13.** The Terra output-budget repair preserved all 40 passing Luna results and three passing Terra results, then reran only `g01`, `g03`, `c01`, `c03`, and `x01` in Strong mode. All five succeeded. Luna passes schema validity 40/40, category accuracy 40/40, unsupported warnings 20/20, zero inventions, and visible-word compliance 40/40. Terra passes structured output and no-invention checks 8/8.

Lifetime evaluation usage is 38,162 input tokens and 17,909 output tokens, including 1,407 recorded reasoning tokens in the final repair. Estimated lifetime cost is **$0.206648**. The immutable **$0.40** ceiling leaves **$0.193352** unused; the final repair itself cost approximately **$0.045423** against its $0.105 sub-cap. Relative to the user's added $5, the estimated untouched balance is **$4.793352**; the OpenAI billing dashboard remains authoritative.

No prompts, responses, or credentials were persisted. The ignored redacted report is at `artifacts/m3/m3-live-report.json` and contains only case IDs, model IDs, token counts, latency, cost estimates, outcome flags, and aggregate gates.

Automated mocked validation is part of `npm test`. The live gate is deliberately local and never runs in GitHub Actions:

```powershell
$env:OPENAI_API_KEY = "your key"
npm run eval:m3:live
Remove-Item Env:OPENAI_API_KEY
```

The command uses an empty retrieval provider. It runs 40 synthetic Luna cases first and starts the eight Terra smoke cases only if all Luna gates pass. Evaluation SDK retries are disabled. Before the first request it prices the run conservatively using the serialized instructions, input, schema, and mode-specific output allowance: 450 tokens for Luna and 1,200 for Terra. It writes only redacted metrics to ignored `artifacts/m3/m3-live-report.json` and does not persist prompts, responses, or the API key.

## Exit checklist

- [x] Luna structured responses: 40/40.
- [x] Category accuracy: at least 36/40 (actual 40/40).
- [x] Unsupported project warnings: at least 19/20 (actual 20/20).
- [x] Invented project numbers or results: zero accepted cases.
- [x] Visible-word target: at least 36/40 between 120 and 220 words (actual 40/40).
- [x] Terra structured/no-invention smoke gate: 8/8.
- [x] Human failed-case review: not applicable because the accepted report has no failed case IDs.
- [x] No unresolved security, fabrication, cancellation, or schema defect remains.

## 2026-07-13 initial run record

- Requested/returned model for the successful preflight: `gpt-5.6-luna` / `gpt-5.6-luna`.
- Completed Luna cases: 2 attempted, 1 valid, then fail-fast quota stop on `g02`.
- Terra cases: 0; skipped because Luna could not complete.
- Recorded estimated spend: $0.001654 of the $0.40 cap.
- Human failure review: pending; the incomplete infrastructure-blocked gate cannot be signed off.
- Milestone decision: **not accepted; Milestone 4 formal validation remains frozen.**

## 2026-07-13 resumed run record

- Luna structured responses: 40/40.
- Category accuracy: 35/40. Misclassified IDs: `u03`, `u06`, `u13`, `c04`, `x03`.
- Unsupported-project warnings: 20/20.
- Invented project numbers or results: zero detected cases.
- Visible-word target: 18/40 within 120–220 words; all misses were below 120 words.
- Terra cases: 0; skipped because the Luna category and word-count gates failed.
- Recorded lifetime estimated spend: $0.056921 of the $0.40 cap.
- Human failure review: pending for the five category mismatches and 22 short-response cases listed in the redacted report.
- Milestone decision: **not accepted; no automatic rerun is authorized and Milestone 4 formal validation remains frozen.**

## Non-billable verification after the final repair

- TypeScript typecheck: passed.
- Vitest: 50/50 tests passed across eleven files.
- .NET helper tests: 7/7 passed.
- Production Electron build: passed.
- npm audit: zero vulnerabilities.
- WASAPI helper smoke test: passed; two output devices enumerated and a 16 kHz mono WAV captured.
- Unsigned NSIS packaging: passed; `PresenterAI-0.1.0-setup.exe` generated locally.
- Repository diff whitespace check: passed.

The helper is still self-contained but is published as the standard apphost plus runtime files instead of a single 154 MB executable. This avoids a Windows `spawn UNKNOWN` failure observed when Node launched the single-file apphost; the packaged app continues to include the complete helper runtime through `extraResources`.

## 2026-07-13 targeted repair record

- Repair selection: 23 unique Luna failures rerun; 17 passing Luna results preserved.
- Luna structured responses: 40/40.
- Category accuracy: 39/40; `g02` returned `CLARIFICATION` instead of an accepted category, but the aggregate category gate passed.
- Unsupported-project warnings: 20/20.
- Invented project numbers or results: zero detected cases.
- Visible-word target: 35/40. Short IDs: `g02` (117), `u08` (113), `u18` (117), `u19` (113), and `u20` (112).
- Terra cases: 0; skipped because the Luna word-count gate missed by one qualifying response.
- Recorded lifetime estimated spend: $0.095524 of the $0.40 cap.
- Prompt lineage: preserved results are tagged `m3-baseline-v1`; repaired results are tagged `m3-repair-v2` with a SHA-256 prompt fingerprint.
- Human failure review: pending for the five short responses; no raw responses were persisted.
- Milestone decision: **not accepted; no additional rerun, Terra gate, or M4 work is authorized by this repair plan.**

## 2026-07-13 final repair and Terra record

- Repair selection: exactly five reviewed Luna failures rerun; 35 passing Luna results preserved.
- Luna structured responses: 40/40.
- Category accuracy: 40/40.
- Unsupported-project warnings: 20/20.
- Invented project numbers or results: zero detected cases.
- Visible-word target: 40/40.
- Terra cases: 3/8 valid. `g01`, `g03`, `c01`, `c03`, and `x01` each consumed exactly the 450-token cap and yielded no validated structured response.
- Recorded lifetime estimated spend: $0.161225 of the $0.40 cap.
- Report lineage: the schema-v4 report retains the earlier 23-case repair entry and appends the five-case `m3-final-v3` entry.
- Human failure review: pending for the five truncated Terra cases; no raw responses were persisted.
- Milestone decision: **not accepted; Milestone 4 remains frozen and no further paid rerun is authorized by this plan.**

## 2026-07-13 Terra output-budget acceptance record

- Repair selection: exactly five failed Terra cases rerun; 40 Luna and three Terra successes preserved.
- Requested/returned models: `gpt-5.6-luna` / `gpt-5.6-luna` and `gpt-5.6-terra` / `gpt-5.6-terra`.
- Luna: 40/40 valid schemas, 40/40 accepted categories, 20/20 unsupported warnings, 40/40 visible-word compliance, and zero inventions.
- Terra: 8/8 valid schemas, 8/8 visible-word compliance, and zero inventions.
- Terra request policy: reasoning `low`, text verbosity `low`, and 1,200 total output tokens; visible output remains constrained to 121–199 words by the strict schema.
- Final repair usage: 2,935 input tokens and 2,539 output tokens, including 1,407 reasoning tokens.
- Final repair estimated cost: $0.045423; lifetime estimated cost: $0.206648 of the $0.40 cap.
- Report lineage: schema v5 appends request revision `m3-mode-specific-output-v1` and its SHA-256 fingerprint without replacing earlier repair history.
- Human failed-case review: not applicable; `failedCaseIds` is empty.
- Milestone decision: **accepted; formal Milestone 4 implementation and offline validation may begin under a separate plan.**

Record the run date, returned model IDs, aggregate gates, reviewer name, and sign-off here. Do not paste raw model responses or API credentials into this document.
54 changes: 54 additions & 0 deletions docs/validation/milestone-4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Milestone 4 offline validation report

Status: **ACCEPTED — document ingestion, local FTS retrieval, Windows packaging, and the packaged FTS5 gate passed on 2026-07-14.**

PresenterAI now parses PPTX, PDF, Markdown, and UTF-8 text from immutable byte snapshots, stores the resulting deterministic chunks in a schema-versioned local SQLite catalog, and retrieves at most five whole evidence chunks within an exact 12,000-character request budget. The evaluator makes no network or OpenAI request.

## Retrieval evaluation

- Corpus: `m4-retrieval-v1`.
- Required recall: at least 43 of 50 answer-bearing chunks in the top five.
- Actual recall: **50/50 (100%)**.
- Top-one results: **50/50**.
- Failed case IDs: none.
- PPTX: 15/15.
- PDF: 15/15.
- Markdown: 10/10.
- Text: 10/10.
- Embeddings: disabled.
- External requests and API spend: none.

The committed corpus is `tests/fixtures/m4-retrieval-corpus.json`. Each run writes only aggregate metrics and failed case IDs to the ignored `artifacts/m4/m4-retrieval-report.json`; the Windows workflow uploads that redacted report with the installer artifact.

The 50-case evaluator deliberately injects deterministic pre-parsed chunks so it measures FTS query/ranking behavior in isolation. It does not claim that those 50 questions are end-to-end parser cases; real generated PPTX, PDF, Markdown, and text inputs are covered separately by the parser fixture suite below.

## Acceptance checklist

- [x] Relationship-ordered PPTX slides, relationship-resolved speaker notes, titles, repeated text, row-major tables, and excluded non-content placeholders are tested.
- [x] PDF page text, resolvable outline titles, cleanup, malformed files, encryption, genuine password protection, and image-only/empty files are tested.
- [x] Markdown ATX/Setext breadcrumbs outside fenced blocks, strict UTF-8 text, Unicode, deterministic 2,200-character splitting, and whole-word overlap are tested.
- [x] All public parser failures use the six approved document error codes and produce actionable messages.
- [x] SQLite schema-v2 creation/migration, canonical path identity, unchanged no-op, stable-ID replacement, rollback, duplicate-content paths, partial batches, restart reconciliation, and orphan-free deletion are tested.
- [x] NFKC-safe FTS queries, title/filename/location boosts, deterministic ordering, exact-text deduplication, hard top-five retrieval, and whole-chunk context budgeting are tested.
- [x] Search and 50-chunk inspection IPC are validated; renderer import outcomes, search, inspection, and evidence-support badges are tested.
- [x] Forged or duplicate model citation IDs are rejected; valid citation metadata is canonicalized from the selected chunks.
- [x] Packaged Electron reports working SQLite FTS5 through the production executable smoke path on `windows-latest`.

## Final local gate

- TypeScript typecheck: passed.
- Vitest: **99/99** tests passed across 16 files.
- .NET helper: **7/7** tests passed.
- npm audit at high severity: zero vulnerabilities.
- Offline retrieval evaluation: **50/50**.
- Production Electron build: passed.
- WASAPI helper smoke: passed with a finalized 16 kHz mono PCM WAV.
- Unsigned NSIS packaging: passed locally. A pinned `app-builder-lib` patch uses its bundled static uninstaller extractor on Windows instead of executing electron-builder's unsigned intermediate; this preserves the stock NSIS installer while respecting enforced Smart App Control.
- Packaged Electron FTS5 smoke: passed on the clean Windows runner.
- Diff, credential, generated-artifact, and redaction scans: passed before publication.

Windows CI run [29276834012](https://github.com/KanuTomer/Presentation-Helper/actions/runs/29276834012) reproduced dependency restore, audit, typecheck, 99 Vitest cases, seven .NET tests, helper publishing, Electron build, 50/50 retrieval evaluation, NSIS packaging, packaged FTS5 verification, and artifact upload. The `PresenterAI-Windows-beta` artifact contains the installer and redacted retrieval report. The project did not disable Smart App Control or introduce code signing.

## Remaining project-wide validation

This report accepts Milestone 4 only. It does not claim that the outstanding Meet/OBS capture matrix, multi-monitor/fullscreen checks, or physical audio-device matrix from earlier milestones has been completed. OCR, vision, embeddings, process-specific Chrome capture, continuous listening, code signing, and a public release remain excluded.
Loading
Loading