Commit Graph
11 Commits
Author SHA1 Message Date
cflmy 5740362880 test: finalize reader snapshots against the published Core 2026-11-24 14:22:14 +08:00
cflmy a482df80be feat: preview and download selected results from the reader 2026-11-24 14:03:27 +08:00
cflmy 790c158db0 test: replay a nonterminal frame before forcing Chromium reconnect 2026-11-22 21:40:11 +08:00
cflmy d000bc1ac9 test: assert typed results under the reader CSP 2026-11-22 21:03:46 +08:00
cflmy 6c9aca975a test: exercise installed View calls and real Chromium reconnect 2026-11-22 21:02:09 +08:00
cflmy 807c24b952 feat(PR-05): Trace provenance annotations, grouped chips and stale semantics
- mark static anchors data-annotation-source=analysis and observed run chips
  data-annotation-source=trace with run seq/kind; group events per source anchor
  into one chip (>3 events collapse to ×N with a truthful title)
- add controller tests for source edits during a run (stale=true and all
  anchors/source ids null), mismatched Trace digest (run succeeds,
  trace.status=invalid, no events) and truncated Trace (event_budget preserved)
- ADR-0010 records the annotation/staleness strategy and the allowed inline-chip
  degradation instead of SVG curves
- extend browser suite with provenance/grouping assertions and dark-theme run
  screenshot; record PR-05 evidence (real Chromium, RFC width matrix)
- unit 63 + contract 41 + integration 43 + security 11 pass; clippy clean
2026-11-22 14:36:09 +08:00
cflmy 046834bcb6 feat(PR-04): SSE execution loop, 7-route server and session security
- replace src/server.rs with src/server/{mod,routes,security,sse}.rs implementing
  exactly the RFC-0002 §6.2 routes: GET /, GET /file, GET /assets, GET
  /api/documents, POST /api/runs, GET /api/runs/{id}/events, POST
  /api/runs/{id}/cancel; old /api/health, /api/document, /api/run and
  /api/clear-run are gone (404)
- SSE writes the event-stream directly to the socket and flushes every frame and
  heartbeat (tiny_http's chunked writer would delay frames); Last-Event-ID
  replay or authoritative snapshot, 128-event ring, terminal close, heartbeat
  comments, at most two observers per run, no polling route
- per-session HttpOnly SameSite=Strict cookie + X-View-CSRF, exact same-origin
  Origin, loopback Host, Sec-Fetch-Site cross-site rejection, JSON-only 64 KiB
  run POSTs; cancel is an authenticated bodyless control POST
- reader.js: Analysis-driven function form with text-only command preview,
  pure/project mode + explicit fs grants with second confirmation, one POST then
  EventSource, cancel, live result/stdout/stderr/Trace panel and keyed source
  anchors (skipped when stale); no innerHTML of CLI data and no status polling
- render: hidden live run shell, generic explicit-run dialog, function call
  buttons carrying Analysis function ids/params, data-analysis-digest/document
  attributes; remove the old run-confirm dialog and run-page reload path
- add tests/security/ suite, rewrite HTTP/SSE integration tests, update browser
  suite for EventSource/dark theme/RFC width matrix (incl. 2048x1133)
- ADR-0009 + docs/evidence/PR-04 with real Chromium log/screenshots and a real
  frozen-CLI SSE run (285 Trace v2 events, CLI SHA unchanged)
- unit 63 + contract 41 + integration 40 + security 11 pass; clippy clean
2026-11-22 14:30:40 +08:00
marqdo-view dev d641ca58ac feat(PR-06): one-command frozen-CLI acceptance, evidence and final docs
- tools/acceptance.sh: RFC §18.1 end-to-end acceptance against the frozen CLI
  release archive in an isolated tool home (build/test/bundle/archive-install/
  view help/verify/export/browse/explicit CSRF run/export+security+browser
  suites/CLI SHA check) and generation of docs/evidence/<CLI-SHA>/manifest.json
- tools/test-contract.sh + .woodpecker.yml CI lanes (remote CI unverified)
- docs/ACCEPTANCE.md gate table (P0 all PASS; U-01/U-04 honestly PARTIAL),
  docs/audits/protocol-conformance.md, ADR-0006 documented RFC deviations
- unicode/CRLF/duplicate-text examples + frozen goldens + tests (S-04)
- presentation degradation matrix tests (S-05..S-07), hostile-stdout escaping
  test (X-05), keyboard accessibility browser checks (U-03)
- final README/STATUS/COMPATIBILITY/CHANGELOG with honest limitations
2026-11-22 12:06:45 +08:00
marqdo-view dev 1f34daffb0 feat(PR-05): pure static export and hardened Live boundary
- export.rs: marqdo view export PATH --out DIR through the same ReaderRenderer;
  index.html + pages/<relative>.html + hash-named assets + manifest.json
- export never calls Core run; refuses output inside project root and unrelated
  non-empty dirs; staging + atomic rename replaces only prior View exports
- offline by construction: embedded asset bytes, data-URI images, relative
  links, no remote subresources; --no-annotations hides anchors only
- HTTP hardening: max 32 concurrent requests (503), detail-free public error
  JSON/pages (no absolute paths/subprocess text), 30s page check budget
- tools/test-export.sh (manifest hashes + file:// Chromium offline check),
  tools/test-security.sh, adversarial security-project browser fixture
- tests/export.rs export contracts; ADR-0005; docs updated
2026-11-22 11:52:22 +08:00
marqdo-view dev 9a80272b5f feat(PR-03): browser acceptance and visual evidence for the single reader theme
- real Chromium (Playwright) suite against the frozen core: one CSS/one script,
  zero external requests, zero console errors, document/source switch, local
  search, settings, 7 viewport widths (390..2560) without overflow or dock
  clipping, no-JS readability, print mode, explicit run + clear
- tools/test-browser.sh starts Live servers on examples/welcome and
  examples/control-flow, verifies core SHA-256 unchanged
- screenshots committed under docs/evidence/PR-03 (Welcome 1664x920 / 390x844,
  real Trace run page); pixel-level manual comparison marked UNVERIFIED
- meta CSP drops the ignored frame-ancestors directive (HTTP header keeps it)
2026-11-22 11:43:59 +08:00
marqdo-view dev df1cf9ec24 feat(PR-04): explicit-run flow, Trace v2 validation and run visualization
- trace.rs: strict Trace v2 validation (schema/product/root_id/analysis_digest,
  known module ids, increasing seq, span bounds) + run states and anchor summaries
- POST /api/run: explicit confirm, CSRF token, Origin/Host checks, JSON limits,
  pure-only mode, one active run, process-group timeout, in-memory run cache
- POST /api/clear-run: session cache cleanup without touching project files
- server-rendered run panel (escaped stdout/stderr, Core error code, public final
  value only, capped event list, truncation/stale/failure states) and inline chips
  anchored to real statement spans; no per-assignment values or memory claims
- page refresh/open never invokes run (tested 10x); rejected requests never spawn
- real Trace v2 goldens (ok/truncated/arity error) from frozen CLI + contract
  and raw-HTTP tests; ADR-0004; docs updated
2026-11-22 11:38:39 +08:00